Skip to main content
Overlay a logo or image watermark onto a video at a fixed position (corner, center, or custom coordinates).

Code

How the FFmpeg command works

  • -i {{in_1}} — input video
  • -i {{in_logo}} — second input: logo PNG (with transparency if desired)
  • -filter_complex "[0:v][1:v]overlay=W-w-10:10" — place logo 10 px from the top-right corner
    • W-w-10 = video width − logo width − 10 px padding
    • 10 = 10 px from the top
  • -c:v libx264 -c:a copy — re-encode video (needed after filter), pass audio through
Position shortcuts:
  • Top-left: overlay=10:10
  • Top-right: overlay=W-w-10:10
  • Bottom-left: overlay=10:H-h-10
  • Bottom-right: overlay=W-w-10:H-h-10
  • Center: overlay=(W-w)/2:(H-h)/2

Response