# Can't get webcamd/motion to work...



## jdb (Jul 2, 2018)

Hi ,

I'm currently trying to get multimedia/webcamd and multimedia/motion working.

My webcam: Logitech C310 HD | Vendor/ProductID (hex): 0x046d:0x081b

I used these commands to install webcamd.

`cd /usr/ports/multimedia/webcamd && BATCH=YES make "WITHOUT=HAL" "WITH=VT_CLIENT VT_SERVER" install clean`

`fetch -q -o - "https://gist.githubusercontent.com/dreamcat4/3518679d6acf46d2ea41/raw/0f730e04363eac806af18adfa08bf34870f501d1/webcamd" > /usr/local/etc/rc.d/webcamd`

`chmod +x /usr/local/etc/rc.d/webcamd`

Motion is already installed and configured, but when I reboot it doesn't finish the bootinng proccess beause motion is complaining that there is no video device...

I have to manually start the server remote console and quit motion otherwhise the booting proccess doesnt't finish.

Thank you in advance!


----------



## tobik@ (Jul 2, 2018)

jdb said:


> fetch -q -o - "https://gist.githubusercontent.com/...30e04363eac806af18adfa08bf34870f501d1/webcamd" > /usr/local/etc/rc.d/webcamd
> 
> chmod +x /usr/local/etc/rc.d/webcamd


multimedia/webcamd comes with its own rc script already. Why are you replacing it?


----------



## Phishfry (Jul 2, 2018)

Beat me to it!

Like I said to balanga , You really want to work out the needed `webcamd` options needed using the command prompt and then add those to /etc/rc.conf settings for `webcamd` when working.


----------



## Phishfry (Jul 2, 2018)

Sometimes instructions on the internet are old. So I worry when I see this from your question:
_make "WITHOUT=HAL" "WITH=VT_CLIENT VT_SERVER"_

The problem is ports change, these dreamcat4 instructions are old.
I would recommend running `make config-recursive` and set your options that way. That way you know they are still valid.
Then run `make install clean`.
This is after changing into the correct build directory: `cd /usr/ports/multimedia/webcamd`

pwcview is the basic tool you use to see if you video device is working. You also need to check your device nodes under /dev


----------



## jdb (Jul 2, 2018)

I reinstalled webcamd and checked the /etc/rc.conf file if everything is fine, I removed the 
	
	



```
webcamd_device_0_name="..."
```
 entry.

I ran the `usbconfig` command and then I copied the bold text below and added it to the /etc/rc.conf.

Output of `usbconfig`: 
	
	



```
#Other devices
ugen5.2: <vendor 0x046d product 0x081b> at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
```



/etc/rc.conf


```
webcamd_device_0_name="vendor 0x046d product 0x081b"
webcamd_enable="YES"
```

After rebooting /dev/video0 appears, but *motion* is still showing "UNABLE TO OPEN VIDEO DEVICE".




I also changed the permissions of /dev/video0 to `chmod 666 /dev/video0`


----------

