Skip to main content
Participant
July 15, 2010
Question

FMS Republishing Not Showing Stream

  • July 15, 2010
  • 1 reply
  • 2396 views

I'm utilizing the developer edition of FMS and am trying to republish a stream that is being broadcast with Flash Media Live Encoder (FMLE) unfortunately, I am unable to get any audio or video to display in the client application. The client app can get the stream from the published to app (e.g. CamChat) but not from the republished stream. Following is the output of the trace statements from the SSAS as well as the source for main.asc:

Error output: (to FMS Admin Console)

Rebroadcast is starting...

NetConnection> code: NetConnection.Connect.Success

Stream> code: NetStream.Publish.Start

Stream> details:

Stream> details: livestream

Stream> code: NetStream.Play.Reset

Stream> code: NetStream.Play.StreamNotFound

Stream> details: livestream

Stream> code: NetStream.Play.Stop

Stream> details: livestream

main.asc:

var localStream = "rtmp://localhost/CamChat";

application.onAppStart = function()

{

     application.allowDebug = true;

     trace("Rebroadcast is starting...");

}

application.onConnect = function( client )

{

     this.acceptConnection( client );

     trace("Connect client id: " + client.id);

     client.onBWDone = function( info ) {

          trace("Server onBWDone: " + info);

     }

}

//---------- Rebroadcast the stream ----------//

nc = new NetConnection();

nc.connect(localStream);

nc.onStatus = function(info)

{

     trace("NetConnection> code: " + info.code);

     if(info.code == "NetConnection.Connect.Success")

     {

          rebroadcast_s = new Stream.get("livestream");

          rebroadcast_s.onStatus = function(info)

          {

               trace("Stream> code: " + info.code);

               trace("Stream> details: " + info.details);

          };

          rebroadcast_s.play("livestream", 0, -1, true, nc);

    

          //rebroadcast_s.record("record");

     }

};

The ultimate goal is to subscribe to stream(s) that will be coming from our Limelight FMS and record them to our local FMIS server.

    This topic has been closed for replies.

    1 reply

    July 15, 2010

    Hi,

    I am not sure if I got your question correctly as what you stated and code you gave are seemingly different. I am assuming that you are publishing a live stream to app1 and you want app1 to publish the stream to app2 on another server or another app on same server. Correct me if I am wrong.

    Now, If you are trying to play a livestream you need to issue ns.play("livestream",-1,-1,true) , i.e, -1 as second argument, as a 0 as second argument is used to play a vod, an as you are publishing a livestream, you are ending up seeing a streamnotfound. Also if you want to publish to another server you need to create a netstream and publish the stream there.

    Looking at your code in main.asc, you are ending up calling nc.connect() as soon as app is starting,  and at that time stream may not have started publishing to the server so you end up getting silence message in the beginning. So Use Application.onPublish handler to check when publish has started to app1 from FMLE and then publish it to another server.

    Please revert back in case you face issues or something is not clear to you.

    Thanks,

    Abhishek

    Participant
    July 15, 2010

    The testing setup was FMLE -> local FMS App -> local Republish App -> Flash Client. Once I changed the second parameter I got video.

    I then changed the stream URL and setup to FMLE -> remote FMS App -> local Republish App -> Flash Client. I got nothing in the flash client though.

    Following is my trace output from the FMS Admin Console:

    Unloaded application instance playon/_definst_

    PlayOn rebroadcast is starting...

    Application name: playon/_definst_

    PlayOn rebroadcast is starting...

    Application name: playon/_definst_

    NetConnection> code: NetConnection.Connect.Success

    Sending error message: Method not found (onBWDone).

    Stream> code: NetStream.Publish.Start

    Stream> details:

    The stream is now publishing

    Stream> code: NetStream.Play.Reset

    Stream> details: livestream

    Stream> code: NetStream.Play.Start

    Stream> details: livestream

    Application name: playon/_definst_

    Connect client id: DPAoo^EI

    Application name: playon/_definst_

    Connect client id: BRA4UI3B

    Thank you for getting me so close...

    July 16, 2010

    >>I then changed the stream URL and setup to FMLE -> remote FMS App -> local Republish App -> Flash Client. I got nothing in the flash client though

    Please give some more details as how you have done that, some code snippet would do and also what message are you gettting on both the remote FMS App and local republish app.

    Thanks,

    Abhishek