Skip to main content
Participant
March 29, 2011
Question

Multipoint publishing problem stream not showing.

  • March 29, 2011
  • 1 reply
  • 1228 views

Hi there

I have been fighting with this for a while.

The problem.

I am attempting to publish from FME (A) to FMS (B) and republish to FMS (C) which is an origin server, for ongoing distribution via an edge platform.

The FME works fine for encoding directly to both B and C.

On FMS B and C all appears to show working correctly when I look in the fms_adminConsole i.e. status publishing.

I can connect to the input stream on FMS B via the client I am using - Flowplayer free for now.

I cannot connect to the stream on FMS C or on the loadbalanced IP address of the edge cluster - it does not return an error but it just seems to enter a state of continual connectiong.  If I use the Flash Application in CS5 and test the source it connects and does not return an error when requesting 'meta data' but when testing nothing.

Details.

B and C are FMS Interactive with full licenses.

B is a standalone.

C is an origin part of an origin/edge configuration.

In the application directory I have a directory livestreamcast_origin on both B and C

In the livestreamcast_origin directory on B I have main.asc and Application.xml

The stream name is: mp4:rbcast.f4v for both.

main.asc on FMS B =

*/


// main.asc file
// server-side actionscript

var nc;
var ns;

// Called when a client connects
application.onConnect = function(client) {

        // accept the new client's connection
        application.acceptConnection(client);

        // send a message
        trace(client.id + " is connected");
}

// Called when a client disconnects
application.onDisconnect = function(client) {
        trace(client.id + "disconnecting at " + new Date());
}


// Called when the client publishes
application.onPublish = function(client, myStream) {

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

        // This is an example of using the multi-point publish feature to republish
        // streams to another application instance on the local server.
        if (application.name == "livestreamcast_origin/_definst_"){

                trace("Republishing the stream into livestreamcast_origin/mp4:rbcast.f4v");

                nc = new NetConnection();
                nc.connect( "rtmp://***.***.***.***/livestreamcast_origin/" );

                ns = new NetStream(nc);

                // called when the server NetStream object has a status
                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( myStream.name, "live" );
        }
}

application.onUnpublish = function( client, myStream ) {
        trace(myStream.name + " is unpublishing");

Thank you

Peter

    This topic has been closed for replies.

    1 reply

    March 29, 2011

    Are there any errors in the logs? I see that you are not waiting for a status event on the netconnection before publishing to the netstream. If you try to publish to a netream, and the netconnection has not completed, the publish call will fail. I also see that you are only testing for a NetStream.Publish.Start code in the status handler for the netstream... try tracing the info.code property before the if statement... if the publish call fails, the status code will tell you about it.

    Participant
    March 29, 2011

    Hi there

    Thanks for the reply.

    I am not seeing any errors in the log files.

    I am fairly new to FMS so I will take a look at the details of your reply and see what I can implement.

    Thanks

    Peter