Skip navigation
Victor Kalyan
Currently Being Moderated

How to stream from one FMS to number of FMS servers?

Jun 28, 2012 3:26 AM

I want to retranslate the stream from my FMS to number of fms servers.
I want to use example of the Multipoint publishing from the ADOBE®FLASHMEDIA SERVER 4.5® Developer’s Guide:

 

application.onPublish = function(client, myStream) {

trace(myStream.name + " is publishing into application " + application.name);

 

if (application.name == "livestreams/_definst_"){

trace("Republishing the stream into livestreams/anotherinstance");

nc = new NetConnection();

nc.connect( "rtmp://remoteserver1/live" );

ns = new NetStream(nc);

 

ns.onStatus = function(info) {

trace("Stream Status: " + info.code)

if (info.code == "NetStream.Publish.Start") {

trace("The stream is now publishing");

}

}

ns.setBufferTime(2);

ns.attach(myStream);

ns.publish( livestream1, "live" );

}

}

 

 

ns.onStatus = function(info) {

trace("Stream Status: " + info.code)

if (info.code == "NetStream.Publish.Start") {

trace("The stream is now publishing");

}

}

 

application.onUnpublish = function( client, myStream ) {

trace(myStream.name + " is unpublishing" );

}

 

But here is discribed only redirecting stream from one server to another one.

 

Retranslating for one to one server works good, but it don`t work when I try modify it for two retranslations and add to this script next strings:

 

 

nc1 = new NetConnection();

nc1.connect( "rtmp://remoteserver2/live" );

ns1 = new NetStream(nc1);
...

ns1.setBufferTime(2);

ns1.attach(myStream);

ns1.publish(livestream2, "live" );

 

What I do wrong?

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points