FFMPEG video overlay loop

I have two videos, one of which is superimposed on the other. The one that overlays lasts only a few seconds, and I want it to continue the loop while the main video is playing. Ive tried everything I can think of, but nothing works in ffmpeg

 ffmpeg -i mainVideo.MTS -vf " movie=overlaid.wmv  [overlay];[in][overlay] overlay=1000:500 [out]" output.mp4

superimposed one on top of the other, but without cycles. Change movie=overlaid.wmvtomovie=overlaid.wmv:loop=0

displays an error message

[movie @ 01B19FC0] The key "loop" was not found. [movie @ 01B19F40] String of error parsing parameters: 'loop = 0' Error initializing filter 'movie' with args 'overlaid.wmv: loop = 0' Error opening filters!

According to ffmpeg docs , a loop is a valid option for a movie. Ive tried 0, 1, 10 as a loop value, but the result is always the same (error)

+5
source share
1 answer

From ffmpeg docs :

Scroll through the input stream. Currently, it only works for image streams ...

Re-loop output for formats that support looping, such as animated GIFs ...

I would recommend you concatenate the video you want to loop several times, and then overlay this video, you can use - t to control the duration of the loop

+2
source

All Articles