Skip to content

Latest commit

 

History

History
101 lines (63 loc) · 6.78 KB

Settings.md

File metadata and controls

101 lines (63 loc) · 6.78 KB

raspiCamSrv Settings

Up

This screen allows for some basic configurations, such as selecting the standard file types for photos, raw photos and videos.

Settings

Switching the active Camera

On systems which allow connection of multiple cameras (e.g. Pi 5), it is possible to switch the active camera.
Only non-USB cameras are offered for selection (see also Information)

Camera Switch

Activating / Deactivating Histograms

raspiCamSrv can show histograms for photos.
Histograms are generated with OpenCV.
This requires that the packages OpenCV, numpy and matplotlib are installed (see RaspiCamSrv Installation Step 9)

If these packages are installed, you can select whether or not to Show Histograms.
The default on first server start is to show histograms.

It may be necessary on smaller systems (Raspberry Pi Zero W, Raspberry Pi Zero 2 W) to deactivate this option because of memory restrictions.
If the option is deactivated, the modules are not loaded and histograms will not be displayed, even if all packages are installed.

The system will automatically detect whether or not the required packages are installed and accessible. If this is not the case, this will be indicated:

NoHistograms

Recording Audio along with Video

Preconditions

If a microphone, such as a USB microphone is connected to the Raspberry Pi, it is possible to record audio along with videos.

Picamera2 accesses the microphone through PulseAudio. PulseAudio daemons (pulseaudio.socket and pulseaudio.service) are running as user units and not as system units.

In order to access the microphone, raspiCamSrv needs to run in the user environment, too.
This is automatically the case when the Flask service is directly started from the command line in the raspiCamSrv virtual environment with
flask --app raspiCamSrv run --debug --host=0.0.0.0

Alternatively, raspiCamSrv can be configured as user service as described in README

Configuration

raspiCamSrv will automatically detect whether a microphone is connected and accessible through PulseAudio.

If this is the case, the default microphone will be shown in the Settings screen: SettingsMic
Also the checkbox Record Audio along with Video is enabled for change.

If the checkbox is checked, audio will be recorded when a video will be recorded.

If no microphone is connected or the microphone is not accessible through PulseAudio (because raspiCamSrv runs as system service), this will be indicated as
SettingsMic
and the Record Audio along with Video checkbox is disabled.

Microphones can be plugged in/out without stopping the system. After a refresh of the Settings screen, the system will detect the changed setup.

If multiple microphones are plugged in, PulseAudio will automatically select a default microphone.
If the selected microphone is not the intended one, plug it out temporarily. Pulse Audio will automatically select another default and keep it.

Audio/Video Synchronization

Due to timing issues of audio and video subsystems, there may be a delay between video and audio.
The discrepancy is typically in subsecond range.

Test videos should be made with something like a clapperboard. In case of delays, the Audio Timeshift value should be adjusted (it can be positive or negative) until video and audio are in sync.

Server Configuration

The Settings screen includes a Configuration section with functions to control the raspiCamSrv configuration:

Configuration

  • Button Store Configuration generates a set of JSON files which include the entire configuration of the raspiCamSrv server (see below).
  • Button Load Stored Configuration replaces the current configuration with a previaously stored configuration.
  • Button Reset Server stops any background activity (live stream, video, photo series) and replaces the current configuration with the default configuration.
  • Start server with stored Configuration controls whether a server start shall use the default configuration or the stored configuration.

Server Configuration Storage

When the configuration is stored with the Store Configuration button, a set of files is created/replaced in the raspi-cam-srv/raspiCamSrv/static/config folder:

Config

  • _loadConfigOnStart.txt
    This is just an empty marker file. If the file exists, the server will initiate its configuration with configuration data stored in the other files.
    Otherwise, default configuration settings will be applied.
  • cameraConfigs.json
    This is currently not used
  • cameraProperties.json
    This file contains the camera properties of the actice camera, which are shown in Camera Properties.
    Camera properties are always read directly from the camera.
  • cameras.json
    This file contains the installed cameras with information shown in Installed Cameras
    Installed cameras are always directly queried from the camera system.
  • controls.json
    This file includes all the camera configuration settings as shown in the upper right part of the Live screen Camera Controls
  • LiveViewConfig.json, photoConfig.json, rawConfig.json, videoConfig.json
    contain the camera configuration settings for the different use cases as shown in the Config screen
  • rawFormats.json
    contain a list of formats which can be used for raw photos.
    This information is extracted from the different Sensor Modes and is always directly obtained from the camera system.
  • serverConfig.json
    This file includes configuration settings for the raspiCamSrv dialog system, such as information included in the Settings dialog, or the configuration of the Display Buffer and some navigation details.
  • streamingCfg.json contains, for each camera, the Live View Configuration settings and Camera Controls which will be used for streaming. The included Video Configuration is stored because Picamera2 always requires the main stream to be configured. This will not be used for streaming.
  • triggerConfig.json contains the configuration settings for triggered capture of videos and photos (motion capture)