To ensure proper timestamp synchronization and smooth video processing in the pipeline, the RTSP camera must support RTCP Sender Reports (SR).
In addition, the camera’s system time should be synchronized with the edge device using a common time source such as NTP. The camera and edge device should also use the same time zone to avoid timestamp drift, log mismatches, and inconsistencies during stream processing.
To inspect SR packets, you’ll use gst-launch-1.0 with rtspsrc and RTP/RTCP components (via rtpsession). Install the required packages:
sudo apt update
sudo apt install -y \
gstreamer1.0-tools \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libavUpdate the RTSP URL in the pipeline and replace the placeholders with your camera details and run the below command
<USERNAME>: camera username<PASSWORD>: camera password<RTSP_CAMERA_IP>: camera IP address<PORT>: RTSP port (commonly554)<FEED>: stream path (varies by camera model/vendor)
Note: If you are behind a proxy network, make sure the camera IP is added to
no_proxyorNO_PROXY
rm -f text.txt; timeout 15s sh -c "GST_DEBUG=rtpsession:7 \
gst-launch-1.0 -v rtspsrc protocols=tcp add-reference-timestamp-meta=true location=\"rtsp://<USERNAME>:<PASSWORD>@<RTSP_CAMERA_IP>:<PORT>/<FEED>\" latency=100 ! fakesink 2>&1 \
| grep 'GstRtpSession:rtpsession0: stats' > text.txt"; grep 'internal\\=\\(boolean\\)false' text.txt | grep -q 'have-sr\\=\\(boolean\\)true' && echo true- If you see
trueprinted in the console, the camera supports RTCP Sender Reports (SR). - If nothing is printed, the camera likely does not provide SR packets (or they were not observed during the 15-second window).
Note: If you suspect SR exists but wasn’t observed, increase the timeout window (e.g.,
timeout 30s) and re-run.
Get the RTSP stream URL from the camera configuration software. Optionally validate the stream using VLC Media Player.
Edit configs/dlstreamer-pipeline-server/config.json and update the pipeline string.
Update the RTSP URL in the pipeline and replace the placeholders with your camera details:
<USERNAME>: camera username<PASSWORD>: camera password<RTSP_CAMERA_IP>: camera IP address / hostname<PORT>: RTSP port (commonly554)<FEED>: stream path (varies by camera model/vendor)
"pipeline": "rtspsrc add-reference-timestamp-meta=true location=\"rtsp://<USERNAME>:<PASSWORD>@<RTSP_CAMERA_IP>:<PORT>/<FEED>\" latency=100 name=source ! rtph264depay ! h264parse ! decodebin ! videoconvert ! video/x-raw,format=BGR ! gvaclassify inference-region=full-frame name=classification ! gvawatermark ! gvametaconvert add-empty-results=true add-rtp-timestamp=true name=metaconvert ! queue ! gvafpscounter ! appsink name=destination"Update .env with the RTSP Camera IP for:
RTSP_CAMERA_IP
Restart the services to apply the changes:
make down && make up