Difference between revisions of "Camogm"

From ElphelWiki
Jump to: navigation, search
Line 8: Line 8:
 
This program makes use of the [[Circbuf|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).
 
This program makes use of the [[Circbuf|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:
+
== Usage ==
  
/var/camogm <named_pipe_name>
+
Eventually camogm will be started (and restarted if needed) automatically at boot time, now it is started manually with the command
 +
 
 +
camogm <named_pipe_name>
 +
 
 +
Where <named_pipe_name> is the filename taht will be used to pass commands to the camogm. A good choice is "/var/state/camogm_cmd" and it is used in a [http://elphel.cvs.sourceforge.net/elphel/elphel353-7.1/apps/camogm/camogmstate.php?view=markup camogmstate.php] - a demo php script that can read the current status of the camogm recorder.
  
 
i.e.:
 
i.e.:
  
/var/camogm /var/state/camogm_cmd
+
camogm /var/state/camogm_cmd
  
 
When the program is runninig you may send commands by writing strings to the command file
 
When the program is runninig you may send commands by writing strings to the command file

Revision as of 20:56, 18 November 2007

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

Eventually camogm will be started (and restarted if needed) automatically at boot time, now it is started manually with the command

camogm <named_pipe_name>

Where <named_pipe_name> is the filename taht will be used to pass commands to the camogm. A good choice is "/var/state/camogm_cmd" and it is used in a camogmstate.php - a demo php script that can read the current status of the camogm recorder.

i.e.:

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.