[MPlayer-users] different audio/video length using mencoder

Thorben Kröger thorbenk at gmx.net
Sun Jan 30 13:23:18 CET 2005


Hello,
A few days ago I asked about how to display the current byte position when 
playing a DVD. (thread: DVD seeking and byte position]

Background: I want to rip small segments from DVDs and later cut them 
together.

Now I'm using mencoder with -sb and -endpos. This works much better than -ss 
(which is really inaccurate), but there remains a small problem:

The length of audio and video seem not to match:
Video stream: 1445.817 kbit/s  (180727 bps)  size: 6325450 bytes  35.000 secs  
875 frames
Audio stream:  218.760 kbit/s  (27345 bps)  size: 969984 bytes  35.472 secs
This wouldn't be much of a problem (video plays fine) but when putting the 
segments in cinelerra the audio track is of course slightly longer and when 
you append another segment there might be gaps in the video or something 
similar.

Recently, someone asked a similar question, and was told to use -noskip and 
-mc 0, which solved his problems. 
(http://mplayerhq.hu/pipermail/mencoder-users/2005-January/000193.html)
Using -sb, this is not the case. I used them and got the above audio/video 
lengths.

As someone guessed on IRC, this might happen because -sb just starts somewhere 
in the file and doesn't take care to start at a frame boundary.

However, the man page says in regard to -endpos:
NOTE: Byte position will not be accurate, as it can only stop at a frame 
boundary.

Is this also true for -sb?

Is there a workaround?

Thorben




More information about the MPlayer-users mailing list