SpazDes
October 1st, 2008, 07:34 PM
Just figured I'd share this, I use it too turn AVI movies too DVD's...
You'll need too have sox, multimux, mplex, ffmpeg, transcode, dvdauthor
What this does is it loops itself over a folder full of movies, and converts them too a dvd and adds a sort of fake surround sound too it, as well, as makes it into an iso file too burn later.
#!/bin/bash
cd Movies
for i in $( dir convert ); do
FILE="`basename $i .avi`"
echo "Splitting Audio and Video for $FILE"
transcode -i convert/$i -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o working/movie -D0 -s2 -m sound/movie.ac3 -J modfps=clonetype=3 --export_fps 29.97
echo "Working sound files now"
ffmpeg -i sound/movie.ac3 sound/movie.wav
sox -V sound/movie.wav -r 48000 -c1 sound/left.wav avg -l
sox -V sound/movie.wav -r 48000 -c1 sound/right.wav avg -r
sox -V sound/left.wav sound/right.wav -r 48000 -c1 sound/centre.wav
sox -V -v 0.5 sound/centre.wav sound/lfe.wav lowp 150
multimux -f sound/left.wav sound/centre.wav sound/right.wav sound/left.wav sound/right.wav sound/lfe.wav
echo "Cleaning up..."
echo "Sound Finished..."
mplex -f 8 -o dvd_movie.mpg working/movie.m2v 6ch.ac3
dvdauthor -x dvdauthor.xml
mkisofs -dvd-video -o complete/$FILE.iso DVD/
rm 6ch.ac3 dvd_movie.mpg sound/* working/*
cp convert/$i $BACKUP
rm convert/$i
cd DVD
rm -r VIDEO_TS AUDIO_TS
cd ..
done
Inside a folder named Movies in the home/<username> directory the directory structure should look like this:
http://i37.tinypic.com/28jkzlw.png
dvdauthor.xml
<dvdauthor dest="DVD">
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="dvd_movie.mpg" chapters="0,15:00,30:00,45:00,1:00:00"/>
</pgc>
</titles>
</titleset>
</dvdauthor>
If anyone wants to shed some light on how to make it handle more file types it'd be much appreciated.
Anyway just figured I'd share that. :D
You'll need too have sox, multimux, mplex, ffmpeg, transcode, dvdauthor
What this does is it loops itself over a folder full of movies, and converts them too a dvd and adds a sort of fake surround sound too it, as well, as makes it into an iso file too burn later.
#!/bin/bash
cd Movies
for i in $( dir convert ); do
FILE="`basename $i .avi`"
echo "Splitting Audio and Video for $FILE"
transcode -i convert/$i -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o working/movie -D0 -s2 -m sound/movie.ac3 -J modfps=clonetype=3 --export_fps 29.97
echo "Working sound files now"
ffmpeg -i sound/movie.ac3 sound/movie.wav
sox -V sound/movie.wav -r 48000 -c1 sound/left.wav avg -l
sox -V sound/movie.wav -r 48000 -c1 sound/right.wav avg -r
sox -V sound/left.wav sound/right.wav -r 48000 -c1 sound/centre.wav
sox -V -v 0.5 sound/centre.wav sound/lfe.wav lowp 150
multimux -f sound/left.wav sound/centre.wav sound/right.wav sound/left.wav sound/right.wav sound/lfe.wav
echo "Cleaning up..."
echo "Sound Finished..."
mplex -f 8 -o dvd_movie.mpg working/movie.m2v 6ch.ac3
dvdauthor -x dvdauthor.xml
mkisofs -dvd-video -o complete/$FILE.iso DVD/
rm 6ch.ac3 dvd_movie.mpg sound/* working/*
cp convert/$i $BACKUP
rm convert/$i
cd DVD
rm -r VIDEO_TS AUDIO_TS
cd ..
done
Inside a folder named Movies in the home/<username> directory the directory structure should look like this:
http://i37.tinypic.com/28jkzlw.png
dvdauthor.xml
<dvdauthor dest="DVD">
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="dvd_movie.mpg" chapters="0,15:00,30:00,45:00,1:00:00"/>
</pgc>
</titles>
</titleset>
</dvdauthor>
If anyone wants to shed some light on how to make it handle more file types it'd be much appreciated.
Anyway just figured I'd share that. :D