Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- IFS='
- '
- if ! [ -d "mp3f" ]
- then
- mkdir mp3f
- fi
- for i in `ls *.MP4`
- do
- echo
- base=$(basename "${i}" .mp4)
- mplayer -vc null -vo null -nocorrect-pts -ao pcm:waveheader "${i}"
- RV=$?
- if [[ $RV != 0 ]] ; then
- echo "mplayer completed unsuccessfully -- exiting."
- exit
- fi
- # Convert .wav to .mp3
- lame -h -b 192 audiodump.wav "${base}.mp3" ${VERB}
- RV=$?
- if [[ $RV != 0 ]] ; then
- echo "lame completed unsuccessfully -- exiting."
- exit
- fi
- done
- IFS=' '
- # Cleanup Temporary File
- rm audiodump.wav
- echo "Conversion complete."
Advertisement
Add Comment
Please, Sign In to add comment