Generating streams dynamically
I am trying to port an application from Wowza to Flash Media server (3.5.3) but I am having a few problems.
How can I get the name of the stream the client has requested? For example, if the client requests something like, rtmp://host/app/mp4:stream.mp4, I want to be able to figure out that the client wants stream.mp4. I can grab the uri the client requested in the onConnect() method on the application but that doesn't contain the name of the stream. The reason for doing this is that the stream name corresponds to the name of a file that contains the video sequence that is to be played; from this file I want to dynamically create a stream and play the videos in the order they are in the file.
With Wowza, I am able to override the play() method on the server so that when the client calls, for example, ns.play("stream-name"), I can grab the name of the stream the client requested, find the corresponding playlist file then create a playlist (stream) dynamically. It's like having an ad pre-roll in the stream before the main content plays.
I haven't found an equivalent way of doing this with Flash Media server. Any pointers? Alternatively, if anybody has any better way to implement this, that would be great.
Thanks
