Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#152 closed defect (invalid)

order of options matters when it shouldn't

Reported by: matteosistisette Owned by:
Priority: important Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


The option -loop_input may be ignored depending on whether it is specified before or after other options. The following commands, which are exactly the same except for the order in which options are specified, produce different result:

ffmpeg -loop_input -shortest -y -i image8.jpg -i sound11.amr -acodec copy -vcodec mjpeg result.avi

-> works as expected, looping the input


ffmpeg -y -i image8.jpg -i sound11.amr -loop_input -shortest -acodec copy -vcodec mjpeg result.avi

-> won't loop the input and will produce a video of one frame, as if the -loop_input option wasn't present.

Change History (3)

comment:1 follow-up: Changed 9 years ago by michael

  • Resolution set to invalid
  • Status changed from new to closed

Actually IMHO the order should matter because you might have -i image1.jpg -i file.avi
and you might want to loop one but not the other.

comment:2 in reply to: ↑ 1 Changed 9 years ago by matteosistisette

You are right, it applies to all inputs specified _after_ it.

However there's no mention whatsoever to this fact in the documentation (I mean the output of ffmpeg -h). Then the flaw is in the documentation, not in the program

Version 0, edited 9 years ago by matteosistisette (next)

comment:3 Changed 9 years ago by cehoyos

All ffmpeg options (applicable to input) apply to the input file that follows the option. And since the same option names can also be used as output options, it would not be possible for the input options to apply to files listed before (you couldn't distinguish between input and output options any more).

Note: See TracTickets for help on using tickets.