Add а stream: Stream.Add
The method and parameters
The method to add a stream for capturing and publishing.
string Stream.Add
(uid camera, uid stream, url source, number priority, bool enable, array tracks, object cluster, object dvr, object capture, object live, object access, object reconnect).
Parameters
uid camera REQUIRED – a unique camera identifier within the installation.
uid stream REQUIRED – a unique stream identifier for a camera.
number priority – the priority of a stream in the camera. It’s used when camera archive is processed.
url source – RTSP URL of the captured/published stream. When source isn’t specified, then the stream is registered but isn’t served. The following URL schemes are supported:
rtsp://– capture the RTSP stream via the TCP protocol.tcp://– is the same as forrtsp://.udp://– capture the RTSP stream via the UDP protocol.sink://– creates the connection point to publish a stream.
bool enable = true – the stream is on.
array tracks = ["audio","video"] – the list of media streams to capture. If it’s not specified, the video stream will be captured.
video– capture the stream with video data. Will be constantly captured regardless the settings. Supports H.264 and H.265 codecs.audio– capture the audio stream. If there is no stream in the initial RTSP, the stream won’t be created and captured. Supports the following codecs: PCMU, PCMA, MPA, AAC.
object cluster – the configuration of the stream capture in fault-tolerant mode.
object dvr – defines the parameters of recording and archive storage for a stream.
object capture – sets the capture parameters.
object live – sets the streaming parameters.
object access – specifies the permission access level to Live and DVR.
object reconnect – parameters for reconnecting to a stream upon network loss or disconnect.
POST /api/ |
200 |
The camera UID, the UID of the added stream.
JSON
|
400 |
A JSON-RPC error
JSON
|
500 |
The server error |