# ffmpeg publish rtmp with authentication

**URL:** https://community.wowza.com/t/ffmpeg-publish-rtmp-with-authentication/37912
**Category:** Wowza Streaming Engine
**Created:** [November 1, 2013, 2:05pm UTC](https://community.wowza.com/t/ffmpeg-publish-rtmp-with-authentication/37912 "2013-11-01T14:05:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ego\_van\_Doornik1](https://avatars.discourse-cdn.com/v4/letter/e/46a35a/32.png) [@Ego\_van\_Doornik1](https://community.wowza.com/u/Ego_van_Doornik1)
#### Post date: [November 1, 2013, 2:05pm UTC](https://community.wowza.com/t/ffmpeg-publish-rtmp-with-authentication/37912/1 "2013-11-01T14:05:30Z")

</div>

Hi,

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

Thanks

---

<div class="post-metadata">

### Author: ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)
#### Post date: [November 1, 2013, 7:49am UTC](https://community.wowza.com/t/ffmpeg-publish-rtmp-with-authentication/37912/2 "2013-11-01T07:49:52Z")

</div>

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?

Salvadore

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [November 1, 2013, 7:32pm UTC](https://community.wowza.com/t/ffmpeg-publish-rtmp-with-authentication/37912/3 "2013-11-01T19:32:27Z")

</div>

You can use [Wowza SecureURLParams](https://www.wowza.com/docs/how-to-secure-publishing-from-an-rtmp-encoder-that-does-not-support-authentication-modulesecureurlparams%28ModuleSecureURLParams%29) instead in this case.

I’m not exactly sure if or how you can get RTMP authentication working with Wowza, [this FFmpeg thread](http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=7&t=723) got it working against the FMS version, which might work with Wowza, but I’m not sure

Richard

---

<div class="post-metadata">

### Author: ![Ego\_van\_Doornik1](https://avatars.discourse-cdn.com/v4/letter/e/46a35a/32.png) [@Ego\_van\_Doornik1](https://community.wowza.com/u/Ego_van_Doornik1)
#### Post date: [November 1, 2013, 8:05pm UTC](https://community.wowza.com/t/ffmpeg-publish-rtmp-with-authentication/37912/4 "2013-11-01T20:05:52Z")

</div>

Hi,

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:

ModuleRTMPAuthenticate

ModuleRTMPAuthenticate

com.wowza.wms.plugin.security.ModuleRTMPAuthenticate

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

---

<div class="post-metadata">

### Author: ![Ego\_van\_Doornik1](https://avatars.discourse-cdn.com/v4/letter/e/46a35a/32.png) [@Ego\_van\_Doornik1](https://community.wowza.com/u/Ego_van_Doornik1)
#### Post date: [November 2, 2013, 11:02am UTC](https://community.wowza.com/t/ffmpeg-publish-rtmp-with-authentication/37912/5 "2013-11-02T11:02:59Z")

</div>

Thanks!

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
