[MPlayer-DOCS] CVS: main/DOCS/xml/en encoding-guide.xml, 1.15, 1.16
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Mon Sep 5 02:27:14 CEST 2005
On Sunday, 04 September 2005 at 19:47, Guillaume POIRIER wrote:
> On 9/4/05, Dominik 'Rathann' Mierzejewski <dominik at rangers.eu.org> wrote:
> > On Sunday, 04 September 2005 at 14:21, Guillaume Poirier CVS wrote:
> > > Modified Files:
> > > encoding-guide.xml
> > > Log Message:
> > > In order to make sure A/V sync is preserved, MEncoder really has to
> > > be fed with an audio track.
> > > Added a paragraph that explains why, and nuked all the occurences of
> > > "-nosound".
> >
> > Funny, that. I have exactly the opposite experience when encoding one set
> > of NTSC DVDs with two audio tracks. I'm muxing into Matroska, though, and
> > streamcopying, not recompressing audio. -nosound was the only way I could
> > get perfect A/V sync in the resulting file. It might be an issue with this
> > particular DVD set, as the video stream is horribly broken and looks like
> > it was originally telecined, then deinterlaced, cut and hard-telecined
> > again, because even after pullup, there are still ghosts in the picture.
>
> If possible, please post the full command line you used to handle this
> case. One never knows, maybe we will have to suggest it one day to one
> of our dear users!
Here's my script (cleaned up a bit). The end result is a Matroska file
with two audio tracks, ripped VOBsub subtitles and perfect A-V sync.
And who knows, it might come in handy one day, should I ever loose my
backups. ;)
SRC="dvd://3"
NAME="Slayers_Try"
epbase=6
chapter=7
epno=`expr $epbase + $chapter`
NICE="nice"
VCODEC=lavc
# video options
PASS="vpass"
VCODECOPTS="-lavcopts"
CODEC=mpeg4 # video codec type
VBR=2070000 # video bitrate
KI=125 # keyframe interval in frames
LMIN=1.0 # min lagrange multiplier
VQMIN=1 # min quantizer
VQDIFF=6 # max quantizer diff between frames
VQCOMP=0.6 # quantizer compression (0,0=high motion look bad, 1,0=low motion look bad)
VQBLUR=0.5 # quantizer blur (lower=faster quantizer change)
# Slayers 3
CROP="crop=688:478:16:2"
SCALE="scale=640:480"
ASPECT=":aspect=4/3"
#ASPECT=":autoaspect"
XOPTS=":v4mv"
XOPTS="$XOPTS:psnr"
XOPTS="$XOPTS:trell:mbd=2:mv0"
XOPTS="$XOPTS:cbp" # only with trellis quantization
XOPTS="$XOPTS:qprd" # mbd=2
XOPTS="$XOPTS:qpel" # for high-bitrate encodings
PREME=2 # 1 - default; 2 - slow
# CMP: 1 for anime, 2 for anything else
PRECMP=1
CMP=1
SUBCMP=1 # 2 = fast/medium; 6 = slow
# DIA: -1,3 = fast; 3,1 = medium; 4,4=slow; -6,-6=combined
DIA=-3
PREDIA=-3
LAST_PRED=0 # 0 - disabled, 2 - slow
QNS=2 # 2 to enable
BF=0
XOPTS="$XOPTS:preme=$PREME:precmp=$PRECMP:cmp=$CMP:subcmp=$SUBCMP"
XOPTS="$XOPTS:predia=$PREDIA:dia=$DIA:last_pred=$LAST_PRED"
#XOPTS="$XOPTS:qns=$QNS"
#XOPTS="$XOPTS:vmax_b_frames=$BF:vb_strategy=1"
ENCOPTS="vcodec=$CODEC:vbitrate=$VBR"
ENCOPTS="$ENCOPTS:vqmin=$VQMIN:lmin=$LMIN"
ENCOPTS="$ENCOPTS:vqcomp=$VQCOMP:vqdiff=$VQDIFF:vqblur=$VQBLUR:keyint=$KI$XOPTS$ASPECT"
VOPTS="-ffourcc mp4v"
VOPTS="$VOPTS -demuxer 2" # MPEG-PS
VOPTS="$VOPTS -noautoexpand"
VOPTS="$VOPTS -sws 10"
VOPTS="$VOPTS -ofps 24000/1001"
# Slayers 3 broken telecine
VF="-vf pullup=1:1:4:4:-1,softskip,$CROP,hqdn3d=4:3:4,pp=lb,$SCALE"
OPTS="-chapter $chapter"
OAC="-nosound"
rm -f frameno.avi
rm -f divx2pass.log
rm -f ${NAME}_${epno}.sub
rm -f ${NAME}_${epno}.idx
rm -f ${NAME}_${epno}.mkv
$NICE mencoder $OPTS $VOPTS -alang en -of rawaudio -oac copy -ovc frameno -o ${NAME}_${epno}.en.ac3
$NICE mencoder $OPTS $VOPTS -alang ja -of rawaudio -oac copy -ovc frameno -o ${NAME}_${epno}.ja.ac3
$NICE mencoder $OPTS -slang en -vobsubout ${NAME}_${epno} \
-ovc $VCODEC $VCODECOPTS $ENCOPTS:$PASS=1:turbo $VOPTS $VF \
$OAC \
-o "${NAME}_${epno}.1st.avi" $SRC
$NICE mencoder $OPTS \
-ovc $VCODEC $VCODECOPTS $ENCOPTS:$PASS=2 $VOPTS $VF \
$OAC \
-o "${NAME}_${epno}.avi" $SRC
$NICE mkvmerge -o ${NAME}_${epno}.cut.mkv \
-d 0 -A -S ${NAME}_${epno}.avi \
--language 0:jpn -a 0 -D -S ${NAME}_${epno}.ja.ac3 \
--language 0:eng -a 0 -D -S ${NAME}_${epno}.en.ac3 \
--language 0:eng -s 0 -D -A ${NAME}_${epno}.idx \
--track-order 0:0,1:0,2:0,3:0
Regards,
R.
--
MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
We stand between the darkness ... and the light."
-- Delenn in Grey Council in Babylon 5:"Babylon Squared"
More information about the MPlayer-DOCS
mailing list