Versions Compared

Key

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

...

REST queries and response states

REST query

REST query body example

REST response example

Response states

/stream/find

Code Block
languagejs
themeRDark
{
   "name":"stream1",
   "published":true,
   "display":["metrics"]
}



Code Block
languagejs
themeRDark
[
  {
    "appKey": "flashStreamingApp",
    "sessionId": "/
5
192.
129
168.23.83:51309/
95
192.
191
168.130.39:1935",
    "mediaSessionId": "6af0baf1-f014-48d6-b285-c975951a402f",
    "name": "stream1",
    "published": true,
    "hasVideo": true,
    "hasAudio": true,
    "status": "PUBLISHING",
    "sdp": ...,
  
  "audioCodec": "mpeg4-generic/48000/2",
    "videoCodec": "H264",
    "record": false,
    "width": 640,
    "height": 360,
    "bitrate": 0,
    "minBitrate": 0,
    "maxBitrate": 0,
    "quality": 0,
    "history": false,
    "gop": 0,
    "fps": 0,
    "audioBitrate": 0,
    "codecImpl": "",
    "transport": "UDP",
    "cvoExtension": false,
    "createDate": 1616730493789,
    "mediaType": "publish",
    "mediaProvider": "Flash",
    "metrics": {
      "VIDEO_SYNC": 43688,
      "VIDEO_K_FRAMES": 22,
      "AUDIO_SYNC": 43712,
      "VIDEO_NACK": 0,
      "AUDIO_RATE": 129408,
      "AUDIO_LOST": 0,
      "VIDEO_LOST": 0,
      "VIDEO_CODEC": 119,
      "VIDEO_B_FRAMES": 0,
      "VIDEO_PLI": 0,
      "AUDIO_CODEC": 96,
      "VIDEO_RATE": 1187440,
      "VIDEO_WIDTH": 640,
      "VIDEO_GOP_SIZE": 48,
      "VIDEO_HEIGHT": 360,
      "VIDEO_FPS": 24,
      "VIDEO_P_FRAMES": 1027
    }
  }
]

200 - Stream data received

404 - Stream not found

500 - Query parameters error

Parameters

Parameter

Description

Example

displayAddituional stream parameters to be in response ["metrics"]

mediaSessionId

Media session Id

6af0baf1-f014-48d6-b285-c975951a402f

nameStream namestream1
publishedPublished or playingtrue
hasVideoIs there video in the stream?true
hasAudioIs there video in the stream?true
statusStream statusPUBLISHING
sdpStream SDP
audioCodecAudio codec mpeg4-generic
videoCodecVideo codecH264
recordStream is recordingfalse
widthStream width at publishing moment640
heightStream height at publishing moment360
transportWebRTC
strea
or MPEG-TS stream transport usedUDP
cvoExtensionWebRTC
pu=icture
picture orientation extension is usedfalse
createDateStream creation date1616730493789
mediaTypeMedia session type: publish or playpublish
mediaProviderPublishing or plaing stream provider (Flash for RTMP)Flash
minBitrateTranscoder parameters created by REST API
maxBitrate
quality
gop
fps
audioBitrate
codecImpl

Audio codec details displaying

Since build 5.2.1619 audio track samplerate and channels count are displayed:

Code Block
languagejs
themeRDark
{
    ...,
    "name": "stream1",
    ...,
    "audioCodec": "mpeg4-generic/48000/2",
    "videoCodec": "H264",
    ...
}

If there is no audio track in the stream, audioCodec will not be displayed.

Receiving stream metrics only

...

Metric

Description

VIDEO_HEIGHT

Video height, px

VIDEO_WIDTH

Video width, px

VIDEO_RATE

Video bitrate, bps

VIDEO_SYNC

Video synchronization

VIDEO_FPS

Video frame rate per second

VIDEO_NACK

NACK requests count

VIDEO_PLI

PLI packets count

VIDEO_CODEC

Video codec

VIDEO_K_FRAMESVideo key frames (I-frames) count
VIDEO_P_FRAMESVideo P frames count
VIDEO_B_FRAMESVideo B frames count
VIDEO_GOP_SIZELast group of frames size between keyframes
VIDEO_LOSTVideo lost packets count

AUDIO_SYNC

Audio synchronization

AUDIO_RATE

Audio bitrate, bps

AUDIO_LOST

Lost audio packets count

AUDIO_CODEC

Audio codec

...