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).
This is an example to wire a USB webcam circuitry to mantain a small size factor.
To avoid to destroy the USB webcam it is possible of cource to wire a standard USB connector.
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.
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.
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.
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.
ARM9 Linux Embedded Module (128MB)
Arietta G25 is a small and low-cost multi-chip module that integrates:
Basic Version with no strips mounted
Microsoft Lifecam HD3000
Microsoft LifeCam HD-3000 webcam
Acme Systems srl
Via Aldo Moro 53 - 00055 Ladispoli (RM) - Italy
Partita IVA / Codice Fiscale 08114831004 - Tel +39.06.99.12.187 - Fax +39.06.622.765.31 - email: firstname.lastname@example.org pec: email@example.com
Iscritta al Registro delle Imprese di Roma al n. 08114831004 - REA: RM-1074631