Skip to main content
Participating Frequently
August 3, 2007
Question

Sending Live Stream from one FMS to another FMS

  • August 3, 2007
  • 4 replies
  • 692 views
Hey,

Here's what I would like to do:
1. The Flash Media Encoder sends a live stream to FMS 1
2. On FMS 1, a connection to FMS 2 is set up and the live stream is sent to FMS 2.
3. Every second, a message with metadata is sent to FMS 2 using Stream.send()
4. A Client connecting to FMS 2 receives the stream and the metadata that was sent along with it.

I know this sounds pretty confusing, but the main problem is, that I don't have access to the FMS 2, so I can't call Stream.send() there. First I thought the solution would be using Stream.play() with a remote connection, but when I call the Stream.send() method nothing happens on the client side.

Then I thought I could do the whole thing by using a client side application that connects to FMS 1, receives the stream, embeds the metadata and publishes it to FMS 2. Here's the code I used:

// Connect to FMS 1 to get stream
client_nc.connect("rtmp://localhost/encoder_stream/room_01", "Client");

// Create input stream
in_ns = new NetStream(client_nc);

// Connect to FMS 2
akamai_nc.connect("rtmp://localhost/akamai/room_01", "Client");

// Create new stream, feed with in_ns and send to FMS2
out_ns = new NetStream(akamai_nc);
out_ns.publish("stream");
out_ns.attachVideo(in_ns);

Unfortunately the attachVideo method only accepts a camera and not a netstream object.
So this is where I'm standing now... anyone any ideas?
thanks

    This topic is closed to new replies. Start a new post to keep the conversation going.

    4 replies

    Participating Frequently
    August 17, 2007
    The upcoming FMS 3 release will support the ability to push live streams from one FMS instance to another. You will be able to push the stream to multiple downstream servers, which will allow you to implement different broadcast topologies. It's really cool!
    LoonababeAuthor
    Participating Frequently
    August 23, 2007
    Hey, that sounds awesome!!
    Is there any official release date yet?
    Or is there a pre-release version I can play around with?
    Would be cool...
    Cheers!
    August 3, 2007
    When you pass a stream from one FMS to another, any data sent with netstream.send or Stream.send on the first FMS will be passed along to the second FMS, and clients connected to the second FMS will get the data.

    Problem is, you can't push from FMS to FMS, you can only pull (you'd need a server side stream.publish method, and that's not there for us). So, in your case, FMS2 would need to make a netconnection to FMS1, and then connect to the stream. Unfortunately, if you don't have access to FMS2, you can't do that.

    I've never worked with akamai, but I wonder if they have some sort of API that will allow you to use your account to connect up to your own FMS to subscribe to a stream. I don't think they do that, but I suppose it's worth asking.
    LoonababeAuthor
    Participating Frequently
    August 14, 2007
    Hello,

    i've asked our Akamai contact and they say it's not possible to install any scripts on their servers. I think the only way is to push the stream from FMS1 to FMS2, but since FMS doesn't support a push method, there i have to find another way *sigh*

    I've heard about FMS version 3 coming up soon, and I'd really like to play around with the alpha version. Any idea where you can get it from? On Steve Wolkoffs blog it says the new FMS is going to support a push method:

    http://blogs.adobe.com/dreaming/2006/10/fmsnext_feature_open_thread.html

    I've also played around with the Red5 server, but I couldn't find anything there to achieve a server side push method. Does anyone have any experience with Red5 and live streaming?

    Cheers!