Skip to main content
Participating Frequently
July 28, 2010
Answered

Problem to publish to CDN Level3

  • July 28, 2010
  • 1 reply
  • 1837 views

Hello

I have an error in the publication of a Live (Webcam) to a CDN (Level3).
when "ns.publish (STREAM_NAME 'live')" 'it is returned an error
"NetStream.Record.NoAccess  '

Thank you to those who use AS3 application to connect to their CDN (Akamai, Level3 ...) of
tell me if they encounter a problem.

I use the same code has always been to publish a Live (Webcam) to servers
streaming (FMS RED5, etc ...) and can be summarized as follows:
nc = new NetConnection ()
nc.connect (HOST_URL)
../..
ns = new NetStream (nc)
ns.publish (MON_STREAM 'live')

this works on all versions FMS 2.5, 3.0, 3.5, etc. ..

Since a migration of my FMS version 2.5 to 3.5 this code does not work anymore!
the worst is that Flash Media Encoder (FME 3.0) it is operating properly.

So is there a feature to broadcast a live publishing point on a CDN (LEVEL3)?
The CDN turning on the fact that if it works with FME is that it is the code that raises
problem ... without more information.

The FMS version uses "special" of FMS, but until now I had no worries!
In general the user CDN use hardware encoders ... but hey it must be well
possible in AS3 coding!

Thank you for any advice, information, support, links, examples!
My Lives are being completely offline!

    This topic has been closed for replies.
    Correct answer

    Sounds like their application wants you to invoke FCPublish before publishing. The FMS application should then invoke your onFCPublish handler.

    Assuming you are using AS3 on the client side, it will look something like this:

    nc = new NetConnection();

    ns = new NetStream(nc);

    nc.client = this; // If you have a client class or object for your nc, change "this" to the reference to the client object

    nc.addEventListener(NetStatusEvent.STATUS, netStatusHandler);

    nc.connect(url);

    function netStatusHandler(e:NetStatusEvent):void{

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

    nc.call("FCPublish", your-stream-name);

    }

    function onFCPublish(info){

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

    ns.publish(your-stream-name, "live");

    }else{

    // handle error here

    }

    1 reply

    July 28, 2010

    Hi,

    You could try one thing so that we can isolate where the problem could be. Please download FMS 3.5 free development server from http://www.adobe.com/products/flashmediainteractive/ and install it locally. Then try connecting to the live app on local FMS server (Use rtmp://localhost/live , replace localhost with hostname/IP of the FMS machine)which you have installed and publish to it. Let me know if it works?

    If it doesn't work then we could check further on FMS side. But if it works fine on the local FMS server then I think you could take a look at the server-side

    code of the FMS app you are connecting to on the CDN hosted FMS. it might be setting some restriction which wasn't there earlier when they had FMS 2.5 deployed.

    Something like setting clientObj.writeAccess=""; in the FMS app can disallow publishing.

    Regards

    Mamata

    tlouvelAuthor
    Participating Frequently
    July 28, 2010

    I Have installed FMS 2.5 and FMS 3.5

    with those 2 FMS version , i make a test with my Code and the local URL (rtmp://localhost/live)

    All Work Fine

    i have make a test with the "Interactive" program (intalled with FMS by default)

    i replace the local rtmp url with the one i must use with CDN Level3

    i get the same error than my own program -> Record.NoAccess

    to resume this:

    - on a local install, my code and interactive program work fine

    - on the CDN version 2.5 , my code and interactive program work fine

    - on the CDN version 3.5 , my code and interactive program make the same error

    >>But if it works fine on the local FMS server then I think you could take a look at the server-side

    >>code of the FMS app you are connecting to on the CDN hosted FMS. it might be setting some restriction which wasn't there earlier when they had FMS >>2.5 deployed.

    >>Something like setting clientObj.writeAccess=""; in the FMS app can disallow publishing.

    That's what i thing... BUT on the CDN... FME 3.0 Work Fine !!(!)

    Level3 send me the application.xml and the main.asc they used... is there any interrest for you ?

    a extract of the main.asc from level3 is:

    application.onConnect = function(client, autoSenseBW) {

    client.writeAccess = "/";

    client.audioSampleAccess = "/";

    client.videoSampleAccess = "/";


    this.acceptConnection(client);


    if (autoSenseBW)

    client.checkBandwidth();

    else

    client.call("onBWDone");

    };

    Level3 Say me that they use FCPublish...:

    When encoding to Level3 FMS3.5 you need to use the FCPublish method only.

    This is the same method used by industry standard encoders such as Adobe FMLE, Digital Rapids Encoder and Inlet Encoder when they publish to Level3 FMS3.5.

    so my question is:
    - How can i use "FCPublish method" in a ActionScript 3 application to connect to the CDN.. ?

    Actualy a use "classic" method : NetConnection.connect and NetStream.publish.

    i don't see anything about FCPublish in the Flash AS3 Documentation

    Thanks

    Correct answer
    July 28, 2010

    Sounds like their application wants you to invoke FCPublish before publishing. The FMS application should then invoke your onFCPublish handler.

    Assuming you are using AS3 on the client side, it will look something like this:

    nc = new NetConnection();

    ns = new NetStream(nc);

    nc.client = this; // If you have a client class or object for your nc, change "this" to the reference to the client object

    nc.addEventListener(NetStatusEvent.STATUS, netStatusHandler);

    nc.connect(url);

    function netStatusHandler(e:NetStatusEvent):void{

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

    nc.call("FCPublish", your-stream-name);

    }

    function onFCPublish(info){

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

    ns.publish(your-stream-name, "live");

    }else{

    // handle error here

    }