[FFmpeg-user] Alternative to Dynamic Text

Adam Nielsen a.nielsen at shikadi.net
Tue Nov 9 00:25:30 EET 2021

> Instead of a sleep and retry, we can simply continue with existing text 
> and try again on next frame. We can also extend the semantics of the 
> option (in a backward-compatible way) to specify the frame interval at 
> which the file is reloaded.

I like this idea.  I'm using it on a Raspberry Pi 1 to write the time
and camera name in a status bar at the bottom of the video, and the Pi
is pegged at 100% CPU usage even using hardware encoding.  So anything
that lowers the CPU usage is welcome.

If you will only reload the file every few frames, I wonder whether you
could cache the output image rather than just the text?  This way the
font rendering would only happen every few frames as well (only when
the text actually changes), further lowering CPU usage.

If this option to re-use previously rendered text could also apply to
placeholders (like text=%{localtime}) that would also help lower the
CPU usage.


More information about the ffmpeg-user mailing list