STREAMER Synchronizing multiple sources to a common receiver

thiyagesh viswanathan thiyageshv at gmail.com
Sat May 7 07:56:41 UTC 2016


SETUP: So, I have two sender trying to send video from two different devices. I have synced the clocks of both the senders through NTPD daemon. Then I tried executing this pipeline based on the insights from Streamer conference videos and few posts in this forum. I am basically assuming here that the pipeline is going to the use the NTP clock. External clock sync is all I need to do before I implement this. Please correct me if I am wrong.  At the receiver I put both streams into a common RTPbin. 

PROBLEM:  I am not getting the expected results. The frames are stuck most of the time or out of sync.  Please let me know where I am going wrong. I am not exactly sure on where I have to use the Test-Netclocck examples. I thought that was a substitute for NTP daemon based syncing.  
I would be really happy if I could get a pipeline based solution. I am not very familiar with the C API.

The pipeline of both senders look like this
SENDER PIPELINE:
VOFFSET=0
AOFFSET=0

VELEM="v4l2src device=/dev/video1"
VCAPS="video/x-raw,width=352,height=288,framerate=15/1"
VSOURCE="$VELEM ! queue ! videorate ! videoconvert ! $VCAPS"
VENC="vp8enc ! rtpvp8pay"
VRTPSINK="udpsink port=5000 host=$DEST ts-offset=$VOFFSET name=vrtpsink"
VRTCPSINK="udpsink port=5001 host=$DEST sync=false  name=vrtcpsink"
VRTCPSRC="udpsrc port=5005 name=vrtpsrc"

gst-launch-1.0 -v rtpbin name=rtpbin ntp-time-source=clock-time \
    $VSOURCE ! $VENC ! rtpbin.send_rtp_sink_0                                             \
        rtpbin.send_rtp_src_0 ! $VRTPSINK                                                 \
        rtpbin.send_rtcp_src_0 ! $VRTCPSINK                                               \
      $VRTCPSRC ! rtpbin.recv_rtcp_sink_0         

RECEIVER PIPELINE:


VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)VP8"
VIDEO_CAPS2="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)VP8"

VIDEO_DEC="rtpvp8depay ! vp8dec"
VIDEO_DEC2="rtpvp8depay ! vp8dec"

VIDEO_SINK="videoconvert ! autovideosink"
VIDEO_SINK2="videoconvert ! autovideosink"

gst-launch-1.0 -v rtpbin name=rtpbin ntp-time-source=clock-time ntp-sync=true buffer-mode=synced rtcp-sync-send-time=false\
     udpsrc caps=$VIDEO_CAPS port=5000  ! rtpjitterbuffer mode=synced !  rtpbin.recv_rtp_sink_0                       \
       rtpbin.  ! $VIDEO_DEC ! $VIDEO_SINK                                             \
     udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0                                       \
         rtpbin.send_rtcp_src_0 ! udpsink port=5005 host=$DEST sync=false \
     udpsrc caps=$VIDEO_CAPS2 port=6000  ! rtpjitterbuffer mode=synced ! rtpbin.recv_rtp_sink_1                       \
       rtpbin. ! $VIDEO_DEC2 ! $VIDEO_SINK2                                             \
     udpsrc port=6001  ! rtpbin.recv_rtcp_sink_1   \  
rtpbin.send_rtcp_src_1 ! udpsink port=6005 host=$DEST2 sync=false   



Thank you for your time,
Thiyagesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160507/ccb01b5e/attachment.html>


More information about the gstreamer-devel mailing list