Code
- Node.js
- Python
- cURL
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 cornerW-w-10= video width − logo width − 10 px padding10= 10 px from the top
-c:v libx264 -c:a copy— re-encode video (needed after filter), pass audio through
- 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