I tried using nuv2disc to burn some of my DVB recordings and ran into a few problems. The first problem was, nuv2disc did not recognise any of my recordings as DVD resolution Mpeg-2 files. The program it uses to do this is mpgtx (in the script statuscheck.sh). Jams helped me work out what was wrong and gave me a replacement statuscheck.sh that uses tcprobe to identify the mpeg2 files. The function he changed is shown below:
Code:
function mpeg_true ()
#Checks to see if a file is an mpeg and creates the link's
{
Totalfiles=0
TotalDVDREADY=0
TotalNONDVD=0
for i in `ls $RECORDDIR`
do
if [ -f $RECORDDIR/$i ] # && [ -z `grep $i $ALREADYTRANSLIST` ]
then
{
grablink $RECORDDIR/$i
Totalfiles=$(( Totalfiles + 1 ))
tcprobe -i $RECORDDIR/$i 2>&1 |grep -q "MPEG"
# $MPGTX -i $RECORDDIR/$i 2>&1 |grep -q "Mpeg 2 Program Stream File"
dvdreadympeg=$? #0 is an mpeg
if [ $dvdreadympeg -eq 0 ]
then
MYRES=`tcprobe -i $RECORDDIR/$i |grep -i "frame size" |cut -d[ -f 1 |awk ' { print $NF } '`
#MYRES=`$MPGTX -i $RECORDDIR/$i |grep Size |cut -d[ -f 2 | cut -d] -f 1`
#if [ "$MYRES" = "720 x 480" ] || [ "$MYRES" = "352 x 480" ] || [ "$MYRES" = "720 x 576" ] || [ "$MYRES" = "704 x 576" ]
if [ "$MYRES" = "720x480" ] || [ "$MYRES" = "352x480" ] || [ "$MYRES" = "720x576" ] || [ "$MYRES" = "704x576" ]
then
dvdreadympeg=0
# echo $i is dvd ready $MYRES
else
dvdreadympeg=2
# echo $i is not dvd ready $MYRES
fi
else
echo "$i is not mpeg 2"
fi
if [ -f $RECORDDIR/$i ]
then
{
if [ $dvdreadympeg -ne 0 ]
then
{
mpeg_string="This is not an mpeg2 file, please transcode $i"
if [ -e $NONMPEGDIR/$i ]
then
link_string="Already there non-mpeg $1"
else
ln -s $LINKNAME $NONMPEGDIR/$i
fi
TotalNONDVD=$((TotalNONDVD + 1 ))
}
else
{
mpeg_string="This is a mpeg2 file $i"
if [ -e $MPEGDIR/$i ]
then
link_string="Already there mpeg $i"
else
ln -s $LINKNAME $MPEGDIR/$i
fi
TotalDVDREADY=$(( TotalDVDREADY + 1 ))
}
fi
# echo $mpeg_string
}
fi
}
fi
done
#didn't use log function so the date is not appended.
echo "Total files ready for dvd selection: $TotalDVDREADY" >>$MAINLOG
echo "Total files for transcoding: $TotalNONDVD" >> $MAINLOG
echo "Total recordings found: $Totalfiles" >> $MAINLOG
echo $TotalNONDVD
echo $TotalDVDREADY
echo $Totalfiles
return $status
}
After fixing this I could select my mpeg2 recordings (some of which I had used
commercial_cut to remove ads from), but then it ran into an error using mplex to re-multiplex the streams into DVD compliant format. Jams suggested I try replex as this was designed for DVB streams. I downloaded the source from
here built it and made the following change in cdvd.sh
Code:
log "Start mplex of $myshortname"
# mkfifo myaud0
# mkfifo myvid0
# mpeg2desc -a0 < "$INFILE" > myaud0 &
# mpeg2desc -v0 < "$INFILE" > myvid0 &
# mplex -v0 -f 8 -V -o dvdmpg$ii myaud0 myvid0
# rm myaud0
# rm myvid0
echo "/usr/local/bin/replex -t DVD -k -o dvdmpg$ii $INFILE"
/usr/local/bin/replex -t DVD -k -o dvdmpg$ii "$INFILE"
This got me as far as the point where it would attempt to burn to dvd. A little bit of poking around and I realised that it was trying to use the /dev/scd0 device which, with the deprecation of scsi emulation and all, is not the right device to use. I changed /dev/scd0 to /dev/dvd in commonvars and it now works a treat (with the exception of blueish upsidedown images in the menus), but I mostly want to make DVDs without menus anyway.
I have three questions:
1. Are the changes to the statuscheck script something that will also work for people burning PVR recordings, and if so, can we get nuv2disc patched so it does it this way and works for both PVR and DVB?
2. Does replex work for PVR recordings, and if not, is there a reliable way to detect if a recording is a DVB recording requiring the use of replex or a PVR recording requiring the use of mplex?
3. Shouldn't nuv2disc be patched to use /dev/dvd (or at least /dev/cdrom) instead of /dev/scd0 by default?