Stan Gammons wrote:
On Fri, 2008-02-29 at 14:34 -0800, Florin Andrei wrote:
You also need to install (under Wine) AviSynth and the Panasonic DV
Codec. And the SoundOut AviSynth plugin to generate AC3.
Then you can process DV AVI Type 2 files and generate m2v and ac3 files
out of them, which you can mux using mplex. That's my current process.
I may give that method a try.
See if the attached script may help figure out all the program options
faster. I posted an older version before, but this one's better.
--
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
*DBPATH ${rootdrive}:${winepwd}
*MAXBITRATE 9500
*PROFILE best
*ASPECT 16:9
*AUTOGOP 18
*CQ_MAXBITRATE 5.000
*DC_PREC 10
*DVSOURCE
*NOSCD
*CLOSEDGOPS
*MATRIX mpeg
*LUMGAIN 1
*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"
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