Camogm

From ElphelWiki
Revision as of 19:50, 18 November 2007 by Andrey.filippov (talk | contribs)
Jump to: navigation, search

Description

This program allows recording of the video/images acquired by Elphel camera to the storage media. It is designed to run in the background and accept commands through a named pipe. It writes JPEG-encoded frames from the camera circbuf-circular video buffer in any of the 3 formats:

  • ogm - MJPEG video in Xiph Ogg container
  • jpeg - series of the individual JPEG files (1 file per frame)
  • mov - MJPEG video in Apple QuickTime(R) container

As of today the last one (mov) is probably the fastest one in the camera as it uses the minimum of computational resources. Ogg is optimized for streaming and requires additional memory copying and checksum calculation for all of the recorded data, individual JPEG files grow large directories that can use system resources, while recording mov format simply merges FPGA-encoded frames (with JPEG and optional Exif headers added by the software) and the file header (with frame index) is calculated only once per file.

This program makes use of the circbuf that can hold several seconds of even high resolution/high frame rate video, so switching from file to file and/or waiting for the search operations on the HDD will not cause the frame loss - that can be verified if the Exif headers are enabled - regardless of the format selected each frame will have the exact timestamp (with 1 microsecond resolution).

Usage:

/var/camogm <named_pipe_name>

i.e.:

/var/camogm /var/state/camogm_cmd

When the program is runninig you may send commands by writing strings to the command file (/var/state/camogm_cmd in the example above). The compete list of available commands is available on Elphel Wiki (http://wiki.elphel.com/index.php?title=Camogm), here is the example of usage from the shell prompt in the camera:

echo "status; exif=1; format=jpeg;status=/var/tmp/camogm.status" > /var/state/camogm_cmd

That will print status information on the standard output (may not be visible if the program was not started from the same session), set exif mode on (each frame will have the full Exif header including a precise time stamp), set output format to a series of individual JPEG files, and then send status information to a file /var/tmp/camogm.status in the camera file system.

This program does not control the process of acquisition of the video/images to the camera internal buffer, it only retrieves that data from the buffer (waiting when needed), packages it to selected format and stores the result files.