V
V
Valentin2020-05-27 13:01:20
Python
Valentin, 2020-05-27 13:01:20

When using the ffmpeg-python module, what is the correct way to pass the argument to the filter?

When you enter

try:
    stream = ffmpeg.input(f'{source_path}\{g}\{filename}')
    stream = ffmpeg.filter_(stream, "pan", 'mono|c0=c0|')
    #stream = ffmpeg.filter_(stream,"lowpass", '500')
    stream = ffmpeg.output(stream, f'{source_path}\{g}\{filename}_remfreq.wav')
    ffmpeg.run(stream, capture_stdout=True, capture_stderr=True)
except FFmpegError as e:
    print('stdout:', e.stdout.decode('utf8'))
    print('stderr:', e.stderr.decode('utf8'))
    raise e

getting

[Parsed_pan_0 @ 0000026ebc1ace40] Syntax error after channel name in "c0\=c0"
[AVFilterGraph @ 0000026ebc1cfa00] Error initializing filter 'pan' with args 'mono|c0\\\=c0|'
Error initializing complex filters.
Invalid argument

How to make it not 'mono|c0\\\=c0|' and 'mono|c0=c0|' ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question