1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HOWTO: adding webcam support for skype and adobe flash

Discussion in 'Howtos and FAQs (Moderated)' started by aleksey14, May 7, 2011.

  1. pkubaj

    pkubaj Member

    Messages:
    442
    Likes Received:
    1
    OK, so now it works out of Skype, but still doesn't work in Skype.
     
  2. tcrider84

    tcrider84 New Member

    Messages:
    6
    Likes Received:
    0
    odd problem with webcamd_enable="YES"

    Hi everyone. So I've come across a strange problem. I'm using Freebsd 9 stable. I've followed the guide and installed the required packages. Here's the issue.

    If I put:

    Code:
    webcamd_enable="YES"
    in /etc/rc.conf, /dev/video0 is not loaded and not listed when I ls /dev, nor does it get picked up by pwcview. BUT

    IF I remove the line, and then manually enable webcamd, /dev/video0 IS generated, and I can set permissions and use pwcview/other webcam programs as normal. Any idea why it's doing this? The cam is a logitech C210.
     
  3. tcrider84

    tcrider84 New Member

    Messages:
    6
    Likes Received:
    0
    Some extra info that might be useful:

    when

    Code:
    webcamd_enable="YES"
    and I try to run it, I get:
    Code:
    Webcamd is already running for ugen3.2.0
    ..yet no /dev/video0
    
    Here's the usbconfig dump_device_desc:
    Code:
    ugen3.2: <product 0x0819 vendor 0x046d> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
    
      bLength = 0x0012 
      bDescriptorType = 0x0001 
      bcdUSB = 0x0200 
      bDeviceClass = 0x00ef 
      bDeviceSubClass = 0x0002 
      bDeviceProtocol = 0x0001 
      bMaxPacketSize0 = 0x0040 
      idVendor = 0x046d 
      idProduct = 0x0819 
      bcdDevice = 0x0010 
      iManufacturer = 0x0000  <no string>
      iProduct = 0x0000  <no string>
      iSerialNumber = 0x0002  <D07EA700>
      bNumConfigurations = 0x0001
     
  4. bbzz

    bbzz New Member

    Messages:
    867
    Likes Received:
    0
    Do you have
    Code:
    cuse4bsd_load="YES"
    in /boot/loader.conf?

    Also to avoid manually setting permission for video0, edit your /etc/devfs.rules file.
     
  5. tcrider84

    tcrider84 New Member

    Messages:
    6
    Likes Received:
    0
    Yes, I do have
    Code:
    cuse4bsd_load="YES"
    in /boot/loader.conf. I do not think I would be able to manually load webcamd and create /dev/video0 if cuse was not loaded.

    As I said it works fine IF:
    1. I do not use
    Code:
    webcamd_enable="YES"
    in /etc/rc.conf
    and also
    2. manually type
    Code:
    webcamd -d ugen3.2 -i 0 -v 0
    this creates /dev/video0 and works properly.

    But if I enable webcamd in /etc/rc.conf, /dev/video0 is not created.

    Also, I already know about /etc/devfs.rules, but it cannot set permissions to /dev/video0 if /dev/video0 is not created/does not exist.
     
  6. bbzz

    bbzz New Member

    Messages:
    867
    Likes Received:
    0
    Right, sorry.
    And if you explicitly add flags in /etc/rc.conf? Along the lines of:

    Code:
    webcamd_flags="-d ugen3.2 -B"
    Also try all again without -i and -v switch. Yeah, I know, you'd be surprised.
     
  7. tcrider84

    tcrider84 New Member

    Messages:
    6
    Likes Received:
    0
    ok, so.

    tried it with
    Code:
    webcmad_enable="YES"
    webcamd_flags="-d ugen3.2 -B"
    
    /dev/video0 not created.

    tried with
    Code:
    webcamd_flags="-d ugen3.2 -B"
    
    only. still /dev/video0 not created

    tried via terminal manually:

    Code:
    sudo webcamd
    Attached ugen3.2[0] to cuse unit 0
    Creating /dev/video0
    
    created, but then it hangs.. as in I can't get back to console without pressing ctrl+c. When I installed webcamd I used pkg_add -r webcamd, maybe I should remove it and compile it from ports instead?
     
  8. tcrider84

    tcrider84 New Member

    Messages:
    6
    Likes Received:
    0
  9. jrm

    jrm Member

    Messages:
    778
    Likes Received:
    0
    Thanks for this helpful guide @Aleksey14.

    Maybe it's a formatting issue, but I had problems with the spaces. Only
    Code:
    [system=10]
    add path 'video*' mode 0666
    worked for me.


    This part didn't seem to make any difference than when I just ran the skype binary. Is it still necessary?

    Thanks again; it's nice to be able to see friends and family who live far away.
     
  10. bbzz

    bbzz New Member

    Messages:
    867
    Likes Received:
    0
    That last part is not needed anymore.
     
  11. jrm

    jrm Member

    Messages:
    778
    Likes Received:
    0
    I haven't used my formerly working generic USB webcam in a few months, but when I plugged it in today and started pwcview I saw a green screen where the video normally would be and the system semi-froze. I say semi- because the colours were slowly changing and every once in awhile the mouse would move or a keystroke would register. But, after about 10 minutes I was forced to hard reboot. I don't think I've used the webcam since upgrading from 8.2 to 8.3, but searching for things like "FreeBSD 8.3 webcam" doesn't turn anything up.

    When I plug the webcam in I see:

    Code:
    Jun  7 19:06:24 met kernel: ugen3.2: <Image Processor> at usbus3
    Jun  7 19:06:24 met root: /usr/local/etc/rc.d/webcamd: WARNING: failed to start webcamd
    Jun  7 19:06:24 met root: Unknown USB device: vendor 0x090c product 0x937b bus uhub3
    
    in syslog.

    I do see /dev/video0 and I set the permissions to crw-rw-rw-.

    Am I missing something?