Opened 12 years ago

Closed 12 years ago

Last modified 12 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 by Michael Niedermayer, 12 years ago

Resolution: invalid
Status: newclosed

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.

in reply to:  1 comment:2 by matteosistisette, 12 years ago

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) and it definitely should be mentioned. Even if one is intelligent enough to note what you noted, how is one supposed to know that it applies to all inputs specified _after_ it and not to all inputs specified _before_ it?

Then the problem is in the documentation, not in the program.

Last edited 12 years ago by matteosistisette (previous) (diff)

comment:3 by Carl Eugen Hoyos, 12 years ago

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.