[MPlayer-users] Question on converting to DivX4...
Rainer Hantsch
office at hantsch.co.at
Mon Jul 4 20:00:22 CEST 2005
Thank you very much. This was very helpful.
Now another problem appeared:
DBox produces/saves an interlaced video with a squeezed image. Stretching is
fine, but which options shall I use to deinterlace?
I tried pp=0x20000 and also pp=0x7f (as recommended in the man pages).
Both actually give a relatively good result (interlacing vanishes nearly
completely), but the resulting DivX gets noisy (picture shows sometimes
artifacts). 0x7f seems to give poorer result than 0x20000, especially in
HighMotion scenes.
Here the script with options I currently use:
---<snip>----------------------------------------------------
#!/bin/sh
function usage () {
echo
echo "Usage: $0 <options> "
echo " -d /dev/sr1 ........ CD-ROM device (default=/dev/sr1)"
echo " -i input ........... Track (default=vcd://1)"
echo " -t sekunden ........ Nur Test-Datei erzeugen"
echo " -o filename ........ Zieldatei für fertigen Film"
echo " -s 4:3 | 16:9 ...... Skalierung wählen (4:3=default)"
echo " -b bitrate ......... Video-Bitrate (1950=default)"
exit 0
}
function cleanup () {
rm -f frameno.avi > /dev/null
rm -f *.log > /dev/null
}
if [ "$1" == "" ] ; then
usage
exit 1
fi
# Initialisierung ...
endpos=""
erg=""
scale="720:540" # 4:3 Bildformat (=default)
VideoBitrate=1950 # Guter Standardwert
device="/dev/sr1"
ori="vcd://1"
while getopts d:i:o:t:s:b: option
do
case $option in
d) device="-cdrom-device $OPTARG";
;;
i) ori="$OPTARG";
;;
t) endpos="-endpos $OPTARG";
;;
o) erg="$OPTARG";
echo "###Zieldatei###: $erg";
;;
s) [ "$OPTARG" == "4:3" ] && scale="720:540";
[ "$OPTARG" == "16:9" ] && scale="720:405";
;;
b) VideoBitrate="$OPTARG";
;;
*) usage;;
esac
done
cat - << EOF
CD-ROM ............... $device
Input Track ........... $ori
Output Datei .......... $erg
Bildformat ............ $scale
Video-Bitrate ......... $VideoBitrate
Zeitlimit ............. $endpos Sek.
EOF
sleep 8
# Fehler abfangen
trap 'cleanup; echo "Mache Cleanup..."; exit 1' 0 3 9
[ "$erg" == "" ] && erg="fertiger-film.avi"
echo "Erzeuge DivX Datei »$erg« ..."
cleanup
# Audio-Umwandlung
echo
echo
echo "AUDIO-UMWANDLUNG: $ori -> frameno.avi"
mencoder $endpos $device $ori -ovc frameno -oac mp3lame \
-lameopts br=128:cbr:aq=0:q=0 \
-o frameno.avi
# Video-Pass1
echo
echo
echo "VIDEO-UMWANDLUNG: $ori -> $erg"
mencoder $endpos $device $ori -oac copy -ovc lavc \
-lavcopts vcodec=mpeg4:vbitrate=$VideoBitrate:keyint=25 \
-o "$erg" -vop pp=0x20000,denoise3d=8:6:6,scale=$scale -sws 2
#pp=0x7f oder 0x20000
#-eof-
---<snap>--------------------------------------
mfg
Ing. Rainer Hantsch
More information about the MPlayer-users
mailing list