Webcam
September 15, 2010 08:49PM
Intel CS110 is an old webcam. The driver is included with Debian. However, I can't get any image from it. I tried webcam which returns "can't get rgb24 data", streamer which gives "neither audio nor video format specified/found", and gqcam which gives an image that doesn't make any sense. This camera works in Windows XP. Any ideas or experience to share?


FreeStar:~# uname -a
Linux FreeStar 2.6.34.1 #6 PREEMPT Tue Jul 20 15:19:20 MDT 2010 armv5tel GNU/Linux

FreeStar:~# lsusb | grep Camera
Bus 001 Device 005: ID 8086:0110 Intel Corp. Easy PC Camera

FreeStar:~# lsmod | grep video
videodev               32527  1 gspca_main
v4l1_compat            13079  1 videodev
FreeStar:~# lsmod | grep gspca
gspca_spca508           6624  0 
gspca_main             21773  1 gspca_spca508
videodev               32527  1 gspca_main

FreeStar:~# v4l-info 

### v4l2 device info [/dev/video0] ###
general info
    VIDIOC_QUERYCAP
        driver                  : "spca508"
        card                    : "USB Camera (8086:0110)"
        bus_info                : "usb-orion-ehci.0-1.4"
        version                 : 2.9.0
        capabilities            : 0x5000001 [VIDEO_CAPTURE,READWRITE,STREAMING]

standards

inputs
    VIDIOC_ENUMINPUT(0)
        index                   : 0
        name                    : "spca508"
        type                    : CAMERA
        audioset                : 0
        tuner                   : 0
        std                     : 0x0 []
        status                  : 0x0 []

video capture
    VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
        index                   : 0
        type                    : VIDEO_CAPTURE
        flags                   : 0
        description             : "S508"
        pixelformat             : 0x38303553 [S508]
    VIDIOC_G_FMT(VIDEO_CAPTURE)
        type                    : VIDEO_CAPTURE
        fmt.pix.width           : 320
        fmt.pix.height          : 240
        fmt.pix.pixelformat     : 0x38303553 [S508]
        fmt.pix.field           : NONE
        fmt.pix.bytesperline    : 320
        fmt.pix.sizeimage       : 115200
        fmt.pix.colorspace      : SRGB
        fmt.pix.priv            : 1

controls
    VIDIOC_QUERYCTRL(BASE+0)
        id                      : 9963776
        type                    : INTEGER
        name                    : "Brightness"
        minimum                 : 0
        maximum                 : 255
        step                    : 1
        default_value           : 128
        flags                   : 0

### video4linux device info [/dev/video0] ###
general info
    VIDIOCGCAP
        name                    : "USB Camera (8086:0110)"
        type                    : 0x1 [CAPTURE]
        channels                : 1
        audios                  : 0
        maxwidth                : 352
        maxheight               : 288
        minwidth                : 48
        minheight               : 32

channels
    VIDIOCGCHAN(0)
        channel                 : 0
        name                    : "spca508"
        tuners                  : 0
        flags                   : 0x0 []
        type                    : CAMERA
        norm                    : 0

tuner
ioctl VIDIOCGTUNER: Invalid argument

audio
    VIDIOCGAUDIO
        audio                   : 0
        volume                  : 0
        bass                    : 0
        treble                  : 0

picture
    VIDIOCGPICT
        brightness              : 46003
        hue                     : 0
        colour                  : 0
        contrast                : 0
        whiteness               : 0
        depth                   : 8
        palette                 : unknown

buffer
ioctl VIDIOCGFBUF: Invalid argument

window
    VIDIOCGWIN
        x                       : 0
        y                       : 0
        width                   : 320
        height                  : 240
        chromakey               : 0
        flags                   : 0



Re: Webcam
September 16, 2010 08:23AM
I have Logitech Pro3000 and when I plug in the webcam seems everything OK,lsusb and lsmod I can see the system detect the webcam, but when I run the "motion" it shows that it has problem connect to /dev/video0.

So finally I compiled all the modules and installed then "motion" works fine..

hope it helps.

Mark
Re: Webcam
September 16, 2010 10:55PM
Thanks for your response. Did you just recompile "motion" and its dependencies, or did you recompile the driver? The reason I ask is that I notice something else when I try gqcam

Output of dmesg afterI plug in the camera
usb 1-1.4: new full speed USB device using orion-ehci and address 6
gspca: probing 8086:0110
spca508: Webcam Vendor ID: 0x8086
spca508: Webcam Product ID: 0x0110
spca508: Window 1 average luminance: 0
gspca: video0 created

Output of dmesg when after I ran "gqcam -v /dev/video0 -a -d test.jpg -t JPEG -i YUV". (-i RGB also gives me the same thing).
gspca: bandwidth not wide enough - trying again

What do you think? Is this more likely to be a driver error or a software error? If you think it is a driver error, how can I confirm it is a driver error?



markweng Wrote:
-------------------------------------------------------
> I have Logitech Pro3000 and when I plug in the
> webcam seems everything OK,lsusb and lsmod I can
> see the system detect the webcam, but when I run
> the "motion" it shows that it has problem connect
> to /dev/video0.
>
> So finally I compiled all the modules and
> installed then "motion" works fine..
>
> hope it helps.
>
> Mark
Re: Webcam
September 16, 2010 11:48PM
Hi EWTUC
I really don't know about Linux much...

I didn't recompile "motion" ,I installed by apt-get

I have 3 logitech webcams but only the oldest one Pro3000 won't work,
So I downloaded the kernel and follow the infomation how to compile the module

I compiled it on my Dockstar, it tool long time to finish but it solved my problem.

Mark
Pallando
Re: Webcam
September 18, 2010 08:56AM
Hi EWTUC,

I have the same problem and I think it is as explained here :
http://osdir.com/ml/linux-media/2009-06/msg00927.html

I'm still figuring a way out though...
Re: Webcam
September 22, 2010 05:45AM
Hello EWTUC,

I also had a problem with an old WebCam, which was not able to deliver JPG compressed pictures, just raw image data.
I figured that out with the utility uvccapture (Debian Squeeze package).

Have a look also at http://www.embeddedlinuxprimer.com/sn9c20x
That raw image data can be converted with the CPU to a JPG picture, but the CPU load is heavy.

Regards, Rudolf
Re: Webcam
September 24, 2010 11:54PM
Probably not a USB bandwidth problem:
I tried emDebian running off NAND with only webcam attached (no usb stick or any other usb device attached) and still get the weird looking images when I manage to get an image.

I remember webcam compatibility page has listed Intel CS110 as YUV, so I am going to try Rudolf's suggestion next. I'll let you know what happens.

Thanks for all your help so far.
Re: Webcam
September 25, 2010 12:47AM
Hi Rudolf,

is "apt-get install libv4l-ruby1.8", the library you are talking about for converting YUV raw image to JPEG? I can't seem to find "v4l2convert.so" anywhere after installing libv4l-ruby1.8.
Re: Webcam, YUV-JPEG conversion
September 25, 2010 02:21AM
Hello EWTUC,

I have not tried the conversion, because I got striped pictures only. If I waved a hand in front of the camera I could see a moving, but that's it.
The CPU load (DockStar) in YUV streaming (5 fps) was 30% at 320 x 240 pixel and 100% at 640 x 480 pixel.

So I gave up, not trying the YUV-JPEG conversion. I the past I made bad experience with CPU load on a low performing CPU (NSLU2, CPU 266 MHz) with picture modification (date/time stamp overlay in a JPG picture).

I think it is better to buy a cheap new WebCam, which has JPEG conversion on board. At older WebCams the conversion was not possible, because of the lack of chip capability, but manufactures do not like to talk about.

Regards, Rudolf
Rufus
Re: Webcam
September 30, 2010 09:21AM
Hello, Following this forum, I can steam video by motion or mjpg_streamer. However, there is no sound streamed. My webcam has mic built-in, I am wondering if any one know how / which software can stream both video and audio. dmesg shows my webcam idVendor=046d, idProduct=09c1, and
[ 35.064641] udev: starting version 160
[ 35.565785] Linux video capture interface: v2.00
[ 35.659479] uvcvideo: Found UVC 1.00 device <unnamed> (046d:09c1)
[ 35.702613] input: UVC Camera (046d:09c1) as /devices/platform/orion-ehci.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input0
[ 35.714086] usbcore: registered new interface driver uvcvideo
[ 35.720703] USB Video Class driver (v0.1.0)
[ 35.957789] usbcore: registered new interface driver snd-usb-audio
[ 36.215770] Adding 549560k swap on /dev/sda2. Priority:-1 extents:1 across:549560k
Thanks.
Re: Webcam
September 30, 2010 09:48AM
Hello Rufus,

VLC should do so, but I do not know the parameter setup.
VLC is both a streaming server and client, beside of being a media player.

In order to use VLC as a streaming client for mjpg-streamer, setup:
In the menu "media/open network stream/network protocol" you enter the address
e.g. http://192.168.17.92:8008/?action=stream and click on play.

I f you figured that out, please let me know.

Regards, Rudolf
Rufus
Re: Webcam
October 01, 2010 09:17AM
Thanks for your suggestion, Rudolf.

I am trying to use vlc, however, I cannot even stream video. I use
cvlc -vvv v4l2:///dev/video0:height=240:width=320 --sout '#rtp{mux=ts,dst=192.168.1.104,port=8081}' --ttl 12
The log show
[0xaefa0] v4l2 demux debug: supported frame intervals for YUY2, 320x240:
[0xaefa0] v4l2 demux debug: supported frame interval: 1/30
[0xaefa0] v4l2 demux debug: supported frame interval: 1/25
[0xaefa0] v4l2 demux debug: supported frame interval: 1/20
[0xaefa0] v4l2 demux debug: supported frame interval: 1/15
[0xaefa0] v4l2 demux debug: supported frame interval: 1/10
[0xaefa0] v4l2 demux debug: supported frame interval: 1/5
[0xaefa0] v4l2 demux debug: added new video es YUY2 320x240
[0xb76f8] main input debug: selecting program id=0
[0xaefa0] main demux debug: using access_demux module "v4l2"
[0xaefa0] main demux debug: TIMER module_need() : 177.151 ms - Total 177.151 ms / 1 intvls (Avg 177.151 ms)
[0xb2138] main decoder debug: looking for packetizer module: 21 candidates
[0xb2138] rawvideo decoder warning: invalid frame rate 0/0, using 25 fps instead
[0xb2138] main decoder debug: using packetizer module "rawvideo"
[0xb2138] main decoder debug: TIMER module_need() : 3.924 ms - Total 3.924 ms / 1 intvls (Avg 3.924 ms)
[0xb2138] main decoder debug: thread (decoder) created at priority 0 (input/decoder.c:301)
[0xb2138] main decoder debug: thread started
[0xb76f8] main input debug: starting in async mode
[0xbb510] main demux meta debug: looking for meta reader module: 2 candidates
[0xbb510] lua demux meta debug: Trying Lua scripts in /home/vlcc/.local/share/vlc/lua/meta/reader
[0xbb510] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
[0xbb510] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac
[0xbb510] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
[0xbb510] main demux meta debug: no meta reader module matching "any" could be loaded
[0xbb510] main demux meta debug: TIMER module_need() : 25.718 ms - Total 25.718 ms / 1 intvls (Avg 25.718 ms)
[0xb76f8] main input debug: `v4l2:///dev/video0:height=240:width=320' successfully opened
[0xb76f8] main input debug: Buffering 0%
[0xb76f8] main input debug: switching to sync mode
[0xa0348] main stream output debug: adding a new sout input (sout_input:0xbb510)
[0xade68] main mux debug: adding a new input
[0xade68] mux_ts mux debug: adding input codec=YUY2 pid=68
[0xade68] main mux error: cannot add this stream
[0xa0628] stream_out_rtp stream out error: cannot add this stream to the muxer
[0xb2138] main decoder error: cannot create packetizer output (YUY2)
[0xb76f8] main input debug: Stream buffering done (63 ms in 63 ms)
[0xb76f8] main input debug: Decoder buffering done in 0 ms

Any idea?
Beside how can i find out my audio device to use?
vlcc@debian:/root$ ls /dev
MAKEDEV fd mtd1 mtdblock3 pts stderr tty13 tty21 tty3 tty38 tty46 tty54 tty62 v4l
block full mtd1ro net random stdin tty14 tty22 tty30 tty39 tty47 tty55 tty63 vcs
bsg initctl mtd2 network_latency root stdout tty15 tty23 tty31 tty4 tty48 tty56 tty7 vcs1
bus input mtd2ro network_throughput sda tty tty16 tty24 tty32 tty40 tty49 tty57 tty8 vcsa
char kmsg mtd3 null sda1 tty0 tty17 tty25 tty33 tty41 tty5 tty58 tty9 vcsa1
console loop0 mtd3ro port sda2 tty1 tty18 tty26 tty34 tty42 tty50 tty59 ttyS0 vga_arbiter
core mem mtdblock0 ppp shm tty10 tty19 tty27 tty35 tty43 tty51 tty6 ttyS1 video0
cpu_dma_latency mtd0 mtdblock1 psaux snd tty11 tty2 tty28 tty36 tty44 tty52 tty60 ubi_ctrl zero
disk mtd0ro mtdblock2 ptmx sndstat tty12 tty20 tty29 tty37 tty45 tty53 tty61 urandom

vlcc@debian:/root$ ls /dev/snd -lt
total 0
drwxr-xr-x 2 root root 60 Jan 1 1970 by-id
drwxr-xr-x 2 root root 60 Jan 1 1970 by-path
crw-rw---- 1 root audio 116, 4 Jan 1 1970 controlC0
crw-rw---- 1 root audio 116, 3 Jan 1 1970 pcmC0D0c
crw-rw---- 1 root audio 116, 2 Jan 1 1970 timer

which one is my audio device to use?

Thanks.

Rufus
Re: Webcam
October 01, 2010 01:10PM
Hello Rufus,

I can only google: cvlc streamer webcam audio:
http://www.videolan.org/doc/videolan-howto/en/ch08.html

Regards, Rudolf
p.s. we are in 12 h in vacation for 2 weeks.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: