Difference between revisions of "Elphel Software Kit for Ubuntu"

From ElphelWiki
Jump to: navigation, search
(Mplayer)
Line 1: Line 1:
==For developers==
+
=About=
Tested on Kubuntu 8.0.4.
+
 
===If you are new to Linux ===
+
This page is a simple howto for running Elphel software on Ubuntu GNU/Linux.
 +
 
 +
==Install Ubuntu==
 +
If you already have Ubuntu 8.04.1 installed you can skip this section.
 +
 
 +
Our software kit is tested on Ubuntu 8.04.1 and is starting to be tested with Ubuntu 8.10 (Intrepid)
 +
 
 +
You can download this GNU/Linux distribution freely from http://www.ubuntu.com/
 +
 
 +
Many forums and wikis are available in many languages to help you to install and use Ubuntu. Ex: http://www.google.com/search?q=forum+ubuntu (you can add "&hl=fr" or any language code to the URL)
 +
 
 +
==If you are new to GNU / Linux ==
 
Most instructions below are commands that you need to enter in the in the terminal window. For the lines that do not end with "\" sign you just copy them one-by-one and paste in the terminal window (in KDE it is Konsole in the "System" menu). For pasting you '''can not''' use <cntrl-V> - you need to '''right-click in the terminal window and select "Paste"''' from the drop-down context menu. Alternatively you can use '''the middle mouse button''' to both copy (drag while middle mouse pressed) and paste - click it in the console window.
 
Most instructions below are commands that you need to enter in the in the terminal window. For the lines that do not end with "\" sign you just copy them one-by-one and paste in the terminal window (in KDE it is Konsole in the "System" menu). For pasting you '''can not''' use <cntrl-V> - you need to '''right-click in the terminal window and select "Paste"''' from the drop-down context menu. Alternatively you can use '''the middle mouse button''' to both copy (drag while middle mouse pressed) and paste - click it in the console window.
  
Line 10: Line 21:
 
If you get some problems it is very useful to copy the error message that system outputs (avoiding anything specific to your particular installation - like user directories names) and paste them into the search box of you browser.
 
If you get some problems it is very useful to copy the error message that system outputs (avoiding anything specific to your particular installation - like user directories names) and paste them into the search box of you browser.
  
===Install needed packages===
+
=User softwares=
 +
 
 +
Some softwares need to be patched and recompiled even if they exist in Ubuntu software repositories, some softwares are not yet packaged in Ubuntu, so you have to compile them from sources also. We try to push our software patches to the mainstream applications, but it take time and is not always possible.
 +
 
 +
 
 +
==Mplayer==
 +
As for now MPlayer have to be patched and recompiled we document here the most simple way to do it on an Ubuntu or Debian based workstation.
 +
 
 +
First install some complilation dependencies, mainly libraries...
 +
sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \
 +
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev liblzo-dev gawk libjpeg62-dev libaudiofile-dev \
 +
libsmbclient-dev libxv-dev libpng3-dev libgif-dev libcdparanoia0-dev libxvidcore4-dev libdv-dev \
 +
liblivemedia-dev libfreetype6-dev em8300-headers libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \
 +
libglu-dev libartsc0-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \
 +
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev  libaa1-dev libcaca-dev \
 +
libx264-dev  libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \
 +
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev liblame-dev
 +
 
 +
'''If you are under Ubuntu 8.10 (Intrepid) replace liblame-dev at the end by libmp3lame-dev'''
 +
 
 +
Get the mplayer ubuntu source package:
 +
apt-get source mplayer
 +
 
 +
patch the sources and compile:
 +
cd mplayer-1.0~rc2/
 +
sed s/\#define\ MAX_RTP_FRAME_SIZE\ 50000/\#define\ MAX_RTP_FRAME_SIZE\ 5000000/g \
 +
libmpdemux/demux_rtp.cpp > libmpdemux/demux_rtp.cpp_
 +
mv libmpdemux/demux_rtp.cpp_ libmpdemux/demux_rtp.cpp
 +
sudo dpkg-buildpackage
 +
cd ..
 +
 
 +
install mplayer package:
 +
sudo dpkg  --install mplayer_1.0~rc2-0ubuntu*.deb
 +
 
 +
You should be able now to play videos with up to 5MB frames (highest quality 5MPix images are around 1 MB) as a multicast or unicast video stream. (the streamer in the camera should be ENABLED)
 +
mplayer rtsp://192.168.0.9:554 -vo x11 -fs -zoom
 +
 
 +
 
 +
=For developers=
 +
 
 +
==Install needed packages==
 
Minimal packages:
 
Minimal packages:
 
  sudo apt-get install cvs build-essential autoconf flex byacc bison libglib2.0-dev tcl gettext libncurses5-dev patch zlib1g-dev nfs-kernel-server bash
 
  sudo apt-get install cvs build-essential autoconf flex byacc bison libglib2.0-dev tcl gettext libncurses5-dev patch zlib1g-dev nfs-kernel-server bash
Line 29: Line 80:
 
answer by default (enter, enter, ...)
 
answer by default (enter, enter, ...)
  
