Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gstreamer gstreamer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 935
    • Issues 935
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 438
    • Merge requests 438
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gstreamergstreamer
  • Issues
  • #494
Closed
Open
Issue created Jan 14, 2020 by Andy Silby@asilby

RTP Streams out of sync

2 rtp streams sent from a machine and received by the same machine are not in sync. Run the 3 command lines below on the same machines to see the issue. The only difference in the 2 command lines is that one has a speed-preset of 4 and the other 5. Due to the rtcp-sync-send-time=false both streams should be in sync. This is obviously causing us fairly major problems. Thanks very much for all your time and help.

Stream1

gst-launch-1.0 rtpbin name=rtpbin buffer-mode=4 rtp-profile=avpf rtcp-sync-send-time=FALSE \
               videotestsrc is-live=true ! video/x-raw,width=1280,height=720,framerate=20/1 ! queue  \
               ! clockoverlay ! videoconvert ! x264enc speed-preset=5  ! h264parse \
               ! video/x-h264,profile=main,width=1280,height=720,framerate=20/1  ! queue !  rtph264pay \
               ! rtpbin.send_rtp_sink_0 \
               rtpbin.send_rtp_src_0 ! udpsink host=127.0.0.1 port=10000 \
               rtpbin.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=10001 sync=false async=false \
               udpsrc port=10002 ! rtpbin.recv_rtcp_sink_0

Stream2

gst-launch-1.0 rtpbin name=rtpbin buffer-mode=4 rtp-profile=avpf rtcp-sync-send-time=FALSE \
               videotestsrc is-live=true ! video/x-raw,width=1280,height=720,framerate=20/1 ! queue  \
                 ! clockoverlay ! videoconvert ! x264enc speed-preset=4  ! h264parse \
                 ! video/x-h264,profile=main,width=1280,height=720,framerate=20/1  ! queue !  rtph264pay \
                 ! rtpbin.send_rtp_sink_0 \
               rtpbin.send_rtp_src_0 ! udpsink host=127.0.0.1 port=10003 \
               rtpbin.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=10004 sync=false async=false \
               udpsrc port=10005 ! rtpbin.recv_rtcp_sink_0

Receiver

gst-launch-1.0 rtpbin  name=rtpbin2 buffer-mode=4 ntp-sync=true latency=400 rtp-profile=avpf \
              compositor  name=convert  sink_0::xpos=0 sink_0::ypos=0 \
                            sink_0::zorder=0 sink_1::xpos=640 sink_1::ypos=360 sink_1::zorder=1 \
              ! videoscale ! video/x-raw,width=1280,height=720 \
              ! videoconvert ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=0 ! autovideosink \
              udpsrc caps="application/x-rtp,media=(string)video, clock-rate=(int)90000, \
                            encoding-name=(string)H264, payload=96" port=10000 \
              ! rtpbin2.recv_rtp_sink_0 rtpbin2. ! rtph264depay \
              ! queue  max-size-buffers=0 max-size-bytes=0 max-size-time=0 \
              ! avdec_h264 ! video/x-raw,width=1280,height=720,framerate=20/1 ! videoconvert ! convert.sink_0 \
              udpsrc port=10001 ! rtpbin2.recv_rtcp_sink_0 \
              rtpbin2.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=10002 sync=false async=false\
              udpsrc caps="application/x-rtp,media=(string)video, clock-rate=(int)90000,\
                             encoding-name=(string)H264, payload=96" port=10003 \
              ! rtpbin2.recv_rtp_sink_1 \
              rtpbin2. ! rtph264depay !  queue  max-size-buffers=0 max-size-bytes=0 max-size-time=0 \
              ! avdec_h264 ! video/x-raw,width=1280,height=720,framerate=20/1 ! videoconvert ! convert.sink_1 \
              udpsrc port=10004 ! rtpbin2.recv_rtcp_sink_1 \
              rtpbin2.send_rtcp_src_1 ! udpsink host=127.0.0.1 port=10005 sync=false async=false
Edited Jan 16, 2020 by Andy Silby
Assignee
Assign to
Time tracking