Install FFmpeg video converter on your linux machine. For my Ubuntu distribution I used below two commands to install it.
#sudo add-apt-repository 'deb http://ppa.launchpad.net/jon-severinsson/ffmpeg/ubuntu '"$(cat /etc/*-release | grep "DISTRIB_CODENAME=" | cut -d "=" -f2)"' main' && sudo apt-get update
#sudo apt-get install ffmpeg
Now you can change directory using cd command to your desired video folder which contains all videos in source format. In my example I wanted to convert all of my .MOV videos to .mp4 for better compression and audio recognition by my media server and players. Below command does the magic for the folder, thought it takes some time.
for i in *.MOV; do ffmpeg -i $i -strict -2 -vcodec mpeg4 -b:v 1200k -flags +aic+mv4 "${i/.MOV}".mp4; done
#sudo add-apt-repository 'deb http://ppa.launchpad.net/jon-severinsson/ffmpeg/ubuntu '"$(cat /etc/*-release | grep "DISTRIB_CODENAME=" | cut -d "=" -f2)"' main' && sudo apt-get update
#sudo apt-get install ffmpeg
Now you can change directory using cd command to your desired video folder which contains all videos in source format. In my example I wanted to convert all of my .MOV videos to .mp4 for better compression and audio recognition by my media server and players. Below command does the magic for the folder, thought it takes some time.
for i in *.MOV; do ffmpeg -i $i -strict -2 -vcodec mpeg4 -b:v 1200k -flags +aic+mv4 "${i/.MOV}".mp4; done