Skip to main content
Participant
June 18, 2010
Question

Generating streams dynamically

  • June 18, 2010
  • 1 reply
  • 448 views

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

    This topic has been closed for replies.

    1 reply

    Asa_-_FMS
    Adobe Employee
    Adobe Employee
    June 18, 2010

    There's a few ways to attack this problem.

    The most flexible involves the FMS Auth adaptor where you can, similar to your previous, intercept the E_PLAY event and then remap as needed to an alternate stream.  You can also from there trigger JS interaction of your choice, invoking whatever play you like for the client.  Some good starting points for you on this

    http://help.adobe.com/en_US/FlashMediaServer/3.5_Plugin/WS5b3ccc516d4fbf351e63e3d11a0d662434-7fe8.html

    This is a good place to begin examining the more sophisticated FMS capabilities.

    Asa