Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
#!/bin/bash | |
VIDEO=$1 | |
AUDIO=$2 | |
DATE=`date +%Y-%m-%d.%H:%M:%S` | |
OUTPUT="Output_"$DATE".mp4" | |
ffmpeg -i $VIDEO -i $AUDIO \ | |
-c:v copy -c:a aac -strict experimental \ | |
-map 0:v:0 -map 1:a:0 $OUTPUT |