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

Jindrich Makovicka makovick at kmlinux.fjfi.cvut.cz
Mon Jan 6 14:06:42 CET 2003


Jaroslav Tulach wrote:

>
> Jindra wrote:
>
>>
>> Jaroslav Tulach wrote:
>>
>>
>>> Surprisingly synchronization is not big problem for me. Sound and 
>>> audio seem to keep in sych relatively well. 
>>
>>
>>
>> It is not exactly bad sync but on my machine I get the video about 
>> two times slower with alsa, and about one frame per second with oss 
>> audio output. With SDL it was usable but I haven't seen more than a 
>> few seconds.
>
>
> I see.
>
>>> Btw. does not this problem influence mencoder? It needs to encode 
>>> audio+video at once, so it should suffer from the same problem!? 
>>
>>
>>
>> The sync algorithms in mplayer expect that the media data delivery 
>> rate is faster than the playback rate but TV watching is more close 
>> to streaming. 
>
>
> 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.

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.

> I am using:
>
> mplayer -vo dxr3:prebuf:sync -ao oos:/dev/em8300_ma -tv on:.....
>
> and everything seems to work find for few minutes. But I can confirm 
> that after 3-7min work the video starts to be very slow. I thought 
> that this is a problem of DXR3 (because DXR3 becames corrupted then). 
> But maybe you are seeing the same problem. What are your arguments? Just
>
> mplayer -tv on:...
>
> Is your video slow since the begining or you have to wait few minutes?

 From the beginning. Also, different timebases of the recording and 
playback device is an important issue. After a while, you either get 
excess samples from the recorder, or the player starts starving.

>> I am objecting to the current unusability of the patch.
>
>
> The patch just exhibits problem that was already there, but you are 
> right better to make it work correctly.

-- 
Jindrich Makovicka




More information about the MPlayer-dev-eng mailing list