HLS Live Streaming origin-edge repeater

setRepeaterOriginUrl works perfect for RTMP connections within an edge server but how do we achieve the same with HLS streaming? How can we intercept an HLS connection and tell it which origin server the stream is on internally? We have multiple origin servers. Using the failover origin method is not sufficient, neither is creating an application for each origin in the edge server.

Hello there,

With Flash RTMP there is a NetConnection and a NetStream, represented server-side by IClient and IMediaStream objects. Flash can connect to Wowza and you can do many things server-side in onConnect like validation and the 302 redirect method where the connection is rejected (used in the Load Balancer). You can’t do any of that where connecting and streaming are the same thing, and because there isn’t a two way communication you with HTTP and RTSP sessions.

You can see what methods are available in the Server-side API or using code-hinting in the IDE. Or you might look into the StreamNameAlias system:

How to get the StreamNameAlias AddOn

This is one of the examples in package readme:

Examples stream alias file 1:
# Fork streams off to multiple origins
origin1/*=rtmp://origin1.com/${Application.Name}/${AppInstance.Name}/${Stream.Name.Part2}
origin2/*=rtmp://origin2.com/${Application.Name}/${AppInstance.Name}/${Stream.Name.Part2}
origin3/*=rtmp://origin3.com/${Application.Name}/${AppInstance.Name}/${Stream.Name.Part2} 

Kind regards,

Salvadore

Listing streams in a file is not practical. At all. And will not work for us. We need to be able to point the HLS session to the correct origin within code. If this is not supported, my mind will be blown. So far I have not found any way to do so on my own.

Please advise.

Bump. Still haven’t found a solution to this problem. Moving away from RTMP and would like to be able to internally point/redirect an HLS request to the correct origin server. This seems like something really straight forward and I’m scratching my head as to why this still isn’t implemented. All I want to do is listen for HLS requests and internally tell the edge server which origin server the stream is located so it can connect and serve up the HLS stream quickly.

Also onHTTPSessionCreate isn’t called when a new HLS request comes in. It simply sees there isn’t any origin servers in the XML file and begins timing out endlessly. This is more frustrating than it has to be quite frankly.

Hi,

You might want to look at the StreamName Resolver module described in the “How to dynamically resolve edge server stream requests to origin servers” forum article. I think you might find it useful for your current workflow.

Zoran