ffmpegwrapper
ffmpegwrapper copied to clipboard
ffmpegwrapper fails to process files which starts with '-'
from ffmpegwrapper import FFmpeg, Input, Output
When running FFmpeg('ffmpeg', Input('a.mp4'), Output('-b.mp4'))
, ffmpeg gives "Unrecognized option 'b.mp4'."
It seems that the command becomes ffmpeg -i a.mp4 -b.mp4
But the command should be ffmpeg -i a.mp4 -- -b.mp4
to prevent the issue (by adding --
).
If I think about it. That could create problems with multiple inputs/outputs. But well: I never checked if this wrapper could work with multiple inputs and outputs :) The input probably has the same issue.
The input does not have the issue, because -i
is interpreted.
My solution may have problems with mutiple outputs, and I am also wondering about how the problem should be solved in this situation.
It seems that the problem can be solved by adding "file:" before the file name.
Like ffmpeg -i a.mp4 -- file:-b.mp4