[MPlayer-users] roughly .25 second delay in playback of avi files

Corey Hickey bugfood-ml at fatooh.org
Wed Feb 1 05:05:20 CET 2006


Ed Sweetman wrote:
> I say avi files because I dont have any reliably in sync media files in 
> other formats.
> 
> The only other video players i have to compare mplayer to is gxine and 
> windows media player and vlc in windows (the windows players are on a 
> different 32bit computer).   My box is running dual core athlon 64 in 
> 64bit mode. 
> Kernel is 2.6.16-rc1 (though this has been going on in every kernel 
> version i've tried since i made the box)
> 
> mplayer version is cvs (over the course of the previous weeks till now)
> alsa playback, xv video output
> 
> I even tried the stream delay patch posted to the devel list and still 
> no change.

Neither of the logs you posted show either stream being delayed by
dwStart, so the patch I'm working on isn't applicable to playing them
back correctly.

Un-delayed video stream from your attached log:
====== STREAM Header =====
Type: vids   FCC: xvid (64697678)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 2997/125 = 23.976
Start: 0   Len: 137657        <--- "Start", on this line, is 0
Suggested BufferSize: 127016
Quality 10000
Sample size: 0
==========================


Video stream delayed about 10 seconds (a test clip of mine):

====== STREAM Header =====
Type: vids   FCC: DIVX (58564944)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 24000/1001 = 23.976
Start: 239   Len: 5213        <--- "Start" is 239: 239/(24000/1001)=9.96
Suggested BufferSize: 40527
Quality 0
Sample size: 0
==========================


> The problem is, playback of media either encoded by mencoder or 
> transcode or virtualdub is played back at about a quarter of a second 
> off, almost always the audio precedes the video.  I played with 
> different values of delay, and .25 seems to bring the audio back in sync 
> with every one I tried that was out of sync.   Only a couple seem to be 
> in sync by default, and it seems to be a fluke that it is, since they 
> were encoded by the same encoder using the same settings and the same 
> codec as the ones that are now out of sync.

If you can tell us the mencoder settings you used it would be helpful.

> The reason I believe this is an mplayer problem is that before i changed 
> to a 64bit system, on my old athlon tbird, these videos were in sync, 
> and right now, playing from the exact same copies, in windows (on 
> another box) they are in sync and with gxine (same box as mplayer) they 
> are in sync.  Only mplayer seems to be out of sync on most of the video 
> files.  
> 
> I dont know what type of data could be useful, and the lack of anyone 
> else reporting the problem is not promising.   I can provide any info 
> required, but my experience playing with mplayer internals is lacking. 
> 
> 
> I've attached two runs of video files, one in sync (actually the only 
> one i've found so far to be in sync) and one of the out of sync ones, 
> encoded by the same program.  It's not using rtc, because tvtime is, but 
> this has no effect on the av sync problem.

Can you please upload those two AVI files to some publicly-accessible
http/ftp server and send the URLs to the list?

If they're big, you can use dd to cut then down to a smaller size --
just make sure they're big enough that you can still see the problem on
your machine.

Actually, what would be most helpful is if you could provide a source
file which, when encoded with mencoder using the settings you provide,
has the desync problem you describe. But, if you can't do that, I'll try
to figure out what's going on from the encoded files.

-Corey




More information about the MPlayer-users mailing list