#6122 closed enhancement (fixed)
Clarify option on looping infinitely in movie filter
Reported by: | slhck | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | documentation |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
The movie filter currently does not allow infinite input looping via the loop
option.
The loop_count
is decremented with every completed loop and stops at 0.
There should be a way to set the loop
option to -1
which would enable infinite looping.
(I can have a try at this but I'm not sure if there's something that prevents it from being implemented in the filter section.)
Change History (4)
comment:1 by , 8 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 8 years ago
I know I should post usage questions on the mailing list, but this wasn't one. I was sure that this wasn't implemented, because setting loop=-1
gives an error:
ffmpeg -i bbb.mp4 -filter_complex "movie=spinner-256-white.png:loop=-1[spinner]; [0:v][spinner]overlay[out]" -map "[out]" -t 5 out.avi
Output:
ffmpeg version N-83288-gacf1dd5-tessus Copyright (c) 2000-2017 the FFmpeg developers … [movie @ 0x7fb4834015c0] Error setting option loop to value -1. [Parsed_movie_0 @ 0x7fb483401500] Error applying options to the filter. [AVFilterGraph @ 0x7fb483600000] Error initializing filter 'movie' with args 'spinner-256-white.png:loop=-1' Error initializing complex filters. Result too large
The documentation says: "If the value is less than 1, the stream will be read again and again" — and -1 is less than 1. Also, -1 is used for the stream_loop
option to declare "infinite looping", which is why I thought it would work. Setting the option to 0 does work, but then either the documentation needs to be changed to reflect that, or the options for infinite looping should be harmonized by making -1 work in this filtering case as well.
To me, having to set loop=0
to make something loop infinitely just seemed absolutely counterintuitive which is why I didn't even try it.
comment:3 by , 8 years ago
If that's fine for you, you could merge this commit, which clarifies the documentation:
https://github.com/slhck/FFmpeg/commit/ba35ff7f4f970feaa2052b2f07fa60856fdd1caa
(I'm not on the devel mailing list at the moment, and your contribution docs now say it's fine to do this as well.)
comment:4 by , 8 years ago
Component: | avfilter → documentation |
---|---|
Resolution: | worksforme → fixed |
Summary: | Support infinite loops in movie filter → Clarify option on looping infinitely in movie filter |
Fixed in 8addd56554eb240f38abfadb8bedf3ff8efc965a.
Please read the fine documentation again and please remember to post all usage questions on the user mailing list.
https://ffmpeg.org/ffmpeg-filters.html#movie-1