Skip to main content
June 16, 2009
Answered

multiple live sources

  • June 16, 2009
  • 3 replies
  • 2108 views

Hi all,

i'm struggling setting up 4 live audio sources with fms 3.5. I have 4 streams input from our studios into 1 encoder server. From here I need to pass it to the internet via 4 FMS 3.5 servers. I do not want to have 4 * 4 encoding sessions on the encoder in order to service the 4 FMS servers. Is there any way to pull the streams from the encoders?

I have also tried configuring explicit connections using 1 server as an origin server and 3 as edge servers but being a live stream the load and connections seem to get passed to the origin server which will eventually not handle the load.

i've looked through the application.xml server settings but cannot seem to see any notiable settings?

Thanks

andrew

    This topic has been closed for replies.
    Correct answer SE_0208

    Hi Andrew,

    Its implemented using server-side application code like how i have written in my previous post. You dont need any plug-in. In your scenario lets consider one as primary server and other 3 are secondory servers. So you have to write application code for one application on primary server where publish from encoder would be targetted. You basically have to set-up 3 Netconnections to one application each on secondary servers and also create three NetStreams which would use created NetConnections and re-publish stream to secondary server application. Just go through FMS docs and you will get to know what I am sayign and how to go about it. In case if you still are not able to code it, let me know.

    Regards

    Rudresh.

    3 replies

    Participant
    July 16, 2009

    Thanks for great information about multiple live sources

    If you looking for multiple live sources company visit:--www.sagarinfotech.com

    July 2, 2009

    thank you, do you implement this as a flash media server plugin using c++.

    Andrew

    SE_0208Correct answer
    Participating Frequently
    July 3, 2009

    Hi Andrew,

    Its implemented using server-side application code like how i have written in my previous post. You dont need any plug-in. In your scenario lets consider one as primary server and other 3 are secondory servers. So you have to write application code for one application on primary server where publish from encoder would be targetted. You basically have to set-up 3 Netconnections to one application each on secondary servers and also create three NetStreams which would use created NetConnections and re-publish stream to secondary server application. Just go through FMS docs and you will get to know what I am sayign and how to go about it. In case if you still are not able to code it, let me know.

    Regards

    Rudresh.

    July 9, 2009

    Hi Rudresh,

    I have wriiten my asc script as follows:-

    trace("Start Script");
    var nc;
    var ns;
    nc = new NetConnection();
    nc.connect("rtmp://192.168.x.x/live/sportslive");
    trace("declared variables");
    nc.onStatus = function(info){
    if (info.code == "NetConnection.Connect.Success") {
    trace("connection sucs");
    } else {
    trace("not connected error");
    }
    };
    application.onPublish = function(client, myStream){
    trace("into publish function");
    ns = new NetStream(nc);
    ns.attach(myStream);
    ns.publish(myStream.name, "live");
    trace(myStream.name + " is publishing into application " + application.name)
    };

    looking at the logs on teh remote server teh connection is made and bytes are streaming across, though when i connec using the sample livetest.swf / as files the connection does not play. Is this because the livetest.as does not use teh

    NetConnection.connect("rtmp://serverName/appName/appInstanceName"), and then call
    NetStream.play("myStream") with the same stream name.

    to connect?

    I also get teh following errors when teh main.asc runs:-

    Method not found (onBWDone)

    Method not found (releaseStream)

    Method not found (FCPublish)

    Thanks

    Participating Frequently
    June 29, 2009

    You can basically publish it to one Origin Server and that server will republish the incoming stream to other 3 origin servers. This feature is called Multi-point publish. Basically you use application.onPublish and onUnpublish handlers in conjunction with Server-side NetStream Class to achieve this.

    Simple example:

    var nc;

    var ns;

    application.onAppStart = function(){

          nc = new NetConnection();

         nc.onStatus = function(info){

              // you can trace connection status here

         }

         nc.connect("rtmp://Origin_Server_2/myApp");

    }

    application.onPublish = function(myClient,myStream){

        ns = new NetStream(nc);

        ns.attach(myStream);

        ns.publish(myStream.name,"live");

    }

    application.onUnpublish = function(myClient,myStream){

          ns.publish(false);

    }