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

Documentation - missing information for ffmpeg options

Open mattia-lecci opened this issue 3 years ago • 0 comments

Problem

I'm trying to add the copyts flag to my filtergraph.

Adding copyts=True or copyts=1 does not work.

Solution

Frome this example, i noticed that shortest=None is used. Trying copyts=None works as expected.

Example code

cmd = ffmpeg.input("myfile.mp4").filter("showinfo").output("-", f="null", copyts=True).compile()
print(" ".join(cmd)) # result: ffmpeg -i myfile.mp4 -filter_complex [0]showinfo[s0] -map [s0] -f null -copyts True -
cmd = ffmpeg.input("myfile.mp4").filter("showinfo").output("-", f="null", copyts=1).compile()
print(" ".join(cmd)) # result: ffmpeg -i myfile.mp4 -filter_complex [0]showinfo[s0] -map [s0] -f null -copyts 1 -
cmd = ffmpeg.input("myfile.mp4").filter("showinfo").output("-", f="null", copyts=None).compile()
print(" ".join(cmd)) # ffmpeg -i myfile.mp4 -filter_complex [0]showinfo[s0] -map [s0] -f null -copyts -

Suggested improvement

Make this clearer from the documentation, examples, readme, etc. If already present, add relevant keywords, e.g., "flag", "option", or popular ffmpeg flags, such as "shortest", "copyts", etc.

mattia-lecci avatar Aug 26 '22 09:08 mattia-lecci