#!/bin/sh

echo "you have choosen to make a VBR MPEG stream"
echo "please notice that VBR MPEG streams cannot be burned to"
echo "a VCD for use with a DVD player, if you want that use nuv2mpg"
echo ""
echo "this is only an example script you should edit it to your"
echo "quality needs. i'll make a better all purpose mpeg script
echo "in time. try to play around with -q and -b and read the"
echo "mpeg2enc man page!!!"

nuvplay -e $1.nuv | toolame -s 44100 -b 192 -p 2 -m s /dev/stdin $1.mp2
exportvideo $1.nuv "|mpeg2enc -b 1300 -q 7 -G 21 -g 21 -N -o $1.m1v"
mplex -V -s 2324 -p 1 -o $1.mpg $1.m1v $1.mp2

echo "you can burn your mpg files with cdrecord, simple change the
echo "device parameter to your cdwriter id and type"
echo ""
echo "mkdir disk1"
echo "mv $1.mpg disk1/"
echo "cd disk1/"
echo "md5sum * >disk.md5"
echo "cd .."
echo "mkisofs -r -J disk1/ | cdrecord dev=0,3,0 speed=6 -data -eject -"
echo ""
echo "have fun"
