Wowza Community

ffmpeg publish rtmp with authentication


I am trying to publish to a wowza server from ffmpeg using this command:

ffmpeg -re -i sample.mp4 -c:v copy -c:a copy -f flv rtmp://user:pass@mywowzaserver/myapp/mystream

I get an error connecting: RTMP_connect0 failed to connect socket (uknown error)

Any gues what i am doing wrong? I checked to connect with fmle using the same url and credentials and that works fine


Try it using this syntax: rtmp://username:password@wowzaserver/app/streamname.

If it still doesn’t work can you post the contents of your Application.xml file?


You can use Wowza SecureURLParams instead in this case.

I’m not exactly sure if or how you can get RTMP authentication working with Wowza, this FFmpeg thread got it working against the FMS version, which might work with Wowza, but I’m not sure



I tried it without the credentials: ffmpeg -re -i sample.mp4 -c:v copy -c:a copy -f flv rtmp://wowzaserver/app/streamname

and removing the following authentication module in the application.xml:



Without the authentication it works fine, so i think the ffmpeg rtmp module does not support authentication or is the way i authenticate wrong?


I am now able to secure the publishing stream with the SecureURLParams like this:

ffmpeg -re -i sample.mp4 -c:v copy -c:a copy -f flv rtmp://wowzaserver/app?doPublish=12345/streamname