Skip to content

Instantly share code, notes, and snippets.

@ahmed-abdelazim
Last active September 10, 2019 21:56
Show Gist options
  • Select an option

  • Save ahmed-abdelazim/4fad8abcf55d0e2a44bcc51006b86f58 to your computer and use it in GitHub Desktop.

Select an option

Save ahmed-abdelazim/4fad8abcf55d0e2a44bcc51006b86f58 to your computer and use it in GitHub Desktop.
add overlay to video
ffmpeg -i intro.mp4 -i overlay.png \
-filter_complex "[1:v]scale=520:-1,format=rgba,colorchannelmixer=aa=0.5[fg];[0][fg]overlay=1380:920:enable='between(t,0,20)'" \
-pix_fmt yuv420p -c:v libx264 -preset fast -crf 22 -c:a libmp3lame \
output.mp4
ffmpeg -i intro.mp4 -i overlay.png \
-filter_complex "[1:v]format=rgba,colorchannelmixer=aa=0.7[fg];[0][fg]overlay" \
-pix_fmt yuv420p -c:a copy \
output.mp4
ffmpeg -i intro.mp4 -i overlay.png \
-filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,0,20)'" \
-pix_fmt yuv420p -c:a copy \
output.mp4
ffmpeg -i intro.mp4 -i overlay.png \
-filter_complex "[0:v];[bg][1:v]overlay=10:10:all_opacity='0.5'" \
-pix_fmt yuv420p -c:a copy \
output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment