STREAMER Synchronizing multiple sources to a common receiver
thiyagesh viswanathan
thiyageshv at gmail.com
Sat May 7 18:25:54 UTC 2016
I am just adding few stuff for more clarity.
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.
Questions I want to be answered:
1.Is my pipeline structure correct?
2.I am not modifying the pipeline clocks at all. Just assuming that the pipeline clocks of senders and receivers will be 3.synchronized once we sync the devices through NTP. Is this assumption correct?
4.Should I have just one rtpbin or separate rtpbin for each sender?
5.Should i USE RTPJITTERBUFFER? if yes, should the mode be synced?
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/ab4cf640/attachment-0001.html>
More information about the gstreamer-devel
mailing list