#Video streaming over IP

<div class="text-success lead">
This article illustrates how make video streaming over httpd using a Microsoft HD-3000 USB webcam 
and an Arietta G25
</div>

As illustrated below we dismounded the Microsoft webcam using just the internal circuitry 
to reduce the size as small as possible. This is the wiring scheme:

<img src="./arietta_webcam_wirings.jpg"/>

Obviously it is possible to use the webcam as is using a hand soldered USB connector as shown below:

<img src="./arietta_usb.jpg"/>

* @article='arietta_wirings_usb'

We used a Microsoft HD-3000 but the same method is valid for any __UVC (USB Video device Class)__ webcam.

##Kernel configuration

Be sure that the UVC driver are enabled in your Kernel image:

<pre class="minicom">
Device Drivers  --->
	<*> Multimedia support  --->     
		[*]   Cameras/video grabbers support
			[*]   Media USB Adapters  --->
				<*>   USB Video Class (UVC)
				[*]     UVC input events device support (NEW)
</pre>

When a USB webcan is detected a new device will appear as <b>/dev/videox</b>

##Send the video stream over HTTP using cvlc

To generate the video stream we will youe cvlc, the command line version of the
famout video player VLC.

Install it by typing:

<pre class="terminal">
~# <b>apt-get install vlc-nox</b>
</pre>

Install also the v4l-utils package:

<pre class="terminal">
~# <b>apt-get install v4l-utils</b>
</pre>

Cvlc need to be run as a normal user, not root, so you have to add a new user or   
if you are using a default Arietta microSD use the existing user <b>acme</b> 
to the group <b>video</b> by typing:

<pre class="terminal">
~# <b>usermod -a -G video acme</b>
</pre>

If you prefere to create a new user type:

<pre class="terminal">
~# <b>useradd -G video myusername</b>
</pre>

The become the user by typing:

<pre class="terminal">
~# <b>su myusername</b>
</pre>

Launch cvlc by typing:

<pre class="terminal">
~$ <b>cvlc --no-audio v4l2:///dev/video0 --v4l2-chroma MJPG --sout '#standard{access=http,mux=mpjpeg,dst=:8080/}' -I dummy</b>
</pre>

##Receive the video streaming using VLC

to receive the video streaming launch VLC on your PC and open a network connection on: <b>http://arietta_ip_address:8080</b>.

If you are using aloha on your PC open <b>http://arietta.local:8080</b>

#Related links

* [USB Video Class Linux device driver home page](http://linux-uvc.berlios.de)

@shop='ARIETTA-G25'
@shop='WB-HD3000'


