Wowza Community

Flash ActionScript RTMP publisher error NetStream.Publish.Failed

I downloaded the .swf and .as files from this tutorial, and even tried a simpler version of this, and received the same result on both tries: NetConnection.Connect.Success

NetStream.Publish.Failed:.

The RTMP server works, because I am able to stream from QTB and FMLE with no problem. What does Wowza want from me to make this work?

Here is the simplified AS of what I am trying to do:

nc = new NetConnection();
nc.onStatus = function(info) {
    trace("LEVEL: "+info.level+"  CODE: "+info.code);
        if (info.code == "NetConnection.Connect.Success") {
            startStreamPublish();
    }
};
startStreamPublish = function() {
      // attach the Camera feed to an Embedded Video Object named, "my_video"
      my_video.attachVideo(Camera.get());
      // attach a NetStream to the variable, publish_ns
      publish_ns = new NetStream(nc);
      // attach the Microphone and Camera to the publish_ns stream
      publish_ns.attachAudio(Microphone.get());
      publish_ns.attachVideo(Camera.get());
      // start publishing the combined camera and microphone feed
      publish_ns.publish("webcast_test.sdp", "live");
};
nc.connect("rtmp://myip:port/app_name", "username", "password");

Do you have ModuleRTMPAuthenticate enabled?

With credentials passed as args of NetConnection.connect, you can use this method:

https://www.wowza.com/docs/how-to-do-file-based-rtmp-authentication-with-netconnection-connect-onconnectauthenticate

And this version has a db lookup example included:

https://www.wowza.com/docs/how-to-do-user-authentication-for-flash-rtmp-client-using-jdbc-connection-to-mysql-database

Richard

If you still have ModuleRTMPAuthenticate enabled, you should disable that. moduleOnConnectAuthenticate is the one that works with passing credentials as arguments of NetConnection.connect. moduleOnConnectAuthenticate2 handles credentials in querystring of the rtmp connection string.

Run Wowza in stand-alone (/bin/startup.bat) mode so you can see log output in the console.

Richard

Thanks for your reply, Richard. I’ll try this.

Do you have ModuleRTMPAuthenticate enabled?

With credentials passed as args of NetConnection.connect, you can use this method:

https://www.wowza.com/docs/how-to-do-file-based-rtmp-authentication-with-netconnection-connect-onconnectauthenticate

And this version has a db lookup example included:

https://www.wowza.com/docs/how-to-do-user-authentication-for-flash-rtmp-client-using-jdbc-connection-to-mysql-database

Richard

Richard,

I followed the first link and moduleOnConnectAuthenticate was already enabled. I found another post on the forum where you recommended to someone that they try moduleOnConnectAuthenticate2, so I replaced this the former with the latter, but I receive the same error still. I can connect, but NetStream publish fails.