rust-media-libs icon indicating copy to clipboard operation
rust-media-libs copied to clipboard

RTMPx

Open ROBERT-MCDOWELL opened this issue 4 years ago • 8 comments

Hi Folks, is rust-media-libs support RTMPS, RTMPE, RTMPTE, RTMPT AND RTMFP? Thanks to tell which protocol stil not supported so I will try to join a community task force.

ROBERT-MCDOWELL avatar May 17 '20 18:05 ROBERT-MCDOWELL

Hi, I know I'm a year late and never properly answered this, so I apologize. I wasn't sure about a lot of the details at the time and didn't have the capacity back then to investigate it.

RTMPS support isn't directly supported as RTMPS is just the RTMPS protocol over a TLS/SSL TCP connection. Since this library is networking agnostic (and can even be used in non-networked test scenarios) there's not really anything to support. If you wrap the existing library in a TLS socket (such as native_tls) that will work with rtmps.

RTMPE and RTMPTE seems to be proprietary encryption protocols and I can't find much information about it. Is this widely used out in the wild these days? It seems like most providers utilize RTMPS for secure video transmission. It looks like I started to implement it as part of the fp9 handshake code, so if that works (which isn't a given) then it's just a matter of exposing those keys as part of the handshake result and using them to encrypt/decrypt inputs before they get to the chunk decoder.

RTMPT also seems like it's a way to wrap the existing RTMP protocol within multiple spread out HTTP requests. As far as I can tell this is just wrapping the existing RTMP protocol in multiple POST requests and responses, is that correct? I don't see a lot of details of the protocol, and Adobe themselves says it should be discouraged due to latency. It's hard to tell how widely used this still is these days.

I had never heard of RTMFP before now, but looking at it I would be surprised if that's used much. It seems like it's been superceded by web browsers using webrtc. Judging from the spec this seems like a heavily different protocol than rtmp and would probably not share any existing code.

KallDrexx avatar Nov 10 '21 02:11 KallDrexx

@kaliDrexx thanks for your answer, it's never too late ;) RTMPT is only RTMP tunneling, useful when for example port 1935 is firewalled so use port rtmpt in port 8080 or else and you can use RTMP. RTMFP is the last excellent UDP protocol done by Adobe, which can create multicast, p2p full mesh and so on, yes webrtc widely plagiarize RTMFP for their QUICK stack. Specs can be read here https://rtmp.veriskope.com/docs/ some good project already implemented RTMFP in C++ and python https://github.com/theintencity/rtmplite https://github.com/MonaSolutions/librtmfp

hope it can help

ROBERT-MCDOWELL avatar Nov 10 '21 13:11 ROBERT-MCDOWELL

Thanks for the info. While I am back in this space these days, I'm in the middle of building a media server that I hope to open source soon, so it will take some time before I get to these :)

KallDrexx avatar Nov 10 '21 13:11 KallDrexx

Very promising!, I would love to contribute, but rust is still for me a stranger in the night... and so busy to fix bugs in other language projects... You can maybe contact the gusy from librtmfp, like Thomas Jammet, he's very open mind to share knowledge as he's also managing Mona server. The real interesting thing would be a media server that automatically converts the protocols when needed and make streaming ready for any kind of protocol connection....

ROBERT-MCDOWELL avatar Nov 10 '21 13:11 ROBERT-MCDOWELL

I had never heard of Mona server before, neat stuff.

The concept of my new media server (which so far seems to be playing out better than I expected) is that it allows non-programmers to create complex video workflows, and it's designed to be protocol agnostic (so rtmp in -> hls out, hls in -> rtmp out, eventually RTP/RTCP and SRT as well, etc...). Hopefully I have things cleaned up soon to start releasing :)

KallDrexx avatar Nov 10 '21 14:11 KallDrexx

Excellent! I know a bunch of good guys who will be happy to join your project!

ROBERT-MCDOWELL avatar Nov 10 '21 14:11 ROBERT-MCDOWELL

@ROBERT-MCDOWELL Hope all is well.

I just made the initial release of my project. You can find it here: https://kalldrexx.github.io/mmids/

KallDrexx avatar Jan 02 '22 17:01 KallDrexx

@KallDrexx Hope your're well too! great! I bookmark it Best wishes for this unique year of 2022!

ROBERT-MCDOWELL avatar Jan 02 '22 22:01 ROBERT-MCDOWELL