ffmpegwrapper icon indicating copy to clipboard operation
ffmpegwrapper copied to clipboard

ffmpegwrapper fails to process files which starts with '-'

Open lxylxy123456 opened this issue 7 years ago • 3 comments

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 --).

lxylxy123456 avatar Jan 04 '18 13:01 lxylxy123456

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.

interru avatar Jan 08 '18 12:01 interru

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.

lxylxy123456 avatar Jan 08 '18 12:01 lxylxy123456

It seems that the problem can be solved by adding "file:" before the file name. Like ffmpeg -i a.mp4 -- file:-b.mp4

lxylxy123456 avatar Jan 21 '18 02:01 lxylxy123456