The figure below gives an overview of the different tasks available in raspiCamSrv and their relation to raspiCamSrv Configurations and camera strams.
For more information on the components, see the Picamera2 manual, chapter 4.2.
The tasks marked in green are executed in background processes (Threads) and may run simultaneously.
The status of each of these processes is indicated with status indicators:
The association between raspiCamSrv Configurations and camera streams shown in the figure above, is the default configuration.
In addition, default values for other configuration parameters are harmonized in such a way that all background processes can run simultaneously.
This is especially important for the live stream which will remain active while a video is recorded, while photos are taken or while a Photo Series is executed.
raspiCamSrv merges the different configurations to a single one which is applied when the camera is started.
This requires that the following configuration parameters must have the same values for the different configurations:
- Transform
- Colour Space
- Queue
The values for Buffer Count can be different. In the merge process, the largest number of buffers will be selected.
All configuration scan be changed, including the association between configuration and camera stream (except raw).
If a configuration change, for example Transform, is made for a single configuration, for example Video, it is no longer possible to use a common configuration for all tasks.
If then, for example, a video is recorded, the video thread needs to run in exclusive mode because it cannot share configuration with the Live Stream. For this purpose:
- The Live Stream must be stopped and paused during video recording
- The Encoder for the Live Stream must be stopped
- The camera must be stopped
- The camera must be configured with the Video configuration
- The camera must be started
- The encoder for video must be started while the video is being recorded
- The encoder must be stopped when video recording is finished
- The camera must be stopped
- The camera must be configured for the LiveStream, including eventally compatible configurations
- The camera must be started
- The MJPEG encoder for Live Stream must be started
- The Live Stream Thread must be started
In case of harmonized configurations, only steps 7 and 8 would have been required.