Hi, I’m looking into redirecting a RTMP publish st...
# server
j
Hi, I’m looking into redirecting a RTMP publish stream through my Ktor backend to another streaming server. This streaming server is only accessible via my backend. I see that with Netty as my Ktor server engine I can handle RTSP streams, but I cannot seem to find any ‘recent’ resources on this with RTMP. In short: RTMP publish stream to an endpoint on my backend -> do some operations in my backend -> forward this RTMP publish stream towards my streaming server. Any answer towards the right direction is appreciated!
a
🙃 As far as I can tell, there's next to no documentation on RTSP/RTMP for Netty; the module exists, and that's it. Assuming your RTMP stream is wrapped by RTSP, you can use the netty rtsp module to deserialize the RTSP message into "http" messages and perform your header inspection there. After that's done, you just need to treat the rest of the stream as TCP and UDP, and forward the packets accordingly.
I started going down this rabbit-hole, but I realized I didn't need to actually forward the stream. I can get away with port-based TCP routing, or just responding to the very first RTSP OPTIONS call with a redirect.
145 Views