Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
themeRDark
{
  "localMediaSessionId": "32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "localStreamName": "test",
  "uri": "srt://test1.flashphoner.com:31014",
  "status": "CONNECTED",
  "hasAudio": truefalse,
  "hasVideo": truefalse,
  "record": false,
  "transport": "SRT",
  "cdn": false,
  "timeout": 90000,
  "maxTimestampDiff": 900001,
  "allowedList": []
}

UDP:

Code Block
languagejs
themeRDark
{
  "localMediaSessionId": "32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "localStreamName": "test",
  "uri": "udp://test1.flashphoner.com:31014",
  "status": "CONNECTED",
  "hasAudio": truefalse,
  "hasVideo": truefalse,
  "record": false,
  "transport": "UDP",
  "cdn": false,
  "timeout": 90000,
  "maxTimestampDiff": 1,
  "allowedList": 90000[]
}

4. Publish MPEG-TS stream using URI from the response

...

REST method

REST query body example

REST response body example

Response states

Description

/mpegts/startup

Code Block
languagejs
themeRDark
{
  "localStreamName":"test",
  "transport":"srt",
  "hasAudio": true,
  "hasVideo": true
}
Code Block
languagejs
themeRDark
{
  "localMediaSessionId": "32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "localStreamName": "test",
  "uri": "srt://192.168.1.39:31014":31014",
  "status": "CONNECTED",
  "hasAudio": false,
  "statushasVideo": "CONNECTED"false,
  "hasAudiorecord": truefalse,
  "hasVideotransport": true"SRT",
  "recordcdn": false,
  "timeout": 90000,
  "maxTimestampDiff": 1,
  "allowedList": 90000[]
}

200 - OK

409 - Conflict

500 - Internal error


Start MPEG-TS publishing


/mpegts/find
Code Block
languagejs
themeRDark
{
  "localStreamName":"test",
  "uri": "srt://192.168.1.39:31014"
}
Code Block
languagejs
themeRDark
[
 {
  "localMediaSessionId": "32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "localStreamName": "test",
  "uri": "srt://192.168.1.39:31014",
  "status": "PROCESSED_LOCAL",
  "hasAudio": "CONNECTED"false,
  "hasVideo": false,
  "hasAudiorecord": truefalse,
  "hasVideotransport": true"SRT",
  "recordcdn": false,
  "timeout": 90000,
  "maxTimestampDiff": 1,
  "allowedList": 90000[]
 }
]

200 – streams found

404 – streams not found

500 - Internal error

Find the MPEG-TS stream by criteria

/mpegts/find_all


Code Block
languagejs
themeRDark
[
 {
  "localMediaSessionId": "32ec1a8e-7df4-4484-9a95-e7eddc45c508",
  "localStreamName": "test",
  "uri": "srt://192.168.1.39:31014",
  "status": "CONNECTED",
  "hasAudio": true,
  "hasVideo": true,
  "record": false,
  "timeout": 90000,
  "maxTimestampDiff": 90000
 }
]

200 – streams found

404 – streams not found

500 - Internal error

Find all MPEG-TS streams

/mpegts/terminate

Code Block
languagejs
themeRDark
{
  "localStreamName":"test"
}

200 - stream stopped

404 - stream not found

500 - Internal error

Stop MPEG-TS stream

...

Name

Description

Example

localStreamNameName to set to the stream on servertest
transportTransport to usesrt
uriEndpoint URI to publish the streamudp://192.168.1.39:31014
localMediaSessionIdStream media session Id32ec1a8e-7df4-4484-9a95-e7eddc45c508
statusStream statusCONNECTED
hasAudioStream has audio tracktrue
hasVideoStream has video tracktrue
recordStream is recordingfalse
timeoutMaximum media data receiving timeout, ms90000
maxTimestampDiffMaximum stream timestamps difference, mss900001

allowedList

Client addresses list which are allowed to publish the stream

["192.168.1.0/24"] 

...

Code Block
themeRDark
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=audio 1 RTP/AVP 102
a=rtpmap:102 mpeg4-generic/48000/2
a=sendonly
m=video 1 RTP/AVP 119
a=rtpmap:119 H265/90000
a=sendonly

Since build 5.2.1598, WCS supports MPEG-TS stream publishing both in H264 and H265 codecs by default without SDP settings change.

H265 must also be added to supported codecs list

...