-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
UDP transport #639
Comments
Some preliminary notes:
very distant future: handle UDP broadcasts for multiple clients |
Not as useful as first thought, too many implementation issues, other more pressing issues (ie: #835) would clash with this. So re-scheduling as future. |
For the encryption part, we can use CBC with a new IV based on the packet sequence number, or a counter mode, or just DTLS. |
See also #1124 The packet loss rate may have an effect on our encoding selection: maybe we should use encodings that tolerate packet loss better. ie: not png or jpeg for big areas. |
This has some helpful pointers: How to stream H.264 video over UDP using the NVidia NVEnc hardware encoder? |
In order to do DTLS, we would need to use something like PyDTLS (no API docs, no examples, no commits for 4 months, no python3 support) or use the raw openssl via python-cryptography (support added in issue 3501 - circa 2.0?) - problem is that >=1.9 doesn't build on macos: #1544, and is a much lower level API. |
2017-08-17 14:55:27: antoine uploaded file
|
Here's how the UDP patch above works:
Still TODO:
Good read: Dealing with IPv6 fragmentation in the DNS: UDP is different, and in UDP a functional response to path message size issue inevitably relies on interaction with the upper-level application protocol. |
2017-08-23 09:04:17: antoine uploaded file
|
With the patch above, UDP seems to work quite reliably, even with a high packet loss (10%).
(adding Things left to fix:
|
2017-08-29 11:30:17: antoine uploaded file
|
Code committed in r16734 - see large commit message. This code also adds a new flag:
(set a higher value to drop the first packet more than once) Still TODO (probably not all for this release):
|
Minor enhancements in r16969. For audio, it may be possible to just let gstreamer handle the dropped and out-of-order packets via rtpjitterbuffer: AAC/RTP streaming:
Having to specify the caps on the receiver is a pain though. |
For DTLS, wolfcrypt-py might be useful. |
This will have to do for this release, will follow up in #1669. @maxmylyn: can you break it? |
2017-10-27 22:57:43: maxmylyn commented
|
UDP support has been removed in 2022238. |
Rather than using mosh #219, we should be able to do our own UDP transport: we know which packets must arrive and may need to be re-sent (window metadata, etc), and which ones we can just skip when they go missing: we just send a newer update instead (window pixels, cursors, etc..).
Then we can also tune the video encoders and insert key frames when needed (and maybe also lower the default gap between key frames when UDP is used), etc..
This may also helps us achieve other things: we could more easily use parallel processes for encoding since each process can then send its data without needing to synchronize or share the socket. Also useful when using hardware encoders which have their own network ports.
We should not need to worry about UDP hole punching for now, if ever.
I don't think we want to be using a library like UDT either: we would lose some flexibility, and the python bindings are old and not very portable...
The text was updated successfully, but these errors were encountered: