Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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


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 Changed 7 years ago by saste

  • Analyzed by developer set
  • Reproduced by developer set
  • Resolution set to invalid
  • Status changed from new to closed

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.

comment:2 Changed 7 years ago by cehoyos

  • Version changed from 1.0.1 to unspecified

comment:3 Changed 7 years ago by cehoyos

  • Priority changed from important to normal

comment:4 Changed 7 years ago by cehoyos

  • Analyzed by developer unset
  • Reproduced by developer unset
Note: See TracTickets for help on using tickets.