...
REST-method | Example of REST query body | Example of response | Response statuses | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
/push/startup |
|
| 409 - Conflict 500 - Internal error | Creates a transponder that subscribes to the given stream and sends media traffic to the specified rtmpUrl. The name of the stream specified in the query can be the name of an already published stream or the name reserved when the SIP call was created (to send media traffic received from SIP). If a transponder for the given stream and rtmpUrl already exists, 409 Conflict is returned. | ||||||||||||||
/push/find |
|
| 404 - Transponder not found 500 - Internal error | Find transponders by a filter | ||||||||||||||
/push/find_all |
|
| 404 - Not found any transponder 500 - Internal error | Find all transponders | ||||||||||||||
/push/terminate |
|
| 404 - Not found transponder 500 - Internal error | Terminate operation of the transponder | ||||||||||||||
/push/mute |
| void | 404 - Not found transponder 500 - Internal error | Turn off audio | ||||||||||||||
/push/unmute |
| void | 404 - Not found transponder 500 - Internal error | Turn on audio | ||||||||||||||
/push/sound_on |
| void | 404 - Not found transponder 404 - No such file 500 - Internal error | Insert audio from a RIFF WAV file located in the /usr/local/ FlashphonerWebCallServer/media/ directory on the WCS server | ||||||||||||||
/push/sound_off |
| void | 404 - Not found transponder 500 - Internal error | Stop inserting audio from the file |
...
Parameter name | Description | Example |
---|---|---|
streamName | Name of the republished stream | streamName |
rtmpUrl | URL of the server the stream is republished to | |
rtmpFlashVersion | RTMP subscriber Flash version | LNX 76.219.189.0 |
options | Transponder options | {"action": "mute"} |
mediaSessionId | Unique identifier of the transponder | eume87rjk3df1i9u14elffga6t |
width | Image width | 320 |
height | Image height | 240 |
keyFrameInterval | Video keyframe interval | 60 |
fps | Video framerate | 30 |
muted | Is sound muted | true |
soundEnabled | Is sound enabled | true |
soundFile | Sound file | test.wav |
loop | Loop playback | false |
rtmpTransponderFullUrl | Take stream name to publish to RTMP server from RTMP URL | false |
Parameters added since build 5.2.785: rtmpFlashVersion, keyFrameInterval and fps.
...
Since build 5.2.785, there are two more parameters enabling transcoding: keyFrameInterval and fps. Stream will be transcoded if either of them, or height is specified.
Set stream name to publish to RTMP server
By default, a stream will be published to RTMP server with the same name as it is publishing on WCS, and the prefix rtmp_
, for example rtmp_test
. This behaviour can be changed by the following parameters
Code Block | ||
---|---|---|
| ||
rtmp_transponder_full_url=true
rtmp_transponder_stream_name_prefix= |
But, these settings are applyed to all the republishings, and require server restart. That's why since build 5.2.860 the /push/startup query parameter is added to allow to define full RTMP URL, including stream name on RTMP server, regardless of server settings
Code Block | ||||
---|---|---|---|---|
| ||||
POST /rest-api/push/startup HTTP/1.1
Host: localhost:8081
Content-Type: application/json
{
"streamName":"stream1",
"rtmpUrl":"rtmp://rtmp.flashphoner.com:1935/live/test",
"rtmpTransponderFullUrl":true
} |
In this case, the stream will be published to RTMP server with the name defined in RTMP URL even with default WCS settings.
Sending the REST query to the WCS server
...