What is stream sharing
Your camera’s memory and CPU resources are shared by many different tasks. By managing these resources carefully, you can get more out of your camera, such as:
- Higher frame rates
- Better bandwidth usage
- Support for more analytics
- More client streams
Each video stream is a transmission of video from your camera to a client. If you have more than one client, it’s helpful if these streams can share resources.
Streams can only be shared if clients request the same options such as resolution, compression, and codec. If clients request different options, the camera needs to create separate pipelines, which uses more resources.
To make stream sharing easier, set up default video channel values. This way, a stream request only needs the camera option. Learn more in Parameter management for video channels.
If you have different use cases that need special settings, you can add a streamprofile option to your request. This lets you distinguish from the default video channel values. See Stream profiles for details. For example: camera=1&streamprofile=storage.
Think of a stream profile as an alias for a set of values. If you provide an option more than once, the last value is used. For example, if a stream profile called Example contains resolution=192x192, but your URL is camera=1&streamprofile=Example&resolution=1920x1080, the camera uses 1920x1080. (All URL options are UTF-8 encoded.)
You can also reduce the load on both your camera and the network by using UDP multicast when streaming to multiple clients. This reduces the number of packets your camera needs to send. See How to get a video stream with RTP over UDP as multicast.
If you’re not sure which settings to use, start with the defaults and adjust as needed. You can always experiment to find what works best for your setup.