Distorted video (uvcvideo resolution issue)

Issue #17 open
Former user created an issue


I run loader (sudo. /.loader), the following result is:

jeveaux@kamael ~/r5u87x $ sudo ./loader --force-clear
Searching for device...
Found camera : 05ca:1839
Firmware : ucode/r5u87x-05ca-1839.fw

Camera reports positive microcode state.
Reset microcode.
Sending microcode to camera...
Enabled microcode.
Camera reports microcode version 0x0030.

Successfully uploaded firmware to device 05ca:1839!

And then, reload de uvcvideo

jeveaux@kamael ~/r5u87x $ sudo modprobe -r uvcvideo
jeveaux@kamael ~/r5u87x $ sudo modprobe uvcvideo

the webcam worked, but the image is duplicated and overlapping, as in the attached file.

My laptop is a Sony Vaio VGN-CR3203 running on Ubuntu Intrepid Beta and Kernel 2.6.27-7

jeveaux@kamael ~/r5u87x $ uname -a
Linux kamael 2.6.27-7-generic #1 SMP Fri Oct 10 03:55:24 UTC 2008 i686 GNU/Linux

My webcam is a ricoh

jeveaux@kamael ~/r5u87x $ lsusb
Bus 003 Device 003: ID 05ca:1839 Ricoh Co., Ltd

