[FFmpeg-user] Sliding text banner (was: Newbie questions)

Nicolas George nicolas.george at normalesup.org
Sun Jul 29 12:26:13 CEST 2012

Le duodi 12 thermidor, an CCXX, Orbisoft Support a écrit :
> Does that mean I can get that number automatically returned via some command
> line so that I can use that value in a later ffmpeg command line (which
> actually draws the text) or does it mean I can only manually see the number
> on the screen and therefore couldn't automate it (since the text is from a
> RSS which always changes)?

It means that if you run ffmpeg with "-loglevel debug", you can see this:

[Parsed_drawtext_0 @ 0x1a39c80] n:0 t:0.000000 text_w:46 text_h:7 x:0 y:0

And of course, if you can see it in ffmpeg's output, you can obviously
capture it, parse it and reuse it in a second call to ffmpeg. The exact way
to do it depends on your operating system, calling language, etc., and is
beyond the scope of this list. You just need to know that ffmpeg's console
output goes to stderr, not stdout.

Also, note that the width of the text is also available as the "text_h" or
"th" variables inside the expressions for the text position, so you can, for
example, write the expression for x so that the text goes through the screen
in a fixed amount of time. Said fixed amount of time could be decided based
on the char count of the text: a text with a lot of "m"s would scroll
slightly faster than a text with a lot of "i"s, but that would probably be
negligible in real conditions.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120729/cf24421f/attachment.asc>

More information about the ffmpeg-user mailing list