[MPlayer-users] UDP -udp-slave video sync
rob at goto10.org
rob at goto10.org
Wed Jun 8 15:40:57 CEST 2011
On Tue, 7 Jun 2011 18:29:12 -0700, Jason Holt wrote:
> On Tue, Jun 7, 2011 at 3:16 PM, wrote:
>> On Mon, 06 Jun 2011 14:29:12 -0400, Morris Beverly wrote:
>>> mplayer -udp-slave myvid.mkv
>>>> then mplayer should apparently freeze on a frame and wait for
>>>> messages from a master instance - for me this does not happen
>>>> - it just plays as normal... i get no error messges about
>>>> even with a -v
>> i cc in jholt who i think is the author of the patch - and sorry in
>> advance if i am missing something obvious
> This does indeed appear to be broken. It kinda works if I start
> the master first, but not very well.
> If I start it without a master present, it renders frames as fast as
> it possibly can, because udp_slave_sync() returns immediately,
> sleep_until_update() to return immediately.
> Then, during "normal" playback, once the slave gets synced up with
> the master and should be playing in lock step, the
> ends up == MP_NOPTS_VALUE for about 10 invocations due to the
> nonblocking get_udp trying to tell it that there aren't any messages
> yet. So udp_slave_sync returns immediately, and mplayer plays frames
> as fast as it can once again. When a datagram finally comes in, the
> slave is way ahead of the master, so it blocks until the master
> catches up, then runs ahead again.
> The attached patch makes the slave block if the master isn't up yet,
> which was the original behavior, and which I think is better than
> having it play normally in most instances. (If you gave -udp-sync,
> you probably want it to wait.) And it makes udp_master_position
> static, so that it's only set to MP_NOPTS_VALUE on startup and after
> blocking get_udp calls.
ok great thank you! - i applied the patch and now it works as expected
- the only thing i have noticed is that the audio and video go out of
sync on the slave instance - its as if the udp packets tell the video
which frame it should be playing but the audio doesnt jump to keep up
i tried passing mplayer some flags to try and fix it -mc 1 -autosync 1
etc but none made any difference
any clue how this could be fixed so the audio and video stay in sync on
the slave instances?
(i know if i were doing a video wall then you could just use the audio
from one source - but this is not what i am doing)
thanks for the quick reply and patch fix!
More information about the MPlayer-users