Syncronizing multiple RTSP streams from live video sources

Hello everyone,

I’m currently working on a project where I need to synchronize multiple RTSP streams, using GStreamer 1.16.
Challenges/Questions

  • Is there a way to use GStreamer’s built-in functionalities to synchronize multiple pipelines?
  • Is there a method to retrieve the timestamp of each frame (RTP packet)

System Design

  • RTSP Server (Camera Device) :
gst_rtsp_media_factory_set_launch ( appsrc name=videosrc ! nvvidconv ! video/x-raw(memory:NVMM), format=P010_10LE ! 
nvv4l2h265enc num-Ref-Frames=8 iframeinterval=10 enable-lossless=true bitrate=1000000 ! 
video/x-h265, stream-format=(string)byte-stream ! tee name=t 
t. ! queue ! h265parse ! rtph265pay name=pay0 pt=96 )
  • RTSP Client
    The client connects to all available camera streams. For instance, if there are 5 RTSP streams, it connects to all and attempts to synchronize the frames from each stream.

A new pipeline is created for each RTSP stream using gst_bin_add_many with the following elements: