[MEncoder-users] How to join 2 videos without losing sync?

Pepe rvm3000 at ya.com
Sat Jan 13 18:21:43 CET 2007


Using mencoder 1.0rc1-3.3.4.

I've got a movie split into 2 avis. I want to join them in one avi. A big 
problem is that those videos has qpel, so my dvd player can't play them, so I 
need to recode the video.

This is the first command I used:

mencoder -noodml -o final_video.avi \
  -oac mp3lame -lameopts vol=0:mode=1:cbr:br=96 \
  -ovc xvid \
  -xvidencopts 
bitrate=1000:nointerlacing:quant_type=h263:nopacked:pass=2:max_iquant=15:max_pquant=15:max_bquant=15:max_bframes=0 
\
  -vf-add harddup \
  -force-avi-aspect 16:9 \
  part1.avi part2.avi

The problem is that in the 2nd part of the movie, audio-video synchronization 
is lost.

I tried several things: -oac copy (copy the original audio), then I tried too 
with -mc 0 -noskip (this gave the worst result).

The last try: I first joined the 2 videos with -oac copy and -ovc copy (the 
ouput video is sync'd), then I recode this whole video, but I still have the 
same problem.

The "funny" part is that in mplayer the movie is sync'd (well, maybe a very 
small audio delay) but when I play in my dvd player, the 2nd part has an 
audio delay of 300 or 400 ms, which is very noticeable.

I'm guessing that mplayer has stored in the header the audio delay (in fact if 
I press "-" in mplayer, OSD say -133 ms, not 100, so I suppose the stored 
audio delay is -33) and my dvd player shouldn't read that info.

Is there any way I can get a video that can be played with correct audio-video 
synchronization in my dvd-player?  Is there any option to tell mencoder not to 
store the audio delay in the header, but do any other things to keep A-V 
sync (skipping frames or whatever)?

-- 
Pepe



More information about the MEncoder-users mailing list