USB Webcam support package

The discussion lounge for third-party packages.
Forum rules
Please note the Disclaimer before modifying your Synology Product.
Max_nl
Student
Student
Posts: 65
Joined: Tue Mar 20, 2012 4:45 pm

USB Webcam support package

Postby Max_nl » Fri Apr 06, 2012 3:22 pm

USB Webcam support package

Provides support for USB webcams.

System requirements:

  • An ARM based Diskstation (DS109, DS209, DS409, DS409slim, DS509, RS409, DS110j, DS210j, DS410j, DS211j, DS411j, DS111, DS211)
  • A webcam that supports the video class USB standard, and does JPEG compression in hardware. Tested on a Microsoft HD Livecam. Logitech should work as well.
  • Google Chrome or Firefox as web browser.

Package download: webcam-arm.spk

Image

Simply go to "package center", click "install/update" and upload the package you downloaded there.

Image

After that you get a "webcam" icon in your DSM to view the Webcam.



Surveillance station support

There is experimental Surveillance station support.
Camera Settings needed are:

Image

IP: 127.0.0.1
Port: 5000
Brand: [user defined]
Source path: webman/3rdparty/webcam/webcam.cgi
No username and password needed (webcam.cgi detects that it is a local connection)


Note that only 1 process can access the webcam at the same time. If you added the camera to surveillance station, you can no longer use the "webcam" test application.


Intel/PowerPC based diskstations

I only have an ARM based NAS and prefer not to release packages I cannot test myself.
If you know what you are doing, and would like to compile a package yourself:

webcam.cgi source: webcam.c
kernel modules needed
Last edited by Max_nl on Fri May 04, 2012 12:03 pm, edited 1 time in total.
rauppe31
I'm New!
I'm New!
Posts: 2
Joined: Sat Mar 17, 2012 3:07 pm

Re: USB Webcam support package

Postby rauppe31 » Sat Apr 07, 2012 4:47 pm

Can you make a SPK for Intel based CPUs?
Best regards rauppe31

DS 712+ - DSM 4.0 2198
Max_nl
Student
Student
Posts: 65
Joined: Tue Mar 20, 2012 4:45 pm

Re: USB Webcam support package

Postby Max_nl » Mon Apr 09, 2012 3:30 am

rauppe31 wrote:Can you make a SPK for Intel based CPUs?


Problem is that I do not have access to an Intel device, and I rather not publish packages I cannot test myself.
crhiles
Beginner
Beginner
Posts: 29
Joined: Thu Mar 08, 2012 1:54 am
Location: Canada
Contact:

Re: USB Webcam support package

Postby crhiles » Mon Apr 09, 2012 5:28 am

Webcam test application works on DS211 using Logitech webcam pro 9000 business. Surveillance station also loads the camera.
DS211 | 4.3-3827 Update 3 | 1xST31000528AS 1xWD10EZEX
joku
I'm New!
I'm New!
Posts: 4
Joined: Thu Jun 09, 2011 11:46 pm

Re: USB Webcam support package

Postby joku » Mon Apr 09, 2012 1:10 pm

Hello Max_nl.
I have tested it on a DS110j. DSM 4.0-2198

with the

QuickCam Express - Logitech, Inc
QuickCam USB camera
quickcam: Sensor HDCS-1000/1100

QuickCam for Notebook Deluxe - Logitech, Inc
USB GSPCA camera
Camera type JPEG
Sensor HV7131R(c)

Soc PC-Camera - Pixart Imaging, Inc

With Firefox, I see
http://diskstation:5000/webman/3rdparty ... webcam.cgi
Error opening device. Webcam not connected or does not support USB video class?

Greetings Jo
Max_nl
Student
Student
Posts: 65
Joined: Tue Mar 20, 2012 4:45 pm

Re: USB Webcam support package

Postby Max_nl » Mon Apr 09, 2012 7:20 pm

Error opening device. Webcam not connected or does not support USB video class?


Hmm, seems indeed not all Logitechs will work.

Found a list.
Logitech cameras that should work (support the UVC standard): :D

Code: Select all

0x0802 9 Logitech Webcam C200
0x0804 9 Logitech Webcam C250
0x0805 9 Logitech Webcam C300
0x0807 9 Logitech Webcam C500
0x0808 9 Logitech Webcam C600
0x0809 9 Logitech Webcam Pro 9000
0x080A 9 Logitech Portable Webcam C905
0x08C1 Logitech QuickCam Fusion
0x08C2 Logitech QuickCam Orbit MP
0x08C2 Logitech QuickCam Sphere MP
0x08C3 Logitech QuickCam for Notebooks Pro
0x08C5 Logitech QuickCam Pro 5000
0x08C7 Cisco VT Camera II
0x08C9 Logitech QuickCam Ultra Vision
0x08CA Logitech QuickCam Fusion
0x08CB Logitech QuickCam for Notebooks Pro
0x08CC Logitech QuickCam Orbit MP
0x08CC Logitech QuickCam Sphere MP
0x08CE Logitech QuickCam Pro 5000
0x0990 8 Logitech QuickCam Pro 9000 for Business
0x0990 9 Logitech QuickCam Pro 9000
0x0990 9 Logitech QuickCam Pro 9000 for Business
0x0991 8 Logitech QuickCam Pro for Notebooks
0x0991 8 Logitech QuickCam Pro for Notebooks for Business
0x0991 9 Logitech QuickCam Pro for Notebooks
0x0991 9 Logitech QuickCam Pro for Notebooks for Business
0x0994 8 Logitech QuickCam Orbit AF
0x0994 8 Logitech QuickCam Sphere AF
0x0994 9 Logitech QuickCam Orbit AF
0x0994 9 Logitech QuickCam Sphere AF
0x09A2 Logitech QuickCam Communicate Deluxe
0x09A2 Logitech QuickCam Communicate S7500
0x09A4 Logitech QuickCam E 3500
0x09A6 Logitech QuickCam Vision Pro
0x09C1 Logitech QuickCam Deluxe for Notebooks
0x09C1 Logitech QuickCam Deluxe for Notebooks for Business Supported


Logitech cameras that will NOT work: :(

Code: Select all

"Logitech QuickCam Express
Dexxa Webcam"
Logitech QuickCam Web
"Logitech QuickCam Express
Logitech QuickCam for Notebooks
Labtec WebCam"
Acer OrbiCam (Built-in notebook camera)
Acer OrbiCam (Built-in notebook camera)
"Logitech QuickCam Connect
Logitech QuickCam E 2500"
Logitech QuickCam IM
Labtec Webcam Plus
Logitech QuickCam IM
Logitech QuickCam Express Plus
Logitech QuickCam Image
Logitech QuickCam for Notebooks Deluxe
Labtec Notebook Pro
Logitech QuickCam IM
Logitech QuickCam Communicate STX
Logitech QuickCam for Notebooks
"Logitech QuickCam Easy
Logitech QuickCam Cool
Logitech QuickCam Connect (China)"
"Logitech QuickCam Pro
Logitech QuickCam Pro 3000"
Logitech QuickCam Pro for Notebooks
Logitech QuickCam Pro 4000
Logitech QuickCam Zoom
Logitech QuickCam Zoom
"Logitech QuickCam Orbit
Logitech QuickCam Sphere"
Cisco VT Camera
Logitech ViewPort AV100
Logitech QuickCam Pro 4000
Logitech QuickCam Zoom
Logitech QuickCam Communicate STX
Logitech QuickCam for Notebooks Deluxe
"Logitech QuickCam IM
Logitech QuickCam Connect"
Logitech QuickCam Messenger
Logitech QuickCam for Notebooks
Logitech QuickCam Messenger
Logitech QuickCam Express
Labtec WebCam
Logitech QuickCam Communicate
Logitech QuickCam Communicate
Logitech QuickCam Express
Labtec WebCam
Logitech QuickCam Live
Logitech QuickCam Express
Labtec WebCam
Logitech QuickCam for Notebooks
Labtec WebCam Plus
Logitech QuickCam Chat
Logitech QuickCam Express
Logitech QuickCam Chat
"Logitech QuickCam Express
Logitech QuickCam Go"


Source: http://www.quickcamteam.net/devices (currently down, but accessible through archive.org)

Do not plan to support those, as they require additional kernel modules which I cannot test (as I don't have those cams), and I'm not sure if they support video compression in hardware.
Which is required to keep the CPU usage of the diskstation low.
joku
I'm New!
I'm New!
Posts: 4
Joined: Thu Jun 09, 2011 11:46 pm

Re: USB Webcam support package

Postby joku » Mon Apr 09, 2012 7:49 pm

Hello Max_nl,
thanks for the reply. I think it's time to buy a new webcam. :)

Greetings Jo
goetz
Knowledgeable
Knowledgeable
Posts: 336
Joined: Wed Mar 18, 2009 10:05 pm
Location: Berlin, Germany

Re: USB Webcam support package

Postby goetz » Tue Apr 10, 2012 2:23 pm

Hi,
@Max_nl
would you provide source code of webcam.cgi?

Regards Goetz
DS-209+II / DSM 3.1-1742 /2x 2TB Seagate Constellation ES
DS-107+ / DSM 3.1-1613 / Samsung HD103UI
DS-106 / DSM 3.1-1742 (from 108j) / Hitachi HDP72505
eTrayZ / Samsung HD103SI
Max_nl
Student
Student
Posts: 65
Joined: Tue Mar 20, 2012 4:45 pm

Re: USB Webcam support package

Postby Max_nl » Tue Apr 10, 2012 3:12 pm

goetz wrote:would you provide source code of webcam.cgi?


Sure. Here you go: http://www.nclone.com/downloads/webcam.c


Most of it is shamelessly copy & pasted from the official v4l2 capture example from: http://v4l2spec.bytesex.org/
With some added stuff to auto-detect the largest resolution supported by the webcam and handle the CGI part.
joku
I'm New!
I'm New!
Posts: 4
Joined: Thu Jun 09, 2011 11:46 pm

Re: USB Webcam support package

Postby joku » Tue Apr 10, 2012 4:04 pm

I have a Logitech Webcam C270 USB HD plugged in to a DS110j, it works pefekt!

Greetings Jo
Nikolausi
I'm New!
I'm New!
Posts: 5
Joined: Fri Apr 06, 2012 5:43 pm

Re: USB Webcam support package

Postby Nikolausi » Tue Apr 10, 2012 5:21 pm

Hi Max_nl thanks for your great Job. I would like to know if Audio is also supported with your webcam solution?
Max_nl
Student
Student
Posts: 65
Joined: Tue Mar 20, 2012 4:45 pm

Re: USB Webcam support package

Postby Max_nl » Tue Apr 10, 2012 6:17 pm

Nikolausi wrote:I would like to know if Audio is also supported with your webcam solution?


No, the "video format" used doesn't support having audio inside the same file.


Technically it would be possible to supply the audio as a second separate stream.
But I don't think Surveillance station can work with independent audio streams.
Nikolausi
I'm New!
I'm New!
Posts: 5
Joined: Fri Apr 06, 2012 5:43 pm

Re: USB Webcam support package

Postby Nikolausi » Sat Apr 14, 2012 7:38 am

Max_nl wrote:
Nikolausi wrote:I would like to know if Audio is also supported with your webcam solution?


No, the "video format" used doesn't support having audio inside the same file.


That´s sad! Thanks for the information.
KEY
Trainee
Trainee
Posts: 10
Joined: Fri Nov 11, 2011 6:30 pm

Re: USB Webcam support package

Postby KEY » Sat Apr 14, 2012 4:54 pm

This is a cool thing!
Thanks for it!.

But: I have only one PPC and one Atom DS.
Saw the source code and got it.

Are there any config options to set before one compiles it?

Yasmin
Max_nl
Student
Student
Posts: 65
Joined: Tue Mar 20, 2012 4:45 pm

Re: USB Webcam support package

Postby Max_nl » Sat Apr 14, 2012 5:29 pm

Two things need to be compiled:

webcam.cgi

Nothing special needed

Code: Select all

path-to-cross-compiler-gcc -O2 -o webcam.cgi webcam.c



Kernel modules

For video you need uvcvideo.ko and videodev.ko

In Linux kernel menuconfig under "device drivers" -> "multimedia support":

- select "video for Linux" (optional compatibility stuff not necessary)
- select "video capture adapters" -> "V4L USB devices" -> "USB Video Class (UVC)"


If you also want audio at some point (not supported by Surveillance station, but I may eventually add it to the webcam test application), you may compile USB sound card support as well, while you are at it.

That's under "device drivers" "sound card support"
Just check "OSS" "ASLA" "OSS PCM" "USB Audio/Midi driver"

Files you need to copy: snd-hwdep.ko snd-page-alloc.ko snd-pcm-oss.ko snd-pcm.ko snd-rawmidi.ko snd-timer.ko snd-usb-audio.ko snd-usb-lib.ko snd.ko sound_firmware.ko soundcore.ko

Return to “Third-party Packages”

Who is online

Users browsing this forum: Ricas and 4 guests