Use of gst_pipeline_set_new_stream_time function

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

Use of gst_pipeline_set_new_stream_time function

Tseng, Kuo-Lang
Hi,

I am trying to stream/render content over rtp using gstreamer on two Ubuntu machines. I kept getting the following error and warning on receiver side if I start the receiver side pipeline first. The video will stop rendering after a while:

Unexpected discontinuity in audio timestamps of more than half a second (0:00:00.512000000), resyncing GstMessageWarning, gerror=(GstGError)(NULL), debug=(string)"gstbaseaudiosink.c\(1365\):\ gst_base_audio_sink_render\ \(\):\ /pipe/autoaudiosink1/autoaudiosink1-actual-sink-alsa:\012Unexpected\ discontinuity\ in\ audio\ timestamps\ of\ more\ than\ half\ a\ second\ \(0:00:00.512000000\)\,\ resyncing";
bus_cb[WARNING]: from element /pipe/autoaudiosink1/autoaudiosink1-actual-sink-alsa: Compensating for audio synchronisation problems Additional debug info:
gstbaseaudiosink.c(1365): gst_base_audio_sink_render (): /pipe/autoaudiosink1/autoaudiosink1-actual-sink-alsa:

My sender side command is:
gst-launch -v gstrtpbin name=rtpbin filesrc location=file.ts ! \
                 queue2 max-size-buffers=65535 ! \
                 mpegtsparse ! \
                 rtpmp2tpay ! \
                 queue2 max-size-buffers=65535 ! \
                 rtpbin.send_rtp_sink_0 \
                 rtpbin.send_rtp_src_0 ! udpsink host=10.3.66.53 port=5000 \
                 rtpbin.send_rtcp_src_0 ! udpsink host=10.3.66.53 port=5001 sync=false async=false \
                 udpsrc port=5002 ! rtpbin.recv_rtcp_sink_0

My receiver side is a program which mimics following pipeline:
gst-launch -v gstrtpbin name=rtpbin udpsrc port=5000 caps="application/x-rtp,media=video,clock-rate=90000,encoding-name=mpegts" ! \
                 rtpbin.recv_rtp_sink_0 rtpbin. ! \
                 rtpmp2tdepay ! \
                 flutsdemux name=demuxer \
                 demuxer. ! queue2 max-size-buffers=0 max-size-time=0 ! a52dec ! audioconvert ! volume volume=10 ! autoaudiosink \
                 demuxer. ! queue2 max-size-buffers=0 max-size-time=0 ! mpeg2dec ! autovideosink \
                 udpsrc port=5001 ! \
                 rtpbin.recv_rtcp_sink_0 \
                 rtpbin.send_rtcp_src_0 ! \
                 udpsink host=10.3.66.198 port=5002 sync=false async=false -t

I found that if I added a call to gst_pipeline_set_new_stream_time(bin, 0) in the on-new-ssrc callback function in the program, the problem won't show and video/audio redering works fine (I still started the receiver side program first before the sender side command).

What is the consequence of calling this function and is it required to use this function?

Any help is appreciated.

Thanks
Kuo

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Use of gst_pipeline_set_new_stream_time function

Tseng, Kuo-Lang
Hi,

I am trying to stream/render content over rtp using gstreamer on two Ubuntu machines. I kept getting the following error and warning on receiver side if I start the receiver side pipeline first. The video will stop rendering after a while:

Unexpected discontinuity in audio timestamps of more than half a second (0:00:00.512000000), resyncing GstMessageWarning, gerror=(GstGError)(NULL), debug=(string)"gstbaseaudiosink.c\(1365\):\ gst_base_audio_sink_render\ \(\):\ /pipe/autoaudiosink1/autoaudiosink1-actual-sink-alsa:\012Unexpected\ discontinuity\ in\ audio\ timestamps\ of\ more\ than\ half\ a\ second\ \(0:00:00.512000000\)\,\ resyncing";
bus_cb[WARNING]: from element /pipe/autoaudiosink1/autoaudiosink1-actual-sink-alsa: Compensating for audio synchronisation problems Additional debug info:
gstbaseaudiosink.c(1365): gst_base_audio_sink_render (): /pipe/autoaudiosink1/autoaudiosink1-actual-sink-alsa:

My sender side command is:
gst-launch -v gstrtpbin name=rtpbin filesrc location=file.ts ! \
                 queue2 max-size-buffers=65535 ! \
                 mpegtsparse ! \
                 rtpmp2tpay ! \
                 queue2 max-size-buffers=65535 ! \
                 rtpbin.send_rtp_sink_0 \
                 rtpbin.send_rtp_src_0 ! udpsink host=10.3.66.53 port=5000 \
                 rtpbin.send_rtcp_src_0 ! udpsink host=10.3.66.53 port=5001 sync=false async=false \
                 udpsrc port=5002 ! rtpbin.recv_rtcp_sink_0

My receiver side is a program which mimics following pipeline:
gst-launch -v gstrtpbin name=rtpbin udpsrc port=5000 caps="application/x-rtp,media=video,clock-rate=90000,encoding-name=mpegts" ! \
                 rtpbin.recv_rtp_sink_0 rtpbin. ! \
                 rtpmp2tdepay ! \
                 flutsdemux name=demuxer \
                 demuxer. ! queue2 max-size-buffers=0 max-size-time=0 ! a52dec ! audioconvert ! volume volume=10 ! autoaudiosink \
                 demuxer. ! queue2 max-size-buffers=0 max-size-time=0 ! mpeg2dec ! autovideosink \
                 udpsrc port=5001 ! \
                 rtpbin.recv_rtcp_sink_0 \
                 rtpbin.send_rtcp_src_0 ! \
                 udpsink host=10.3.66.198 port=5002 sync=false async=false -t

I found that if I added a call to gst_pipeline_set_new_stream_time(bin, 0) in the on-new-ssrc callback function in the program, the problem won't show and video/audio redering works fine (I still started the receiver side program first before the sender side command).

What is the consequence of calling this function and is it required to use this function?

Any help is appreciated.

Thanks
Kuo

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel