Web lists-archives.com

[Spca50x-devs] gspca v2-0.2.8 works with 046d:0928 Logitech, Inc. Quickcam Express




Hi Jean-Francois,

I thought a message on the mailing list with a title
reflecting the working status of the logitech camera
should be sent to reflect your good work.

In summary gspcav2-0.2.8 works with the 046d:0928
Logitech, Inc. Quickcam Express webcam - problems only
occur if the wrong colour format is selected, and or
the v4l interface is used....  stick to rgb format and
v4l2 interface and results are good. Unfortunately
some established applications need help to set the
correct colour format.

v4lctl - works, and allows manual control of contrast
and brightness.
mplayer - works, control of contrast and brightness
possible.
vlc - works.
skype - green picture.
spcaview - works.
gstreamer - works.
ekiga - fails to run.


Colour formats supported

$ v4l-info /dev/video1 | grep pixelformat
ioctl VIDIOCGTUNER: Invalid argument
ioctl VIDIOCGAUDIO: Invalid argument
ioctl VIDIOCGFBUF: Invalid argument
        pixelformat             : 0x31384142 [BA81]
        pixelformat             : 0x56595559 [YUYV]
        pixelformat             : 0x32315559 [YU12]
        pixelformat             : 0x33424752 [RGB3]
        pixelformat             : 0x33524742 [BGR3]
        pixelformat             : 0x50424752 [RGBP]
        fmt.pix.pixelformat     : 0x31384142 [BA81]

Controls available 
$ v4lctl -c /dev/video1 list
attribute  | type   | current | default | comment
-----------+--------+---------+---------+-------------------------------------
norm       | choice | (null)  | (null)  |
input      | choice | spca561 | spca561 | spca561
bright     | int    |      32 |      32 | range is 0
=> 63
contrast   | int    |    8192 |    8192 | range is 0
=> 16383
Auto Gain  | bool   | on      | on      |

The brightness and contrast can be altered with:
$v4lctl -c /dev/video1 setattr contrast 400
This can be done with the viewer application running -
very useful (a contrast of 200 to 400 gives a useable
picture outdoors).

Changing Auto Gain has no effect on the camera output
- I think this is an old problem?  Is it worth me
trying some USB snooping with MS Windows to find the
mechanism used for the Auto exposure on this logitech
camera?


Mplayer produces a good picture, and can directly
control brightness and contrast values as reported by
v4lctl:
$mplayer tv:// -tv
driver=v4l2:device=/dev/video1:noaudio:brightness=0:contrast=0:outfmt=0x33424752
Note mplayer defines brightness and contrast to range
from -100 to 100, and then appears to map the values
onto the range reported by v41ctl. mplayer can produce
a good picture without specifying noaudio, outfmt,
contrast and brightness - but if they are omitted I've
seen mplayer fail with a Segmentation fault, or more
commonly a picture with the wrong colours (the only
definite pattern has been that specifying contrast
requires outfmt to get the correct picture colours).


vlc works:
$vlc v4l:/dev/video1


As before spcaview can work
$spcaview -d /dev/video1 -t
and adding -b causes the brightness to be auto
adjusted - which locks out manual adjustment of
contrast via v4lctl - so alter contrast before
starting spcaview -b.  I've not found any application
that auto adjusts contrast, I guess because that is
what the Auto Gain is supposed to do in hardware.

but using -g still causes my PC to lock up completely
$spcaview -d /dev/video1 -t -g

As you said before spcaview is not a v4l2 application,
so some bad behaviour is likely.


Skype produces a green tinted preview picture - so no
good (syslog extract attached after using echo 0x3f >
/sys/module/gspca_main/parameters/debug), and I've
only got one xv port on my old sis 315 graphics card
so playing with skype and gstfakevideo/gstreamer
pipelines is not likely to work well - need skype to
be a bit more flexible - if only to turn off the my
view option by default.


gstreamer works if the appropriate colour format is
set:
$gst-launch-0.10 v4l2src device=/dev/video1 !
video/x-raw-rgb ! ffmpegcolorspace ! ximagesink

and with tee pieces the video stream can be split off
to analyse, watch, record, transform, simultaneously
but you still need v4lctl to adjust the brightness and
contrast - this can be done whilst gstreamer is
running.  I think more control maybe possible if a
program was to be written to call gstreamer.  There is
 a bayer2rgb plugin (it failed, but according to
gstreamer bug 521392 the fix will be in 0.10.8).
This works...
$gst-launch-0.10 -m v4l2src device=/dev/video1 !
video/x-raw-rgb,width=352,height=288  ! tee name=tee0
{ tee0.src1 ! queue ! ffmpegcolorspace ! ffenc_h263 !
queue ! filesink location=testh263.avi } { tee0.src2 !
queue ! ffmpegcolorspace ! videoanalyse !
ffmpegcolorspace ! ximagesink } { tee0.src3 ! queue !
ffmpegcolorspace ! revtv ! ximagesink }



However most of the gstreamer video plugins require
yuv format, so if rgb is not explicitly selected then
a failure as follows occurs:
$gst-launch-0.10 v4l2src device=/dev/video1 !
ffmpegcolorspace ! ximagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Caught SIGSEGV accessing address 0xb6efd000
Spinning.  Please run 'gdb gst-launch 5962' to
continue debugging, Ctrl-C to quit, or Ctrl-\ to dump
core.
Caught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 13255863376 ns.
Setting pipeline to PAUSED ...

$
I hit ctrl-c twice, syslog_gstreamer is attached.



