GET /streams
curl http://demo:[email protected]:8083/streams
{
"status": 1,
"payload": {
"demo1": {
"name": "test video",
"channels": {
"0": {
"name": "ch1",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
},
"1": {
"name": "ch2",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
}
}
},
"demo2": {
"name": "test video",
"channels": {
"0": {
"name": "ch1",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
},
"1": {
"name": "ch2",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
}
}
}
}
}
POST /stream/{STREAM_ID}/add
curl \
--header "Content-Type: application/json" \
--request POST \
--data '{
"name": "test video",
"channels": {
"0": {
"name": "ch1",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
},
"1": {
"name": "ch2",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
}
}
}' \
http://demo:[email protected]:8083/stream/{STREAM_ID}/add
{
"status": 1,
"payload": "success"
}
POST /stream/{STREAM_ID}/edit
curl \
--header "Content-Type: application/json" \
--request POST \
--data '{
"name": "test video",
"channels": {
"0": {
"name": "ch1",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
},
"1": {
"name": "ch2",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
}
}
}' \
http://demo:[email protected]:8083/stream/{STREAM_ID}/edit
{
"status": 1,
"payload": "success"
}
GET /stream/{STREAM_ID}/reload
curl http://demo:[email protected]:8083/stream/{STREAM_ID}/reload
{
"status": 1,
"payload": "success"
}
GET /stream/{STREAM_ID}/info
curl http://demo:[email protected]:8083/stream/{STREAM_ID}/info
{
"status": 1,
"payload": {
"name": "test video",
"channels": {
"0": {
"name": "ch1",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
},
"1": {
"name": "ch2",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
}
}
}
}
GET /stream/{STREAM_ID}/delete
curl http://demo:[email protected]:8083/stream/{STREAM_ID}/delete
{
"status": 1,
"payload": "success"
}
POST /stream/{STREAM_ID}/channel/{CHANNEL_ID}/add
curl \
--header "Content-Type: application/json" \
--request POST \
--data '{
"name": "ch4",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": false,
"debug": false,
"status": 0
}' \
http://demo:[email protected]:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/add
{
"status": 1,
"payload": "success"
}
POST /stream/{STREAM_ID}/channel/{CHANNEL_ID}/edit
curl \
--header "Content-Type: application/json" \
--request POST \
--data '{
"name": "ch4",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": true,
"debug": false,
"status": 0
}' \
http://demo:[email protected]:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/edit
{
"status": 1,
"payload": "success"
}
GET /stream/{STREAM_ID}/channel/{CHANNEL_ID}/reload
curl http://demo:[email protected]:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/reload
{
"status": 1,
"payload": "success"
}
GET /stream/{STREAM_ID}/channel/{CHANNEL_ID}/info
curl http://demo:[email protected]:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/info
{
"status": 1,
"payload": {
"name": "ch4",
"url": "rtsp://admin:admin@{YOUR_CAMERA_IP}/uri",
"on_demand": false,
"debug": false,
"status": 1
}
}
GET /stream/{STREAM_ID}/channel/{CHANNEL_ID}/codec
curl http://demo:[email protected]:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/codec
{
"status": 1,
"payload": [
{
"Record": "AU0AFP/hABRnTQAUlahQfoQAAAMABAAAAwCiEAEABGjuPIA=",
"RecordInfo": {
"AVCProfileIndication": 77,
"ProfileCompatibility": 0,
"AVCLevelIndication": 20,
"LengthSizeMinusOne": 3,
"SPS": [
"Z00AFJWoUH6EAAADAAQAAAMAohA="
],
"PPS": [
"aO48gA=="
]
},
"SPSInfo": {
"ProfileIdc": 77,
"LevelIdc": 20,
"MbWidth": 20,
"MbHeight": 15,
"CropLeft": 0,
"CropRight": 0,
"CropTop": 0,
"CropBottom": 0,
"Width": 320,
"Height": 240
}
}
]
}
GET /stream/{STREAM_ID}/channel/{CHANNEL_ID}/delete
curl http://demo:[email protected]:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/delete
{
"status": 1,
"payload": "success"
}
GET /stream/{STREAM_ID}/channel/{CHANNEL_ID}/hls/live/index.m3u8
curl http://127.0.0.1:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/hls/live/index.m3u8
ffplay http://127.0.0.1:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/hls/live/index.m3u8
GET /stream/{STREAM_ID}/channel/{CHANNEL_ID}/hlsll/live/index.m3u8
curl http://127.0.0.1:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/hlsll/live/index.m3u8
ffplay http://127.0.0.1:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/hlsll/live/index.m3u8
/stream/{STREAM_ID}/channel/{CHANNEL_ID}/mse?uuid={STREAM_ID}&channel={CHANNEL_ID}
ws://127.0.0.1:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/mse?uuid={STREAM_ID}&channel={CHANNEL_ID}
NOTE: Use wss
for a secure connection.
/stream/{STREAM_ID}/channel/{CHANNEL_ID}/webrtc
http://127.0.0.1:8083/stream/{STREAM_ID}/channel/{CHANNEL_ID}/webrtc
The request is an HTTP POST
with a FormData parameter data
that is a base64 encoded SDP offer (e.g. v=0...
) from a WebRTC client.
The response is a base64 encoded SDP Answer.
/{STREAM_ID}/{CHANNEL_ID}
rtsp://127.0.0.1:{RTSP_PORT}/{STREAM_ID}/{CHANNEL_ID}
ffplay -rtsp_transport tcp rtsp://127.0.0.1/{STREAM_ID}/{CHANNEL_ID}