Versions Compared

Key

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

...

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/stream/find HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 4057
Content-Type: application/json

{
	"name":"stream1",
	"published":true,
    "display":["metrics"]
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Date: Tue, 2826 Mar 20172021 1611:05:16 GMT

[
	  {
		"custom":{},
		"nodeId":null,
		"    "appKey": "defaultApp",
		    "sessionId": "/1925.168129.123.10283:3450051294/19295.168191.1130.101:808039:8443-118f9784-d3b0-4e2b-8837-425eb71efcbe",
		    "mediaSessionId": "4f112b2086108970-13d08de5-11e711eb-b521afa9-59a9cb7eddeb0d709beccf93",
		"remoteMediaElementId":null,
		"    "name": "stream1test",
		    "published": true,
		    "hasVideo": true,
		    "hasAudio": true,
		    "status": "PUBLISHING",
		    "sdp": ".....",
    "audioCodec": "opus",
		"info":null,
		    "videoCodec": "H264",
    "record":true false,
		    "width":0 640,
		    "height":0 360,
		    "bitrate": 0,
		"quality    "minBitrate": 0,
		"rtmpUrl    "maxBitrate":null 0,
		"streamInfo    "quality":{ 0,
		    "customhistory":{} false,
		    "nodeIdgop":null 0,
		    "appKeyfps":null 0,
		    "sessionIdaudioBitrate":null 0,
		    "mediaSessionIdcodecImpl":"4f112b20-13d0-11e7-b521-59a9cb7eddeb "",
		    "nametransport": "stream1UDP",
		    "samplingTime":1490717116551,
		cvoExtension": false,
    "createDate": 1616730250682,
    "mediaType": "publish",
    "mediaProvider": "WebRTC",
    "metrics": {
      "VIDEO_SYNC": 3825719227118,
      "recordTimestampVIDEO_K_FRAMES":7640 87,
		      "recordStartedAUDIO_SYNC":true
		},
		"mediaProvider":"Flash"
	 3825719227166,
      "VIDEO_NACK": 0,
      "AUDIO_RATE": 32912,
      "AUDIO_LOST": 112,
      "VIDEO_LOST": 0,
      "VIDEO_CODEC": 119,
      "VIDEO_B_FRAMES": 0,
      "VIDEO_PLI": 0,
      "AUDIO_CODEC": 111,
      "VIDEO_RATE": 542200,
      "VIDEO_WIDTH": 640,
      "VIDEO_GOP_SIZE": 60,
      "VIDEO_HEIGHT": 360,
      "VIDEO_FPS": 13,
      "VIDEO_P_FRAMES": 4972
    }
  }
]


/stream/terminate

Запрос

Ответ

Code Block
languagejs
themeRDark
POST /rest-api/stream/terminate HTTP/1.1
Host: 192.168.1.101:8081
Content-Length: 57
Content-Type: application/json

{
	"mediaSessionId":"4f112b20-13d0-11e7-b521-59a9cb7eddeb"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Tue, 28 Mar 2017 16:11:48 GMT

...

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"uri":"transcoder://tcode1"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 4:16:40 GMT

/transcoder2/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 242

{
    "uri": "transcoder2://tcode2",
    "localStreamName": "testT",
    "remoteStreamName": "test",
    "encoder": {
      "width": 320,
      "height": 240,
      "keyFrameInterval": 60,
      "fps": 30,
      "bitrate": 1000,
      "audioRate": 44100,
      "audioCodec": "mpeg4-generic",
      "videoCodec": "H264"
    }
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

/transcoder2/find

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/find HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"remoteStreamName": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Type: application/json
Content-Length: 387

[
  {
    "localMediaSessionId": "abde0bbf-558f-49e7-88e8-5431824dbc6c",
    "localStreamName": "testT",
    "remoteStreamName": "test",
    "uri": "transcoder2://tcode2",
    "status": "PROCESSED_LOCAL",
    "hasAudio": true,
    "hasVideo": true,
    "record": false,
    "encoder": {
      "width": 320,
      "height": 240,
      "keyFrameInterval": 60,
      "fps": 30,
      "bitrate": 1000,
      "audioRate": 44100,
      "audioCodec": "mpeg4-generic",
      "videoCodec": "H264",
      "videoRate": 90000
    }
  }
]

/transcoder2/find_all

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/find_all HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 0

Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Content-Type: application/json
Content-Length: 387

[
  {
    "localMediaSessionId": "abde0bbf-558f-49e7-88e8-5431824dbc6c",
    "localStreamName": "testT",
    "remoteStreamName": "test",
    "uri": "transcoder2://tcode2",
    "status": "PROCESSED_LOCAL",
    "hasAudio": true,
    "hasVideo": true,
    "record": false,
    "encoder": {
      "width": 320,
      "height": 240,
      "keyFrameInterval": 60,
      "fps": 30,
      "bitrate": 1000,
      "audioRate": 44100,
      "audioCodec": "mpeg4-generic",
      "videoCodec": "H264",
      "videoRate": 90000
    }
  }
]

/transcoder2/terminate

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/transcoder2/terminate HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 30

{
	"uri":"transcoder2://tcode2"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

/vod/startup

ЗапросОтвет
Code Block
languagejs
themeRDark
POST /rest-api/vod/startup HTTP/1.1
HOST: 192.168.1.101:8081
content-type: application/json
content-length: 83

{
	"uri":"vod-live://sample.mp4",
	"localStreamName": "test"
}
Code Block
languagejs
themeRDark
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 06 Dec 2018 4:16:40 GMT

...