Skip to content

Instantly share code, notes, and snippets.

@rhtyd

rhtyd/mp4-to-mp3

Created Oct 18, 2010
Embed
What would you like to do?
Converts Mp4 in a dir to mp3
#! /bin/bash
#
# Converts all MP4 files in the current directory to MP3s.
#
# Uncomment to remove whitespaces in mp4 files
for video in *.MP4; do
#f=`echo $video | tr ' ' '_'`
#mv "$video" $f
#video=$f
#echo "processing: $video"
ffmpeg -i $video -f mp3 -ab 192000 -ar 44100 -ac 2 -vn $video.mp3
echo "Done: $video"
done
# Put destination here:
#cp *.mp3 /meda/<name your path... to your ipod :)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.