ffmpeg-python icon indicating copy to clipboard operation
ffmpeg-python copied to clipboard

Can't pass value-less options?

Open ceptonit opened this issue 6 years ago • 4 comments

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.

ceptonit avatar Jun 14 '19 03:06 ceptonit

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.

kkroening avatar Jun 29 '19 16:06 kkroening

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!

AGresvig avatar Mar 19 '20 21:03 AGresvig

There is an example about this: Mono to stereo with offsets and video

There, shortest=None is used.

Maybe this could be made more explicit, otherwise the issue could be closed.

mattia-lecci avatar Jan 25 '23 10:01 mattia-lecci

I, too, tried y=True before finding the answer here.

wpchen avatar Aug 27 '24 05:08 wpchen