AV synchronization rtp.

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

AV synchronization rtp.

BogdanS
I have two apps.
One takes audio from some source, rtp payload and sends it to udpsink.
Second takes video from another source, rtp payload and sends to udpsink.

On reciever side I recive two streams and save them to pcap's.

My problem that sometimes I turn off for sec audio source, and sometimes videosource.
When I try to convert pcap to avi, it's not synchronized.

How I can to do synchronization( when saving to file) when I receive from two different sources?
Usually what way people uses?



Reply | Threaded
Open this post in threaded view
|

Re: AV synchronization rtp.

Sebastian Dröge-3
On Sun, 2016-09-25 at 03:30 -0700, BogdanS wrote:

> I have two apps.
> One takes audio from some source, rtp payload and sends it to udpsink.
> Second takes video from another source, rtp payload and sends to udpsink.
>
> On reciever side I recive two streams and save them to pcap's.
>
> My problem that sometimes I turn off for sec audio source, and sometimes
> videosource. 
> When I try to convert pcap to avi, it's not synchronized. 
>
> How I can to do synchronization( when saving to file) when I receive from
> two different sources? 
> Usually what way people uses?
There are no means for synchronization between different streams in RTP
alone, only for a single stream by itself. You need additional
information from elsewhere to do that.

This is provided by RTCP for example, or a higher-level protocol like
RTSP. Just dumping different RTP streams to a PCAP will not preserve
any of this information.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: AV synchronization rtp.

BogdanS
Thank you.
And there is no way to make synchronization from pcap?
Reply | Threaded
Open this post in threaded view
|

Re: AV synchronization rtp.

BogdanS
Found Solution:
Use audiorate and videorate to recieve a perfect stream.
Reply | Threaded
Open this post in threaded view
|

Re: AV synchronization rtp.

Sebastian Dröge-3
On Wed, 2016-09-28 at 05:23 -0700, BogdanS wrote:
> Found Solution:
> Use audiorate and videorate to recieve a perfect stream.

That's not going to do proper A/V sync with RTP streams though.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: AV synchronization rtp.

BogdanS
Sebastian Dröge-3 wrote
On Wed, 2016-09-28 at 05:23 -0700, BogdanS wrote:
> Found Solution:
> Use audiorate and videorate to recieve a perfect stream.

That's not going to do proper A/V sync with RTP streams though.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


signature.asc (949 bytes) <http://gstreamer-devel.966125.n4.nabble.com/attachment/4679846/0/signature.asc>

Yep. It does not work properly. If I will use in rtpbin element on sender and receiver, it will work?
My problem that .avi file has audio channel and video channel. That means if I am saving to avi audio and video one-hour-stream and on minute 30 turn off for 10 min audio for example and turn on back.  Video cahnnel will be hour long and data in audio channel will 50 min long.

Audio jumps  from minute 30 to minute 40. Because between 30 and 40 I have nothing to put to file.

So how I can to put something in this gap?

Thank you