🍅 automatoes.com

Join a Video and Audio File Together

Solution: Create a zsh function that captures [ffmpeg] arguments

Filename: replace-audio

extension=${1##*.}
filename=${1%*.$extension}

newfilename="$filename"-processed."$extension"

ffmpeg -i $1 -i $2 -c:v copy -map 0:v:0 -map 1:a:0 $newfilename

Usage

replace-audio myVideo.mp4 myAudio.wav

Tags:

Contributor: [John Lindquist]

Referred in

edit
Join a Video and Audio File Together