Reputation: 47
I want to overlay a video on top of another slow-motion video. Surprisingly, the overlay becomes also slow-motion.
I'm applying the following command:
ffmpeg
-to 00:00:01.000 -i camera1.mp4 // original video
-ss 00:00:02.000 -to 00:00:09.000 -i confeti.mov // overlay video
-filter_complex '[0]setpts=3.333*PTS[s0]; [s0][1]overlay' // change FPS of original video and overlay
-r 24 out.mp4
The output can be seen here: out.mp4
As you can see, the "confetti" overlay is slow while the original video is playing and go back to normal speed once the original video ends.
Any idea why it happens and how can it be fixed?
Upvotes: 0
Views: 762
Reputation: 93231
The overlay filter paints the overlay video on top of frames provided by the first input. If you use setpts to space out frames of the first input, the 'density' will get reduced and there won't be enough intermediate frames to paint all the frames from the overlay input.
Add fps filter after setpts to provide more base frames.
[0]setpts=3.333*PTS,fps=24[s0]
Upvotes: 1