- 1 Introduction
- 2 Software Architecture of Elphel 3x3 cameras
- 3 Client Software
All the camera software is provided under the terms of the GNU General Public License. All the source code is available inside the camera but you may want to visit Elphel web site for the latest version.
Software Architecture of Elphel 3x3 cameras
Software in the Elphel cameras started from Axis Developer Boards Software and was amended for the camera specific functions. It was modified to work with newer hardware (models 303-313/323-333), support more features and now seems to be a good time to make a major redesign instead of applying incremental changes.
Some discussion has already started in Russian here - Nc3x3
The camera can be accessed from client-software using the Video API (compatible with Axis network cameras), or using the more ancient ccam.cgi interface. The user must select the interface that he wishes to use. If the ccam.cgi interface is selected, an AJAX web-interface will allow simple access to the camera, by visiting the cameras IP-address (default: 192.168.0.9) with a web-browser.
PC-based video server that will archive incoming Ogg Theora incoming streams from several cameras and transcode them on the fly to lower resolution (binary decimation, windowing) and frame rate (i.e. using only key frames) presenting multiple streams (real time and recorded) to the operator. The external interface of the server might be one of the industry standards and compatible with 3rd party legacy software.
Folowed software are included in the Live CD
Common software for video
This is a movie player. It can play files and streams with many different video and audio formats.
To watch an rtp stream from our cameras you may use the following command:
Where camera-ip is the ip address of the camera.
To play a file recorded with mencoder or any other videofile you may use the following command:
Or you may use the KDE menu to run mplayer in dialog mode
You can use the keyboard to control playing
- space pause/continue
- Q quit
See the mplayer man page and site for more information.
This program is included in the mplayer package. It can transcode video and audio to and from many different formats. For more about this see the man page. Type:
To record the rtp stream from our cameras it is better to use mencoder in copy mode (without reencoding):
mencoder rtsp://camera.ip:554 -ovc copy -fps <fps> -o filename.avi
- camera.ip - DNS name or IP address of the camera;
- <fps> - approximate value of the frame frequency (this parameter is mandatory);
- filename.avi - the name of an output file.
Close the terminal window or press Ctrl+C to finish recording.
The following program written in unix shell will split recording video into blocks with the specified number of frames:
while true ; do f=`date -Iseconds` mencoder rtsp://camera.ip:554 -ovc copy -fps <fps> -frames 1000 -o $f.avi done
You can enter these strings "as is" at the command prompt.
A receiver for the multicast RTP stream. It generates ogg/mjpeg stream on stdout. You can use it with mplayer or another video player to watch the RTP stream from the camera:
ElphelOgm -a <multicast address> -p <multicast port> | mplayer -nocache -
Or to record stream to a file:
ElphelOgm -a <multicast address> -p <multicast port> -f <fps> > video.ogm
Other tested players: VLC(some performance).
See also detailed description and roadmap
This program is used to recode ogg/mjpeg file to QuickTime .mov format. Usage:
ogm2mov -o <output file name> <input_file_name or "-" for stdin>
The program cannot write to a pipe, only to a file.
GenReS plugin for Firefox
This is a plugin for Mozilla/Firefox to allow embedding of external applications like mplayer in the browser window.
netcardconfig is an improved version of knoppix network configurator. It needs root privileges. It has two modes: interactive and batch.
It is called from the startup script on our Live CD. If you have installed netcardconfig-knoppix separately from our distro, it is possible you need to insert a call to the script in a system startup script. Our version uses arping to check the IP address.
Run "netcamconfig" as user "root" to apply additional network settings and some kernel parameters.
This script adds aliases for network cards with the most popular LAN ip adresses, adds route records for multicast ip addresses and changes kernel parameters to prevent long i/o operations blocking the hard drive,
It is called from the startup script on our Live CD after netcardconfig. If you have installed elphel-pack separately from our distro, you possibly need to insert a call for the script in a system startup script.
This shell script scans the LAN using broadcast ping and detects elphel cameras. It creates the file "cameras.html" in the current directory with links to found cameras and information about software versions. It is called from the system startup script after network configuration and can be restarted using the "Find cameras again" link on the KDE desktop.
This program uses Axis low-level Ethernet packets see "Theory" (some details do not apply to the camera) to communicate with a network bootloader hard-wired in the CPU internal ROM. This makes firmware upgrade a safe process - even if the process was interrupted and the camera was left in non-bootable state, it is always possible to start over again.
When the program is started without arguments (e.g. by just clicking the icon on the desktop) it offers a choice of images available on the DVD. You may also download flash image files (elphel3?3*-flash.tar.bz2) from the files section on Elphel project page at SourceForge.net, save them and use as an argument to flashit (i.e. drag-and-drop the file icon over flashit).
To use the flashit utility, the camera should be started in firmware updgrade mode - the green button on the back panel should be held pressed down when the power is applied to the camera. You may do this in any sequence - if the program was started first, you will see the program output messages immediately after the camera is started in this special mode. The flashing process takes several minutes - both LEDs on the network connector stay on until it is over.
This script is designed for calling from a browser. It accepts a temporary "sdp" file downloaded from camera and calls mplayer to view the stream or mencoder to record it. On the CD it processes files with the mime type text/sdp. The script deletes the given temporary file.
Free Software and Open Hardware. Elphel, Inc., 2005