Extract audio from video filePosted: April 22, 2014
Extract audio from MP4 video file and save it as MP3 audio file:
- avconv -i filename.mp4 -vn -ar 44100 -ac 2 -ab 128k -f mp3 filename.mp3
Quick and dirty way to extract audio from all video files in the directory:
- for i in *.mp4; do myname=`basename “$i”`; avconv -i “$i” -vn -ar 44100 -ac 2 -ab 128k -f mp3 “$myname.mp3”; done
If you copy and paste this code and it does not work, please check the back tick and quotation marks. they normally get “spoiled” when copying HTML.