I have a photo and a text page. I want to make a video with a background image that I have and the text will run on that photo. Please help me with ffmpeg

  • Sounds like you want some video editing software... not ffmpeg.
    – Attie
    Dec 1, 2017 at 13:25
  • You can see clips: youtube.com/watch?v=y2aY5y3kC2M
    – Duyet Pham
    Dec 1, 2017 at 13:39
  • You really need to add some more detail so to what you're asking.
    – Darren
    Dec 1, 2017 at 14:04

1 Answer 1


Basic method is

ffmpeg -loop 1 -i image \
       -vf drawtext=textfile='yourtextfile':x=X:y=h-t*(h/D),format=yuv420p \
       -t T out.mp4

yourtextfile is a plaintext UTF-8 file.

You will have to see how long the text takes to scroll across and use that in the -t T option (e.g. -t 30 to make a 30 second video), otherwise ffmpeg will keep going indefinitely.

X should be replaced with a value that represents horizontal position. x=100 for 100 pixels from left-edge. x=w-500 for 100 pixels from right-edge.

In the y expression, h/D controls the scrolling speed. D is the number of seconds a line takes to reach from the bottom to the top.

Consult the drawtext documentation for more details, like font selection and styling.

Not the answer you're looking for? Browse other questions tagged .