two computer sync

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

two computer sync

nongio


Hi all, 
i'm a newbie gstreamer developer, i'm trying to build two pipelines for play a video in two different computers that will play in frame sync. what is the best way to do this? 
(each computer have the source video file in the local filesystem)

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: two computer sync

Marc Murphy
I would say look at using multicast to the two computers. You can setup a multicast pipeline to play out the video source and have each receiving pc have the rx end running continually so that when you start the playing from the server it will start the decode on each receiving pc. 

Sent from my iPhone

On 26 Mar 2011, at 10:01, "Riccardo Canalicchio" <[hidden email]> wrote:



Hi all, 
i'm a newbie gstreamer developer, i'm trying to build two pipelines for play a video in two different computers that will play in frame sync. what is the best way to do this? 
(each computer have the source video file in the local filesystem)
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: two computer sync

timothe jahan
Just two mention that this was done in my company (nothing to do with gstreamer) but the multicast was not enough to ensure synchronisation down to frame level, they had to implement some custom protocole between the players.
Of course it depends on the accuracy needed...

Regards, 
TImothe

On Sat, Mar 26, 2011 at 11:57 AM, Marc Murphy <[hidden email]> wrote:
I would say look at using multicast to the two computers. You can setup a multicast pipeline to play out the video source and have each receiving pc have the rx end running continually so that when you start the playing from the server it will start the decode on each receiving pc. 

Sent from my iPhone

On 26 Mar 2011, at 10:01, "Riccardo Canalicchio" <[hidden email]> wrote:



Hi all, 
i'm a newbie gstreamer developer, i'm trying to build two pipelines for play a video in two different computers that will play in frame sync. what is the best way to do this? 
(each computer have the source video file in the local filesystem)
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: two computer sync

Marc Murphy
In reply to this post by Marc Murphy
If you use ts encapsulation which means you will have pcr and time stamping it means that it will be synchronised. 

Sent from my iPhone

On 26 Mar 2011, at 12:30, "timothe jahan" <[hidden email]> wrote:

Just two mention that this was done in my company (nothing to do with gstreamer) but the multicast was not enough to ensure synchronisation down to frame level, they had to implement some custom protocole between the players.
Of course it depends on the accuracy needed...

Regards, 
TImothe

On Sat, Mar 26, 2011 at 11:57 AM, Marc Murphy <[hidden email]> wrote:
I would say look at using multicast to the two computers. You can setup a multicast pipeline to play out the video source and have each receiving pc have the rx end running continually so that when you start the playing from the server it will start the decode on each receiving pc. 

Sent from my iPhone

On 26 Mar 2011, at 10:01, "Riccardo Canalicchio" <[hidden email]> wrote:



Hi all, 
i'm a newbie gstreamer developer, i'm trying to build two pipelines for play a video in two different computers that will play in frame sync. what is the best way to do this? 
(each computer have the source video file in the local filesystem)
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: two computer sync

nongio
and what about using GstNetTimeProvider and GstNetTimeClient? they are made for this kind of stuff?



Il giorno 26/mar/2011, alle ore 15:57, Marc Murphy <[hidden email]> ha scritto:

If you use ts encapsulation which means you will have pcr and time stamping it means that it will be synchronised. 

Sent from my iPhone

On 26 Mar 2011, at 12:30, "timothe jahan" <[hidden email]> wrote:

Just two mention that this was done in my company (nothing to do with gstreamer) but the multicast was not enough to ensure synchronisation down to frame level, they had to implement some custom protocole between the players.
Of course it depends on the accuracy needed...

Regards, 
TImothe

On Sat, Mar 26, 2011 at 11:57 AM, Marc Murphy <[hidden email][hidden email]> wrote:
I would say look at using multicast to the two computers. You can setup a multicast pipeline to play out the video source and have each receiving pc have the rx end running continually so that when you start the playing from the server it will start the decode on each receiving pc. 

Sent from my iPhone

On 26 Mar 2011, at 10:01, "Riccardo Canalicchio" <[hidden email][hidden email]> wrote:



