2016-05-12 47 views
0

我在Ubuntu 14.04上使用WowzaStreamingEngine 4.4.1。我使用了restful api並創建了vod應用程序(restful_vod),就像在示例中那樣,它沒有工作,沒有流化vod文件。這就是爲什麼我比較默認vod應用程序和restful_vod應用程序的application.xml文件。 MediaReader屬性有所不同。默認VOD應用程序沒有財產的存在,但restful_vod低於:mediaReaderRandomAccessReaderClass與wowza restful api問題

<MediaReader> 
    <!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications --> 
    <Properties> 
    <Property> 
     <Name>randomAccessReaderClass</Name> 
     <Value></Value> 
     <Type>String</Type> 
    </Property> 
    </Properties> 
</MediaReader> 

當我刪除randomAccessReaderClass命名的屬性,它開始工作。我意識到mediaReaderRandomAccessReaderClass參數在restful api端管理它的值。但我無法找到一種方法來防止在使用restful api時添加它。我嘗試不設置mediaReaderRandomAccessReaderClass值,並且還設置mediaReaderRandomAccessReaderClass false,null和空字符串。

有什麼辦法可以防止爲此添加它或默認工作值?

謝謝。

回答

1

您可以將其設置爲設置默認mediaReaderRandomAccessReaderClass如下: 「mediaReaderRandomAccessReaderClass」:「」

在你得到的Application.xml文件中,MediaReader容器然後將空白,這表明它會使用默認值:

<MediaReader> 
    <!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications --> 
    <Properties> 
    </Properties> 
</MediaReader> 

例如,一個可用於創建VOD文件的REST API命令將如下所示。

curl -X POST --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod -d' 
{ 
    "restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod", 
    "version": "1462342478287", 
    "name": "testvod", 
    "appType": "VOD", 
    "description": "Test VOD via REST.", 
    "applicationTimeout": 0, 
    "pingTimeout": 0, 
    "repeaterQueryString": "", 
    "clientStreamReadAccess": "*", 
    "avSyncMethod": "senderreport", 
    "maxRTCPWaitTime": 12000, 
    "httpStreamers": [ 
     "cupertinostreaming", 
     "smoothstreaming", 
     "sanjosestreaming", 
     "mpegdashstreaming" 
    ], 
    "mediaReaderRandomAccessReaderClass": "", 
    "httpOptimizeFileReads": false, 
    "mediaReaderBufferSeekIO": false, 
    "captionLiveIngestType": "", 
    "vodTimedTextProviders": [ 
     "vodcaptionprovidermp4_3gpp" 
    ], 
    "securityConfig": { 
     "restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod/security", 
     "secureTokenVersion": 0, 
     "clientStreamWriteAccess": "*", 
     "publishRequirePassword": true, 
     "publishPasswordFile": "", 
     "publishRTMPSecureURL": "", 
     "publishIPBlackList": "", 
     "publishIPWhiteList": "", 
     "publishBlockDuplicateStreamNames": false, 
     "publishValidEncoders": "", 
     "publishAuthenticationMethod": "digest", 
     "playMaximumConnections": 0, 
     "playRequireSecureConnection": false, 
     "secureTokenSharedSecret": "", 
     "secureTokenUseTEAForRTMP": false, 
     "secureTokenIncludeClientIPInHash": false, 
     "secureTokenHashAlgorithm": "", 
     "secureTokenQueryParametersPrefix": "", 
     "secureTokenOriginSharedSecret": "", 
     "playIPBlackList": "", 
     "playIPWhiteList": "", 
     "playAuthenticationMethod": "none" 
    }, 
    "streamConfig": { 
     "restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod/streamconfiguration", 
     "streamType": "default", 
     "storageDir": "${com.wowza.wms.context.VHostConfigHome}/content", 
     "createStorageDir": false, 
     "storageDirExists": true, 
     "keyDir": "${com.wowza.wms.context.VHostConfigHome}/keys", 
     "httpRandomizeMediaName": false 
    }, 
    "modules": { 
     "restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/testvod/modules", 
     "moduleList": [ 
     { 
      "order": 0, 
      "name": "base", 
      "description": "Base", 
      "class": "com.wowza.wms.module.ModuleCore" 
     }, 
     { 
      "order": 1, 
      "name": "logging", 
      "description": "Client Logging", 
      "class": "com.wowza.wms.module.ModuleClientLogging" 
     }, 
     { 
      "order": 2, 
      "name": "flvplayback", 
      "description": "FLVPlayback", 
      "class": "com.wowza.wms.module.ModuleFLVPlayback" 
     }, 
     { 
      "order": 3, 
      "name": "ModuleCoreSecurity", 
      "description": "Core Security Module for Applications", 
      "class": "com.wowza.wms.security.ModuleCoreSecurity" 
     } 
     ] 
    } 
}' 
+0

我很確定我之前嘗試過,但有趣的是,現在設置空字符串的作品。不管怎麼說,還是要謝謝你。 – Bilal