[mythtv-users] DVD Burning

James Pifer jep at obrien-pifer.com
Fri Feb 10 02:13:47 UTC 2006


> #!/bin/bash
> 
> rm -drf mydvd
> rm -f mydvd.tmp
> echo Checking video size...
> # Calculate the requantization factor 
> vsize=`ls -l ./vid | awk '{print $5}'` 
> vsize=`echo $vsize / 1048576 | bc` 
> asize=`ls -l ./aud | awk '{print $5}'` 
> asize=`echo $asize / 1048576 | bc` 
> req=`echo "($vsize + $asize) / 4350" | bc -ql` 
> req2=`echo "$req * $req" | bc -ql`
> 
> if [ ${req:0:1} = "." ];   
> then
>    echo Shrinking not required!!
> else  
>    echo Shrinking the video to fit the disc. Please wait... 
>    echo Reduction Factor: $req2 
>    echo Note: vid has been saved as vid-full
>    mv -f vid vid-full 
>    tcrequant -i vid-full -o vid -f $req2  
> fi
> 
> mplex -f 8 -V -O -3016mpt -o mydvd.tmp aud vid
> #rm aud
> #rm vid
> echo "creating dvd file system"
> dvdauthor -o mydvd -f mydvd.tmp
> dvdauthor -o mydvd -T
> rm -f mydvd.tmp
> echo Burning DVD
> #primary burning method, works well and no key or shell required.
> growisofs -Z /dev/hdd -dvd-video mydvd
> #alternative burning process below, not currently used.
> #mkisofs -dvd-video -udf ./mydvd/VIDEO_TS > ./movie.iso
> #cdrecord-wrapper.sh dev=0,0,0 -sao ./movie.iso
> #echo "cleaning up"
> #rm -rf movie.iso
> #rm -rf mydvd

I'm interesting in trying your script, but I'm a little confused about
how to get started. I have my nuv or mpg file, do I send that as an
argument when I call the script? It's looking for a vid and aud
directory, where do those come from?

Thanks,
James



More information about the mythtv-users mailing list