Ask an FMS Guru #23: How can I interrupt a stream from Flash Media Encoder to FMS?
This is a good question about Flash Media Encoder that has just recently popped out from Adobe. If you happen to have Flash Media Server, then this is free to use with it.
The question: How can I interrupt a stream from Flash Media Encoder to FMS and put in place a previously encoded stream?
The answer:
This isn't as difficult as you would think it is actually. The deal with the Flash Media Encoder (FME) is that you can publish to FMS. FME publishes straight to an application on FMS and then subscribe to it from any client side. Even though the encoding side (FME) needs the special player because it's encoding VP6 video, the Flash player can actually just play that natively and of course FMS can stream it natively.
So that's a bit of background.
What needs to be done is a bit of coding on the client side to play certain video streams based on what an "administrator" tells them to.
So the order of business would be so:
1. Create a SWF that takes orders from the admin side on what stream to play.
2. Create the SWF that gives the orders to all the clients to tell them what stream to play.
3. Setup FME to encode to a specific application that both the admin and client side connect to. Obviously setup the stream name to something static.
Now, to make this as easy as possible I think that no server side code is needed. You could just use a shared object. So, the admin side would set a value that would be the stream name. The client side would get the update that the SO has changed, or when they first login they could grab that value, and then just subscribe to that stream. Whenever that value changes by way of the admin side, the onSync method runs on the SO and each client changes which video they subscribe to.
This way, you would be able to change from live to saved FLV's rather easily I think.
That's about it.
On a side note, I've just chatted with a DevNet Adobe person and it looks like maybe I can write an article about this and post it up there. Could be useful? If so, then I'll write it out, but I suppose if there aren't any votes for it then it might just get tossed off to the side as something that just may not be required or wanted in the community. So let me know!
Posted by Graeme at June 14, 2007 07:49 AM