-
Notifications
You must be signed in to change notification settings - Fork 201
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
Switch RTCP handling to pion/interceptor #22
Comments
Hi @aler9 ! What is the current status on this one? We're really eager to get some stats for RTSP-sessions (accessible in Prometheus metrics or in API), especially for jitter and package loss. Do you have any basic overview of the migration process to get this working from the webrtc package, over to to RTSP on this matter? Because if not currently in progress, I/we might try to start the process because of the need for it now. Also, if you could provide a rough overview of the needed work, this would help alot. Some key features, that might overlap with this endeavour:
Is the gortsplib currently utilizing any optimalisation/adjustments in the videostream based on the RTCP for RTSP-sessions? |
Hello Magnus,
The switch to pion/interceptor was put on hold because it requires an additional layer that decreases performance. Most of its features are already implemented here.
This might be a good future enhancement, currently the only two exposed stats are
This is already present in a real-time variant, it's inside
Video adjustments like dynamic bitrate cannot be achieved since an RTSP server or client doesn't have access to the video encoder, contrarily to browser-based WebRTC, therefore video packets can only be routed without touching them. Resending lost video frames through NACKs would be a very good enhancement but there is no client that supports it (VLC, FFmpeg, GStreamer), thus it would be useless to implement it. The only thing that you can do to improve the transmission rate with RTSP is using Forward Error Compensation (FEC), that consists in sending the same packet multiple times at once. You can generate packets by following the specification and send them through gortsplib. |
Thank you so much for the detailed reply @aler9 ! 👏 We have a lot of unstable (wifi/wireless linked) RTSP-cameras we need to connect to. Btw, we're currently benchmarking TCP vs UDP on the streams, but are interested in all ways the gortsplib by default handles instable/bad streams, and what potential features/param adjustments we can use/create to manually improve the streams. From what you write, I cannot find alot of FEC implementations (only some research-papers) which use this. Thanks in advance |
From what I've used in gstreamer, mainly three params/features would be nice to manually adjust:
Are any if these already implemented as with any default-value? |
There is no latency, because the server doesn't need to emit frames with a constant interval. The server sends out frames to clients as soon as they are available. It's the client responsibility to keep a buffer with a latency and emit frames with a constant interval. |
This might be out of scope of the original issue but is it possible currently to handle PLI RTCP feedback packets (in the context of a mediamtx server being sent them by an RTSP client)? In my case I'm needing to intercept them and forward them upstream (as mediamtx is proxying an RTSP stream from another source). |
Features that are currently missing in gortsplib's receiver reports and sender reports, and are handled correctly in pion/interceptor:
The text was updated successfully, but these errors were encountered: