Work with a stream
This page presents commands for working with a stream:
Creating a stream
Deleting a stream
Disabling a stream
To start capturing a stream with the media server, it needs to be configured properly. Each configuration file should contain parameters for one stream.
The path to the stream configuration files is set in the server.media.streams parameter.
The server loads all files with the .yaml
extension from the directory. Other files are ignored.
One stream corresponds to one configuration setting.
Create a stream
All created streams are stored in one folder:
/opt/<xxxx>/media-server/streams/
Each stream has its own configuration setting. In the created *.ini file, you need to copy the configuration setting template.
The file looks like: stream-uid.ini
When creating a stream, its name must be unique.
Creating a file:
/opt/<xxxx>/media-server/streams/ sudo touch 123.ini
Configuration settings for camera stream.
Delete a stream
Deletion occurs in 3 stages.
1. The stream is deleted
sudo rm cbd5918d-c977-4534-a0cc-d588c9db5795.ini
2. The archive is deleted (the entire folder with its location is specified)
rm -r cbd5918d-c977-4534-a0cc-d588c9db5795
3. After deletion, the service must be restarted
sudo service <xxxx>-media-server restart
Disable a stream
In some situations, it is enough to simply disable a stream.
If a stream is disabled, it stops recording, but archive recordings remain on the server.
To disable a stream in the configuration setting file, set the value to false.
stream-enable = false //Disabling a stream