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: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).
Solution 1:
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