...
Code Block | ||||
---|---|---|---|---|
| ||||
rtmp://myrtmpserver.com:1935/liveapp_name/stream?param1user=test1user1¶m2pass=test2 |
...
pass1 |
or, if a stream supposed to be published to a specified instance of RTMP server application
Code Block | ||||
---|---|---|---|---|
| ||||
rtmp_transponder_full_url=true |
When REST query /push/startup is sent to WCS server or createstream() method is called with parametes
Code Block | ||||
---|---|---|---|---|
| ||||
{
"streamName": "rtmp_test",
"rtmpUrl": "rtmp://myrtmpserver.com:1935/live/stream?param1=test1¶m2=test2"
} |
RTMP-server will receive the request on connection establishing to republish stream as follows
Code Block | ||||
---|---|---|---|---|
| ||||
onConnect: AMFDataList: [0] connect, [1] 1.0, [2] object {Obj[]: app: "live/stream?param1=test1¶m2=test2", type: "nonprivate", flashVer: "FMLE/3.0 (compatible; Lavf54.59.106)", swfUrl: "://myrtmpserver.com:1935/app_name/app_instance/?user=user1&pass=pass1 |
Where
- myrtmpserver.com is the RTMP server name
- app_name is the application on the RTMP server name
- app_instance is the instance name of the RTMP server application
Stream name is set in REST query /push/startup parameter 'streamName' or in corresponding stream creation option.
This is the example on RTMP connection establishing with query parameters passing
Stream name passing in sever URL
In some cases, a stream publishing name shoukd be passed in the server URL. To do this, the following option must be set in flashphoner.properties file
Code Block | ||||
---|---|---|---|---|
| ||||
rtmp_transponder_full_url=true |
Then, the URL to publish should be set in REST query /push/startup 'rtmpUrl' parameter or in corresponding stream creation option like this:
Code Block | ||||
---|---|---|---|---|
| ||||
rtmp://myrtmpserver.com:1935/live/stream?param1=test1¶m2=test2", tcUrl: "app_name/stream_name |
or, to publish to another application instance
Code Block | ||||
---|---|---|---|---|
| ||||
rtmp://myrtmpserver.com:1935/live/stream?param1=test1¶m2=test2"}/app_name/app_instance/stream_name |
In this case, 'streamName' parameter or REST query /push/startup or corresponding stream creation option is ignored.
Automatic republishing to a specified RTMP server
WCS server can automatically republish all the streams published to a specified RTMP server. To activate this feature, set the next options in flashphoner.properties file:
...