ekiga - fails to run when the logitech webcam is
connected:
$ ekiga
*** glibc detected *** ekiga: realloc(): invalid next
size: 0x084ad720 ***
======= Backtrace: =========
/lib/i686/libc.so.6[0xb6353d87]
/lib/i686/libc.so.6(realloc+0x112)[0xb6355d62]
/usr/lib/libpt.so.1(_ZN14PAbstractArray15InternalSetSizeEii+0x1e1)[0xb72a6121]
======= Memory map: ========
08048000-08121000 r-xp 00000000 03:01 300529    
/usr/bin/ekiga
08121000-08128000 rw-p 000d9000 03:01 300529    
/usr/bin/ekiga
08128000-0853a000 rw-p 08128000 00:00 0         
[heap]
b1500000-b1521000 rw-p b1500000 00:00 0
b1521000-b1600000 ---p b1521000 00:00 0
b1699000-b179d000 rw-p b1699000 00:00 0
b179d000-b1818000 r--p 00000000 03:01 60019     
/usr/share/fonts/TTF/dejavu/DejaVuSans-Oblique.ttf
b1818000-b1819000 ---p b1818000 00:00 0
b1819000-b1859000 rw-p b1819000 00:00 0
b1859000-b185a000 ---p b1859000 00:00 0
b185a000-b189a000 rw-p b185a000 00:00 0
b189a000-b189b000 ---p b189a000 00:00 0
b189b000-b18db000 rw-p b189b000 00:00 0
b18db000-b18dc000 ---p b18db000 00:00 0
b18dc000-b191c000 rw-p b18dc000 00:00 0
b191c000-b1926000 rw-s 0001e000 00:0e 15702     
/dev/video1
b1926000-b1930000 rw-s 00014000 00:0e 15702     
/dev/video1
b1930000-b193a000 rw-s 0000a000 00:0e 15702     
/dev/video1
b193a000-b1944000 rw-s 00000000 00:0e 15702     
/dev/video1
b1944000-b198f000 rw-p b1944000 00:00 0
b198f000-b1990000 ---p b198f000 00:00 0
b1990000-b19d0000 rw-p b1990000 00:00 0
b19d0000-b19d1000 ---p b19d0000 00:00 0
b19d1000-b21d1000 rw-p b19d1000 00:00 0
b21d1000-b21d2000 ---p b21d1000 00:00 0
b21d2000-b29d2000 rw-p b21d2000 00:00 0
b29d2000-b29d3000 ---p b29d2000 00:00 0
b29d3000-b31d3000 rw-p b29d3000 00:00 0
b31d3000-b31e9000 r-xp 00000000 03:01 307993    
/usr/lib/libbeagle.so.1.0.0
b31e9000-b31ea000 rw-p 00016000 03:01 307993    
/usr/lib/libbeagle.so.1.0.0
b31ea000-b31f0000 r-xp 00000000 03:01 351733    
/usr/lib/libfam.so.0.0.0
b31f0000-b31f1000 rw-p 00006000 03:01 351733    
/usr/lib/libfam.so.0.0.0
b31f1000-b31f8000 r-xp 00000000 03:01 72995     
/lib/libacl.so.1.1.0
b31f8000-b31f9000 rw-p 00006000 03:01 72995     
/lib/libacl.so.1.1.0
b31f9000-b31fd000 r-xp 00000000 03:01 72993     
/lib/libattr.so.1.1.0
b31fd000-b31fe000 rw-p 00003000 03:01 72993     
/lib/libattr.so.1.1.0
b3204000-b320a000 r-xp 00000000 03:01 358904    
/usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
b320a000-b320b000 rw-p 00005000 03:01 358904    
/usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so
b320b000-b320d000 r--p 00000000 03:01 113350    
/usr/share/locale/en_GB/LC_MESSAGES/libbonoboui-2.0.mo
b320d000-b320f000 r--p 00000000 03:01 351632    
/usr/share/locale/en_GB/LC_MESSAGES/atk10.mo
b320f000-b3215000 r--p 00000000 03:01 113351    
/usr/share/locale/en_GB/LC_MESSAGES/libgnomeui-2.0.mo
b3215000-b3221000 r-xp 00000000 03:01 367074    
/usr/lib/gnome-vfs-2.0/modules/libfile.so
b3221000-b3222000 rw-p 0000c000 03:01 367074    
/usr/lib/gnome-vfs-2.0/modules/libfile.so
b3222000-b322c000 r-xp 00000000 03:01 32986     
/usr/lib/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so
b322c000-b322d000 rw-p 0000a000 03:01 32986     
/usr/lib/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so
b322d000-b328d000 rw-s 00000000 00:08 6455298   
/SYSV00000000 (deleted)
b328d000-b3391000 rw-p b328d000 00:00 0
b3391000-b3418000 r--p 00000000 03:01 60016     
/usr/share/fonts/TTF/dejavu/DejaVuSans-Bold.ttf
b3418000-b351c000 rw-p b3418000 00:00 0
b351c000-b35ad000 r--p 00000000 03:01 60020     
/usr/share/fonts/TTF/dejavu/DejaVuSans.ttf
b35ad000-b35af000 r-xp 00000000 03:01 366983    
/usr/lib/pango/1.6.0/modules/pango-basic-fc.so
b35af000-b35b0000 rw-p 00001000 03:01 366983    
/usr/lib/pango/1.6.0/modules/pango-basic-fc.so
b35b0000-b35b6000 r--s 00000000 03:01 81109     
/var/cache/fontconfig/20b58f14c9b581391d79ea335a81488a-x86.cache-2
b35b6000-b35b8000 r--s 00000000 03:01 81548     
/var/cache/fontconfig/87f5e051180a7a75f16eb6fe7dbd3749-x86.cache-2
b35b8000-b35be000 r--s 00000000 03:01 81108     
/var/cache/fontconfig/b79f3aaa7d385a141ab53ec885cc22a8-x86.cache-2
b35be000-b35c1000 r--s 00000000 03Aborted
$

syslog_ekiga attached


Software versions:
    gspcav2-0.2.8
    Mandriva 2008.1
    Kernel 2.6.24.4-desktop-3mnb
    MPlayer 1.0-1.rc2.10plf2008.1-4.2.2
    VLC media player 0.8.6f Janus
    spcaview-20071224
    skype 2.0.0.68
    gstreamer-0.10
    ekiga 2.0.12

Thats all for now, many thanks,

Chris.


      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html

Attachment: syslog_skype
Description: 3063892353-syslog_skype

Attachment: syslog_gstreamer
Description: 765362008-syslog_gstreamer

Attachment: syslog_ekiga
Description: 3128586811-syslog_ekiga

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs