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

Categories

, ,

Leave a comment


Type the characters you see in the picture above.

About this Entry

This page contains a single entry by Cedric published on November 17, 2007 2:14 PM.

My Little Airport, PixelToy, 草地音樂同學會, and 開始! was the previous entry in this blog.

Expozine 2007 + etc is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.