Live CD
353/363 | Using the cameras | Camera software | Live CD | Camera hardware | Diagnostic & repair | Development documentation | 333 prices | Information | FAQ | About Elphel, Inc
The Live CD based on Knoppix which is based on Debian.
Contents
Structure
The Live CD contains multipurpose GNU/Linux software and a special software for elphel cameras. The software is organized as debian packages. Our debian packages are presented on our SourceForge page in the Live-CD and Players sections.
Root file system of Knoppix is compressed and cloop kernel module is needed to decompress it on-fly when it is necessary. The CD contains compressed root file system, boot loader and flash tarballs for different modeles of our cameras.
If you already have installed Debian or Knoppix system, you can add some our debs to work with our cameras.
- We recommend to install following packages from our SourceForge page:
- elphel-pack It has utilites to configure network specially for cameras (for rtp stream receiving), search cameras in the LAN, update flash and helper for Mozilla/Firefox to work with .sdp files.
- netcardconfig-knoppix elphel clone to configure network card and to make a simple bridge from several cards.
- patched MPlayer to watch and to record rtp stream from our cameras.
To install selected package(s) you may use the following command:
# dpkg -i --force-overwrite <deb-file-name>
Our version of netcardconfig-knoppix is dependant of iputils-arping package. You may to istall it with:
# apt-get install iputils-arping
Other our packages and applayed patches contains common minor improvements and bug fixes for the base distro.
Usage
Boot and use
Currently we have Live CD only for i386 architecture.
Boot CD allows to use Linux with necessary network settings and utilites for our cameras without any modification of data on your hard drive.
Insert our CD in CD drive and let computer to boot from this CD. It is possible you need change some BIOS settings to do it.
You may simply to wait until system will be ready.
First you will see Knoppix boot menu. To continue boot you can wait some time or simply press Enter. The most common intervention during boot process is setting the screen resolution to match your monitor (details below - [[1]]):
knoppix screen=1600x1200
In most case Knoppix starts succesfully and automatically detects computer hardware.
Then network cards will be configured. Config script may ask you about to make a bridge if your computer has several network cards. Press Enter or wait some time for default configuration.
Then it automatically searches for elphel cameras in your LAN and makes a static html page with links.
After boot completes you will see the page with cameras.
Knoppix cheat codes (boot parameters)
Special parameters can be set at boot prompt.
- The first word must be a name of boot variant.
- knoppix
- Default mode.
- expert
- Verbose interactive mode.
- debug
- Debug mode.
- failsafe
- Boot without hardware autodetection.
- memtest
- RAM test.
- Further some parameters divided by blanks can follow in any order.
- screen=1280x1024
- Use this if you have monitor resolution bigger than 1024x768 pixels and autodetection does not work.
- lang=XX
- Specify the two-letter denotation of your language.
See file "KNOPPIX/knoppix-cheatcodes.txt" on the Live CD for more in-depth information. Or online - here
Common software for video
mplayer
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:
mplayer rtsp://camera-ip:7070/
Where camera-ip is a ip address of the camera.
To play a file recorded with mencoder or any other videofile you may use the following command:
mplayer path-to-file
Or you may use KDE menu to run mplayer in dialog mode
You may use keyboard to control playing
- space pause/continue
- Q shut
Look mplayer man page and site for more information.
mencoder
This program is included to mplayer package. It can transcode video and audio from different formats. For more about this see the man page, type:
man mencoder
To record rtp stream from our cameras it is better to use mencoder in copy mode (without reencoding):
mencoder rtsp://camera.ip:7070 -ovc copy -fps <fps> -o filename.avi
where:
- camera.ip - DNS name or IP address of the camera;
- <fps> - approximate value of the frames frequency (this parameter is mandatored);
- filename.avi - 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 on blocks with the specified number of frames:
while true ; do f=`date -Iseconds` mencoder rtsp://camera.ip:7070 -ovc copy -fps <fps> -frames 1000 -o $f.avi done
You can enter this strings "as is" on command prompt.
ElphelOgm
Receiver for multicast RTP stream. It generates ogg/mjpeg stream on stdout. You can use it with mplayer or other videoplayer to watch 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 detaled description and roadmap
ogm2mov
This program is to recode ogg/mjpeg file to QuickTime .mov format. Usage:
ogm2mov -o <output file name> <input_file_name or "-" for stdin>
The program can not write to pipe, only to file.
GenReS plugin for Firefox
This is a plugin for Mozilla/Firefox to embedding external application as mplayer to browser window.
See also description for javascript programmers.
Special software
netcardconfig
netcardconfig is an improved version of knoppix network configurator. It needs root priveleges. It has two modes: interactive and batch.
...
It is called from startup script on our Live CD. If you have installed netcardconfig-knoppix not on our distro, it is possible you need to insert call to the script in a system startup script. Our version uses arping to check IP address.
netcamconfig
Run "netcamconfig" as user "root" to apply additional network settings and some kernel parameters.
This script adds aliases for the network card with most popular LAN ip adresses, adds route records for multicast ip addresses and changes kernel parameters to prevent long i/o operations with hard drive,
It is called from startup script on our Live CD after netcardconfig. If you have installed elphel-pack not on our distro, possible you need to insert call for the script in a system startup script.
camsearch
This shell script scans the LAN using broadcast ping and detects elphel cameras. It creates file "cameras.html" in the current directory with links to found cameras and information about software versions. It is called from system startup script after network configuration and can be restarted using "Find cameras again" link on the KDE desktop.
flashit
This program uses Axis low-level Ethernet packets see "Theory"(some detailes do not apply to the camera) to communicate withe a network boot loader hard-wired in the CPU internal ROM. That 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 (i.e. by just clicking the icon on the desktop) it offers a choice of the 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 file icon over the flashit).
To use flashit utility camera should be started in the firmware updgrade mode - a green button on the back panel should be held pressed when the power is applied to the camera. You may do it 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. Flashing process takes several minutes - both LEDs on the network connector stay on until it is over.
sdp-helper
This script is for call from a browser. It accept temporary "sdp" file downloaded from camera and calls mplayer to watch stream or mencoder to record it. In the CD it process files with mime type text/sdp. Script deletes given temporary file.
Install to hard drive
Work with packages
How to Make New CD Image
Here will be described usage of Live CD maker which can be downloaded from our SourceForge page. Tar archive contain several shell scripts and directories with patches and files for CD.
Debs
This directory contains packages to install in new CD and files with list of package and file names to remove. Script recognizes deb rpm and compressed tar archives. Usage of debs is preferred.
Files "00remove-debs" and "00remove-files" contans respectively a lists of debian packages and files to remove before install and update new packages. Files "zzremove-debs" and "zzremove-files" are used similarly only after installation of new packages.
Patches
there are objects of 4 types:
- diff patches, to be applyed with patch to knoppix root;
- tar.bz2 archives, to unpack in knoppix root file system;
- executable files which will run with knoppix root as current directory;
- directories are ignored by the script, can contain data for executable.
Before applyed initrd image inpacked to knoppix root and repacked after. So patches can modify content of initrd.
Diff patches are tested before apply: it tryed with --dry-run and -p0 and p1 options.
Executables at first runs with --dry-run, on this option it must check posibility but not modify files.
Files to Be Placed on CD
Directory "newcd" contains files wich will be placed on CD as is. Put here new flash tarballs and HTML files which can be accessed without booting from the CD.
Scripts
download-debs
livecd-make
Other Files
Diagnostic
Road map
Free Software and Open Hardware. Elphel, Inc., 2005