Hi all, 
i'm a newbie gstreamer developer, i'm trying to build two pipelines for play a video in two different computers that will play in frame sync. what is the best way to do this? 
(each computer have the source video file in the local filesystem)
_______________________________________________
gstreamer-devel mailing list
[hidden email][hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email][hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: two computer sync

nongio
ok, i have tried to use GstNetTimeProvider and GstNetClientClock with this code:

//on the server side
gst_element_set_state (pipeline, GST_STATE_PLAYING);
GstClock * clock =  (GstClock *)gst_pipeline_get_clock((GstPipeline*)pipeline);
gst_net_time_provider_new(clock, "127.0.0.1", 3333);

//on the client side
GstClock * netclientclock = gst_net_client_clock_new("net_clock", "127.0.0.1", 3333, GST_SECOND);
gst_pipeline_use_clock((GstPipeline*)pipeline, netclientclock);
gst_element_set_state (pipeline, GST_STATE_PLAYING);

results:
the two pipelines are not synchronized but if I calibrate the server clock to a double speed the client goes at double speed:
gst_clock_set_calibration(clock, (GstClockTime)0, gst_clock_get_time(clock), (GstClockTime)2, (  GstClockTime)2);

so i think that the two clocks are synchronized, now my question is: how can i set the same start time on the two pipelines? 



On 26 March 2011 18:17, Riccardo Canalicchio <[hidden email]> wrote:
and what about using GstNetTimeProvider and GstNetTimeClient? they are made for this kind of stuff?



Il giorno 26/mar/2011, alle ore 15:57, Marc Murphy <[hidden email]> ha scritto:

If you use ts encapsulation which means you will have pcr and time stamping it means that it will be synchronised. 

Sent from my iPhone

On 26 Mar 2011, at 12:30, "timothe jahan" <[hidden email][hidden email]> wrote:

Just two mention that this was done in my company (nothing to do with gstreamer) but the multicast was not enough to ensure synchronisation down to frame level, they had to implement some custom protocole between the players.
Of course it depends on the accuracy needed...

Regards, 
TImothe

On Sat, Mar 26, 2011 at 11:57 AM, Marc Murphy <[hidden email][hidden email][hidden email]> wrote:
I would say look at using multicast to the two computers. You can setup a multicast pipeline to play out the video source and have each receiving pc have the rx end running continually so that when you start the playing from the server it will start the decode on each receiving pc. 

Sent from my iPhone

On 26 Mar 2011, at 10:01, "Riccardo Canalicchio" <[hidden email][hidden email][hidden email]> wrote:



Hi all, 
i'm a newbie gstreamer developer, i'm trying to build two pipelines for play a video in two different computers that will play in frame sync. what is the best way to do this? 
(each computer have the source video file in the local filesystem)
_______________________________________________
gstreamer-devel mailing list
[hidden email][hidden email][hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email][hidden email][hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [gmail] Re: two computer sync

Marc Leeman
In reply to this post by nongio
> and what about using GstNetTimeProvider and GstNetTimeClient? they are made
> for this kind of stuff?

Indeed,

Using this you can go to a synchronisation of about 100-150 us on
RTP. We've done this about 9 months ago.

The patches are in GST since that time.

--
  greetz, marc
You can't cheat the phone company.
crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [gmail] Re: two computer sync

nongio
hi mark,
i'm able to put two clocks synchronized but how can i synchronize two pipelines including start time?

On 29 March 2011 15:29, Marc Leeman <[hidden email]> wrote:
> and what about using GstNetTimeProvider and GstNetTimeClient? they are made
> for this kind of stuff?

Indeed,

Using this you can go to a synchronisation of about 100-150 us on
RTP. We've done this about 9 months ago.

The patches are in GST since that time.

--
 greetz, marc
You can't cheat the phone company.
crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk2R3rgACgkQUQpj09NWLeH+EgCgxHPUJeKhbHiX390nii6rccmz
Ea4AoN8FkStxD1aJRJcFsPgzxVgvXQ/S
=LJl6
-----END PGP SIGNATURE-----

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [gmail] Re: two computer sync

Matt Veenstra
Riccardo,

I did this on another platform, andI set both pipelines to start a a
future time that was the same.  This guaranteed the clock starts the
time and not the API call.  The future time needs to be long enough
for all the calls to complete and for the item to get in the signal
queue.  I chose 100 milliseconds if I recall.

I am not sure how GStreamer handles this, but that same idea should work.

Matt
tribalmedia



On Tue, Mar 29, 2011 at 6:47 AM, Riccardo Canalicchio
<[hidden email]> wrote:

> hi mark,
> i'm able to put two clocks synchronized but how can i synchronize two
> pipelines including start time?
>
> On 29 March 2011 15:29, Marc Leeman <[hidden email]> wrote:
>>
>> > and what about using GstNetTimeProvider and GstNetTimeClient? they are
>> > made
>> > for this kind of stuff?
>>
>> Indeed,
>>
>> Using this you can go to a synchronisation of about 100-150 us on
>> RTP. We've done this about 9 months ago.
>>
>> The patches are in GST since that time.
>>
>> --
>>  greetz, marc
>> You can't cheat the phone company.
>> crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (GNU/Linux)
>>
>> iEYEARECAAYFAk2R3rgACgkQUQpj09NWLeH+EgCgxHPUJeKhbHiX390nii6rccmz
>> Ea4AoN8FkStxD1aJRJcFsPgzxVgvXQ/S
>> =LJl6
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel