Opened 14 years ago

Closed 14 years ago

Last modified 14 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

Description

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

while

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, 14 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, 14 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). Then the flaw is in the documentation, not in the program

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

comment:3 by Carl Eugen Hoyos, 14 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.