[MEncoder-users] ac3 out of sync - x264 encode

Johannes Lindblom johanneslindblom at gmail.com
Sat Mar 17 15:24:41 CET 2007


Using this script to encode:

#!/bin/bash
FILETITLE=`echo $1 |grep -o .*S[0-9][0-9]E[0-9][0-9]`
mencoder -vf pp=lb,filmdint=dint_thres=256,pp=ac,scale=1280:720,harddup -ovc
x264 -x264encopts
bitrate=$2:threads=auto:pass=1:turbo=2:frameref=15:bframes=5:nob_pyramid:direct_pred=auto:partitions=all:8x8dct:subq=7:mixed_refs:nodct_decimate
-nosound -ofps 24000/1001 -noskip -of rawvideo -o /dev/null $1
mencoder -vf pp=lb,filmdint=dint_thres=256,pp=ac,scale=1280:720,harddup -ovc
x264 -x264encopts
bitrate=$2:threads=auto:pass=3:frameref=15:bframes=5:nob_pyramid:direct_pred=auto:partitions=all:8x8dct:subq=7:mixed_refs:nodct_decimate
-nosound -ofps 24000/1001 -noskip -of rawvideo -o /dev/null $1
mencoder -vf pp=lb,filmdint=dint_thres=256,pp=ac,scale=1280:720,harddup -ovc
x264 -x264encopts
bitrate=$2:threads=auto:pass=3:frameref=15:bframes=5:nob_pyramid:direct_pred=auto:partitions=all:8x8dct:subq=7:mixed_refs:nodct_decimate
-nosound -ofps 24000/1001 -noskip -of rawvideo -o
$FILETITLE.720p.HDTV.x264.264 $1
MP4Box -fps 23.976025 -add $FILETITLE.720p.HDTV.x264.264
$FILETITLE.720p.HDTV.x264.mp4
mplayer -dumpaudio -dumpfile $FILETITLE.ac3 $1
mkvmerge -o $FILETITLE.720p.HDTV.x264.mkv $FILETITLE.720p.HDTV.x264.mp4
$FILETITLE.ac3

While encoding i get this very often:

Pos: 3.0s 98f ( 0%) 1.68fps Trem: 373min 710mb A-V:0.000 [5204:0]
demux_mpg: 24000/1001fps progressive NTSC content detected, switching
framerate.
Pos: 5.6s 177f ( 0%) 1.90fps Trem: 301min 634mb A-V:0.000 [4886:0]
demux_mpg: 30000/1001fps NTSC content detected, switching framerate.
Warning! FPS changed 23.976 -> 29.970 (-5.994005) [4] -V:0.000 [4874:0]
Pos: 7.7s 239f ( 0%) 1.87fps Trem: 311min 651mb A-V:0.000 [4841:0]
demux_mpg: 24000/1001fps progressive NTSC content detected, switching
framerate.
Pos: 12.5s 383f ( 1%) 1.89fps Trem: 294min 626mb A-V:0.000 [4783:0]

When playing back the video the sound goes way out of sync. Maybe even more
out of sync the more is played, not really sure though. So is there
something wrong with my script? Any settings off?
I think this has something to do with the video switching between
progressive/interlaced the whole time, so the sound gets all messed up but I
have no idea how to fix it. Maybe I'm wrong.. but I really need some help.
Thanks!

// spuck



More information about the MEncoder-users mailing list