Complex Filter syntax giving me escape key errors in ffmpeg-python, works at command line
(I'm trying to extract a single audio channel from a stereo stream.)
This works at command line:
ffmpeg -i gettysburg4st.mov -filter_complex "[0:a:1]pan=1|c0=2*c1" -ac 1 8st.wav
but in python I can't figure it out. Here's one of 1000 variations i've tried:
video = ffmpeg.input("gettysburg4st.mov")
channel = video.filter_('pan', f"mono=[0:1]pan=[0:a:1]pan=1|c0=2*c1")
output = ffmpeg.output(channel, 'gburg4.wav')
ffmpeg.run(output)
I get this error:
[Parsed_pan_0 @ 0x13363c200] Invalid channel layout 'mono\=[0\:1]pan\=[0\:a\:1]pan\=1'
[AVFilterGraph @ 0x13363fb80] Error initializing filter 'pan' with args 'mono\\\=[0\\\:1]pan\\\=[0\\\:a\\\:1]pan\\\=1|c0\\\=2*c1'
What am I missing?