Live CD

From ElphelWiki
Revision as of 05:56, 23 October 2005 by 80.163.42.55 (talk) (Structure: typo fixed)
Jump to: navigation, search
Elphel Network Cameras Manual

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.

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 search elphel cameras in your LAN and make static html page with links.

After boot complette 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.

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.

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

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

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


Free Software and Open Hardware. Elphel, Inc., 2005