wowza 的 mediaReaderRandomAccessReaderClass 问题 restful api

mediaReaderRandomAccessReaderClass issue with wowza restful api

我在 Ubuntu 14.04 使用 WowzaStreamingEngine 4.4.1。我使用 restful api 并创建了 vod 应用程序 (restful_vod) 作为示例,它没有工作,没有流式传输 vod 文件。这就是为什么,我比较默认 vod 应用程序和 restful_vod 应用程序的 application.xml 个文件。 MediaReader 属性之间存在差异。默认 vod 应用程序在那里没有 属性 但 restful_vod 有以下内容:

<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 和空字符串。

有什么方法可以防止添加它或为此设置默认工作值吗?

谢谢。

您可以通过如下设置来设置默认的 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"
         }
      ]
   }
}'