# webcamd



## balanga (Dec 19, 2017)

I managed to get my DVB-T dongle working with a multimedia/webcamd v4.8.0.4 built from ports. The PKG version did not work. I'm trying to rebuild the application on another system which has a more recent version of the ports collection which tries to build v4.12.0.1.

Can I simply copy /usr/ports/multimedia/webcamd/ from one computer to the other and run `make install`to be able to build the old version?


----------



## balanga (Dec 19, 2017)

In answer to my own question, yes you can... and it is now working on my intended computer.

The problem now is how to start `webcamd` with the correct device?

It is supposed to be started by adding `webcamd_enable="YES"` to /etc/rc.conf but how do I make it start as `webcamd -d ugen5.2` ?


----------



## myso (Dec 20, 2017)

Hi balanga,

I'm using webcamd for several years now to use my DVB cards with mythtv. I never had to configure anything, webcamd automatically detects my DVB cards and starts a single instance per device. It does it automatically even after plugging the device into the USB port.


```
# usbconfig list
ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <ASRock ASM107x> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen0.3: <vendor 0x05e3 USB2.0 Hub> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen0.4: <TechnoTrend TT-USB2.0> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (10mA)
ugen0.5: <Afatech DVB-T 2> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen0.6: <ASRock ASM107x> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (2mA)
```


```
# ps aux | grep webcamd
root    359   0.0  0.0  41656   6712  -  Is   Mon19      4:34.20 /usr/local/sbin/webcamd -i 0 -d ugen0.4 -B -U webcamd -G webcamd
root    370   0.0  0.0  38836   6356  -  Is   Mon19      1:47.66 /usr/local/sbin/webcamd -i 0 -d ugen0.5 -B -U webcamd -G webcamd
root  65354   0.0  0.0  14836   2496  0  S+   12:31      0:00.00 grep webcamd
```


----------



## balanga (Dec 22, 2017)

I got this:-
`ps aux | grep webcamd`

```
root       1006   0.0  0.1  14828 2516  0  S+   17:28     0:00.00 grep webcamd
```
I start `webcamd` by including it in /etc/rc.conf

```
webcamd_enable="YES"
```
Why don't I get similar output?


----------



## myso (Dec 22, 2017)

What about this prerequisite, is it fulfilled?


```
webcamd requires the cuse4bsd(3) kernel module from ports in versions of
     FreeBSD prior to 11.x and the cuse(3) kernel module in versions of
     FreeBSD starting at 11.0.  To load the driver as a module at boot time,
     place the following line in loader.conf(5):

            # FreeBSD < 11.x, package from ports
            cuse4bsd_load="YES"

            # FreeBSD >= 11.x, part of default kernel build
            cuse_load="YES"
```


----------



## balanga (Dec 22, 2017)

myso said:


> What about this prerequisite, is it fulfilled?
> 
> 
> ```
> ...



`webcamd` will not run until cuse is loaded, but I found (using 11.1) that cuse_load="YES" in /boot/loader.conf had no effect, whereas cuse4bsd_load="YES" does work..


----------



## balanga (Dec 30, 2017)

According to this guide 

```
# Webcamd won't start unless you tell it which USB devices to connect to
```

this can be done using `sysrc "webcamd_device_0_name=SCEH-0036 SONY"`

On my system I have 
`usbconfig -d ugen0.4`

```
ugen0.4: <ITE Technologies, Inc. USB Deivce> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
```

How do I change it into the format above?


----------



## Phishfry (Dec 31, 2017)

`sysrc "webcamd_device_0_name="ITE Technologies, Inc. USB Deivce"`


----------

