[MEncoder-users] Audio sync problems
HTUME 20051111
htumenc at gmail.com
Tue Nov 29 09:57:21 CET 2005
> >On Saturday, 26 November 2005 at 21:43, Karl Mitchell wrote:
> so I had to use "--engage allow_avc_in_vfw_mode" in mkvmerge. Any suggestions?
>
> However, my aim was to create an MP4 container, for the sake of
> portability. If your or anyone can tell me how to do this, I'd be grateful.
>
> Regards,
>
> -Karl
>
> mencoder dvd://1 -dvd-device /Volumes/Neptune/Movies/DVD/VIDEO_TS -alang
> eng -nosound -vf pullup,softskip -ovc x264 -x264encopts
> bitrate=1200:turbo=1:pass=1 -ofps 24000/1001 -o test.mp4
>
> mencoder dvd://1 -dvd-device /Volumes/Neptune/Movies/DVD/VIDEO_TS -alang
> eng -oac faac -faacopts br=128 -vf pullup,softskip -ovc x264
> -x264encopts bitrate=1200:turbo=1:pass=1 -ofps 24000/1001 -o test.aac
> -of rawaudio
>
> mkvmerge -o test.mkv test.mp4 test.aac --engage
> allow_avc_in_vfw_mode-engage allow_avc_in_vfw_mode
>
hi.
I've been looking for info about whether MEncoder uses vfw mode or
not. such as "packed Bframes" or "Delay frames".
I'm using commands below, to make x264+aac.mp4. On MacOSX
10.4.3,MEncoder dev-CVS-051115-06:05-4.0.1
#1st PASS (may be -ni is not needed )
mencoder XXX.mpeg -oac copy -ovc x264 -x264encopts
threads=2:me=3:bitrate=1024:qp_min=16:qp_max=51:i4x4:frameref=5:subq=6:keyint=230:cabac:deblock:nob_adapt:bframes=1:turbo=1:pass=1
-passlogfile XXX.avi.log -vf
pullup,softskip,crop=704:464:8:8,scale=640:480,hqdn3d=4:3:6,pp=l5,harddup
-ni -sws 9 -ofps 23.976 -of avi -o /dev/null
#2nd PASS
mencoder XXX.mpeg -oac copy -ovc x264 -x264encopts
threads=2:me=3:bitrate=1024:qp_min=16:qp_max=51:i4x4:frameref=5:subq=6:keyint=230:cabac:deblock:nob_adapt:bframes=1:pass=2
-passlogfile XXX.avi.log -vf
pullup,softskip,crop=704:464:8:8,scale=640:480,hqdn3d=4:3:6,pp=l5,harddup
-ni -sws 9 -ofps 23.976 -of avi -o XXX.avi
#extract rawvideo
mp4box -aviraw video XXX.avi
#Audio encode
ffmpeg -i XXX.mpeg -y -vn -f mp4 -acodec aac -ar 48000 -ac 2 -ab 64
-map 0.1:0.0 XXX_aac.mp4
#mux
mp4box -fps 23.976 -add XXX_video.h264 -add XXX_aac.mp4 -new XXX.mp4
Good points:
1. Playable in QuickTime Player 7.0.3 Pro, VLC, MPlayer OSX. (not
tested on Win nor any *nix distros)
Bad points:
1. Durations of Audio & Video has some slight difference. Video is
always longer, Up to 0.22sec~0.15sec. encoding Audio & Video is not
good thing any way. but encoding all on ffmpeg has same problem, So I
may try to trim Video or scale Audio.
2. Not editable in QuickTime Player 7.0.3 Pro. "Edit", I mean
correcting Audio durations, changing aspect ratio for playing,,,.
After these operations, QT7 claims that I have to encode again.
This never take place when I use no bframes.
3. I guess -oac faac could result more accurate durations, but
sometimes MEncoder says "bus erroer". not always, but so far there,
seems to be no rule.
Bad points 2. seems to be caused by vfw mode. Is there any way to
enable other modes in MEncoder?
--
http://htffmpegx.seesaa.net/
More information about the MEncoder-users
mailing list