As shown in these video screen captures, I would like to replace the text in the upper left of the videos to another language.

What I am thinking is first to create a gradient box with colors that are automatically sampled along the edges of the box. Then it would be easy to drawtext the replacement text. For each video file, the background gradient doesn't change, so it can be sampled only once for each file.

Is this possible in FFmpeg? Other ideas on how to achieve the text replacement is also welcome.

enter image description here

1 Answer 1


I eventually found an answer to my question: FFmpeg delogo filter

delogo options I used for the videos in the question is: (for testing you can set show=1)


Sample ffmpeg/ffplay -vf options for encoding, delogo + drawtext filters:

-vf "delogo=x=85:y=47:w=300:h=40:show=0,drawtext=text='SampleText':fontfile="${FONTFILE}":fontcolor=white:fontsize=34:x=93:y=54:alpha=0.9"

delogo is pretty neat, I wonder how they did this. Quite fast too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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