Created
June 25, 2021 16:24
-
-
Save rybak/11d21f953d6e836932f57fae3fe19163 to your computer and use it in GitHub Desktop.
ffmpeg incantation to convert a single long image into a rolling marquee-style video
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ffmpeg -loop 1 -t 10 -i "${1:-1.png}" \ | |
# -vf "crop=w=W:h=ih:x='(iw-W)*t/10':y=0" \ | |
# -r 25 -pix_fmt yuv420p out.mp4 | |
# ffmpeg -f lavfi -i color=s=1920x1080 -loop 1 -t 0.08 -i "input.png" \ | |
# -filter_complex "[1:v]scale=1920:-2,setpts=if(eq(N,0),0,1+1/0.02/TB),fps=25[fg];[0:v][fg]overlay=x=-'t*h*0.02':eof_action=endall[v]" \ | |
# -map "[v]" output.mp4 | |
ffmpeg -f lavfi -i color=s=1920x1080 -loop 1 -t 0.08 -i "input.png" -filter_complex "[1:v]scale=1920:-2,setpts=if(eq(N\,0)\,0\,1+1/0.02/TB),fps=25[fg]; [0:v][fg]overlay=y=-'t*h*0.02':eof_action=endall[v]" -map "[v]" output.mp4 | |
# ffmpeg -loop 1 -t 10 -i input.png \ -vf "crop=w=W:h=ih:x='(iw-W)*t/10':y=0" \ -r 25 -pix_fmt yuv420p out.mp4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment