Rip audio from a music video DVD with mencoder
Mencoder really does miracles. After showing how to rip streams last week, now comes a script to rip the audio from a music video DVD:
#!/bin/bash
# Script to rip the audio of DVDs (useful for music videos!)
ACODEC=mp3
ABITRATE=128
if [ $# -ne 5 ]
then
echo "Usage: ripaudiodvd.sh [AID] [TITLE] [START CHAPTER] [END] [SUBDIR]"
exit 1
else
OUTDIR=${HOME}/ripdvdaudio/${5}
mkdir -p ${OUTDIR}
for i in `seq ${3} ${4}`
do
TRACKNO=`printf %02d $i`
mencoder -v dvd://${2} -aid ${1} -chapter ${i}-${i} \
-o ${OUTDIR}/track${TRACKNO}.${ACODEC} -ovc copy -oac lavc \
-lavcopts abitrate=${ABITRATE}:acodec=${ACODEC} -of rawaudio
done
fi
Download it: ripdvdaudio.sh
Leave a comment