Am fairly new to FFMPEG. I am able to convert a sequence of images to video, with each image displayed for a specified time . I want to annotate these images ,e.g with text, and then convert to video. I don't know weather it's feasible using FFMPEG or not. I want to:

  • give ffmpeg a text file having list of images to be encoded to video and there duration.
  • If any of these images need to be annotated with text, then that informatiom. Be able to specify styling of the text (font,font-size,shadow,color,hightlight etc)
  • image annotation (overlaying image over another image).
  • create video.

1 Answer 1


As described in https://stackoverflow.com/questions/17623676/text-on-video-ffmpeg you can use the drawtext filter for this.

Documentation: https://ffmpeg.org/ffmpeg-filters.html#drawtext

See the more complex example for showing text for s specific time only: Show text fading in and out (appearing/disappearing):

DS=1.0 # display start
DE=10.0 # display end
FID=1.5 # fade in duration
FOD=5 # fade out duration
ffplay -f lavfi "color,drawtext=text=TEST:fontsize=50:fontfile=FreeSerif.ttf:fontcolor_expr=ff0000%{eif\\\\: clip(255*(1*between(t\\, $DS + $FID\\, $DE - $FOD) + ((t - $DS)/$FID)*between(t\\, $DS\\, $DS + $FID) + (-(t - $DE)/$FOD)*between(t\\, $DE - $FOD\\, $DE) )\\, 0\\, 255) \\\\: x\\\\: 2 }"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.