Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8091981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:11:23+00:00 2026-06-05T20:11:23+00:00

In Ffmpeg you can create moving text: ffmpeg -y -t 10 -s qcif -f

  • 0

In Ffmpeg you can create moving text:

ffmpeg -y -t 10 -s qcif -f rawvideo -pix_fmt rgb24 -s 1280x720 -i /dev/zero -g 1 -r 24 -vf drawtext="fontfile=~/fonts/Trebuchet_MS.ttf:text='thing crawls':fontsize=155:fontcolor=red:y=h-20*t" wow.mpg

So this will give me a black frame with “thing crawls” slowly going from bottom up..

If I know the length of the video (20 seconds) and want to, for example create “thing falls” that starts at the top of the screen at time 0 and goes to the bottom of the screen until 00:00:20, how do I do that?

Also can I create the situation where the text will start going from top to bottom, but stop at the middle of the screen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:11:24+00:00Added an answer on June 5, 2026 at 8:11 pm

    The FFmpeg docs give a full listing of the variables that you have to work with when using the drawtext filter, but for mobile text there are a few of particular interest:

    ‘n’
    the number of input frame, starting from 0

    ‘t’
    timestamp expressed in seconds, NAN if the input timestamp is unknown

    With these, you can set the text position in relation to how many frames have already been seen. That’s what the y=h-20*t expression in your example is doing. As t increases, the text moves closer to the top of the video as h-20*t decreases.

    To make your example “thing falls”, you’d want a term like 20*t instead. Because the y position starts from 0 at the top of the video, as t increases, it will move down the screen.

    For text that stops in the middle of the screen, you could probably do some fancy math, or just use FFmpeg’s rich set of logical functions. Something like y=t*20*lte(t*20,h/2) + h/2*gt(t*20,h/2) which moves the text while t*20 is less than half the height, then keeps the y position at h/2 once t*20 is greater than half the height.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a create a dnxhd mov with ffmpeg but can't seem
I'm dying to know how I can make a GUI for ffmpeg and jhead
I am attempting to call ffmpeg to create an image from a frame in
Background: I have encoded a raw h264 file using ffmpeg. I'm trying to create
How can I add SPEEX support to my FFMPEG installation? I need to extract
In my main process, i create a ffmpeg child process using CreateProcess(...). I need
What command line util can i use to create a thumbnail preview of a
Im trying to create a movie from set of PNG images using FFmpeg in
Im trying to create a movie from set of PNG images using FFmpeg in
I'm trying to create a small ffmpeg hack which enables parallel executin of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.