[MPlayer-users] mencoder - phenomen....

Rainer Hantsch rainer at hantsch.co.at
Mon Oct 27 14:17:51 CET 2003


Hi!

Meanwhile it starts to become really strange:

I try to convert a movie from 3x(S)VCD  into  1x DivX   file. Source is a
(S)Video-CD, no plain .mpg file.

So I tried to do the following steps:
1.  Use 'mencoder' to convert every particular CD into a partial AVI file.
    This is done always with the same script (vcd2avi), which I attached
    for your reference.
2.  Now I use avidemux to append all three parts to each other and save the
    result as a new file.

    AVIDEMUX wants to use smartcopy. Maybe this is because Audio and video
    have not exactly the same length?


After 1. every file plays with voice in sync. Because all three avi's were
made with the same script and settings, they should (also) have identical
encoding.
After putting the parts together, I loose more and more audio sync. within the
2nd part it is still acceptable, but the third part is awful, more than 3
seconds wrong.

Any idea on what can be the reason for this?



mfg

  Ing. Rainer Hantsch
-------------- next part --------------
#!/bin/sh

# Verschiedene Grundeinstellungen
ori="vcd://1 -cdrom-device /dev/sr5"

erg=$1
[ "$erg" == "" ] && erg="fertiger-film.avi"
echo "Erzeuge DivX Datei ?$erg? ..."
sleep 1

VideoBitrate=1950   # Guter Standardwert
#VideoBitrate=2100
scale="720:405"     # 16:9 Bldformat
scale="720:540"     # 4:3 Bildformat

# Cleanup
 rm -f frameno.avi > /dev/null
 rm -f *.log > /dev/null



# Audio-Umwandlung
echo
echo
echo "AUDIO-UMWANDLUNG: $ori -> frameno.avi"
nice -+18 mencoder $ori -ovc frameno -oac  mp3lame -lameopts br=128:cbr \
          -o frameno.avi 


# Video-Pass1
echo
echo
echo "VIDEO-UMWANDLUNG PASS 1:  vcd://1 -> /dev/null"
    nice -+15 mencoder $ori -oac copy -ovc lavc \
    -lavcopts vcodec=mpeg4:vpass=1:vbitrate=$VideoBitrate \
    -o pass1.avi -vop scale=$scale -sws 2

# Video-Pass2
echo
echo
echo "VIDEO-UMWANDLUNG PASS 2:  vcd://1 -> $erg"
    rm pass1.avi
    nice -+15 mencoder $ori -oac copy -ovc lavc \
    -lavcopts vcodec=mpeg4:vpass=2:vbitrate=$VideoBitrate \
    -o "$erg" -vop scale=$scale -sws 2

rm -f frameno.avi
rm -f divx2pass.log

#-eof-


More information about the MPlayer-users mailing list