Window: record¶
Workflow¶
The overall workflow is as follows:
- The user opens the recording program (e.g. from a shortcut).
- The user is asked to select which video input device to use if there are multiple available.
- A preview window (see above) is shown along with video backend
configuration options. The application is in
preview
state. - The user adjusts their experimental setup and configuration options until they’re happy with the result.
- The user sets the output directory where they want their recorded
files dropped, and presses “Start recording!”. The application
enters
recording
state.
Configuration options¶
Examples of configuration options:
output::meta-description
(multiline string)output::filename-suffix
(string)maximum-record-time
(string; backend validates as HH:MM:SS)v4l2-ctl::brightness
(integer)v4l2-ctl::brightness
(integer)v4l2-ctl::contrast
(integer)v4l2-ctl::saturation
(integer)v4l2-ctl::hue
(integer)v4l2-ctl::gamma
(integer)v4l2::tv-norm
(choices:NTSC
orPAL
)v4l2::resolution
(choices)encoder-vp8::max-bitrate
(string)encoder-vp8::crf
(integer)encoder-vp8::cpu-used
(choices:0 - very high
,1 - high
,2 - medium
, etc.)
Each entry should have a (backend-supplied) tooltip, possibly quite lengthy.
Clicking the “reset to default” button asks the backend for the default value. This gives the backend the possibility of suggesting a different default value depending on the values of other config options.
Note
The output directory is actually a string configuration option
output::directory
, but it is presented to the user as a big
button leading to a file chooser because it is such a common
option.
Application states¶
Preview state¶
In the preview
state, the user can modify the video backend config
options and their experimental setup and view the changes instantly in
the preview canvas.
Recording state¶
In the recording
state, the video backend config options are
readonly/frozen (including the ‘load config’ button). The preview
canvas is disabled (since the backend gst pipe is busy pushing its
data to the avconv encoder). The “Set output directory” button changes
into “Open output directory”, and the “Start recording!” button
changes into “Stop recording!”. The “warnings from backend” textbox
now displays whatever status the backend wants to report (probably the
file size and how many minutes of recording it has).
The “Stop recording!” button should ask for confirmation (with default “no”).
Todo
As a future feature we can think of supplying a real-time preview by adding a “tee” in the gst pipe, but this is not necessary for now.
Frontend-backend separation¶
The backend runs in a separate process with higher priority level (and does not depend on X11 being alive). The backend is intended to be extremely resilient to software and even some temporary hardware failures.
If the user closes the UI while recording, the backend continues to record in the background. The user can re-open the application and select the video interface (now with a “(rec)” note next to its name) to reconnect to that backend process (to be able to monitor or stop that recording).