user22976: I'm trying to superimpose a transparent video on another video. If the original video has a longer duration than the transparent video, then the transparent video should be looped until the end of the original video.
I wrote the following operation, but the transparent video does not repeat.
How can I change this ffmpeg command to make the overlay video loop?
-i preresult.mp4 -c:v libvpx-vp9 -i Overlay.webm -filter_complex ""[1]loop=0,setpts=N/FRAME_RATE/TB[bg];[0][bg]overlay=shortest=1:x=(W-w)/2:y=(H-h)/2"" -preset ultrafast output.mp4


user1871: If you're using a recent git build, use stream_loop and drop the loop filter:
-stream_loop -1 -c:v libvpx-vp9 -i Overlay.webm -filter_complex "[0][1]overlay=...

For older builds, you'll have to supply the loop filter with full details,
[1]loop=-1:C:0,setpts=N/FRAME_RATE/TB[bg]

where C is a value greater than the frame count of the file.

22976: <p>I'm trying to superimpose a transparent video on another video. If the original video has a longer duration than the transparent video, then the transparent video should be looped until the end of the original video.
I wrote the following operation, but the transparent video does not repeat.
How can I change this ffmpeg command to make the overlay video loop?</p>

<pre><code>-i preresult.mp4 -c:v libvpx-vp9 -i Overlay.webm -filter_complex ""[1]loop=0,setpts=N/FRAME_RATE/TB[bg];[0][bg]overlay=shortest=1:x=(W-w)/2:y=(H-h)/2"" -preset ultrafast output.mp4
</code></pre>
 1871: <p>If you're using a recent git build, use stream_loop and drop the loop filter:</p>

<pre><code>-stream_loop -1 -c:v libvpx-vp9 -i Overlay.webm -filter_complex "[0][1]overlay=...
</code></pre>

<p>For older builds, you'll have to supply the loop filter with full details,</p>

<pre><code>[1]loop=-1:C:0,setpts=N/FRAME_RATE/TB[bg]
</code></pre>

<p>where <code>C</code> is a value greater than the frame count of the file.</p>
