Sunday, March 16, 2008

extract WAV from DVD with mplayer

I found several post on the web using transcode, unfortunately it didn’t work well for me and kept on coredump.

It turns out mplayer can do the same job with less trouble, below is a script that allows you to extract tracks from a specific range of chapters of a track with selected audio channel.

#!/bin/bash
for i in `seq 1 33`;
do
`echo mplayer -vo null -ao pcm -ao pcm:file=track$i.wav:fast dvd://2 -chapter $i-$i -aid 129;`
done

1 33 - this means to rip from chapter 1 to 33
dvd://2 - this is the track that you want to extract the chapters from
aid 129 - 129 is the audio stream ID that you want to select

You can use lsdvd to get the details of the DVD.
use soundconverter to convert it to MP3.

References:
http://www.larsen-b.com/Article/186.html
http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.txt

No comments: