I add a stream named demo1 (I will give windows bash example):
curl.exe --header "Content-Type: application/json" --request POST --data '{\"name\":\"demo1\", \"channels\":{}}' http://demo:demo@127.0.0.1:8083/stream/demo1/add
Linux bash is similar, but I didn't test:
curl --header "Content-Type: application/json" --request POST --data '{"name":"demo1", "channels":{}}' http://demo:demo@127.0.0.1:8083/stream/demo1/add
config file becomes like this:
.
"streams": {
"demo1": {
"name": "demo1"
}
}
.
and I add a stream to this:
in Windows:
curl.exe --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:demo@127.0.0.1:8083/stream/demo1/channel/1/add
in Linux (probably):
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:demo@127.0.0.1:8083/stream/demo1/channel/1/add
Initial config.json file is like this:
I add a stream named demo1 (I will give windows bash example):
curl.exe --header "Content-Type: application/json" --request POST --data '{\"name\":\"demo1\", \"channels\":{}}' http://demo:demo@127.0.0.1:8083/stream/demo1/add
Linux bash is similar, but I didn't test:curl --header "Content-Type: application/json" --request POST --data '{"name":"demo1", "channels":{}}' http://demo:demo@127.0.0.1:8083/stream/demo1/add
config file becomes like this:and I add a stream to this: in Windows:
curl.exe --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:demo@127.0.0.1:8083/stream/demo1/channel/1/add
in Linux (probably):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:demo@127.0.0.1:8083/stream/demo1/channel/1/add
and sometimes I get this error:
After an error, even though you restart RtspToWeb.exe, it doesn't add the channel, I have to revert config.json to this:
and restart rtsptoweb.exe and it works again.