【发布时间】:2016-09-19 12:09:21
【问题描述】:
我正在尝试通过 wowza 流引擎重新流式传输实时“RTMP”流。为此,我正在使用 wowza REST API。我能够创建流文件,但 RTMP URI 目标未在此文件中创建/更新。以下是遵循的详细步骤和获得的结果。 1. 使用以下请求创建流文件
POST: `http://<server-ip>:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/<app-name>/streamfiles`
标题:
Accept :application/json
Content-Type: application/json
身体
{
"name": "test_stream",
"uri": "rtmp://ingest-sgp-01.lb.nanocosmos.de:80/live/<stream-name>"
}
结果
{
"success": true,
"message": "",
"data": null
}
当我使用 Stream status 检查状态时,RTMP URL 未在属性中创建。详情如下 获取:
`http://<server-ip>:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/<app-name>/streamfiles/test_stream/adv`
BODY
{
"enabled": false,
"canRemove": true,
"name": "uri",
"valuhttp://<server-ip>:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/<app-name>/streamfiles/test_stream/adve": null,
"defaultValue": null,
"type": "String",
"sectionName": "Common",
"section": null,
"documented": true
}
我再次向服务器发送 PUT 请求,其中包含以下详细信息。
http://<server-ip>:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/<app-name>/streamfiles/test_stream/adv
身体
{
"advancedSettings": [
{
"enabled": true,
"canRemove": true,
"name": "uri",
"value": "rtmp://ingest-sgp-01.lb.nanocosmos.de:80/live/Q0f8HNVJ1P",
"defaultValue": null,
"type": "String",
"sectionName": "Common",
"section": null,
"documented": true
},
{
"enabled": true,
"canRemove": true,
"name": "streamTimeout",
"value": "0",
"defaultValue": "12000",
"type": "Integer",
"sectionName": "Common",
"section": null,
"documented": true
},
{
"enabled": true,
"canRemove": true,
"name": "reconnectWaitTime",
"value": "0",
"defaultValue": "3000",
"type": "Integer",
"sectionName": "Common",
"section": null,
"documented": true
}
],
"serverName": "_defaultServer_"
}
结果
{
"success": true,
"message": "",
"data": null
}
但仍在流文件详细信息中 URI 为空 结果
{
"enabled": false,
"canRemove": true,
"name": "uri",
"value": null,
"defaultValue": null,
"type": "String",these End points were hit with. swagger-ui tool provided by wowza, POST man tool with chrome, and nodej
"sectionName": "Common",
"section": null,
"documented": true
}
我不知道为什么这个 RTMP URL 不是通过不同的请求创建/更新的?这些 REST 端点受到了打击。
- wowza提供的swagger-ui工具,
- 带有 chrome 的 POST 人工工具,
- nodejs 请求 API。
所有结果都相同。在 wowza 服务器的 Server.xml 文件中,REST 服务设置为无身份验证。
【问题讨论】: