[Libav-user] Get app/stream info as RTMP server

Lysander Mealy code at lysandermealy.com
Wed Apr 30 16:29:52 EEST 2025


Hello libav-user folk,

I'm trying to build a streaming server of sorts, where I stream RTMP to the server, and it saves that stream as HLS. I'd like to support multiple streams at once. I've come up with an option that would be perfect for me: I'd like to be able to enter rtmp://my-domain/foo in my client (the one producing the stream) and have the server automatically save that stream as foo.m3u8. (I would accept the stream name as well, i.e. the bar in rtmp://my-domain/foo/bar)

I've come up with a way to do this as well: I'll run a tcp listener on port 1935, and whenever I get a connection, I'll use avformat_open_input with a custom AVIOContext that reads from that connection.

The issue I still have is in figuring out what to name the output HLS file. Is there a way for me to figure out the app name that the remote is requesting (the foo in the above example)?

Thank you,
Lysander Mealy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20250430/f35d51f9/attachment.htm>


More information about the Libav-user mailing list