[c_lug] Converting WMV to MPEG2 for DVD burning

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 2004 : Group Archive : Group : All Groups

From: Glen Stewart <root@...>
Date: Sat, 11 Sep 2004 22:31:14 -0400
I've been adapting a DVD-burning script to take one or more MPEG2 movies and 
make a DVD out of them.  It works fine, but there is no menu to choose the 
movies from - they just play in sequence.  The script is at bottom.

I got a batch of WMV movies that I needed to have converted to MPEG2, so 
thought I'd document that 2-step conversion process here too.

transcode -x mplayer -i some_movie.wmv -g 320x240 -y mpeg -F 2 -Z 320x480 -o 
new_movie.mpg -e 32000,16,2 -E 48000,16,2 -f 29.97

tcmplex -m 2 -i new_movie.mpg.m2v -p new_movie.mpg.mpa -o new_movie.mpg


Here's the script to burn the DVD...

#!/bin/sh

let cnt=1

if [ "$1" = "" ]
then
  echo "usage: $0 mpeg2-1 [mpeg2-2] [mpeg2-3] ..."
  exit
else
  while [ "$1" != "" ]
  do
    mkfifo aud$cnt
    mkfifo vid$cnt
    mkfifo dvdmpg$cnt
    mpeg2desc -a0 < "$1" > aud$cnt &
    mpeg2desc -v0 < "$1" > vid$cnt &
    mplex -f 8 -V -o dvdmpg$cnt aud$cnt vid$cnt &
    dvdmp2="$dvdmp2 dvdmpg$cnt"
    dvdaud="$dvdaud aud$cnt"
    dvdvid="$dvdvid vid$cnt"
    dvdauthor -o mydvd -f dvdmpg$cnt
    dvdauthor -o mydvd -T
    shift
    ((cnt=cnt+1))
  done
fi

rm $dvdaud
rm $dvdvid
rm $dvdmp2

cd mydvd
TSIZE=`mkisofs -dvd-video -udf -q -print-size .`

while [ $cnt -gt 0 ]
do
  read -p "Press return to burn a DVD, or CTRL-C to abort..."

  mkisofs -dvd-video -udf -V mydvd . | dvdrecord speed=2 dev=/dev/sg3- \
    driveropts=burnfree -dao -v tsize="$TSIZE"s -
done

-- 
Associate.com - THE Place to Associate!                   http://associate.com
Is Your E-mail Group Here? Visit http://associate.com/faq/your-list-here.shtml