Results 1 to 2 of 2

Thread: Authentication from Java rtmp publisher

  1. #1

    Default Authentication from Java rtmp publisher

    Hello Wowza Team , I have been building a small publisher app using ffmpeg which is capable of streaming an RTMP stream with username and password .
    So far I have experimented with the following Authentication mechanisms in wowza server v4.1.1 , all in vain

    1. ModuleCoreSecurity

    My class extends ModuleBase implements IServerNotify.

    My Settings in Application.xml

    <Module>
    <Name>ModuleCoreSecurity</Name>
    <Description>Core Security Module for Applications</Description>
    <Class>com.wowza.wms.security.ModuleCoreSecurity</Class>
    </Module>
    Set property securityPublishRequirePassword to true
    usernamePasswordProviderClass points to my class in jar

    The class checks for username and password from file (username 123456) and accepts or rejects the connection . works okay with gocoder but not with the ffmpeg url : ffmpeg -i big_buck_bunny.mp4 -f flv "rtmp://wowzaip:1935/appname/streamname?user=username&password=123456"

    Error : ERROR 500 - invoke(publish): java.lang.reflect.InvocationTargetException|at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)|at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)|at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|at java.lang.reflect.Method.invoke(Method.java:606)|at com.wowza.wms.module.ModuleFunction.invoke(ModuleFunction.java:369)|

    2. ModuleRTMPAuthenticate

    The class extends AuthenticateUsernamePasswordProviderBase and uses the getpassword() method to make the checks .

    Settings in Application.xml
    <Module>
    <Name>ModuleRTMPAuthenticate</Name>
    <Description>ModuleRTMPAuthenticate</Description>
    <Class>com.wowza.wms.security.ModuleRTMPAuthenticate</Class>
    </Module>

    Remove Module CoreSecurity
    Set property securityPublishRequirePassword to false
    usernamePasswordProviderClass points to my class in jar


    Again Works ok for Gocoder and other encoders but on ffmpeg url ffmpeg -i big_buck_bunny.mp4 -f flv "rtmp://usernameassword@wowzaip:1935/appname/streamname
    or ffmpeg -i big_buck_bunny.mp4 -f flv "rtmp://wwoszaip:1935/appname/streamname?user=username&password=123456" it doesnt stream

    3.ModuleOnConnectAuthenticate2

    The class extends extends ModuleBase

    <Property>
    <Name>rtmpAuthenticateFile</Name>
    <Value>${com.wowza.wms.context.VHostConfigHome}/conf/connect.password</Value>
    <Type>String</Type>
    </Property>
    <Module>
    <Name>moduleOnConnectAuthenticate</Name>
    <Description>Authenticates RTMP in flash </Description>
    <Class>com.wowza.wms.plugin.collection.module.ModuleOnConnectAuthenticate2</Class>
    </Module>

    usernamePasswordProviderClass points to my class in jar

    However the stream gets published even with the wrong userna,e password as mentioned in the connect.password file

    I am at the end of my wits on how to enable media publishing security from my app using any of the methods / modules . Any help will be useful .
    Thanks

  2. #2
    Join Date
    Jan 2015
    Posts
    357

    Default

    Hi altanai,

    One of our Support staff members posted recently about incorporating user authentication in an ffmpeg URL. I hope that helps.

    Michelle

Similar Threads

  1. RTMP authentication, RTSP authentication => problem
    By nvanhaute1 in forum Server Administration Discussion
    Replies: 4
    Last Post: 11-09-2011, 03:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •