Webcams

From CSCWiki
Revision as of 11:03, 29 September 2014 by Laden (talk | contribs) (→‎Operation)
Jump to navigation Jump to search

A live webcam feed of the office is available online.

Operation

We use Motion to serve this webcam feed. It uses video4linux to read from the webcam, and pushes frames to the client (who maintains an HTTP connection). Frames are pushed when a certain amount of motion has detected, or a set maximum amount of time has passed since the last frame. One of these runs on each of our webcam hosts (maltodextrin and bit-shifter). Motion includes a builtin tiny HTTP server (running on port 8081 in our case) which serves a sequence of JPEG images to the browser. An ordinary <img> tag is embedded in the web page, and browsers will update the image when they receive a new one over the HTTP connection.

The Motion documentation is fairly self-explanatory, but here are the options we use for the webcam server part:

webcam_port 8081
webcam_quality 30
webcam_motion on
webcam_maxrate 5
webcam_localhost off
webcam_limit 1000


We also have a couple of udev rules to map the camera devices to a constant location and to disable any on-camera mice. These rules exist at /etc/udev/rules.d/99-csc-webcams.rules on the right machines.

maltodextrin cam

# Create symlink for camera device at /dev/csc/malto-cam
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0808", ATTRS{serial}=="714B8C60", ATTRS{bInterfaceClass}=="0e", SYMLINK+="csc/malto-cam", GROUP="motion"

# Disable the cam's mic
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0808", ATTRS{serial}=="714B8C60", ATTRS{bInterfaceClass}=="01", ATTR{authorized}="0"

bit-shifter cam

# Create symlink for camera device at /dev/csc/bitshifter-cam
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="082c", ATTRS{serial}=="AF2F2AD0", SYMLINK+="csc/bitshifter-cam", GROUP="motion"

Webcam Counter

Also known as the "implicit consent sign". The sign is connected via serial to bit-shifter. Associated scripts which update the counter are found in /opt/camcount/ on bit-shifter.

If the counter isn't working, /opt/camcount/daemon likely needs to be restarted.

Hardware

Logitech QuickCam Messenger

  • USB IDs: 046d:08da
  • Kernel module: gspca (gspca-source)
  • Max resolution: 640x480

Logitech QuickCam Zoom

  • USB IDs: 046d:08b3
  • Kernel module: pwc
  • Max resolution: 640x480

Logitech QuickCam Web

  • USB IDs: 046d:0850
  • Kernel module: quickcam (qc-usb-source package)
  • Max resolution: 480x360

Logitech QuickCam Chat

  • USB IDs: 046d:092c
  • Kernel module: gspca (gspca-source)
  • Max resolution: 480x360