Dinh Quang Khang
Dinh Quang Khang

Reputation: 31

Create a vertical video scroll based on an image using ffmpeg

I am creating a video scroll vertical image with ffmpeg.

My code

ffmpeg -loop 1  -t 61 -i 0.jpg  -filter_complex "color=white:s=1280x720[bg];[bg][0]overlay=y=-'t*120':shortest=1[video]"  -r 200/1 -preset ultrafast -map [video] "D:\FFMPEG\output.mp4"

But the video is very bad. Although I set the frame rate at 200, it is jerky.

My source image enter image description here

And result result video

Upvotes: 2

Views: 3369

Answers (1)

infval
infval

Reputation: 348

ffmpeg -r 1 -loop 1 -t 61 -i 0.jpg -filter_complex "color=white:s=1280x720, fps=fps=60[bg];[bg][0]overlay=y=-'t*120':shortest=1[video]" -preset ultrafast -map [video] output.mp4

You need to set the frame rate fps=fps=60 (default is 25). -r 1 is for faster processing.

Result video.

Upvotes: 7

Related Questions