Question
Sending Live Stream from one FMS to another FMS
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
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
