-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add Low latency mode for video #8551
Conversation
This needs to be a setting? It kinds of reads like "check this box to make your video not suck"! |
@andrewvoznytsa pointed out that some encoders can send frames out of orders, which the sync takes care of. So the lower latency mode is probably less robust, and higher-latency smoother. |
There is no way to autodetect that somehow? if not, then we need some good way to explain this completely techy thing to a user @Williangalvani Can you screenshot the new setting? @hamishwillee Getting hamish involved... |
We'll have to ask @andrewvoznytsa. Maybe based on the amount of bad frames decoded? I'd still prefer some artifacts over a high latency video. Making it low-latency-only or making it the default both sound ok to me, I was just being cautious as it could harm other users I'm not aware of. PS: I got the image on the PR description |
This will fix #8489 . The setting is working over here, no app restart is necessary. In controlled tests (ethernet connection, udp, h264 1080p 30fps): QGC 3.5: 202ms After this patch: What this does is enable/disable an internal buffer that will wait for missing/out-of-order packets for 200ms, then reorder the packets for a nice display. This is very good for wireless connections, but it adds up to 200ms latency to the video stream, which is quite noticeable to a pilot. If the internal frame buffer is disabled, the video stream may have more tearing/breaking and lower framerate (especially for a poor wireless connection), but the 200ms latency overhead of the internal frame buffer is eliminated. I suggest calling the setting 'disable (200ms) frame buffer' or something along those lines. |
Ok, so I'm maybe fingers crossed at a point with Stable that this next point release may last more than a couple days. So I'd like to wait on it until we get some good wording here. Then I'll merge and get a point release out. |
There are some ways to autodetect if this rtp jitter buffer is needed (in fact this is something that good jitter buffers do - they are able to adjust buffer length depending on QoS). But they are very risky to be added in the last moment and not really trivial to do. Our silver bullet for 4.0 is to explain that |
9e479d5
to
ef675ec
Compare
Updated, thank you @andrewvoznytsa for the help. |
Note: It's possible for QGC to inform the user about the video latency: |
Is this ready to merge? |
I am running some tests here on a real vehicle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DonLakeFlyer This pr is testing ok, and I believe we have @andrewvoznytsa blessing on the implementation.
Docs pr is here: mavlink/qgc-user-guide#251
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if you need me to test then I can do it tomorrow (past midnight here).
Thanks folks. I'll spit out a point release tomorrow. |
This setting disables the rtpjitterbuffer and sets the videosink to non-sync (assynchronous? mode. This reduces the latency here from ~380ms to ~200ms.
@jaxxzer can you please test?