Ffmpeg-python: Can't pass value-less options?

Created on 14 Jun 2019  路  2Comments  路  Source: kkroening/ffmpeg-python

Some ffmpeg options don't take any values.
In this example '-an' (it's the disable audio option).
So how can we pass them on?

with: input_stream = ffmpeg.input('input.mp4')

I tried:
output_stream = ffmpeg.output(input_stream, 'output.mp4', 'an')
output_stream = ffmpeg.output(input_stream, 'output.mp4', an='')
output_stream = ffmpeg.output(input_stream, 'output.mp4', **{'an': ''})

None of the 3 worked.

answered enhancement question

Most helpful comment

Try an=None.

We should probably add an example of that in the readme. And also add support for an=True, as I think that might be more intuitive.

All 2 comments

Try an=None.

We should probably add an example of that in the readme. And also add support for an=True, as I think that might be more intuitive.

And also add support for an=True, as I think that might be more intuitive.

Just as a note, I tried an=True just out of intuition
an=None worked though!

Was this page helpful?
0 / 5 - 0 ratings