How to sync audio and video in RTSP Server

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

How to sync audio and video in RTSP Server

dhquero
Hi,

I am working in a live video and audio. The video and audio frames are
received from security camera (via SKD) and retransmited in RTSP server
(gstreamer rtsp server). My pipiline in gstreamre server is:

appsrc name=appvideo is-live=true do-timestamp=true ! h264parse ! rtph264pay
perfect-rtptime=true name=pay0 pt=96 appsrc name=appaudio do-timestamp=false
caps=audio/x-alaw,rate=8000,channels=1 ! rawaudioparse use-sink-caps=true !
rtppcmapay perfect-rtptime=true name=pay1 pt=97

The problem is after a few seconds when video and audio aren't more
synchronized. My connection is estabilished by VLC player. I have a delay
only in my video. Audio is working fine.

Please, how to sync video and audio? What am I doning wrong?





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

Re: How to sync audio and video in RTSP Server

Nicolas Dufresne-5


Le ven. 1 nov. 2019 17 h 25, dhquero <[hidden email]> a écrit :
Hi,

I am working in a live video and audio. The video and audio frames are
received from security camera (via SKD) and retransmited in RTSP server
(gstreamer rtsp server). My pipiline in gstreamre server is:

appsrc name=appvideo is-live=true do-timestamp=true ! h264parse ! rtph264pay
perfect-rtptime=true name=pay0 pt=96 appsrc name=appaudio do-timestamp=false
caps=audio/x-alaw,rate=8000,channels=1 ! rawaudioparse use-sink-caps=true !
rtppcmapay perfect-rtptime=true name=pay1 pt=97

The problem is after a few seconds when video and audio aren't more
synchronized. My connection is estabilished by VLC player. I have a delay
only in my video. Audio is working fine.

Please, how to sync video and audio? What am I doning wrong?

Using do-timestamp never yields long term good results. Make sure to disable that and produce GstBuffer with a reliable timestamp source (ideally one that isn't affected by your OS scheduler) and in a way that audio and video can be correlated.







--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: How to sync audio and video in RTSP Server

dhquero
Your resolution solved my problem.
I just put PTS manually in GstBuffer and my pipeline is working fine.
Thank you a lot!



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel