Skip to content
Beat Küng edited this page Jul 19, 2012 · 4 revisions

Table of Contents

leanXstream - A simple image storing and video streaming server

LeanXstream is a very simple application for streaming Video (uncompressed).

  • Author: baettig baettig
  • Download: leanXstream
  • License: lgpl
  • Oscar Version tested: v1.3-p1
You can do the following basic tasks with leanXstream:
  • Watch a live video stream in Windows or Linux
  • Save live images to a harddisk as .BMP
  • Save video the a harddisk (uncompressed)
  • Play video from the harddisk

How it works

The leanXstream application takes images as fast as it can and writes them to a buffer. Client can connect with a TCP connection to port 8111. As soon as a client is connected, the camera sends the raw image data over the TCP connection. Multiple clients can connect at the same time, it just slows down the frame rate.

To receive the stream on a client, nc (netcat) can be used. The following command receives the stream and writes it to a file (Video recording)

 nc 192.168.1.10 8111 > video.dat

If you want to play the video, simply play the raw data with mplayer:

 cat test.dat| mplayer - -demuxer rawvideo -rawvideo w=752:h=480:format=y8:fps=100 -vo x11

There is also a small application which takes the raw video stream from the standard input and writes it to .BMP files. This works like this:

 nc 192.168.1.10 8111 | ./writebmps

If you just want to play a live video stream, you connect to the camera with nc and pipe the data directly to mplayer:

 nc 192.168.1.10 8111 | mplayer - -demuxer rawvideo -rawvideo w=752:h=480:format=y8:fps=100 -vo x11

Installation and usage

Configure the application by executing one of the following commands, depending on the used version:

 make config

for the original version linking with Oscar1.3, or, for the version for Oscar2.0:

 ./configure

And then, independently of version:

 make
 scp leanXstream_target root@192.168.1.10:.

Run leanXstream on camera:

 telnet 192.168.1.10
 cd /root
 #(kill all applications that are still running and using the camera, eg. with the following line:)
 killall *target
 ./leanXstream_target

In the linux virtualbox

 # Play live video stream
 nc 192.168.1.10 8111 | mplayer - -demuxer rawvideo -rawvideo w=752:h=480:format=y8:fps=100 -vo x11
 # Replay the recorded video
 cat test.dat| mplayer - -demuxer rawvideo -rawvideo w=752:h=480:format=y8:fps=100 -vo x11

Using it with MS Windows

There are nc and mplayer versions precompiled for windows. Just download them and use the same commands as above.

leanXalarm - A simple alarm system

A simple alarm system. Stores images as soon as something moves. Built in live video stream.

  • Author: baettig baettig
  • Download: leanXalarm
  • License: lgpl
  • Oscar Version tested: v1.3-p1
How to build:
 tar -xzf leanXalarm.tgz
 cd leanXalarm
 make config
 make
 scp leanXalarm_target index.html runapp.sh root@192.168.1.10:.

Reboot and point your browser to http://192.168.1.10

To watch live video from your cam, enter the following command in the leanXalarm directory in your linux virtual box:

 . display.sh

leanXzebra - a very fast barcode reader

A very fast and robust bar code reader. Watch what it does with the live video stream.

  • Authors: baettig baettig (leanXcam port + app), spadix (zebra library)
  • Download: leanXzebra
  • License: lgpl
  • Oscar Version tested: v1.3-p1
How to build:
 tar -xzf leanXzebra.tgz
 cd leanXzebra
 make config
 make
 scp leanXzebra_target runapp.sh root@192.168.1.10:.

To start the application:

 telnet 192.168.1.10
 cd /root
 (kill all applications that are already running)
 ./leanXzebra_target

To watch live video from your cam, enter the following command in the leanXzebra directory in your linux virtual box:

 . display.sh

leanXzebra uses part of the zbar open source barcode library, formerly known as "zebra". Many thanks to spadix for the great work!

For QR Codes and some other features, compiling the full library for leanXcam is required. Check out the experiences and handy instruction of Axel von Arnim here: Compiling zbar for leanXcam.

Clone this wiki locally