Video streaming over IP

This article illustrates how make a little IP camera using and Arietta G25 and a Microsoft HD-3000 USB webcam deprived of its enclosure to get as less space as possible.

We used a Microsoft HD-3000 but the same concepts are valid for all the webcams compatible with UVC (USB Video device Class).

Click here to see the quality image received on the browser

Wirings with a Microsoft Lifecam (C) HD-3000

This is an example to wire a USB webcam circuitry to mantain a small size factor.

Using other USB WebCam with standard USB connector

To avoid to destroy the USB webcam it is possible of cource to wire a standard USB connector.

Send the video stream over HTTP using mjpeg_streamer

The utility used in this example is MJPG-streamer. MJPG-streamer takes JPGs from Linux-UVC compatible webcams, filesystem or other input plugins and streams them as M-JPEG via HTTP to webbrowsers, VLC and other software .

Mjpeg_streamer automatically generates a set of html pages that illustrates different methods to stream the video over your browser. The best result comes using Google Chrome on any OS but it works well also on Firefox, Opera and IE.

The stream works well but slower also on iPhone.

MJPG_streamer installation

To install mjpg-streames it is required to compile it directly from the sources. I've used a my own fork from this fork Codewithpassion fork that is a fork of the original sources available on http://sourceforge.net/projects/mjpg-streamer/.

It is required a Linux Kernel not higher than 3.14.xx.

Open a command line session with your board and clone the git repository on your board by typing:

root@arietta:~# git clone git://github.com/tanzilli/mjpg-streamer

Now install some package required to compile the sources:

root@arietta:~# apt-get install make libjpeg-dev graphicsmagick-imagemagick-compat

The launch run the source compilation:

root@arietta:~# cd mjpg-streamer 
root@arietta:~/mjpg-streamer# make

After a while the mjpg-streamer executable will be ready.

Using MJPG Streamer

Plug your webcam and type:

root@arietta:~/mjpg-streamer#  dmesg
usb 1-2: new full speed USB device using at91_ohci and address 4
Linux video capture interface: v2.00
uvcvideo: Found UVC 1.00 device  (046d:0804)
input: UVC Camera (046d:0804) as /devices/platform/at91_ohci/usb1/1-2/1-2:1.0/input1
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v1.0.0)
usbcore: registered new interface driver snd-usb-audio

Now run the streaming server typing:

root@arietta:~/mjpg-streamer# ./mjpg_streamer -i "./input_uvc.so -f 15 -r 640x480 -n" -o "./output_http.so -w ./www"

Open your browser and navigate on:

To have a full size stream stream go to:

A complete list of examples are available on the start.sh file in mjpg_streamer directory.

How to get the resolution of 1280x720

Unfortunately the host USB port C used here is a full speed so the max resolution is 640x480 pixel. To get 1280x720 pixel we need to use the USB port B (used by the WiFi module) or the USB port A used by the USB client to link your PC.

If you are not using a WiFi module simply move the USB line to the USB port B and try this command:

root@arietta:~/mjpg-streamer# ./mjpg_streamer -i "./input_uvc.so -f 15 -r 1280x720 -n" -o "./output_http.so -w ./www"

If you are using the WiFi and can disconnect the USB A data line using for example a power supply instead on a PC port move the webcam line to the USB port A.

Related links

ARIETTA-G25
EUR 25.00


ARM9 Linux Embedded Module (128MB)

Arietta G25 is a small and low-cost multi-chip module that integrates:

  • a ARM9 @ 400Mhz CPU Atmel AT91SAM9G25
  • a 128MB of DDR2 RAM
  • up to 3 USB 2.0 host ports
  • 20x2 pads for strip pitch 2.54mm (100mil)

Basic Version with no strips mounted. If you need to have any strip mounted take a look to the Welding services

| Product description |

WB-HD3000
EUR 24.00


Microsoft Lifecam HD3000

Microsoft LifeCam HD-3000 webcam

| Microsoft description... | Video streaming over HTTP |

Kernel Linux 3.14.23
Debian 'Wheezy' Grip 7.7

Ready-to-use microSD image

This is a ready to use image to try the contents of this article.

  • Download arietta_webcam.img.zip and uncompress its contents
  • Write arietta_webcam.img on the microSD using:
    • On Windows: Win32 Disk Imager
    • On Linux: sudo dd if=arietta.img of=/dev/sdX where sdX is the microSD device
    • On Mac: sudo dd if=arietta.img of=/dev/diskN where diskN is the microSD device

Login data

  • SSH, and Debug port: user root password acmesystems
  • SSH via Shellinabox: user acme password acmesystems
  • Codiad: user root password acmesystems

How-to use it

Wire the webcam as illustrated then turn-on the board and open your browser at:

Special notes

  • For Arietta G25 with 256 MB of RAM rename boot256.bin in boot.bin in the first partition mounted on /boot
  • The image contains just the first two partitions (KERNEL and rootfs) and uses just the first 1.8 GB. To add more space create a third partition to add in /etc/fstab or enlarge the rootfs partition size with gparted.