Webcams and Ubuntu

Discussion in 'Linux & BSD' started by sean.ferguson, Jan 16, 2005.

  1. sean.ferguson

    sean.ferguson Moderator Folding Team

    Messages:
    1,693
    Location:
    Fife; Scotland
    Has anyone had any luck with their webcams in ubuntu, i have tried both camE and camstream which i installed through synaptic but i can seem to get either of them to work. Both applications see my webcam (Logitech Quickcam Zoom) but when i open camstream and then open a viewer from within camstream the entire application hangs and needs to be killed.
    As for camE i have had a look through ~/.camErc and edited the paths for ftp access and logs but for some reason each time i try to take a shot it never takes the image, i just get the error in the terminal "No Image Taken" (or something to that effect)

    Im open to suggestions, of either ways to fix one of these applications or of a different application (preferably one which can be installed through the synaptic apt-get frontend) :squareeye
     
  2. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    did you try to run it as root, it might be a problem with device permissions. I tried to get both my webcam's working and it was a failure, so i gave up, both are very much unsupported on Linux though so ...
     
  3. cryogenic

    cryogenic OSNN Addict

    Messages:
    241
    Location:
    TN, blah!
    I have a Quickcam 3000 and camstream works perfectly fine on my box... running as root shouldn't make any difference, though I can see your point in suggesting it. I'm running Fedora Core 3, kernel 2.6.10. I've gotten the application to take pics and upload them via FTP just fine. However, didn't install via apt-get, I downloaded the tarball and compiled it. I'm not sure if that would make any difference, though.
     
  4. sean.ferguson

    sean.ferguson Moderator Folding Team

    Messages:
    1,693
    Location:
    Fife; Scotland
    well camstream deffinetly doesnt like it. im beggining to wonder if its just Ubuntu, because i have noticed already when trying to compile things i get gcc errors...
    Its definetly useable tho
    Code:
     sferguson@shuttle:~ $ caminfo
     Detected 1 Video4Linux devices.
     Device node      : /dev/video0
     Name of device   : "Logitech QuickCam Zoom"
     Minimum size     : 160x120
     Current size     : 0x0
     Maximum size     : 352x288
     Video inputs     : 1
      Input 0
       Name             : "Webcam"
       Type             : Camera
       Audio            : no
       Tuners           : 0
     Audio inputs     : 1
      Input 0
       Name             : "Microphone"
       Mutable          : no
     
     sferguson@shuttle:~ $
     
     
  5. cryogenic

    cryogenic OSNN Addict

    Messages:
    241
    Location:
    TN, blah!
    sounds like it to me... on FC3 my webcam works wonderfully. :) Honestly, I'd never even heard of Ubuntu until I came here. It's obviously detecting your cam, so the kernel driver is loaded properly. I'm just not sure what could be causing the problem. Does Ubuntu have yum or apt-get? I know on FC3, I can run "yum update" to make sure everything is up to date with the latest in the repository and "yum search ____" to search for packages. It almost sounds as though you're missing dependency somewhere? Also, as a side note I'm running 0.26.3 instead of whatever the latest snapshot is. I just did as normal... ./configure.. make... make install.. everything went fine, no errors and my cam worked fine from the get-go.
     
    sean.ferguson likes this.
  6. sean.ferguson

    sean.ferguson Moderator Folding Team

    Messages:
    1,693
    Location:
    Fife; Scotland
    yes, Ubuntu is basically a re-package debian system, so it uses the apt-get system for its package management. GCC is compiled and fully up to date, but i think they have moved paths around because even when trying to install simple irc scripts gcc errors occur. I know other people have had errors similar to this (Glaanieboy i believe for one) but i will work around it... i might even take a hop onto the ubuntu forums :)
     
  7. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    Install the GCC packages from the package system, and all will be well :p
     
  8. cryogenic

    cryogenic OSNN Addict

    Messages:
    241
    Location:
    TN, blah!
    apt-get satisfies dependencies automatically, so you shouldn't have any problems if you use it.
     
  9. cryogenic

    cryogenic OSNN Addict

    Messages:
    241
    Location:
    TN, blah!
    One other thing... I can't remember if your cam is supported by the PWC driver, but you can try "dmesg | grep pwc" without the quotes in a terminal window and see what it spits out. Once you start camstream and open a viewer window, you'll immediately start getting messages in dmesg... mine says "dumping frame ###" over and over again.. so check yours and paste here. That may help with troubleshooting.
     
  10. sean.ferguson

    sean.ferguson Moderator Folding Team

    Messages:
    1,693
    Location:
    Fife; Scotland
    Code:
    sferguson@shuttle:~ $ dmesg | grep pwc
    pwc Philips webcam module version 9.0.1 loaded.
    pwc Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.
    pwc Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,
    pwc the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.
    pwc Logitech QuickCam Zoom (new model) USB webcam detected.
    pwc Registered as /dev/video0.
    pwc Logitech QuickCam Zoom (new model) USB webcam detected.
    pwc Registered as /dev/video0.
    pwc Failed to set LED on/off time.
    pwc set_video_mode(176x144 @ 10, palette 15).
    pwc decode_size = 1.
    sferguson@shuttle:~ $
    
    thats my output, pre-running camstream

    this is what i get during camstream;
    Code:
    sferguson@shuttle:~ $ camstream
    CCamWindow::CCamWindow()
    CWebCamViewer::CWebCamViewer(0x80cd908, 320x240)
    CVideoDevice::Init()
    Using mmap(), VMBuf.size = 921600
    Trying to find video options for Logitech QuickCam Zoom:/dev/video0
    Creating new video options
    <!DOCTYPE Configuration>
    <config>
     <defaults/>
     <videodevices>
      <videoconfiguration name="Logitech QuickCam Zoom" >
       <basename>snapshot</basename>
       <textfont>system</textfont>
       <textcolor>#ffff00</textcolor>
       <timeinimage>false</timeinimage>
       <fileformat>PNG</fileformat>
       <savetodisk>true</savetodisk>
       <ftptoserver>false</ftptoserver>
       <saveoption>1</saveoption>
       <maxsequence>1000</maxsequence>
       <sequence>0</sequence>
       <ftpserver></ftpserver>
       <ftppath></ftppath>
       <ftpuser></ftpuser>
       <ftppass></ftppass>
       <ftppassive>false</ftppassive>
       <ftpunique>true</ftpunique>
      </videoconfiguration>
     </videodevices>
    </config>
    
    CSnapshotSettingsDlg::CSnapshotSettingsDlg(...)
    CVideoSettingsDlg::SizeChanged(160x120)
    CVideoSettingsDlg::FramerateChanged(10)
    Philips webcam detected, enabling extensions
    CCamPanel::SetSize(160x120)
    CCamPanel::SetImageSize(160x120)
    CCamPanel::SetVisibleSize(160x120)
    CVideoDevice::SetSize(320, 240)
    CVideoDevice::MSync() ioctl: Invalid argument
    SWIN: No such file or directory
    CCamPanel::SetSize(160x120)
    CCamPanel::SetImageSize(160x120)
    CCamPanel::SetVisibleSize(160x120)
    CCamPanel::SetSize(160x120)
    CCamPanel::SetImageSize(160x120)
    CCamPanel::SetVisibleSize(160x120)
    RecalcTotalViewSize: resize viewport(160x120)
    EnableRGB: +
    CVideoDevice::SetPalette picked palette 15 [yuv420p]
    CVideoDevice::CreateImagesRGB()
     allocating space for RGB
    CVideoDevice::StartCapture() go!
    CVideoDevice::MCapture() ioctl: Device or resource busy
    
    sferguson@shuttle:~ $
    
    oh and x-istence... i didnt even check the gcc was installed... i thought i would have been :p installed and fixed now tho ;)
     
  11. cryogenic

    cryogenic OSNN Addict

    Messages:
    241
    Location:
    TN, blah!
    Right there's your problem, basically... Apparently nothing is able to access your camera.. something else has it "tied up" so to speak. While I'm not an uber-guru and can't think right off-hand what would cause such a problem, perhaps someone else here can chip in. :) It's weird that it doesn't work on your box... I'm running kernel 2.6.10 and my cam runs flawlessly. Generally speaking, I've heard the 2.6x kernels work a whole lot better for USB devices and such. If you're not already running a 2.6 kernel, you might want to try?
     
  12. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    it is not :p. That bit me the first time around.
     
  13. cryogenic

    cryogenic OSNN Addict

    Messages:
    241
    Location:
    TN, blah!
    I can't understand why distros don't install compiling tools bydefault. That makes no sense to me. it's something that a large portionof linux users are going to need at some point or another. Even thosethat don't need it immediately may need it without realizing it.Honestly, "./configure".. "make" and "make install" aren't harddirections to follow for installing software and in order to do such,you'll need gcc and gcc++ in most cases. So why not install it bydefault? bleh... also we've still not fixed his webcam problem fromwhat I can tell
     
  14. sean.ferguson

    sean.ferguson Moderator Folding Team

    Messages:
    1,693
    Location:
    Fife; Scotland
    hmm.. nope not fixed. but im going to custom my kernel radically and probably strip it right down possibly this weekend as i am still running the default.
    During this time i will probably try some source compilations of the software :)
     
  15. cryogenic

    cryogenic OSNN Addict

    Messages:
    241
    Location:
    TN, blah!
    I wouldn't be shocked if going to the 2.6x kernel fixed the problem byitself... customizing the kernel may benefit even further. Just makesure you add support for the pwc driver. :p
     
  16. sean.ferguson

    sean.ferguson Moderator Folding Team

    Messages:
    1,693
    Location:
    Fife; Scotland
    ubuntu runs 2.6.8 anyway so it would only be a small update ;)
     
  17. cryogenic

    cryogenic OSNN Addict

    Messages:
    241
    Location:
    TN, blah!
    ahh... mine worked fine under 2.6.9... I would assume there's very little difference in 2.6.8 and 2.6.9... I'm running 2.6.10 now and it's not made any difference at all. That's just plain weird why your cam won't work. I dunno if you've considered this, but there's some supposedly very good kernels available from www.linux-militia.net. They have what are apparently called performance optimized kernels available. I haven't bothered to try one yet, but I've been considering it.
     
  18. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    Cause it is a distro for mom and pop, to check their mail, surf the web, and listen to a bit of music.

    Go get gentoo and compile all you want.
     
  19. cryogenic

    cryogenic OSNN Addict

    Messages:
    241
    Location:
    TN, blah!
    argh... why on earth did some of my words get all squished together like that? I even fixed it and it did it all over again! Anyway, back on topic, Fedora gives you the option to install compiling tools but I don't believe they're checked by default. As far as Gentoo goes, you don't really have much of an option but to compile a large portion of your software just to get a working system (after which you can use portage). I prefer to be given the option of whether I want to compile from source or install via rpm. :)