[MEncoder-users] Audio sync problems
Karl Mitchell
karl.l.mitchell at jpl.nasa.gov
Sat Nov 26 23:33:47 CET 2005
>On Saturday, 26 November 2005 at 21:43, Karl Mitchell wrote:
>
>
>>I'm a returning user to mencoder (last used in 2003 under Linux), so my
>>apologies if the answer to my question seems obvious.
>>
>>I've been trying to backup a DVD to H.264/AAC on MacOS X 10.4 (Tiger).
>>I managed to compile mplayer/mencoder from CVS last night (2006/11/25)
>>with x264 and faac support, so no problems there. However, I've been
>>having major problems with lip sync, with audio being a significant
>>fraction of a second ahead of video. I suspect that the problem I'm
>>having is due to the input being mixed progressive and telecine NTSC, a
>>format I've never used before, as I used to live in a PAL country. The
>>following is my attempt at a first pass:
>>
>>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 title1.mp4
>>
>>I have also tried using -mc (values of 0, 0.1 and 1), with no success.
>>-oac copy seems to produce similarly out of sync results.
>>
>>mplayer dvd://1 -dvd-device /Volumes/Neptune/Movies/DVD/VIDEO_TS works fine.
>>
>>I can't find any clues to solve this in the documentation (which only
>>has -nosound examples for mixed progressive and telecine) or man page,
>>and would greatly appreciate any help.
>>
>>On the plus side, this basic first-pass H.264 encode seems to already be
>>producing extremely good video results at only 1200 kbps. I look
>>forward to seeing the second-pass results.
>>
>>
>
>Try encoding audio and video separately. I've had good results encoding
>video with -nosound (I know this is not recommended, but try) and muxing
>two audio tracks dumped with mencoder -of rawaudio into Matroska
>container while still maintaing perfect lip-sync.
>
>Regards,
>R.
>
>
>
Hi Rathann,
Thanks for your suggestion. With a little experimenting I managed to
put everything into the mkv container and it played back well within
mplayer. I have to admit that I do not understand why the sync should
work using this method and not using the internal mencoder method.
I'm sure there's got to be a better way of doing this than I used
(commands below), and I would appreciate your recommendations. I was
only able to use the -of rawaudio dump if I did it at the same time as
doing full x264 compression, which is very slow. In addition, it turns
out that my method was actually putting the data into an AVI container,
which is certainly not what I wanted, 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
More information about the MEncoder-users
mailing list