Patrique Ouimet
Senior Product Engineer
Wed, Oct 9, 2019 11:34 AM
A simple bash function to convert an MOV (or .mov) to MP4 (or .mp4). You simply type the function name then a space followed by the file name you wish to convert
NOTE: this requires that ffmpeg is installed
Add the following to your aliases file (i.e. .bashrc, .bash_aliases, .zshrc)
convertMovToMp4() {
originalFileName="$1"
newFileName=${originalFileName/\.mov/\.mp4}
ffmpeg -i "$originalFileName" -q:v 0 "$newFileName"
}convertMovToMp4 my-video.movYou will now have my-video.mp4 in the same directory as my-video.mov