COMMANDKEY
• place .mp4 onto .jpg (video on portrait image)
ffmpeg -i video1.mp4 -i back.png -filter_complex "[0:v]scale=-1:720[video];[1:v][video]overlay=(W-w)/2:(H-h)/2" -c:a copy video2.mp4
• place image in top right corner, fades in at 0 and starts fading out 3 seconds
logo or branding
ffmpeg -i video2.mp4 -loop 1 -i icon.png -filter_complex "[1:v]fade=in:st=0:d=1,fade=out:st=3:d=1[ov];[0:v][ov]overlay=W-w-10:10:shortest=1" -pix_fmt yuv420p -c:a copy video3.mp4
• replace video audio with mp3
ffmpeg -i video3.mp4 -i music.mp3 -c:v copy -map 0:v:0 -map 1:a:0 -shortest video4.mp4
• loop gif in top left
ffmpeg -i video4.mp4 -ignore_loop 0 -i animation.gif -filter_complex "[1:v]scale=320:-1[ovrl], [0:v][ovrl]overlay=10:10" -pix_fmt yuv420p -c:a copy -t $(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 video4.mp4) video5.mp4
[file name key - for quick workflow, duplicate work files, rename them following the example names below, place all files into one folder. right click folder, >services>open this folder in terminal window, ]
video1.mp4
back.png
icon.png
music.mp3
animation.gif
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install ffmpeg
brew install yt-dlp
yt-dlp -f mp4 <youtube link>