XBOX Live Vision Camera in Ubuntu

Xbox LIVE Vision Cam The Xbox live Vision camera. There’s a lot of these things floating around but just not enough good uses when connected to your Xbox 360. Up until recently (The release of Hardy Heron) It was fairly painstaking to get this working. But now you can have it up and streaming to the web in a couple minutes.

What you’ll need

  1. A Computer running Ubuntu (8.04 Hardy Heron) http://www.ubuntu.com
  2. An Xbox LIVE Vision Cam http://www.xbox.com/en-US/hardware/x/xboxlivevision/
  3. A Free USB 2.0 port on your computer (IT HAS TO BE USB 2.0 a 1.1 port will not work)
  4. A Web browser (Preferably FireFox http://www.getfirefox.com

Now that we have all the pieces lets get to work.

Lets cut right to the chase.
Plug your Xbox LIVE cam into the USB 2.0 port on your Ubuntu box.
Open a terminal window and type

sudo modprobe uvcvideo

press return.

You should be prompted for your password. If you don’t get any errors the command was successful.

You can double check this by typing

lsmod |grep uvcvideo

The output should look like this

uvcvideo               58116  1
compat_ioctl32          2304  1 uvcvideo
videodev               29312  2 uvcvideo
v4l1_compat            15492  2 uvcvideo,videodev
v4l2_common            18304  2 uvcvideo,videodev
usbcore               146028  4 uvcvideo,ehci_hcd,ohci_hcd

At this point Ubuntu knows how to use our Xbox LIVE Cam but we don’t have any software to pull the video out.

We’ll install a nice little peripheral app for UVCVideo that streams your camera live.

lets make a temporary folder to work in.

mkdir /home/username/uvcwork
cd /home/username/uvcwork
wget http://internap.dl.sourceforge.net/sourceforge/mjpg-streamer/mjpg-streamer_r64-1_i386.deb

(Or download from the SourceForge project page (http://sourceforge.net/projects/mjpg-streamer/)

dpkg -i ./mjpg-streamer_r64-1_i386.deb

That’s it the MJPG streamer is now installed.

Start it up with the following command

mjpg_streamer -i "input_uvc.so -d /dev/video0 -f 15 -r 640x480" -o "output_http.so -p 8080 -w ./"

If it works you should get the following back on the terminal and the green ring should light up on the camera

MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 15
 i: Format............: MJPEG
 o: www-folder-path...: ./
 o: HTTP TCP port.....: 8080
 o: username:password.: disabled
 o: commands..........: enabled

Lets test it out. Go to the following address

http://your.ip.address:8080/?action=stream

Replace “your.ip.address” with the IP address or hostname of the computer you’ve plugged the camera into

If everything went well you should be seeing the view from your camera.

*NOTE: Sometimes mjpg_streamer refuses to start with an error. The following sequence of commands usually resolves it

sudo rmmod uvcvideo
sudo modprobe uvcvideo

In my next article we’ll be adding motion detection to this setup. Make sure and check back

Camera View

If you enjoyed this post, make sure you subscribe to my RSS feed!

7 Responses to “XBOX Live Vision Camera in Ubuntu”

  1. Aaron Says:

    i got an error when i was trying to open the command after installing the package. this is what the terminal said to me:
    aaron@aaron-desktop:~$ mjpg_streamer -i “input_uvc.so -d /dev/video0 -f 15 -r 640×480″ -o “output_http.so -p 8080 -w ./”
    MJPG Streamer Version.: 2.0
    i: Using V4L2 device.: /dev/video0
    i: Desired Resolution: 640 x 480
    i: Frames Per Second.: 15
    i: Format…………: MJPEG
    ERROR opening V4L interface: No such file or directory
    Init v4L2 failed !! exit fatal
    i: init_VideoIn failed

    also. i’d like to point out that my inital check with the command “lsmod |grep uvcvideo” read something like this:
    aaron@aaron-desktop:~$ lsmod |grep uvcvideo
    uvcvideo 58116 0
    compat_ioctl32 2304 1 uvcvideo
    videodev 29440 1 uvcvideo
    v4l1_compat 15492 2 uvcvideo,videodev
    v4l2_common 18304 2 uvcvideo,videodev
    usbcore 146028 3 uvcvideo,ohci_hcd

    note the very last line. i also tried the fix at the bottom, but it didn’t work. i’m in desperate need of a cam! need help plz!

    thanks btw, you’ve gotten me further than anything else i’ve tried so far

  2. LiamM Says:

    if you run ls /dev/video* What do you get back?

  3. DANR Says:

    I have the same problem as Aaron. When I type ls /dev/video*, I get ”cannot access no such file or directory”

  4. h0ju Says:

    Same probs, modprobe isnt finding the cam. dont know why.

    dev/video*: No such file or directory

  5. eric Says:

    Same here

    My error message: ERROR OPENING V4L INTERFACE: NO SUCH FILE OR DIRECTORY

    and when I checked in /dev/video* wow there is none!! where I can find it?

  6. LiamM Says:

    Hey Eric. if you tried

    sudo rmmod uvcvideo
    sudo modprobe uvcvideo

    with no change then it may be the version of uvcvideo on your system. Mine worked out of the box but it looks like some people need to upgrade so try this.

    install svn

    sudo apt-get install svn

    download the latest version ov uvcvideo

    svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk

    move to the new folder

    cd ./trunk

    edit the Makefile

    gedit ./Makefile

    and change

    INSTALL_MOD_DIR := usb/media

    to

    INSTALL_MOD_DIR := kernel/ubuntu/media/usbvideo

    save your changes

    compile the driver

    make

    then install

    make install

    Now reboot and walk through the steps in the article again.

    Let me know if this helps or not

  7. jason Says:

    mjpg streamer isn’t supported by amd64. Any help?

Leave a Reply