CreateStream. Strеam. Mediaserver
Creating and configuring a stream on the media server. If a request is sent with an existing stream identifier on the server, the stream will restart with new configuration parameters: the current connection with the source is terminated and a new one is established, the stream state and buffers are cleared.
POST /streams/{new-stream-uid}/
Body | |||||||||
json |
JSON
| ||||||||
tokenrequired | string | API request authorization token. See Mediaserver/Web API/Authorization/CreateApiToken. | |||||||
new-stream-uidoptional | uid | Unique identifier of the virtual camera {@hint:uid}. | |||||||
stream-urlrequired | url | Connection URL for the stream or publishing URL for the stream. See Mediaserver/Configuration/Stream (stream.ini). | |||||||
stream-tracksoptional | array | List of channels allowed to be captured, regardless of whether a channel exists in the stream or not. | |||||||
stream-protooptional | array | Protocols allowed for clients to connect to the media server for viewing the stream. | |||||||
stream-enableoptional | bool | Whether the media server is allowed or denied access to the stream (if denied, live and DVR playback and recording are unavailable). | |||||||
dvr-enablerequired | enum | Allows or denies the server to record and store a copy of the stream. | |||||||
dvr-archiverequired | path | Sets the root directory for storing DVR recordings. | |||||||
dvr-durationrequired | seconds | Sets the duration of recording storage. | |||||||
dvr-capacityrequired | bytes | Limits the amount of disk space for recordings. This parameter is for informational purposes only and does not impose physical restrictions. | |||||||
dvr-chunkrequired | seconds | Sets the recording segment duration. | |||||||
stream-accessrequired | string | Determines the type of authentication for clients connecting to view the stream. | |||||||
stream-whitelistrequired | array | List of allowed IP addresses that can connect to view the stream. | |||||||
stream-limitrequired | int | Limits the maximum number of concurrent client connections for viewing streams across all protocols. | |||||||
reconnect-numbersoptional | int | Number of reconnection attempts. The limit of consecutive reconnection attempts to the stream, after which the media server marks the stream as unavailable and excludes it from further capture. | |||||||
reconnect-timeoutoptional | seconds | Progressive time delay between reconnection attempts. | |||||||
reconnect-intervaloptional | seconds | Maximum value of progressive delay between connections. | |||||||
reconnect-invalidoptional | seconds | ||||||||
primary-nodeoptional | string | If cluster functionality is available, the parameter sets the primary stream capture node. | |||||||
secondary-nodeoptional | string | If cluster functionality is available, the parameter sets the secondary (backup) stream capture node. |
Response | |||||||||
200 | Stream successfully created. | ||||||||
403 | Authorization error. Invalid or missing API access token. See Mediaserver/Web API/Authorization/CreateApiToken. |
Example | |||||||||
JSON
|