...
REST-method | Example of REST-query | Example of REST response | Response status | Description | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
/pull/pull |
| 409 - Conflict 500 - Internal error | Pull the RTMP stream at the specified URL | ||||||||
/pull/find_all |
| 200 – streams are found 500 - Internal error | Find all pulled RTMP streams | ||||||||
/pull/terminate |
| 200 - stream terminated 500 - Internal error | Terminate the pulled RTMP stream |
...
Since build 5.2.724 it is possible to set the name to publish stream on server using localStreamName
query parameter. If the parameter is not set, the stream name will be set to uri
, as done in previous builds.
RTMP stream repeatedly capturing with the same URI
/pull/rtmp/pull
query returns 409 Conflict
while trying to repeatedly capture RTMP stream with the same URI. If If the stream is already published on the server, it is necessary to subscribe to it.
Audio only or video only stream publishing
Since build 5.2.1439 it is possible to set in REST query how to publish an RTMP stream captured on WCS. For example, to publish a video only stream, set
Code Block | ||||
---|---|---|---|---|
| ||||
{ "uri":"rtmp://myserver.com/live/myStream", "localStreamName":"stream1", "hasAudio": false, "hasVideo": true } |
Configuration
In the /usr/local/FlashphonerWebCallServer/conf
directory you can find the SDP description file for the RTMP agent rtmp_agent.sdp
:
Code Block | ||||
---|---|---|---|---|
| ||||
o=- 1988962254 1988962254 IN IP4 0.0.0.0 c=IN IP4 0.0.0.0 t=0 0 a=sdplang:en m=video 0 RTP/AVP 95 a=rtpmap:95 H264/90000 a=fmtp:95 profile-level-id=42e01f;packetization-mode=1 a=sendonly m=audio 0 RTP/AVP 103 96 97 98 99 100 102 108 104 a=rtpmap:108 mpeg4-generic/48000/1 a=rtpmap:96 mpeg4-generic/8000/1 a=rtpmap:97 mpeg4-generic/11025/1 a=rtpmap:98 mpeg4-generic/12000/1 a=rtpmap:99 mpeg4-generic/16000/1 a=rtpmap:100 mpeg4-generic/22050/1 a=rtpmap:104 mpeg4-generic/24000/1 a=rtpmap:102 mpeg4-generic/32000/1 a=rtpmap:103 mpeg4-generic/44100/1 a=recvonly |
...
Code Block | ||||
---|---|---|---|---|
| ||||
a=sendonly |
for video.
Publishing a stream without audio or video
If audio or video description is removed from rtmp_agent.sdp
, an RTMP stream captured will be published on WCS without audio or video respectively. For example, use the following SDP to publish video only:
Code Block | ||
---|---|---|
| ||
v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 95
a=rtpmap:95 H264/90000
a=fmtp:95 profile-level-id=42e01f;packetization-mode=1
a=sendonly |
Quick manual on testing
Capturing of an RTMP stream broadcast by another server using the REST-query /pull/rtmp/pull
...