Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: lib: stream: Improve RTSP latency #426

Merged

Conversation

joaoantoniocardoso
Copy link
Collaborator

@joaoantoniocardoso joaoantoniocardoso commented Jul 18, 2024

The is-live=true in shmsrc was adding ~1 frame of latency, while the sync=true in shmsink was adding more ~2.

tested:

  • locally (Linux)
  • BlueOS @ Raspberry Pi 4

How to test:

  1. Create a QrTimestamp 320x320@30fps RTSP stream as below:
    image

  2. To receive it, run the following line:

clear; GST_DEBUG="*:3,*qrtimestampsink*:5" gst-launch-1.0 -v \
    rtspsrc location=rtsp://192.168.100.2:8554/test is-live=true latency=0 \
    ! application/x-rtp,payload=96 \
    ! rtph264depay \
    ! h264parse \
    ! avdec_h264 discard-corrupted-frames=true \
    ! videoconvert \
    ! qrtimestampsink

Before this patch (master), the expected latency is ~100 ms.
After this patch it is ~34 ms (which is the same as the UDP)

@joaoantoniocardoso joaoantoniocardoso merged commit be9b059 into mavlink:master Jul 18, 2024
7 checks passed
@joaoantoniocardoso joaoantoniocardoso deleted the improve_rtsp_latency branch July 18, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants