Window: record

_images/window_record_preview.svg

Workflow

The overall workflow is as follows:

  1. The user opens the recording program (e.g. from a shortcut).
  2. The user is asked to select which video input device to use if there are multiple available.
  3. A preview window (see above) is shown along with video backend configuration options. The application is in preview state.
  4. The user adjusts their experimental setup and configuration options until they’re happy with the result.
  5. 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:

  1. output::meta-description (multiline string)
  2. output::filename-suffix (string)
  3. maximum-record-time (string; backend validates as HH:MM:SS)
  4. v4l2-ctl::brightness (integer)
  5. v4l2-ctl::brightness (integer)
  6. v4l2-ctl::contrast (integer)
  7. v4l2-ctl::saturation (integer)
  8. v4l2-ctl::hue (integer)
  9. v4l2-ctl::gamma (integer)
  10. v4l2::tv-norm (choices: NTSC or PAL)
  11. v4l2::resolution (choices)
  12. encoder-vp8::max-bitrate (string)
  13. encoder-vp8::crf (integer)
  14. 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).