Scroll Text from Bottom to Top in Ffmpeg
I Want to Scroll Text from Bottom to Top. I Use the Command: Ffmpeg -I Test. Mp4 -Vf "Drawtext=Fontfile=Tahoma. Ttf: Fontsize=40: Fontcolor=Green...
I want to scroll text from bottom to top. I use the command:
ffmpeg -i test.mp4 -vf "drawtext=fontfile=tahoma.ttf:fontsize=40:fontcolor=green:x=(w-text_w)/2+20:y=h-40*t:text=Scroll.txt:bordercolor=white:borderw=2" -c:v libx264 -y -preset ultrafast scrolling.mp4
It scrolls from bottom to top, but I want to scroll from bottom to (top - 50px) only. (I get text from a file and multilines).
1 Answer
Quickest way to do this is to overlay the top 50 px of the original video onto the video with text.
Use
ffmpeg -i test.mp4 -filter_complex "[0]split[txt][orig];[txt]drawtext=fontfile=tahoma.ttf:fontsize=40:fontcolor=green:x=(w-text_w)/2+20:y=h-40*t:text=Scroll.txt:bordercolor=white:borderw=2[txt];[orig]crop=iw:50:0:0[orig];[txt][orig]overlay" -c:v libx264 -y -preset ultrafast scrolling.mp4