Here’s how to watermark your video with ffmpeg by adding text

Merunas Grincalaitis
2 min readDec 10, 2022

Recently I had to watermark a few videos and instead of using a program to edit all of the videos manually, I decided to use ffmpeg which is far faster and more effective when you want the same result over and over.

Here’s how the command looks, then I’ll explain in it in detail:

ffmpeg -i my-video.mp4 -y -vf "drawtext=text='my watermark':x=100:y=400:fontfile=./fonts/Poppins/Poppins-Black.ttf:fontsize=100:fontcolor=white@0.2" watermarked.mp4

Here’s the breakdown:

  • -i my-video.mp4 simply the input video.
  • -y means we want to override any existing videos with the same output name.
  • -vf here is where we add the watermark with this filter option. Each parameter is separated by a colon : so you can specify multiple filter options.
  • drawtext=text='my watermark' this is the text we want to display as the watermak.
  • x=100 means the watermark will be pushed 100 pixels from the left.
  • y=400 means the watermark will be pushed 400 pixels from the top.
  • fontfile=./fonts/Poppins/Poppins-black.ttf this is a font I’ve downloaded from google fonts and it’s called poppins. You need to add that font to the same folder and write down the…

--

--