Opened 5 years ago

Closed 5 years ago

Last modified 5 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 follow-up: Changed 5 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 5 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) 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 5 years ago by matteosistisette (previous) (diff)

comment:3 Changed 5 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.