[MPlayer-dev-eng] [PATCH] TV & DXR3: mencoder works but mplayer does not

Jaroslav Tulach jtulach at netbeans.org
Sat Jan 11 21:46:55 CET 2003


So I have finally found some time to work on this and I have to admit, 
that in spite of spending whole Saturday playing with the code, I have 
reached no real success. The synchronization is still pretty bad.

I wonder why there is not single stream (buffer) of captured 
audio+video. One single buffer with one write place (but two producers), 
two reading pointers (one for video one for audio) and if they got to 
far from each other, then either the first one is slowered (repeating) 
the frames, or the one behind skips some frames.

But after that idea I have read again your email...

> Date: Mon, 06 Jan 2003 14:06:42 +0100 From: Jindrich Makovicka <makovick at kmlinux.fjfi.cvut.cz>
> 
>>
>> Jindra wrote:
>>
> 
>>>
>>> Jaroslav Tulach wrote:

>> First solution that comes to my mind is to double the data deliver 
>> rate n-times by duplicating each video frame n-times. I can imagine 
>> this could work for video, but I expect that it would not for audio at 
>> all.
> 
> 
> Another idea: we could capture the video almost without any buffering, 
> drop any excess frames and duplicate the last one if none is available, 
> and return timestamps as 1/25*frameno, like now when in the immediate 
> mode. Then you have to adjust the audio stream as the frames are 
> inserted or dropped.

This suggestion seems similar to the one buffer for audio+video (at 
least I know where I've stolen that idea). But I am really not sure. I 
would like to find out what is causing the desynchronization, but I am 
really not able to debug it.

> 
> If I try leaving priv->immediate_mode = 1 together with your patch, 
> video works but audio gets desynched fast, especially when pressing 
> pause or changing channels. With some compensation for dropped frames it 
> could work.

What about creating a branch in CVS? I have tried to leave the 
priv->immediate_mode on as well (see the attached patch), but I am not 
sure if I did it right. If you could check your ideas to CVS branch I 
would at least know that I am looking in the right direction.

-jst

> -- Jindrich Makovicka 
 > <makovick at kmlinux.fjfi.cvut.cz>

Btw. From the email address I can guess that you can be reached in 
Prague. Why not have a local mplayer fans meeting? An evening pub in 
pha6? As I am a bit boring person I hope at least Tomas Hurka could join 
us as well...
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TVAudio.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030111/aeba12db/attachment.txt>


More information about the MPlayer-dev-eng mailing list