Comments (64)

  1. Anonymous

    Same problem here. I have a sony vaio vng-cr31s

    I'm runnign 2.6.27-ARCH in arch linux and have a ricoh camera, and worked well with the r5u87x dirver

  2. Anonymous

    Hi all, Same problem on 05ca:183a with Ubuntu 8.10 on Sony VAIO VGN-TZ21MN. Works very well with luvcview, but not with amsn, neither skype. Used to work with r5u870 and Ubuntu 8.04.

  3. Anonymous

    Same problem with sony vaio FZ38M with ubuntu 8.10 , webcam : Bus 003 Device 002: ID 05ca:183b Ricoh Co., Ltd

    the loader works (see below), but the image is Duplicated for skype (as above) with XawTv , (BUT the image is correct WITH luvcview" luvcview .... Stream settings: Frame format: YUYV (MJPG is not supported by device) Frame size: 640x480 Frame rate: 30 fps

    (With previous drivers r5u870 was working perfectly on ubuntu 8.04 and but of course with the previous kernel ! )

    thanks anyway for your works ...

    Yan ________ r5u87x-f24553d56d3e$ sudo ./loader Searching for device... Found camera : 05ca:183b Firmware : ucode/r5u87x-05ca-183b.fw

    Camera reports positive microcode state. Camera reports microcode version 0x0131. Not doing anything - camera already setup.

    Successfully uploaded firmware to device 05ca:183b!

  4. mmaki

    I have found this has to do with resolution. If you can get your application to work at 640x480 it works fine. For example switching xawtv to full screen it works fine. Same with the application motion. If you set it to capture images at 640x480 it works great.

  5. Anonymous

    thanks mmaki,

    you are right : For skype add just this two lines : <Video> <CaptureHeight>480</CaptureHeight> <CaptureWidth>640</CaptureWidth> </Video>

    in /home/user_name/.Skype/user_name/config.xml

    and it is working with the 640x480 resolution instead 1280x1024 thanks, we can survive at this resolution and wait for a more general fix. thanks Yan

  6. Pihhan

    I fear there is no simple solution to this problem, this camera seems to not follow uvc video standard as it should. I made some experiments with mplayer, and you can see that it will not change to lower resolution. Interesting is, switching modes does work between 640x480 and 1280x1024, but for 320x240 it will not work.

    See http://www.pihhan.info/sony/webcam/webcam-tests. There are some images, and their modifications with changed frame size in metadata of image. Image is first part of 640x480 buffer only, as application thinks it has different image size than it really has.

  7. Anonymous

    Editing config.xml as suggested has worked for me -- though initially I wasn't sure in which part of the XML file it should be added. The Video tag should be inside Lib - the nesting in my config xml is:

    config > Lib > Video

    thanks for the fw loader to AHixon and to anon for the workaround!

  8. Anonymous

    Thanks for FW-loader and skype workaround, works for me with Sony VAIO AR51J with 05ca:1839 Ricoh integrated webcam. It was most annoying to explain windows-Skype-Contacts why webcam doesnt work.

  9. Anonymous

    Same problem here with all the same specs as the OP. Video works fine at 640x480 using lucview, but none of my chat programs use that or can change to that resolution.

  10. Anonymous

    Strangely, the resizing was working with the old r5u870 driver. Is this something that uvcvideo should special-case for this camera?

  11. Anonymous

    Hi all, I have a sony vaio sz and a Ricoh Camera but nothing is running ;-(

    lsusb Bus 005 Device 004: ID 05ca:1830 Ricoh Co., Ltd Visual Communication Camera VGP-VCC2

    The driver for the camera seems to be fine

    /download/r5u87x-881dbd07a263$ sudo ./loader r5u87x firmware loader v0.1 Searching for device... Found camera : 05ca:1830 Firmware : ucode/r5u87x-05ca-1830.fw

    Camera reports positive microcode state. Camera reports microcode version 0x0100. Not doing anything - camera already setup.

    Successfully uploaded firmware to device 05ca:1830!

    The reload the ?uvcvideo? -module

    sudo modprobe -r uvcvideo sudo modprobe uvcvideo

    try to start Xawtv ### /download/r5u87x-881dbd07a263$ sudo xawtv This is xawtv-3.95.dfsg.1, running on Linux/i686 (2.6.27-11-generic) xinerama 0: 1280x800+0+0 can't open /dev/video0: No such file or directory v4l-conf had some trouble, trying to continue anyway v4l2: open /dev/video0: No such file or directory v4l2: open /dev/video0: No such file or directory v4l: open /dev/video0: No such file or directory no video grabber device available ###

    /download/r5u87x-881dbd07a263$ lsmod | grep vid uvcvideo 63624 0 compat_ioctl32 9344 1 uvcvideo videodev 41344 1 uvcvideo v4l1_compat 22404 2 uvcvideo,videodev video 25232 0 output 11008 1 video usbcore 149360 8 uvcvideo,btusb,usb_storage,libusual,usbhid,ehci_hcd,uhci_hcd

    Xawtv still doesn't start, because there is no video, but why ???

  12. Anonymous

    I have the exact same problem as the person above with the exact same vaio and camera: vaio sz and 05ca:1830.

    ./loader is successful as above and I reload uvcvideo, likewise, but I get no picture in cheese and camorama gives me "Cannot connect to video device."

    Any suggestions?

  13. Anonymous

    In Skype, all I get is distorted image or, if I add the resolution configuration in Skype, a green image.

    Has anyone solved this problem? Thanks for your efforts :-)

  14. Anonymous

    I have same result in Skype if I change resolution to 640x480 (green image).

    I tried to change FPS from 30 to 25 but nothing helps.

  15. Anonymous

    same problem with a ID 05ca:1810 Ricoh Co., Ltd on hp pavillon dv 9000. The workaround work fine with skype with resolution to 640x480... But in ekiga or aMSN, i don't know how to change resolution... thanks for your worh and sorry for my english

  16. Anonymous

    hmm, i try the last version of ekiga, there is possibility to change resolution but it don't work better

  17. Anonymous

    the workaround with skype do not permit the other person to see me!! I can se mee correctly in Skype-option-Video device test

  18. Anonymous

    I have the same issues with a vaio tz o5ca:183a, I don't use skype though. My Ekiga (for testing) displays the jacked up images, works fine in luvcview, canarama can't connect. Same issues as everyone else. Can we PLEASE get this fixed? I'd really like to have my webcam working. It's one of the very few things I don't have working in linux...

  19. Anonymous

    I have the same issues. With the current code and ubuntu 8.10 I get a perfect picture on skype, but only with non-Linux users.

    With Linux users the video in skype "breaks" after a short amount of time (10-30sec), webcam status LED goes off and on but Skype then shows only a distorted picture afterwards. Since it happens on the other end of the line (skype linux and logitech webcam), too, this is probably more a skype problem (especially since this never happens with Windows and Mac users).

    Cheese works perfectly -- and helps identify the problem, since switching to 320x240 resolution works, but lower resolutions lead to the exact distortion ("double vision") I get with skype as described. BTW this is the same distortion that appears with most flash-applications (like dimdim.com or openmeetings.de).

    However, Ekiga does not work either showing a completely different distortion.

    If this is a resolution issue is there a way to disable lower resolutions in the code for now? Any updates would be great!

  20. terrainvista

    similar problem for me. The camera ricoh works with cheese but not with ekiga after I installed the r5U87x. In particular I see something completed distorted with horizontal stripes (synchronization?). With Skype I see the image but doubled and shifted. I installed also the latest version yesterday. I have a Vaio VGN-AR41E with Ubuntu 8.10. Can I do something to improve the situation? Thanks a lot for your work. r5u87x firmware loader v0.2 My report for reload:

    Searching for device... Found camera: 05ca:1839 Camera reports positive microcode state. Camera reports microcode version 0x0030. Not doing anything - camera already setup.

    Successfully uploaded firmware to device 05ca:1839! Reloading uvcvideo module... Finished.

  21. Anonymous

    i have same problem ( Pihhan )

    notebook: sony vaio fz31sr

    camera: Bus 002 Device 002: ID 05ca:183b Ricoh Co., Ltd

    lsmod | grep uvc uvcvideo 59912 0 compat_ioctl32 5248 1 uvcvideo videodev 37632 1 uvcvideo v4l1_compat 17540 2 uvcvideo,videodev usbcore 147728 7 usbhid,btusb,uvcvideo,usb_storage,ehci_hcd,uhci_hcd

    camera work fine for resolution 640x480 and 1280x1024. for another resolution picture is destroy. (sample: module sent picture with resolution 640x480 with header for resolution 320x240)

    not work skype, ekiga, emphaty.


    sudo r5u87x-loader r5u87x firmware loader v0.2

    Searching for device... Found camera: 05ca:183b Camera reports positive microcode state. Camera reports microcode version 0x0131. Not doing anything - camera already setup.

    Successfully uploaded firmware to device 05ca:183b!

    thx for work.

  22. Anonymous

    (same author as above) with skype problem has remove.

    skype install gstfakevideo from http://ubuntuforums.org/showthread.php?t=725179

    mv /dev/video0 /dev/video1

    ./gstfakevideo v4l2src device=/dev/video1 ! video/x-raw-yuv,width=640,height=480 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! identity

    this is software change resolution (truncate). but camera module return bad picture with resolution 320x240.

  23. Anonymous

    I have the same problem, the webcam works at 640x480, but when the application tries to change it to 320x240 it doesn't happen and video is distorted. This was working with the previous driver (r5u870), so it must not be a bug in the camera, right?

  24. Anonymous

    yes, it is weird, it worked one year ago, but somebody messed it up and now it is not working for months... and nobody has a clue LOL

  25. Anonymous

    Anybody know if it is possible to make the old version of the driver work with current linux versions so we get 320x240 back? Without 320x240 my camera is useless.

  26. Alex Hixon repo owner

    Sorry for the lapse in attention to this; real-life came in the way on working on this further.

    The issue here is between uvcvideo and the camera. I had a quick look tonight and I'm pretty sure here's why it's happening:

    1. the camera sends back an incomplete list of possible capture formats
    2. client requests a video format to send when it starts streaming, and since uvcvideo can't find it in it's list, it picks the first one as a fallback (which happens to be 640x480).
    3. camera sends video in wrong resolution

    I'll have a look at the code for these functions between r5u870 and uvcvideo and see if I can narrow down the issue.

    Not sure of an ETA to a fix though, sorry! :(

  27. Anonymous

    Hi guys, I'm having same issue with Flash in webbrowsers. When I open my webcam it shows up but distorted and overlapping. In other applications like Skype or cheese all works excelent. Another problem is that when I disconnect camera (in flash not camera from pc), it then hangs somehow and I can't use the camera even in other applications where it normally works. In flash on connecting again it show only distorded static image of somethig meaningless. To be able to use webcam again I have to reload uvcvideo module. I'm using Ubuntu 9.10 and running on Sony Vaio sz4vwn. Another maybe worth to say thing is if I connect camera to virtual windows machine it works without problems on flash websites. If you need some debug output I'm more than happy to provide all you request.

  28. Anonymous

    To get ricoh webcam working in web browsers, you need to wait :P untill the Evil (Adobe Flash) opens its code then you can config the webcam resolution to 640x480. or the r5u870 developpers add lower resolutions support to the driver :)

  29. Hugo Palma

    I just installed r5u87x on Ubuntu Lucid and it worked without change on Skype and any other application except for flash.

    The only place i now get the resolution problem is in the flash plugin.

  30. Anonymous

    hpalma do you use 32 bit OS or 64? Cos this flash issue is annoying for me I'd like to use some web based video conferencing tools which are all flash. I'm running 64bit and was hoping it could be sorted by installing 32bit Lucid...

  31. Anonymous

    I don't think you can. Flash application can. I did some tests in my Flex application and when I set to camera resolution to 640x480 it shows properly even I show it smaller and different aspect. So I think only way here is the application programmers must detect somehow native resolution, set camera to get video stream in this resolution, then resize/cut/stretch or do whatever with it in flash move itself and then transmit to a server. I don't know whether it is possible to detect native resolution of webcam by flash, though. The issue here may also be that flash movie will process video in client side which probably will affect CPU usage by flash movie.

  32. Log in to comment