Skip to content

Instantly share code, notes, and snippets.

@rohityadavcloud
Created October 18, 2010 00:35
Show Gist options
  • Save rohityadavcloud/631503 to your computer and use it in GitHub Desktop.
Save rohityadavcloud/631503 to your computer and use it in GitHub Desktop.
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