===Configure your NFS server===
+
==Configure your NFS server==
  
 
Let's say you want to configure an NFS server on your machine and your IP address is '''192.168.0.100'''.
 
Let's say you want to configure an NFS server on your machine and your IP address is '''192.168.0.100'''.
Line 46: Line 97:
 
  sudo exportfs -a
 
  sudo exportfs -a
  
===Install sources of Elphel camera===
+
==Install sources of Elphel camera==
  
====CVS====
+
===CVS===
  
 
Get [http://downloads.sourceforge.net/elphel/elphel353_install_from_cvs.sh.tar.gz?modtime=1195003055&big_mirror=0 elphel353_install_from_cvs.sh] script and execute it.
 
Get [http://downloads.sourceforge.net/elphel/elphel353_install_from_cvs.sh.tar.gz?modtime=1195003055&big_mirror=0 elphel353_install_from_cvs.sh] script and execute it.
  
====Release====
+
===Release===
 
http://sourceforge.net/projects/elphel
 
http://sourceforge.net/projects/elphel
  
Line 60: Line 111:
 
  ./install_elphel
 
  ./install_elphel
  
===Elphel SDK===
+
==Elphel SDK==
  
 
We provide our clients with a complete SDK to develop software, FPGA code and even to redesign the hardware.
 
We provide our clients with a complete SDK to develop software, FPGA code and even to redesign the hardware.
  
====PHP====
+
===PHP===
 
*[[PHP in Elphel cameras]]
 
*[[PHP in Elphel cameras]]
 
*[[Elphel PHP constants]]
 
*[[Elphel PHP constants]]
 
*[[PHP Examples]]
 
*[[PHP Examples]]
  
====KDevelop IDE====
+
===KDevelop IDE===
 
*[[KDevelop]] IDE
 
*[[KDevelop]] IDE
 
*work in progress [[KDevelop]] integration with GTKWave & Icarus.
 
*work in progress [[KDevelop]] integration with GTKWave & Icarus.
  
====FPGA Development in Elphel cameras====
+
===FPGA Development in Elphel cameras===
 
*[[FPGA Development in Elphel cameras]] is the page to read if you want to install Xilinx tools to do some FPGA development.
 
*[[FPGA Development in Elphel cameras]] is the page to read if you want to install Xilinx tools to do some FPGA development.
 
*iverilog
 
*iverilog
 
*GTKWave
 
*GTKWave
 
 
==Mplayer==
 
As for now MPlayer have to be patched and recompiled we document here the most simple way to do it on an Ubuntu or Debian based workstation.
 
 
First install some complilation dependencies, mainly libraries...
 
sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \
 
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev liblzo-dev gawk libjpeg62-dev libaudiofile-dev \
 
libsmbclient-dev libxv-dev libpng3-dev libgif-dev libcdparanoia0-dev libxvidcore4-dev libdv-dev \
 
liblivemedia-dev libfreetype6-dev em8300-headers libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \
 
libglu-dev libartsc0-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \
 
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev  libaa1-dev libcaca-dev \
 
libx264-dev  libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \
 
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev liblame-dev
 
 
'''If you are under Ubuntu 8.10 (Intrepid) replace liblame-dev at the end by libmp3lame-dev'''
 
 
Get the mplayer ubuntu source package:
 
apt-get source mplayer
 
 
patch the sources and compile:
 
cd mplayer-1.0~rc2/
 
sed s/\#define\ MAX_RTP_FRAME_SIZE\ 50000/\#define\ MAX_RTP_FRAME_SIZE\ 5000000/g \
 
libmpdemux/demux_rtp.cpp > libmpdemux/demux_rtp.cpp_
 
mv libmpdemux/demux_rtp.cpp_ libmpdemux/demux_rtp.cpp
 
sudo dpkg-buildpackage
 
cd ..
 
 
install mplayer package:
 
sudo dpkg  --install mplayer_1.0~rc2-0ubuntu*.deb
 
 
You should be able now to play videos with up to 5MB frames (highest quality 5MPix images are around 1 MB) as a multicast or unicast video stream. (the streamer in the camera should be ENABLED)
 
mplayer rtsp://192.168.0.9:554 -vo x11 -fs -zoom
 

Revision as of 14:44, 2 November 2008

About

This page is a simple howto for running Elphel software on Ubuntu GNU/Linux.

Install Ubuntu

If you already have Ubuntu 8.04.1 installed you can skip this section.

Our software kit is tested on Ubuntu 8.04.1 and is starting to be tested with Ubuntu 8.10 (Intrepid)

You can download this GNU/Linux distribution freely from http://www.ubuntu.com/

Many forums and wikis are available in many languages to help you to install and use Ubuntu. Ex: http://www.google.com/search?q=forum+ubuntu (you can add "&hl=fr" or any language code to the URL)

If you are new to GNU / Linux

Most instructions below are commands that you need to enter in the in the terminal window. For the lines that do not end with "\" sign you just copy them one-by-one and paste in the terminal window (in KDE it is Konsole in the "System" menu). For pasting you can not use <cntrl-V> - you need to right-click in the terminal window and select "Paste" from the drop-down context menu. Alternatively you can use the middle mouse button to both copy (drag while middle mouse pressed) and paste - click it in the console window.

Character "\" at the end of the line means continuation, so you can copy the whole block of text where each line but the very last ends with "\" and paste them together.

Many of the commands start with "sudo" - first time system will ask you for your user password that you enter without any starts (provided you have administrative privileges).

If you get some problems it is very useful to copy the error message that system outputs (avoiding anything specific to your particular installation - like user directories names) and paste them into the search box of you browser.

User softwares

Some softwares need to be patched and recompiled even if they exist in Ubuntu software repositories, some softwares are not yet packaged in Ubuntu, so you have to compile them from sources also. We try to push our software patches to the mainstream applications, but it take time and is not always possible.


Mplayer

As for now MPlayer have to be patched and recompiled we document here the most simple way to do it on an Ubuntu or Debian based workstation.

First install some complilation dependencies, mainly libraries...

sudo apt-get install build-essential debhelper libncurses5-dev libesd0-dev liblircclient-dev libgtk2.0-dev \
libvorbis-dev libsdl1.2-dev sharutils libasound2-dev liblzo-dev gawk libjpeg62-dev libaudiofile-dev \
libsmbclient-dev libxv-dev libpng3-dev libgif-dev libcdparanoia0-dev libxvidcore4-dev libdv-dev \
liblivemedia-dev libfreetype6-dev em8300-headers libgl1-mesa-dev libdvdread-dev libdts-dev libtheora-dev \
libglu-dev libartsc0-dev libfontconfig-dev libxxf86dga-dev libxinerama-dev libxxf86vm-dev \
libxvmc-dev libggi2-dev libmpcdec-dev libspeex-dev libfribidi-dev libfaac-dev  libaa1-dev libcaca-dev \
libx264-dev  libpulse-dev libmad0-dev ladspa-sdk libdbus-glib-1-dev libaudio-dev liblzo2-dev libdvdnav-dev \
libopenal-dev libjack-dev libtwolame-dev libsvga1-dev libenca-dev liblame-dev

If you are under Ubuntu 8.10 (Intrepid) replace liblame-dev at the end by libmp3lame-dev

Get the mplayer ubuntu source package:

apt-get source mplayer

patch the sources and compile:

cd mplayer-1.0~rc2/
sed s/\#define\ MAX_RTP_FRAME_SIZE\ 50000/\#define\ MAX_RTP_FRAME_SIZE\ 5000000/g \
libmpdemux/demux_rtp.cpp > libmpdemux/demux_rtp.cpp_
mv libmpdemux/demux_rtp.cpp_ libmpdemux/demux_rtp.cpp
sudo dpkg-buildpackage 
cd ..

install mplayer package:

sudo dpkg  --install mplayer_1.0~rc2-0ubuntu*.deb

You should be able now to play videos with up to 5MB frames (highest quality 5MPix images are around 1 MB) as a multicast or unicast video stream. (the streamer in the camera should be ENABLED)

mplayer rtsp://192.168.0.9:554 -vo x11 -fs -zoom


For developers

Install needed packages

Minimal packages:

sudo apt-get install cvs build-essential autoconf flex byacc bison libglib2.0-dev tcl gettext libncurses5-dev patch zlib1g-dev nfs-kernel-server bash

Suggested packages:

sudo apt-get install minicom firefox graphviz doxygen kdevelop ctags cervisia

Download and install Cris-GCC compiler:

wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headers-1.64.tar.gz   
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-linux-headersv32-1.64.tar.gz  
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-glibc-1.64.tar.gz 
wget http://www.axis.com/ftp/pub/axis/tools/cris/compiler-kit/cris-dist-1.64.tar.gz
tar zxvf cris-dist-1.64.tar.gz
cd cris-dist-1.64/
tar zxvf ../cris-dist-linux-headers-1.64.tar.gz                                 
tar zxvf ../cris-dist-linux-headersv32-1.64.tar.gz                             
tar zxvf ../cris-dist-glibc-1.64.tar.gz                                         
sudo ./install-cris-tools

answer by default (enter, enter, ...)

Configure your NFS server

Let's say you want to configure an NFS server on your machine and your IP address is 192.168.0.100.

Edit /etc/exports file with your favorite editor. Here I use nano.

sudo nano -w /etc/exports

Add at the end of the file:

/nfs            192.168.0.0/255.255.255.0(rw,sync)

save the file.

If it does not yet exist make /nfs directory and make it world writable to make it possible to write logs from the camera.

sudo mkdir /nfs
sudo chmod 777 -R /nfs

And finally export the filesystem.

sudo exportfs -a

Install sources of Elphel camera

CVS

Get elphel353_install_from_cvs.sh script and execute it.

Release

http://sourceforge.net/projects/elphel

  • get one of the elphel353-7.1 or elphel353-8.0 releases
  • decompress the archive
  • execute the ./install_elphel script
./install_elphel

Elphel SDK

We provide our clients with a complete SDK to develop software, FPGA code and even to redesign the hardware.

PHP

KDevelop IDE

FPGA Development in Elphel cameras