2016-09-19 5 views
1

wowzaストリーミングエンジンを通じてライブ "RTMP"ストリームを再ストリーミングしようとしています。私はこの目的のためにwowza REST APIを使用しています。ストリームファイルを作成できましたが、RTMP URIターゲットはこのファイルで作成/更新されません。以下の詳細な手順と結果が得られます。私はストリームステータスRTMPで状態をチェックするとWOWZAストリーミングエンジンREST APIがRTMP URLを更新しない

Accept :application/json 
    Content-Type: application/json 

BODY

{ 
    "name": "test_stream", 
    "uri": "rtmp://ingest-sgp-01.lb.nanocosmos.de:80/live/<stream-name>" 
} 

RESULT

{ 
    "success": true, 
    "message": "", 
    "data": null 
} 

次の要求

POST: `http://<server-ip>:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/<app-name>/streamfiles` 

ヘッダを持つストリーム・ファイルを作成するための 1 URLプロパティで作成されませんでした。 GET詳細は以下のとおりです。もう一度

`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 

BODY

{ 
    "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_" 
} 

RESULT

{ 
    "success": true, 
    "message": "", 
    "data": null 
} 

それでもstreamfile詳細にURIが RESULT

{ 
     "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 
    } 

nullの場合、このRTMP URLが作成されていない理由を私は無知です/ upd別の要求を介してated?これらのRESTエンドポイントはヒットしました。 wowzaによって提供さ

  1. 威張っ-UIツール、クロムと
  2. POSTの男ツール、
  3. nodejsリクエストAPI。

すべての結果は同じです。 wowzaサーバーのServer.xmlファイルでRESTサービスが認証なしに設定されています。

答えて

0

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/live/streamfiles/test_stream -d' 
{ 
    "restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/streamfiles", 
    "streamFiles": [ 
     { 
     "id": "connectAppName=live&appInstance=_definst_&mediaCasterType=rtp", 
     "href": "http://localhohst:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/streamfiles/connectAppName=live&appInstance=_definst_&mediaCasterType=rtp" 
     } 
    ] 
}' 

既存のストリームファイルを更新するには、あなたはまた、次のような、あなたのJSONボディにresturiパラメータを使用する必要があります。

curl -X PUT --header 'Accept:application/json; charset=utf-8' --header 'Content-type:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/streamfiles/test_stream/adv -d' 
{ 
"restURI": "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/streamfiles/test_stream/adv", 
"version": "1430601267443", 
"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 
} 
] 
}' 
関連する問題