Results 1 to 5 of 5

Thread: Live repeater to an encrypted stream

  1. #1
    Join Date
    May 2013
    Posts
    19

    Default Live repeater to an encrypted stream

    Hi there,

    I'm hoping someone can help me - this may not be possible.

    We have a Wowza media server with an application called 'secure' which is configured with a securetoken etc. We want to create a live repeater application, lets say 'unsecure' which connects to the 'secure' stream.

    I've confirmed that I can repeat two unsecure streams without a problem.

    On the secure stream, this is my Application.xml stored in [wowza root]/conf/secure/

    <Root>^M
            <Application>^M
                    <!-- Uncomment to set application level timeout values^M
                    <ApplicationTimeout>60000</ApplicationTimeout>^M
                    <PingTimeout>12000</PingTimeout>^M
                    <ValidationFrequency>8000</ValidationFrequency>^M
                    <MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>^M
                    <MaximumSetBufferTime>60000</MaximumSetBufferTime>^M
                    <MaximumStorageDirDepth>25</MaximumStorageDirDepth>^M
                    -->^M
                    <Connections>^M
                            <AutoAccept>true</AutoAccept>^M
                            <AllowDomains></AllowDomains>^M
                    </Connections>^M
                    <!--^M
                            StorageDir path variables^M
                            ^M
                            ${com.wowza.wms.AppHome} - Application home directory^M
                            ${com.wowza.wms.ConfigHome} - Configuration home directory^M
                            ${com.wowza.wms.context.VHost} - Virtual host name^M
                            ${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory^M
                            ${com.wowza.wms.context.Application} - Application name^M
                            ${com.wowza.wms.context.ApplicationInstance} - Application instance name^M
                            ^M
                    -->^M
                    <Streams>^M
                            <StreamType>live</StreamType>^M
                            <StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>^M
                            <KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>^M
                            <!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater -->^M
                            <LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer</LiveStreamPacketizers>                        ^M
                            <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->^M
                            <Properties>^M
                            </Properties>^M
                    </Streams>^M
                    <Transcoder>^M
                            <!-- To turn on transcoder set to: transcoder -->^M
                            <LiveStreamTranscoder></LiveStreamTranscoder>^M
                            <!-- [templatename].xml or ${SourceStreamName}.xml -->^M
                            <Templates>${SourceStreamName}.xml,transrate.xml</Templates>^M
                            <ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>^M
                            <TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>^M
                            <Properties>^M
                            </Properties>^M
                    </Transcoder>^M
    ^M
                    <DVR>^M
                            <!-- As a single server or as an origin, use dvrstreamingpacketizer in LiveStreamPacketizers above -->^M
                            <!-- Or, in an origin-edge configuration, edges use dvrstreamingrepeater in LiveStreamPacketizers above -->^M
                            <!-- As an origin, also add dvrchunkstreaming to HTTPStreamers below -->^M
    ^M
                            <!-- To turn on DVR recording set Recorders to dvrrecorder.  This works with dvrstreamingpacketizer  -->^M
                            <Recorders></Recorders>^M
                                    <PlayMethod>none</PlayMethod>^M
                            </Authentication>^M
                            <!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->^M
                            <AVSyncMethod>senderreport</AVSyncMethod>^M
                            <MaxRTCPWaitTime>12000</MaxRTCPWaitTime>^M
                            <IdleFrequency>75</IdleFrequency>^M
                            <RTSPSessionTimeout>90000</RTSPSessionTimeout>^M
                            <RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>^M
                            <RTSPBindIpAddress></RTSPBindIpAddress>^M
                            <RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>^M
                            <RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>^M
                            <IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>^M
                            <!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->^M
                            <Properties>^M
                            </Properties>^M
                    </RTP>^M
                    <MediaCaster>^M
                            <RTP>^M
                                    <RTSP>^M
                                            <!-- udp, interleave -->^M
                                            <RTPTransportMode>interleave</RTPTransportMode>^M
                                    </RTSP>^M
                            </RTP>^M
                            <!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->^M
                            <Properties>^M
                            </Properties>^M
                    </MediaCaster>^M
                    <MediaReader>^M
                            <!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->^M
                            <Properties>^M
                            </Properties>^M
                    </MediaReader>^M
                    <MediaWriter>^M
                            <!-- Properties defined here will override any properties defined in conf/MediaWriter.xml for any MediaWriter loaded by this applications -->^M
                            <Properties>^M
                            </Properties>^M
                    </MediaWriter>^M
                    <LiveStreamPacketizer>^M
                            <!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->^M
                            <Properties>^M
                            </Properties>^M
                    </LiveStreamPacketizer>^M
                    <HTTPStreamer>^M
                            <!-- Properties defined here will override any properties defined in conf/HTTPStreamers.xml for any HTTPStreamer loaded by this applications -->^M
                            <Properties>^M
                            </Properties>^M
                    </HTTPStreamer>^M
                    <Repeater>^M
                            <OriginURL></OriginURL>^M
                            <QueryString><![CDATA[]]></QueryString>^M
                    </Repeater> ^M
                    <Modules>^M
                            <Module>^M
                                    <Name>base</Name>^M
                                   <Description>Base</Description>^M
                                    <Class>com.wowza.wms.module.ModuleCore</Class>^M
                            </Module>^M
                            <Module>^M
                                    <Name>properties</Name>^M
                                    <Description>Properties</Description>^M
                                    <Class>com.wowza.wms.module.ModuleProperties</Class>^M
                            </Module>^M
                            <Module>^M
                                    <Name>logging</Name>^M
                                    <Description>Client Logging</Description>^M
                                    <Class>com.wowza.wms.module.ModuleClientLogging</Class>^M
                            </Module>^M
                            <Module>^M
                                    <Name>flvplayback</Name>^M
                                    <Description>FLVPlayback</Description>^M
                                    <Class>com.wowza.wms.module.ModuleFLVPlayback</Class>^M
                            </Module>^M
                            <Module>
                                    <Name>ModuleRequireSecureConnection</Name>
                                    <Description>ModuleRequireSecureConnection</Description>
                                    <Class>com.wowza.wms.security.ModuleRequireSecureConnection</Class>
                            </Module>
                            <Module>
                                    <Name>Hotlink Denial</Name>
                                    <Description>Hotlink Denial Module</Description>
                                    <Class>com.wowza.wms.plugin.collection.module.ModuleHotlinkDenial</Class>
                            </Module>
                            <Module>
                                    <Name>ModuleSecureURLParams</Name>
                                    <Description>ModuleSecureURLParams</Description>
                                    <Class>com.wowza.wms.security.ModuleSecureURLParams</Class>
                            </Module>
                    </Modules>^M
                    <!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->^M
                    <Properties>^M
                            <Property>
                                    <Name>secureurlparams.publish</Name>
                                    <Value>12345.doPublish</Value>
                            </Property>
                            <Property>
                                    <Name>secureTokenSharedSecret</Name>
                                    <Value>t0kens</Value>
                            </Property>
                            <Property>
                                    <Name>requireSecureConnection</Name>
                                    <Value>true</Value>
                                    <Type>Boolean</Type>
                            </Property>
                            <Property>
                                    <Name>domainLock</Name>
                                    <Value>localhost,127.0.0.1,192.168.0.20</Value>
                            </Property>
      <Property>
                                    <Name>AllowEncoder</Name>
                                    <Value>unknown</Value>
                            </Property>
                    </Properties>^M
            </Application>^M
    </Root>^M


    in the [wowza root]/content folder i've placed a file named: unsecure.stream (chan7 is where I publish to) .. it's contents are
    rtmpe://localhost:1935/secure/chan7
    I then go into the stream manager and create a live repeater stream in the unsecure application and point it to unsecure.stream.


    After setting the debug on Wowza... when I connect using JWplayer with the secure token i see the following output from a connection that is working for the secure application:

    DEBUG server comment - open
    INFO server comment - handshake0: 1537
    INFO server comment - RTMPRequestAdapter.service[client.receive]: wowzVersion:0 accept:true
    DEBUG server comment - Handshake[1]: length:1907
    DEBUG server comment - Handshake[2]: length:371
    DEBUG server comment - cmd: connect
    DEBUG server comment - queryStr:
    DEBUG server comment -   connect: connectapp=secure/
    DEBUG server comment -   connect: connectflashVer=WIN 11,7,700,203
    DEBUG server comment -   connect: connectswfUrl=http://192.168.0.20/rtmps/jwplayer/jwplayer.flash.swf
    DEBUG server comment -   connect: connecttcUrl=rtmpe://192.168.0.20:1935/secure/
    DEBUG server comment -   connect: connectfpad=false
    DEBUG server comment -   connect: connectcapabilities=239.0
    DEBUG server comment -   connect: connectaudioCodecs=3575.0
    DEBUG server comment -   connect: connectvideoCodecs=252.0
    DEBUG server comment -   connect: connectvideoFunction=1.0
    DEBUG server comment -   connect: connectpageUrl=http://192.168.0.20/rtmps/jwplayer6.html
    DEBUG server comment -   connect: connectobjectEncoding=0.0
    INFO session connect-pending 192.168.0.11 -
    INFO server comment - ModuleHotlinkDenial onConnect: 2057128010
    INFO server comment - ModuleHotlinkDenial Client Flashver: win 11,7,700,203
    INFO server comment - domainLock: localhost,127.0.0.1,192.168.0.20,satnode.nwl.core.network
    INFO server comment - pageUrl: http://192.168.0.20/rtmps/jwplayer6.html
    DEBUG server comment - SecureURLParams: connect: SUCCEED (no folder found [/usr/local/WowzaMediaServer/applications/secure/secureurlparams/_definst_], no property found [secureurlparams.connect])
    DEBUG server comment - SecureURLParams.onConnect: generate SecureToken GUID
    INFO session connect 192.168.0.11 -
    DEBUG server comment - cmd: secureTokenResponse
    DEBUG server comment - SecureToken.secureTokenResponse: Challenge matches response.
    DEBUG server comment - cmd: createStream
    DEBUG server comment - LiveReceiver.onFlushNotifyClients[secure/_definst_/]: false
    DEBUG server comment - LiveReceiver.flushInterval[secure/_definst_/]: 75
    DEBUG server comment - LiveReceiver.verboseDebug[secure/_definst_/]: false
    INFO stream create - -
    DEBUG server comment - cmd: play
    DEBUG server comment - SecureURLParams.checkSecureToken: true
    DEBUG server comment - cmd: setBufferTime
    DEBUG session setbuffertime [2057128010,1]: 2000 2000
    DEBUG server comment - sessionClosed: send close
    DEBUG server comment - sessionClosed: closeConnection: vhost:_defaultVHost_ clientId:2057128010
    INFO stream destroy chan7 -
    INFO session disconnect 2057128010 -
    DEBUG server comment - ServerHandler.handleSessionIdle: isDidClose
    However, when I'm trying to connect to localhost from the repeater i get the following:



    DEBUG server comment - LiveMediaStreamReceiver.internalConnect: rtmpe://localhost:1935/secure[chan7]
    DEBUG server comment - NetConnectionSessionHandler: create
    DEBUG server comment - NetConnectionSessionHandler: sessionCreated
    DEBUG server comment - NetConnectionSessionHandler: sessionOpened
    INFO server comment - NetConnectionAdapter.service[server.init]: isInitiateWOWZConnections:true
    DEBUG server comment - open
    INFO server comment - handshake0: 1537
    INFO server comment - RTMPRequestAdapter.service[client.receive]: wowzVersion:1 accept:true
    INFO server comment - NetConnectionAdapter.service[server.receive]: wowzVersion:1
    DEBUG server comment - NetConnectionCallResults: add: 1
    DEBUG server comment - LiveMediaStreamReceiver.onResult
    DEBUG server comment - Handshake[1]: length:1866
    DEBUG server comment - Handshake[2]: length:330
    DEBUG server comment - cmd: connect
    DEBUG server comment - queryStr:
    DEBUG server comment -   connect: connectapp=secure/_definst_
    DEBUG server comment -   connect: connectflashVer=WIN 10,0,12,36
    DEBUG server comment -   connect: connectswfUrl=WowzaProLiveRepeater
    DEBUG server comment -   connect: connecttcUrl=rtmp://localhost:1935/secure/_definst_
    DEBUG server comment -   connect: connectfpad=false
    DEBUG server comment -   connect: connectaudioCodecs=3191.0
    DEBUG server comment -   connect: connectvideoCodecs=252.0
    DEBUG server comment -   connect: connectpageUrl=null
    DEBUG server comment - connect: sendChunkSize: 4096
    DEBUG server comment -   connect: connectsendChunkSize=4096.0
    DEBUG server comment -   connect: connectliveRepeaterCapabilities=1.0
    INFO session connect-pending 127.0.0.1 -
    INFO session comment 299901422 ModuleRequireSecureConnection.onConnect: rejectConnection: clientId:299901422
    INFO server comment - ModuleHotlinkDenial onConnect: 299901422
    INFO server comment - ModuleHotlinkDenial Client Flashver: win 10,0,12,36
    INFO server comment - Client Rejected. IP: 127.0.0.1
    DEBUG server comment - SecureURLParams: connect: SUCCEED (no folder found [/usr/local/WowzaMediaServer/applications/secure/secureurlparams/_definst_], no property found [secureurlparams.connect])
    DEBUG server comment - SecureURLParams.onConnect: generate SecureToken GUID
    INFO session connect 127.0.0.1 -
    DEBUG server comment - setReceiveChunkSize: 4096
    DEBUG server comment - NetConnectionCallResults[102]: remove: 1
    INFO server comment - LiveMediaStreamReceiver.onResult: Error Connecting to remote server: code: NetConnection.Connect.Rejected
    DEBUG server comment - sessionClosed: send close
    INFO server comment - LiveMediaStreamReceiver.sessionClosed:
    DEBUG server comment - sessionClosed: closeConnection: vhost:_defaultVHost_ clientId:299901422
    INFO server comment - LiveMediaStreamReceiver.sessionClosed: reconnect: isCurrentSession:true tryConnect:true
    INFO session disconnect 299901422 -
    DEBUG server comment - LiveMediaStreamReceiver.resetStream:  streamName:chan7e.stream
    DEBUG server comment - LiveMediaStreamReceiver#Reconnector.run: reconnectDelay: 2940
    DEBUG server comment - ServerHandler.handleSessionIdle: isDidClose
    Now the line of interest is
    INFO session comment 299901422 ModuleRequireSecureConnection.onConnect: rejectConnection: clientId:299901422
    , even though I'm stating an rtmpe connection in the stream file it's rejecting the connection.

    Is there a way around this? i.e. by setting in the unsecure.stream file the securetoken properties and forcing the connection to be secure?

    Any help is much appreciated.

  2. #2

    Default

    Hi there,

    According to this line in the logs:
    DEBUG server comment - connect: connecttcUrl=rtmp://localhost:1935/secure/_definst_

    You are not connecting through rtmpe


    Salvadore

  3. #3
    Join Date
    May 2013
    Posts
    19

    Default

    Quote Originally Posted by salvadore View Post
    Hi there,

    According to this line in the logs:
    DEBUG server comment - connect: connecttcUrl=rtmp://localhost:1935/secure/_definst_

    You are not connecting through rtmpe


    Salvadore

    Hi there, thanks for you reply.

    Yes - according to the debug that appears to be the case, in actual fact I am connecting with rtmpe so it could be a bug.

  4. #4

    Default

    Ok, I ran your Application.xml file through an xml validator and there appears to be a few errors.

    You can run it through this validator and see what the issues are, or you may choose to start fresh:
    http://www.w3schools.com/xml/xml_validator.asp

    Salvadore

  5. #5
    Join Date
    May 2013
    Posts
    19

    Default

    Quote Originally Posted by salvadore View Post
    Ok, I ran your Application.xml file through an xml validator and there appears to be a few errors.

    You can run it through this validator and see what the issues are, or you may choose to start fresh:
    http://www.w3schools.com/xml/xml_validator.asp

    Salvadore

    Ahhh sorry, that's my bad cut and paste.

    It's complaining about a missing DVR tag... in the application it is there

Similar Threads

  1. Encrypted Live Stream as input to wowza
    By f.hernandez.b in forum Live Streaming and Encoder Discussion
    Replies: 5
    Last Post: 01-31-2013, 09:45 AM
  2. Recording a live stream to an encrypted file?
    By Geofflee in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 11-02-2011, 09:02 PM

Posting Permissions

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