#2091 closed defect (invalid)
ffmpeg can easily overwrite lots of video files
Reported by: | forthrin | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
A moment thoughtlessness with filename wildcards can cause ffmpeg to zero out every single video files in the current directory, causing the user to jump out the window or what have you.
How to reproduce:
% ffmpeg -i *.mkv ... output.mp4
*.mkv is expanded to a long list of files, and evidently all of these files (except the first one) are considered to be output files by ffmpeg. They are zeroed out at least.
Possible solutions:
a) Let input files be specified simply by filename (without "-i") and the output file explicitly by "-o".
b) Let all filenames following "-i" be considered to be input files (except the last one, which would be the output file)
c) Simply exit ffmpeg if there are multiple output filenames (doesn't ffmpeg only support one output file anyway?)
Change History (4)
comment:1 by , 12 years ago
Analyzed by developer: | set |
---|---|
Reproduced by developer: | set |
Resolution: | → invalid |
Status: | new → closed |
comment:2 by , 12 years ago
Version: | 1.0.1 → unspecified |
---|
comment:3 by , 12 years ago
Priority: | important → normal |
---|
comment:4 by , 12 years ago
Analyzed by developer: | unset |
---|---|
Reproduced by developer: | unset |
All the proposed changes break the current syntax:
a) different incompatible syntax with the current one
b) this changes the semantics of the command ffmpeg -i IN OUT1 OUT2 to ffmpeg -i IN1 IN2 OUT
c) ffmpeg currently supports multiple outputs, so it should not exit
Truth is that you should be careful when using powerful (and dangerous) features of the shell, there is nothing ffmpeg as a tool can do about that.