Getting Microsoft USB camera to work on Ubuntu Linux (9.10)

Why use a Microsoft camera?

Well because this camera has the following attributes and is very compact and light.

  • Wide angle F/2.0 lens
  • 720p HD
  • 30 frames per second
  • Autofocus
  • Widescreen
  • Plugging it in and listing the devices

    Upon plugging the camera in the following devices were listed in the /dev directory

    audio2

    dsp2

    mixer2

    v4l

    video0

    Full output

    4a5 > audio2

    17a19 > dsp2

    43a46 > mixer2

    176a180 > v4l

    194a199 > video0

    Using Streamer (local video only)

    Installing Streamer

    sudo apt-get install streamer

    Taking a snapshot

    streamer -c /dev/video0 -b 16 -o /home/user/file.jpeg

    Taking HD video

    streamer -C /dev/dsp2 -t 0:0:05 -F stereo -r 30 -c /dev/video0 -b 16 -f jpeg -s 1280×720 -o /home/user/outfile2.avi

    Using Motion (Streaming the device to a web browser on remote computer)

    Installing Motion

    sudo apt-get install motion

    Create config

    cd /etc/motion

    sudo vim motion.conf

    Add the following lines to disable file support (I wanted streaming only)

    output_all off

    output_normal off

    output_motion off

    Set the port by locating the webcam_port property in the motion.conf file

    webcam_port 80

    Enable remote machines to view video (rather than restricting it to localhost) change the webcam_localhost from on to off in the motion.conf file.

    webcam_localhost off

    Start the motion application

    sudo motion

    View the footage from a remote computer by typing the address of the server running motion and the port into your browser on the remote computer

    http://123.456.78.9:80

    Firewalls

    Make sure that you have your firewalls configured correctly. Not implementing the correct security can result in anyone seeing the footage from your camera from anywhere in the world. Please take the time to learn about, implement and test the security of your systems. You have been warned.

    Advertisements

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s