Marko Loparic wrote:

I want to start converting dv -> dvd of 15 years of family video, so I
would like to check if I get the same problem as you got. Could you
please post the commands you used and the version of the tools so that
I try exactly the same thing?

At this moment, this page still has the old version of my script - the one that uses mpeg2enc:

http://florin.myip.org/soft/conv-dvd/

As for version numbers - I've been using these scripts for several years now. I used whatever was the latest version at the moment.

If you want to do comparisons, I attached to this message the new version of the conv-dvd script - the one that uses HCenc. For that, you will need to install and configure WINE - setup the fake C: drive and all that (on Ubuntu, the setup is done automatically the first time you run wine - I'm not sure about other distros). The moment you can successfully run "wine winver" you're good to go.
Then, inside WINE, you need to install the following free Windows apps:

HC Encoder
AviSynth
Panasonic DV codec
SoundOut AviSyth plugin (not required with AviSynth 2.6 or newer)
avs2yuv

I had 0 issues with these apps under WINE.

Did you check the bitrates of the resulting mpeg files?

I verified the bitrates with mplex on almost all DVDs. I verified some of them on the DVD player, which can optionally display live information about the video stream. Everything looks fine. I'm not sure what else I can do.

--
Florin Andrei

http://florin.myip.org/
#!/bin/bash

# v20080221
# Florin Andrei <[EMAIL PROTECTED]>

if [ $# -ne "1" ]; then
 echo "Usage: $0 dirname"
 exit
fi

# Testing pre-requisites
for exe in wine unix2dos mplex dvdauthor; do
if [ -z `which ${exe}` ]; then
    echo "${exe} is not installed, bye"
    exit
fi
done

name=$1
pushd $name

# File that contains the DVD structure info
xmlf="dvdauthor.xml"

# The HC Encoder executable
# Path is in Windows format (as seen inside Wine)
encoder="C:\HCenc\HCenc.exe"

aencoder="avs2yuv"

# The Unix filesystem root is what "drive letter" under Wine?
# (e.g., if drive is Z, then /home/user becomes Z:\home\user under Wine)
rootdrive="Z"

# pwd in "windows" format (replace / with \)
unixpwd=`pwd`
winepwd=`echo ${unixpwd} | tr / \\\ `

# HC Encoder general encoding parameters
# Change ASPECT to 4:3 or 16:9, depending on the source
# Change BITRATE up or down to adjust image quality and file size
# The other parameters typically don't need to be adjusted
cat - > HC.ini << HCINI
*BITRATE          5000
*MAXBITRATE       9500
*PROFILE          best
*ASPECT           16:9
*AUTOGOP          18
*DC_PREC          10
*DVSOURCE
*CLOSEDGOPS
*LOSSLESS
*MATRIX           mpeg
*PRIORITY         normal
*WAIT             0
HCINI

unix2dos HC.ini

rm -f $xmlf
# dvdauthor XML config head
cat - >> $xmlf << XMLHEAD
<dvdauthor>
<vmgm />
<titleset>
<titles>
<pgc>
XMLHEAD

max=`ls dv | wc -l`
n=1
for inp in `ls dv`; do
rem=$(( $max - $n ))
echo
echo -n "["
for i in `seq 1 $n`; do
    echo -n "+"
done
if [ $rem -ne 0 ]; then
for i in `seq 1 $rem`; do
    echo -n "-"
done
fi
echo "]"
out=`basename $inp .avi`

cat - > $out-video.avs << AVSFILE-VIDEO
AviSource("${rootdrive}:${winepwd}\\dv\\${out}.avi")
ConvertToYV12()
AVSFILE-VIDEO

cat - > $out-audio.avs << AVSFILE-AUDIO
AviSource("${rootdrive}:${winepwd}\\dv\\${out}.avi")
ConvertToYV12()
SoundOut(output="ac3", filename="${rootdrive}:${winepwd}\\${out}.ac3", 
cbrrate=192, acmod=2, autoclose=true, wait=0, overwritefile="Yes", 
silentblock=false)
AVSFILE-AUDIO

unix2dos $out-video.avs
unix2dos $out-audio.avs

awinerun="wine ${aencoder} -frames 1 ${rootdrive}:${winepwd}\\${out}-audio.avs 
-o NUL"
echo ${awinerun}
`${awinerun}`

winerun="wine ${encoder} -ini ${rootdrive}:${winepwd}\\HC.ini -i 
${rootdrive}:${winepwd}\\${out}-video.avs -o 
${rootdrive}:${winepwd}\\${out}.m2v -log ${rootdrive}:${winepwd}\\${out}.log 
-frames all -2pass"
echo ${winerun}
`${winerun}`

mplex -f 8 -S 4400 $out.m2v $out.ac3 -o $out.vob 2>&1 | tee $out-mplex.log
echo "<vob file=\"$out.vob\" />" >> $xmlf
n=$(( $n + 1 ))
done

# dvdauthor XML config tail
cat - >> $xmlf << XMLTAIL
</pgc>
</titles>
</titleset>
</dvdauthor>
XMLTAIL

dvdauthor -o $name -x $xmlf

chmod -R 0755 $name
chmod 0644 $name/*_TS/*
sync
popd
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to