#!/bin/bash # # $Id: ac32wav,v 1.1 Wed Oct 27 05:20:46 CEST 2004 stock Crk $ # (c) 2003,2004 Robert M. Stockmann # # This is a AC3 to wav and mp3 ripping tool, which uses transcode. # Packager : Lenz Grimmer # URL : http://zebra.fh-weingarten.de/~transcode/ # Summary : A linux video stream processing utility # # Its of typical use when extracting digital audio from DVD movie disks # to a wave or mp3 file. 4-channel wav audio is possible by changing # inside the sox command -c 2 to -c 4 . # # if [ "$1" = "" -a "$2" = "" ]; then echo "" echo " Usage : $0 [basename] [audio-amplifier] " echo "" echo "A file [basename].ac3 should exist and is converted to " echo "[basename].wav. [audio-amplifier] is a number between " echo "0.0 and 10.0 and should of course be greater dan 0.0 " echo "" echo "To obtain the 5.1 Digital Dolby AC3 sound from a DVD-movie " echo "use the following command : " echo "" echo " tcextract -i VTS_01_1.VOB -a 0 -x ac3 -t vob > [basename].ac3 " echo "" echo "wav to mp3 is typically performed with lame. For best results " echo "use LAME version 3.92 from (http://www.mp3dev.org/). Its " echo "rumoured that higher versions are of "lame" quality :) " echo "The following command should be used : " echo "" echo " lame --quiet -h -b 192 [basename].wav [basename].mp3 " echo "" exit 0 fi cat $1.ac3 | tcdecode -x ac3 -s $2,$2,$2 -d 4 |\ sox -t raw -r 48000 -s -w -c 2 - -t wav $1.wav exit 0