11b0b [Solved] Webcam programs working with webcamd in FreeBSD [Archive] - The FreeBSD Forums

PDA

View Full Version : [Solved] Webcam programs working with webcamd in FreeBSD


Chuchubi
June 18th, 2010, 20:45
Some time ago a lot of people where complaining about FreeBSD not having the possibility to use a webcam. Okay, we had a gspca driver and some other drivers but only for v4l1 and most of them don't work anymore. Now we have webcamd and v4l2 and we (The FreeBSD people) can take advantage of that. Webcamd have a lot of drivers and also the important UVC driver. There are a lot of programs that are working with a webcam on linux and now these programs can work on FreeBSD. I have succesfully compiled and run the following programs on FreeBSD:

wxcam
guvcview
effectv
luvcview
uvcview
mplayer
mencoder
mjpg_streamer
uvc_streamer
camorama
camserv
motion
xawtv
zoneminder

I have screenshots of this programs running on FreeBSD 8.0 release. For more information, go to http://www.rockafunk.org/

Making ports of all of this programs can easy be done. I already have the patches. Any help is welcome.

zeiz
June 18th, 2010, 23:43
Tried to get my Logitech webcam working with webcamd and cuse4bsd but no luck :(

Chuchubi
June 19th, 2010, 00:24
Tried to get my Logitech webcam working with webcamd and cuse4bsd but no luck :(

Can you be more specific what is not working? Can you post some error messages. How did you install webcamd? There is a port of webcamd and you also need to install v4l_compat and libv4l. Do /dev/video0 exist?

adamk
June 19th, 2010, 02:43
mplayer and vlc work here. Skype and flash are still non-functioning (just gives green static). At least when I last tried about 2 weeks ago.

Adam

Chuchubi
June 19th, 2010, 12:29
mplayer and vlc work here. Skype and flash are still non-functioning (just gives green static). At least when I last tried about 2 weeks ago.

Adam

I have tried skype but no luck yet. For the video in skype to work, some patching need to be done in the kernel source. Skype on FreeBSD work under linux emulation and I think the patches only work only the pwc driver. The patches can be found at http://opal.com/freebsd/sys/compat/linux/.

sk8harddiefast
June 19th, 2010, 16:16
Me too. Same problem with Zeiz. If i remember right it was refused to see camera on usb port or something like that.

Chuchubi
June 19th, 2010, 16:44
Me too. Same problem with Zeiz. If i remember right it was refused to see camera on usb port or something like that.

Do /dev/video0 exists? How do you start webcamd? First you need to load cuse4bsd by doing kldload cuse4bsd Then do a dmesg in a terminal to find out the ugen number. My logitec camera gives "ugen4.3".

Load webcamd like this:
# As root or use sudo

webcamd -d ugen4.3 -i 0 -v 0

Also change the permissions of your video device.
# As root or use sudo

chmod 666 /dev/video0

Test with pwcview:

pwcview

Chuchubi
June 19th, 2010, 17:30
I see that some people have problems installing webcamd. I like to help so I have written here how I have done it.

Get the latest port tarballs for v4l_compat, libv4l, pwcview and webcamd.
Also get the cuse4bsd source.
Just follow the instructions to do that.
################################################## ####################

http://www.freebsd.org/cgi/cvsweb.cgi/ports/multimedia/v4l_compat/

tar xvzf v4l_compat.tar.gz

cd v4l_compat

sudo make install
----------------------------------------------------------------------

http://www.freebsd.org/cgi/cvsweb.cgi/ports/multimedia/libv4l/

tar xvzf libv4l.tar.gz

cd libv4l

sudo make install
----------------------------------------------------------------------

http://www.freebsd.org/cgi/cvsweb.cgi/ports/multimedia/pwcview/

tar xvzf pwcview.tar.gz

cd pwcview

sudo make install
----------------------------------------------------------------------

Get cuse4bsd and install it

svn --username anonsvn --password anonsvn checkout svn://svn.turbocat.net/i4b/trunk/usbcam/cuse4bsd

cd cuse4bsd

sudo make all install
----------------------------------------------------------------------

http://www.freebsd.org/cgi/cvsweb.cgi/ports/multimedia/webcamd/

tar xvzf webcamd.tar.gz

cd webcamd

sudo make install
----------------------------------------------------------------------
# restart devd

sudo /etc/rc.d/devd restart
----------------------------------------------------------------------
sudo kldload cuse4bsd
----------------------------------------------------------------------
# Plugin your webcam and find out the ugen it is using.

dmesg

# If it is ugen4.2

webcamd -d ugen4.2 -i 0 -v 0

# If it is ugen2.2

webcamd -d ugen2.2 -i 0 -v 0

# change permission of device
# You can also do that with /etc/devfs.rules
# add path 'video*' mode 0666

sudo chmod 666 /dev/video

# Test

pwcview

I hope this helps.

sk8harddiefast
June 19th, 2010, 21:59
I give a try again :)

zeiz
June 20th, 2010, 03:54
Actually tried Skype :)
Anyway:
$ pwcview
Warning short read, got only 6174 of 115200 bytes
.................................................
"Green box" and multiple warnings like above.

$ ls -l /dev/video0
crw-rw-rw- 1 root operator 0, 138 Jun 19 21:54 /dev/video0

/etc/rc.conf
webcamd_enable="YES"
/boot/loader.conf
cuse4bsd_load="YES"
pwc_load="YES"
$ ls /var/db/pkg | grep v4l
libv4l-0.6.4
v4l_compat-1.0.20100403_1

/etc/devfs.conf
perm video0 0666
# webcamd -d ugen2.2 -i 0 -v 0
Webcamd is already running for ugen2.2.0

Ports were up-to-date

Chuchubi
June 20th, 2010, 05:49
Hi zeiz, if your webcam supports the pwc driver you should only load that driver. If you put webcamd_enable="YES" in your rc.conf the webcamd driver will load on boot. And when you then do webcamd -d ugen2.2 -i 0 -v 0 you load the driver for the second time. Do not load the pwc driver and webcamd together.

zeiz
June 22nd, 2010, 16:19
Understandable. I just shown that webcamd is loaded.
However Do not load the pwc driver and webcamd together
Did you mean that webcamd will be loaded by pwc driver and thus no need in webcamd_enable="YES" in /etc/rc.conf?

adamk
June 22nd, 2010, 16:23
pwc is a driver for specific webcams.. webcamd + cuse4bsd should be used for webcams *not* supported by pwc.

Adam

zeiz
June 22nd, 2010, 16:47
Thanks but how could you comment this:
Do /dev/video0 exists? How do you start webcamd? First you need to load cuse4bsd by doing kldload cuse4bsd Then do a dmesg in a terminal to find out the ugen number. My logitec camera gives "ugen4.3".

Load webcamd like this:
# As root or use sudo

webcamd -d ugen4.3 -i 0 -v 0

Also change the permissions of your video device.
# As root or use sudo

chmod 666 /dev/video0

Test with pwcview:

pwcview
? cuse4bsd loaded, webcam loaded and then pwcview started. But you said that pwc is only for some webcams. Did you mean that for other webcams cuse4bsd+webcamd must be loaded to make pwcview working? And for those supported by pwc no need in both cuse4bsd and webcamd?
Sorry if I'm really dumb today :)

adamk
June 22nd, 2010, 16:54
There is the pwc driver (for specific webcams) and then there is the pwcview program, which is not specific to the pwc driver.

Adam

Chuchubi
June 22nd, 2010, 17:59
There is the pwc driver (for specific webcams) and then there is the pwcview program, which is not specific to the pwc driver.

Adam

You are right. The program pwcview is just a program to view /dev/video0. The driver does not matter for pwcview. The pwc driver however is just for webcams supporting this driver. If you dont have such a webcam you dont have to load the pwc driver. So you are right!

zeiz
June 22nd, 2010, 18:01
So, assuming that pwcview works for both following cases, should I use webcamd + pwc if my webcam supported and webcamd + cuse4bsd othewise?

adamk
June 22nd, 2010, 18:16
Wow, you really are having a hard time with this:


Do not load the pwc driver and webcamd together


If your card is supported by the pwc driver, use it (do not use webcamd). If it's not supported by the pwc driver use cuse4bsd+webcamd.

Adam

zeiz
June 22nd, 2010, 18:28
I left the wedding right after 4 a.m but they finished at 7:30 :)

lme@
June 23rd, 2010, 10:06
Chuchubi: Do you plan to create some PRs with the patches, so they get into the ports collection?

zeiz
June 23rd, 2010, 15:02
Got it working. Thanks, Chuchubi!
A couple of problems are here.
First video0 looks always being created under root credentials and editing of /etc/defaults/devfs.rules or /etc/devfs.rules or /etc/devfs.conf doesn't work here. Only chmod works for given session.

Second: during boot webcam first fails to start:
Starting webcamd
/libexec/libexc/ld-elf.so.1: Shared object libcuse4bsd.so.1 not found required by "webcamd"
/usr/local/etc/rc.d/webcamd: WARNING: failed to start webcamd
ELF ldconfig path: ..... /usr/local/lib ....
However
find / -name libcuse4bsd.so.1
/usr/local/lib/libcuse4bsd.so.1

Nevertheless webcamd starts later. I am on 9-current, it could be the -current problem.

Skype (tarball: skype_static-2.0.0.72-oss.tar.bz2) doesn't work yet: both video and audio.
On Linux same webcam works fine.

Chuchubi
June 23rd, 2010, 17:29
Chuchubi: Do you plan to create some PRs with the patches, so they get into the ports collection?

I would like to create the ports but I have to do a lot of reading and that may take some time. My experience with writing a port from scratch is very little at the moment. I have edited and upgraded some existing ports that were left alone by the maintainers. That is why any help is welcome. If you want to help I will send you the patches. Just let me know.

lme@
June 25th, 2010, 13:38
I would like to create the ports but I have to do a lot of reading and that may take some time. My experience with writing a port from scratch is very little at the moment. I have edited and upgraded some existing ports that were left alone by the maintainers. That is why any help is welcome. If you want to help I will send you the patches. Just let me know.

Great, just send me your patches and I'll take a look at it.

Chuchubi
June 25th, 2010, 17:53
Great, just send me your patches and I'll take a look at it.

I will send you the patches this weekend. Thanks!

lme@
June 30th, 2010, 07:54
Sorry, I haven't found the time to take a look at it... :(
You can also send them to multimedia@freebsd.org so a lot of people can see it.

sk8harddiefast
July 7th, 2010, 15:37
Hi guys :)
I finally made my camera work but is show low the resolution :(
Any way to increase resolution?

hselasky
July 11th, 2010, 22:32
Have you tried:

pwcview -s vga

--HPS

sk8harddiefast
July 11th, 2010, 23:08
Have you tried:
pwcview -s vga
Works better in higher resolution :)

kl7af
August 13th, 2010, 04:55
I am using FreeBSD version 8.1 (AMD64)

I installed V4l_compat, libv4l and webcamd.

I have checked to make sure that those software applications were installed correctly.

I have loaded webcamd_enable in /etc/rc.conf

I have also loaded the cuse4bsd in /boot/loader.conf

I have tried 3 different web cams and none of them are capable of rending streaming content.

I have looked at /var/log/messages and see no record of my device pluging in my web cam either. It does indicate or show a USB memory stick

hselasky
August 13th, 2010, 08:05
Hi,

Please dump output from:

usbconfig dump_device_desc dump_curr_config_desc

for your webcams.

--HPS

kl7af
August 13th, 2010, 19:50
# usbconfig dump_device_desc dump_curr_config_desc
ugen0.1: <OHCI root HUB ATI> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON

bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0100
bDeviceClass = 0x0009
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0000
idProduct = 0x0000
bcdDevice = 0x0100
iManufacturer = 0x0001 <ATI>
iProduct = 0x0002 <OHCI root HUB>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001


Configuration index 0

hselasky
August 14th, 2010, 08:28
Hi,

The output you've dumped is for the Root HUB. Find the similar output for your webcam device.

--HPS

Const
September 4th, 2010, 12:29
Hello.

I'm using PC-BSD 8.1 on laptop Lenovo G530. webcamd-0.1.14 is preinstalled. It detects my webcam as /dev/ugen7.2. But Skype reports the webcam is not detected and pwcview command gives me

[const@alpha] /dev# pwcview
Failed to set palette to YUV420P: Invalid argument
and usbconfig
[const@alpha] /dev# usbconfig dump_device_desc dump_curr_config_desc
ugen7.2: <Lenovo EasyCamera Image Processor> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x00ef
bDeviceSubClass = 0x0002
bDeviceProtocol = 0x0001
bMaxPacketSize0 = 0x0040
idVendor = 0x090c
idProduct = 0x3371
bcdDevice = 0x2171
iManufacturer = 0x0001 <Image Processor>
iProduct = 0x0002 <Lenovo EasyCamera>
iSerialNumber = 0x0000 <no string>
bNumConfigurations = 0x0001


Configuration index 0

bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x01b7
bNumInterfaces = 0x0002
bConfigurationValue = 0x0001
iConfiguration = 0x0000 <no string>
bmAttributes = 0x0080
bMaxPower = 0x00fa

Additional Descriptor

bLength = 0x08
bDescriptorType = 0x0b
bDescriptorSubType = 0x00
RAW dump:
0x00 | 0x08, 0x0b, 0x00, 0x02, 0x0e, 0x03, 0x00, 0x00


Interface 0
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0000
bAlternateSetting = 0x0000
bNumEndpoints = 0x0001
bInterfaceClass = 0x000e
bInterfaceSubClass = 0x0001
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>

Additional Descriptor

bLength = 0x0d
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x0d, 0x24, 0x01, 0x00, 0x01, 0x4d, 0x00, 0x80,
0x08 | 0xc3, 0xc9, 0x01, 0x01, 0x01


Additional Descriptor

bLength = 0x12
bDescriptorType = 0x24
bDescriptorSubType = 0x02
RAW dump:
0x00 | 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00,
0x08 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
0x10 | 0x00, 0x00


Additional Descriptor

bLength = 0x1a
bDescriptorType = 0x24
bDescriptorSubType = 0x06
RAW dump:
0x00 | 0x1a, 0x24, 0x06, 0x02, 0x92, 0x42, 0x39, 0x46,
0x08 | 0xd1, 0x0c, 0xe3, 0x4a, 0x87, 0x83, 0x31, 0x33,
0x10 | 0xf9, 0xea, 0xaa, 0x3b, 0x03, 0x01, 0x01, 0x01,
0x18 | 0xff, 0x00


Additional Descriptor

bLength = 0x0b
bDescriptorType = 0x24
bDescriptorSubType = 0x05
RAW dump:
0x00 | 0x0b, 0x24, 0x05, 0x03, 0x02, 0x00, 0x00, 0x02,
0x08 | 0x7f, 0x17, 0x00


Additional Descriptor

bLength = 0x09
bDescriptorType = 0x24
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x09, 0x24, 0x03, 0x04, 0x01, 0x01, 0x00, 0x03,
0x08 | 0x00

Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0083 <IN>
bmAttributes = 0x0003 <INTERRUPT>
wMaxPacketSize = 0x0008
bInterval = 0x0010
bRefresh = 0x0000
bSynchAddress = 0x0000

Additional Descriptor

bLength = 0x05
bDescriptorType = 0x25
bDescriptorSubType = 0x03
RAW dump:
0x00 | 0x05, 0x25, 0x03, 0x08, 0x00



Interface 1
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0000
bNumEndpoints = 0x0000
bInterfaceClass = 0x000e
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>

Additional Descriptor

bLength = 0x0e
bDescriptorType = 0x24
bDescriptorSubType = 0x01
RAW dump:
0x00 | 0x0e, 0x24, 0x01, 0x01, 0xfb, 0x00, 0x81, 0x00,
0x08 | 0x04, 0x01, 0x00, 0x00, 0x01, 0x00


Additional Descriptor

bLength = 0x1b
bDescriptorType = 0x24
bDescriptorSubType = 0x04
RAW dump:
0x00 | 0x1b, 0x24, 0x04, 0x01, 0x05, 0x59, 0x55, 0x59,
0x08 | 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00,
0x10 | 0xaa, 0x00, 0x38, 0x9b, 0x71, 0x10, 0x01, 0x00,
0x18 | 0x00, 0x00, 0x00


Additional Descriptor

bLength = 0x2a
bDescriptorType = 0x24
bDescriptorSubType = 0x05
RAW dump:
0x00 | 0x2a, 0x24, 0x05, 0x01, 0x01, 0x80, 0x02, 0xe0,
0x08 | 0x01, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d,
0x10 | 0x00, 0x00, 0x60, 0x09, 0x00, 0x9a, 0x5b, 0x06,
0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c,
0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c,
0x28 | 0x0a, 0x00


Additional Descriptor

bLength = 0x2a
bDescriptorType = 0x24
bDescriptorSubType = 0x05
RAW dump:
0x00 | 0x2a, 0x24, 0x05, 0x02, 0x01, 0x60, 0x01, 0x20,
0x08 | 0x01, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d,
0x10 | 0x00, 0x00, 0x18, 0x03, 0x00, 0x9a, 0x5b, 0x06,
0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c,
0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c,
0x28 | 0x0a, 0x00


Additional Descriptor

bLength = 0x2a
bDescriptorType = 0x24
bDescriptorSubType = 0x05
RAW dump:
0x00 | 0x2a, 0x24, 0x05, 0x03, 0x01, 0x40, 0x01, 0xf0,
0x08 | 0x00, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d,
0x10 | 0x00, 0x00, 0x58, 0x02, 0x00, 0x9a, 0x5b, 0x06,
0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c,
0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c,
0x28 | 0x0a, 0x00


Additional Descriptor

bLength = 0x2a
bDescriptorType = 0x24
bDescriptorSubType = 0x05
RAW dump:
0x00 | 0x2a, 0x24, 0x05, 0x04, 0x01, 0xb0, 0x00, 0x90,
0x08 | 0x00, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d,
0x10 | 0x00, 0x00, 0xc6, 0x00, 0x00, 0x9a, 0x5b, 0x06,
0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c,
0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c,
0x28 | 0x0a, 0x00


Additional Descriptor

bLength = 0x2a
bDescriptorType = 0x24
bDescriptorSubType = 0x05
RAW dump:
0x00 | 0x2a, 0x24, 0x05, 0x05, 0x01, 0xa0, 0x00, 0x78,
0x08 | 0x00, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d,
0x10 | 0x00, 0x00, 0x96, 0x00, 0x00, 0x9a, 0x5b, 0x06,
0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c,
0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c,
0x28 | 0x0a, 0x00



Interface 1 Alt 1
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0001
bNumEndpoints = 0x0001
bInterfaceClass = 0x000e
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>

Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0081 <IN>
bmAttributes = 0x0005 <ASYNC-ISOCHRONOUS>
wMaxPacketSize = 0x1400
bInterval = 0x0001
bRefresh = 0x0000
bSynchAddress = 0x0000


Interface 1 Alt 2
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0002
bNumEndpoints = 0x0001
bInterfaceClass = 0x000e
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>

Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0081 <IN>
bmAttributes = 0x0005 <ASYNC-ISOCHRONOUS>
wMaxPacketSize = 0x1340
bInterval = 0x0001
bRefresh = 0x0000
bSynchAddress = 0x0000


Interface 1 Alt 3
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0003
bNumEndpoints = 0x0001
bInterfaceClass = 0x000e
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>

Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0081 <IN>
bmAttributes = 0x0005 <ASYNC-ISOCHRONOUS>
wMaxPacketSize = 0x1300
bInterval = 0x0001
bRefresh = 0x0000
bSynchAddress = 0x0000


Interface 1 Alt 4
bLength = 0x0009
bDescriptorType = 0x0004
bInterfaceNumber = 0x0001
bAlternateSetting = 0x0004
bNumEndpoints = 0x0001
bInterfaceClass = 0x000e
bInterfaceSubClass = 0x0002
bInterfaceProtocol = 0x0000
iInterface = 0x0000 <no string>

Endpoint 0
bLength = 0x0007
bDescriptorType = 0x0005
bEndpointAddress = 0x0081 <IN>
bmAttributes = 0x0005 <ASYNC-ISOCHRONOUS>
wMaxPacketSize = 0x12c0
bInterval = 0x0001
bRefresh = 0x0000
bSynchAddress = 0x0000
What does this error mean and is it possible to make this webcam work?

Thank you.

hselasky
September 8th, 2010, 18:36
Hi,

There will soon be a new version of webcamd uploaded to ports. Maybe you can try that, webcamd-0.1.16.

--HPS

hselasky
September 8th, 2010, 18:37
The USB descriptors look OK. Your Webcam appears to be using the USB video class.

--HPS

pkubaj
September 14th, 2010, 13:45
I installed webcamd, loaded cuse4bsd module. My webcam is ugen7.2. However when I run webcamd -d ugen7.2 -i 0 -v 0 it displays

Attached ugen7.2[0] to cuse unit 0
Creating /dev/video0

and stops at it. The video0 device in /dev is created, but after waiting for an hour for webcamd to finish, I just stopped it with CTRL+C. Is there something wrong, or my camera is unsupported? I have Logitech C310, it's UVC-enabled, works on Debian stable OOTB.

hselasky
September 15th, 2010, 07:57
Hi,

You started webcamd in foreground mode. Use -B option.

--HPS

pkubaj
September 18th, 2010, 22:49
Thanks, works now.

SIFE
October 22nd, 2010, 20:54
I am confused, witch driver's I have to load, pwc and cuse4bsd, only pwc, webcamd and cuse4bsd?
Mr zeiz, I will upload a tarball for both linux compat and skype, the sound work perfect for me and I am working on to make video work, just be patient.

SIFE
October 22nd, 2010, 21:23
Now I understand, loading pwc doesn't work with my webcam so switch to webcamd, /dev/video0 is appear but when open it I get green screen, any suggestions.

Webcam set to: 640x480 (vga) at 5 fps
Warning short read, got only 18349 of 460800 bytes
.
.
.
Warning short read, got only 19101 of 460800 bytes
^CError reading from webcam: Device not configured

darcsis
October 24th, 2010, 11:25
I suggest that you use a lower resolution for pwcview to work properly. It seems pwcview can't handle too many resolutions. For cheese, things get better.

SIFE
October 24th, 2010, 21:22
How to do it? I tried
pwcview -s vga
but it doesn't work.

alie
November 1st, 2010, 15:33
Is this for USB camera only ?

hselasky
November 2nd, 2010, 08:41
Yes, it is currently for USB cameras only.

neckro
January 14th, 2011, 07:40
Yes, it is currently for USB cameras only.

Hi, i have a PCI saa7134 card. How can i make it working ?
Thank you.

Fiuz
March 23rd, 2011, 20:55
Hello everyone.
I am trying to get a Logitech C160 webcam working on webcamd, to use it with motion software, but I smell unsupported hardware.

I have also the hunch that webcamd won't work on usb 2.0 ports ( I have no 1.1 ports on the box... dang ).

Said webcam is UVC-supported as in this page of the Logitech support forums ( http://logitech-en-amr.custhelp.com/app/answers/detail/a_id/6471 ) so I guess it should be supported by webcamd.
After I did everything that has been suggested in this thread, I still can't get it working.

anyway, the box is headless, so pwcview -h:
pwcview -h
yields
Failed to set palette to YUV420P: Invalid argument
so I tried with a lower res:
pwcview -s sqcif -h
but:
Failed to set palette to YUV420P: Invalid argument

usbconfig dump_device_desc dump_curr_config_desc
ugen2.2: <product 0x0824 vendor 0x046d> at usbus2, 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 = 0x0824
bcdDevice = 0x0010
iManufacturer = 0x0000 <no string>
iProduct = 0x0000 <no string>
iSerialNumber = 0x0002 <340253A0>
bNumConfigurations = 0x0001

So it's definitely a video device.
I could not find a list of supported hardware with webcamd. Anyway motion says:

motion: [1] v4l_start: set input [8]
motion: [1] Retrying until successful connection with camera


webcamd -d ugen2.2 -i 0 -v 0 -B
Attached ugen2.2[0] to cuse unit 0
Creating /dev/video0


ls -l /dev/video0
crw-rw-rw- 1 root operator 0, 85 Mar 23 20:49 /dev/video0


ls /var/db/pkg | grep v4l
libv4l-0.8.1
v4l_compat-1.0.20101027_1



Any ideas? I guess my cam is not supported.

Thanks in advance to everyone.

adamk
March 23rd, 2011, 21:16
Unfortunately, I can't offer much in the way of advice. I do have a uvc webcam. webcamd does allow me to use some applications (mplayer, vlc, emesene) but, even so, motion errors out for me :-)

Adam

Fiuz
March 23rd, 2011, 22:46
I'll try to build motion as described in their wiki ( http://www.lavrsen.dk/foswiki/bin/view/Motion/FreeBSD ) with pwc support, crossing my fingers. Have to clean up after all the mess I made with webcamd tho :)
Thanks anyway.

Fiuz
March 23rd, 2011, 23:45
Update: I managed to re-install and re-compile motion with pwc support, re-compile pwc to the latest version, but I still can't figure why I have no /dev/video0. Driver is loaded correctly, and when I plug/unplug the webcam, dmesg reports:

ugen2.2: <vendor 0x046d> at usbus2 (disconnected)
ugen2.2: <vendor 0x046d> at usbus2

The system sees the hardware. At least it's something :) I want to try to create /dev/video0 manually since motion's log says that it can't access the device file.

mknod /dev/video0 c 81 0 root:wheel
returns
mknod: /dev/video0: No such file or directory
The man page says that mknod is deprecated since 6.0, what should I use to create manually the device? Devfs?

adamk
March 24th, 2011, 00:40
According to your first post, you do have a /dev/video0. It's created when webcamd attaches to the device.

Adam

Fiuz
March 24th, 2011, 09:10
Thanks for your reply, adamk.

I maybe am not clear with my post above, but since I have uninstalled webcamd in order to try with pwc/motion-with-pwc support, my /dev/video0 has disappeared. I need to recreate it.
Sorry for the misunderstanding.


ls /dev/
acpi console klog sysmouse ttyvd
ad0 consolectl kmem ttyu0 ttyve
ad0s1 ctty log ttyu0.init ttyvf
ad0s1a cuau0 lpt0 ttyu0.lock ufsid
ad0s1b cuau0.init lpt0.ctl ttyv0 ugen0.1
ad0s1d cuau0.lock mdctl ttyv1 ugen1.1
ad0s1e dcons mem ttyv2 ugen2.1
ad0s1f devctl nfslock ttyv3 ugen2.2
ad2 devstat null ttyv4 urandom
ad2s1 dgdb pci ttyv5 usb
ad2s1d fd ppi0 ttyv6 usbctl
agpgart fido ptmx ttyv7 xpt0
ata geom.ctl pts ttyv8 zero
atkbd0 io random ttyv9
audit kbd0 stderr ttyva
bpf kbd1 stdin ttyvb
bpf0 kbdmux0 stdout ttyvc

okeeblow
April 11th, 2011, 04:48
I did the same thing and was able to re-create it by running webcamd manually.


[root@Emi#/dev]webcamd -d ugen3.2 -i 0 -v 0
Attached ugen3.2[0] to cuse unit 0
Creating /dev/video0


My camera works fine in pwcview, but Cheese reports no device found. Its docs suggest testing the webcam in gstreamer-properties, but it also works fine there as the default v4l2 device.

Skype and Flash can't see a camera device either, but I'm not sure that works for anybody.

hselasky
April 11th, 2011, 08:37
Hi,

Use the -H option to register with HAL which is needed by some applications.

--HPS

nox@
April 12th, 2011, 19:23
[...]
Skype and Flash can't see a camera device either, but I'm not sure that works for anybody.

I have just posted patches that add V4L2 (and DVB) support to the Linuxolator which got webcam video working in Skype at least for one guy. :) Here is my mailing list post with details:
http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-April/011888.html

nox@
April 13th, 2011, 20:45
I have just posted patches that add V4L2 (and DVB) support to the Linuxolator which got webcam video working in Skype at least for one guy. :) Here is my mailing list post with details:
http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-April/011888.html
Updated the patches at the same place, now they also work for amd64 hosts:
http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-April/011897.html
(Also has details how to get webcams working that don't support YUV video like the one I tested here.)

A few clarifications:

- The skype version tested was the one from the net/skype port, newer ones still need other patches: http://markmail.org/message/yilswgpnur4zawne

- To install Linux rpms (libv4l) see "Installing a Random Linux RPM Based Application" in the handbook: http://www.freebsd.org/doc/handbook/linuxemu-lbc-install.html

- You may need to restart skype after enabling video support.

- You may need to adjust device permissions in /etc/devfs.rules for /dev/video*.

And I just found my cam now works in flash too: http://www.testmycam.com/

adamk
April 14th, 2011, 02:26
I can report success here with a uvc webcam on 9.0-CURRENT amd64! Skype and flash :-) I never thought I'd see this day :-) Thanks for all your great work.

adamk
April 14th, 2011, 11:49
Unfortunately I'm having less luck with an older gspca webcam. skype crashes when I enable test the webcam, and flash just hangs up entirely. The v4l rpm is installed. Let me know if there is anything I can do to help debug this.

EDIT:

I tried the flash site again, and this time it worked. skype (from net/skype) still crashes, though. I am setting XLIB_SKIP_ARGB_VISUALS=1 as per your directions.

nox@
April 14th, 2011, 13:29
Unfortunately I'm having less luck with an older gspca webcam. skype crashes when I enable test the webcam, and flash just hangs up entirely. The v4l rpm is installed. Let me know if there is anything I can do to help debug this.

Sounds like your camera (like mine which is also a gspca) doesn't support YUV video ootb, did you LD_PRELOAD the v4l2convert.so as mentioned in the thread I linked? Example: (bourne shell)
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so /usr/local/share/skype/skype --resources=/usr/local/share/skype

And btw bsam@ now posted a port for the Linux libv4l that I just tested and I guess he will commit soon: http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-April/011912.html

adamk
April 14th, 2011, 13:48
Ahhh, the LD_PRELOAD did it. I had tried setting LD_PRELOAD to /compat/linux/usr/lib/libv4l/v4l2convert.so

You rock :-)

Adam

Chuchubi
April 18th, 2011, 23:57
Updated the patches at the same place, now they also work for amd64 hosts:
http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-April/011897.html
(Also has details how to get webcams working that don't support YUV video like the one I tested here.)

A few clarifications:

- The skype version tested was the one from the net/skype port, newer ones still need other patches: http://markmail.org/message/yilswgpnur4zawne

- To install Linux rpms (libv4l) see "Installing a Random Linux RPM Based Application" in the handbook: http://www.freebsd.org/doc/handbook/linuxemu-lbc-install.html

- You may need to restart skype after enabling video support.

- You may need to adjust device permissions in /etc/devfs.rules for /dev/video*.

And I just found my cam now works in flash too: http://www.testmycam.com/

I can confirm that your patches work. The video in skype is working en wxcam en guvcview are still working. I had to tweak the patched /usr/src/sys/compat/linux/linux_ioctl.c on my system ( 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #17 r209545M ).

Many thanks!!!!!

dusty_fox
April 21st, 2011, 07:21
Would it be possible to get this patch to work with 8.2?

bbzz
April 21st, 2011, 23:18
Nevermind! Works now! Many thanks. Wow great work.

bbzz
April 22nd, 2011, 15:36
For some reason it compiles on amd64 while it doesn't on i386. I applied patches to files in /usr/src/.. added files to /usr/src/sys/compat/linux/, but I get this error when compiling kernel on i386:

cc1: warnings being treated as errors
/usr/src/sys/modules/ksyms/../../dev/ksyms/ksyms.c: In function 'ksyms_open':
/usr/src/sys/modules/ksyms/../../dev/ksyms/ksyms.c:431: warning: implicit declaration of function 'copyout_map'
/usr/src/sys/modules/ksyms/../../dev/ksyms/ksyms.c:431: warning: nested extern declaration of 'copyout_map'
/usr/src/sys/modules/ksyms/../../dev/ksyms/ksyms.c:444: warning: implicit declaration of function 'copyout_unmap'
/usr/src/sys/modules/ksyms/../../dev/ksyms/ksyms.c:444: warning: nested extern declaration of 'copyout_unmap'
*** Error code 1

Stop in /usr/src/sys/modules/ksyms.
*** Error code 1

Stop in /usr/src/sys/modules.
*** Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.


Am I missing something? I did same thing on my amd64 but it works.

nox@
April 22nd, 2011, 16:32
For some reason it compiles on amd64 while it doesn't on i386. I applied patches to files in /usr/src/.. added files to /usr/src/sys/compat/linux/, but I get this error when compiling kernel on i386:

cc1: warnings being treated as errors
/usr/src/sys/modules/ksyms/../../dev/ksyms/ksyms.c: In function 'ksyms_open':
/usr/src/sys/modules/ksyms/../../dev/ksyms/ksyms.c:431: warning: implicit declaration of function 'copyout_map'
[...]


Am I missing something? I did same thing on my amd64 but it works.

Maybe you use a different FreeBSD version/date of checkout on that box? Anyway, copyout_map() etc are only used by the DVB part of the patches which I now separated out into a port and fixed this issue in (separated because of LGPL in Linux DVB header files that I used parts of and got no reply about when emailing the author of those parts); I posted about the new patches here: http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-April/011992.html

And as mentioned in that posting I'm also trying to collect data about the latest skype beta where video doesn't work at least for me.

bbzz
April 22nd, 2011, 20:25
Tried again to D/L sources and patch/compile, now it works. Hmm...must've followed wrong link on mailing list. Again, great job. I'll try to run latest skype version and see what happens.
The camera that now works is Logitech QuickCam Communicate (V-UBK45).

nox@
April 24th, 2011, 16:20
Would it be possible to get this patch to work with 8.2?

I think the current version of the patch as well as the DVB wrapper port "should" work on 8.2, just give it a try. :)

Link to the mailing list post again: http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-April/011992.html

And I also made yet other versions that use the V4L2 header from Linux 2.6.17 which doesn't seem to make a difference for Skype and Flash at least for my camera: http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-April/012005.html

(And I'm still trying to collect data and webcamd logs for the latest skype as also mentioned in that post.)

lockdoc
May 1st, 2011, 18:58
Hi everybody,

I currently still have problems getting skype to work.
In skype I get a green screen instead of the video. Other programs like mplayer accept my cams.

My Sytem is i386 FreeBSD-9-current with latest ports and kernel module loaded


kldstat
Id Refs Address Size Name
1 36 0xc0400000 82e77c kernel
2 2 0xc0c2f000 2f090 linux.ko
3 1 0xc0c5f000 1ceb4 if_bwi.ko
4 1 0xc0c7c000 1b440 snd_hda.ko
5 2 0xc0c98000 57920 sound.ko
6 1 0xc0cf0000 1a150 bwi_v3_ucode.ko
8 1 0xc4fb3000 8000 linprocfs.ko
9 1 0xc4fc3000 b000 ntfs.ko
10 1 0xc56eb000 9000 i915.ko
11 1 0xc56f4000 15000 drm.ko
12 1 0xc9286000 4000 cuse4bsd.ko



user> ls /var/db/pkg | grep v4l
gstreamer-plugins-v4l2-0.10.27,3/
libv4l-0.8.1/
v4l_compat-1.0.20101027_1/

user> pkg_version -v | grep linux_base
linux_base-f10-10_4 = up-to-date with port


I have been testing with two different webcams

ugen4.2: <vendor 0x046d> at usbus4 # this is a Logitech C500
ugen3.2: <CRrative Labs> at usbus3 # i cannot find what creative model this is




I start webcamd with the -B switch, otherwise it will suddenly go up to 100% cpu

webcamd -d ugen4.2 -i 0 -v 0 -B





I tried those 3 Skype Version

2.0.0.72-oss (old one from the ports)
2.1.0.81
2.2.0.25


with this command

LD_PRELOAD=/compat/linux/usr/lib/libv4l/v4l2convert.so /path/to/skype --resources=/path/to/skype



When I hit the "Test" webcam button in skype, the console puts out this

Starting the process...
Skype Xv: Xv ports available: 17
Skype XShm: XShm support enabled
Skype Xv: Using Xv port 73



So right now I am more or less lost on what to do next.

Anything else I could check or modify in the settings?

nox@
May 3rd, 2011, 11:18
Hi everybody,

I currently still have problems getting skype to work.
In skype I get a green screen instead of the video. Other programs like mplayer accept my cams.

My Sytem is i386 FreeBSD-9-current with latest ports and kernel module loaded
[...]
Anything else I could check or modify in the settings?

Just to make sure, you did apply the Linuxolator V4L2 patch, rebuilt, and reloaded linux.ko?

nox@
May 3rd, 2011, 23:13
I think the current version of the patch as well as the DVB wrapper port "should" work on 8.2, just give it a try. :)

I was wrong, new mailing list post with Q&D patches for 8.2 and more detailed notes about how to get Skype 2.1.0.81 working:
http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-May/012080.html

Chuchubi
May 4th, 2011, 01:02
I was wrong, new mailing list post with Q&D patches for 8.2 and more detailed notes about how to get Skype 2.1.0.81 working:
http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-May/012080.html

My FreeBSD version is (8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #21 r209545M). The patches for the audio worked and now the mic on my logitec webcam record the sound in skype_static-2.1.0.81. With the video and audio working this version is usable. Many thanks!

Skype_static-2.2.0.25 has all the audio working but not the video. I am sure this will be fixed!

lockdoc
May 4th, 2011, 07:22
Just to make sure, you did apply the Linuxolator V4L2 patch, rebuilt, and reloaded linux.ko?

Which one of them should I use:

http://people.freebsd.org/~ae/v4l2.diff
http://people.freebsd.org/~nox/dvb/linux-dvb-v4l2-test.patch
http://people.freebsd.org/~nox/dvb/linux-dvb-v4l2-test-split.patch


Is there a way only to rebuild the linux.ko without having to recompile the kernel?

nox@
May 4th, 2011, 19:38
Which one of them should I use:

http://people.freebsd.org/~ae/v4l2.diff
http://people.freebsd.org/~nox/dvb/linux-dvb-v4l2-test.patch
http://people.freebsd.org/~nox/dvb/linux-dvb-v4l2-test-split.patch

Turns out Alexander committed the patches to -current now (r221426), so since you run that you just need to update your /usr/src.

Is there a way only to rebuild the linux.ko without having to recompile the kernel?
Well there may be other unrelated changes that may require a kernel rebuild anyway, but in general you should be able to just cd to /usr/src/sys/modules/linux and run:
make DEBUG_FLAGS=-g install
(The same goes for /usr/src/sys/modules/sound/sound after applying the one-line sound.ko patch which has been committed as r221388.)

nox@
May 8th, 2011, 17:30
Hi!

I now turned my Linuxolator V4L2 patches into a port: multimedia/linux_v4l2wrapper-kmod

So now people not running -current no longer have to find the right patch to apply to their 8-stable or release and rebuild their linux.ko, just install this port and do:kldload linux_v4l2wrapper
Thanx to Andrey V. Elsukov for turning my patches into a separate kld like I already did with the Linuxolator DVB patches: multimedia/linux_dvbwrapper-kmod

lockdoc
May 11th, 2011, 16:05
Thanks, it is working with the linux_V4l2wrapper.

One more question. If it would also work by just fetching the latest source and re-compiling the kernel, why is the need for a kernel module? Just curious because I try to have as less modules loaded as possible xD

nox@
May 22nd, 2011, 17:21
Thanks, it is working with the linux_V4l2wrapper.

One more question. If it would also work by just fetching the latest source and re-compiling the kernel, why is the need for a kernel module? Just curious because I try to have as less modules loaded as possible xD

(Sorry for the late reply.)

The module port is only for people that don't want to upgrade to -current or manually apply my V4L2 patch. (or upgrade to -stable once the patch has been merged there.)

zeissoctopus
May 24th, 2011, 05:10
I suggest make a new ports of FarSight's libmimic (http://sourceforge.net/projects/farsight/files/libmimic/libmimic-1.0.4/) and then modify any instant messager in ports tree, which supports webcamd, to link with libmimic.

lockdoc
May 24th, 2011, 15:43
@zeissoctopus

Please read here, I got a working webcam with libmimic in emesene
http://forums.freebsd.org/showthread.php?t=15724&highlight=amsn

Edit:
Currently webcam converesations are not possible on at least aMSN, due to microsoft having blocked access to their SIP servers. (Please read the link above I posted, there is the original quote)

densan
February 11th, 2012, 09:30
Does not work camserv.
uname -v
FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:15:25 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
pkg_info | grep webcam
pwcview-1.4.1_3 The Video4Linux PWC webcam viewer
webcamd-3.2.0.2 A port of Linux USB webcam and DVB drivers into userspace
pwcview -h -s vga -c 1 -o foo.jpg
Webcam set to: 640x480 (vga) at 5 fps
Camera work.
pkg_info |grep camserv
camserv-0.5.1_15,1 Camserv is a free program to do streaming video via the web

cat /usr/local/share/camserv/camserv.cfg | grep -v '^#' | sed '/^$/d'
[video_basic]
path /usr/local/lib/camserv/libvideo_basic.so.0
[video_v4l_qcam]
path /usr/local/lib/camserv/libvideo_v4l.so.0
device_path /dev/video0
color 30000
hue 30000
contrast 30000
brightness 30000
whiteness 30000
autobright 0
[jpg_filter]
path /usr/local/lib/camserv/libjpg_filter.so.0
quality 30
[hello_world_banner]
path /usr/local/lib/camserv/libtext_filter.so.0
text Hello World
bg #000000
fg #ffffff
x 0
y 0
mangle 0
fontname 6x11
[time_stamp]
path /usr/local/lib/camserv/libtext_filter.so.0
text Time: %X
bg #000000
fg #ffffff
x 0
y 11
mangle 1
fontname 8x8
[static_filter]
path /usr/local/lib/camserv/librand_filter.so.0
num_perline 20
coloredpix 0
[socket]
listen_port 9192
max_frames 0
max_bytes 0
max_seconds 0
[filters]
num_filters 2
filter0_section time_stamp
filter1_section jpg_filter
[video]
video_section video_v4l_qcam
width 320
height 240
maxfps 0
memhack 1
[main]

camserv
camserv v0.5.1 - by Jon Travis (jtravis@p00p.org)
Syntax: camserv <cfg file>
Will try /root/.camserv and /usr/local/share/camserv/camserv.cfg
2012-02-11 12:29:24 [main] Trying to read config file "/root/.camserv":
2012-02-11 12:29:24 [main] Error reading config "/root/.camserv": No such file or directory
2012-02-11 12:29:24 [main] Trying to read config file "/usr/local/share/camserv/camserv.cfg":
2012-02-11 12:29:24 [main] Success reading config "/usr/local/share/camserv/camserv.cfg"
2012-02-11 12:29:24 [camconfig] Using default of "2359296" for [main]:shm_alloc
2012-02-11 12:29:24 [mainloop] Setup signals
2012-02-11 12:29:24 [video] file not found
2012-02-11 12:29:24 [video] Error opening video driver; "/usr/local/lib/camserv/libvideo_v4l.so.0 "
2012-02-11 12:29:24 [picloop] Error opening video device!
2012-02-11 12:29:24 [main] Picture taker could not be created!

ll /usr/local/lib/camserv/libvideo_v4l.so.0
-rwxr-xr-x 1 root wheel 16531 11 фев 11:14 /usr/local/lib/camserv/libvideo_v4l.so.0
ll /dev/video0
crw-rw-rw- 1 webcamd webcamd 0, 95 10 фев 14:07 /dev/video0

Chuchubi
February 14th, 2012, 03:22
Hi, I think you use the port version. This version only use the bktr driver. If you want to use the version that will work with webcamd you will need a patched version. You could try:

http://www.rockafunk.org/patches_and_includes.tar.gz

This file include a lot of patches including Camserv. I hope this helps.

densan
February 18th, 2012, 09:32
Hi.

fetch http://www.rockafunk.org/patches_and_includes.tar.gz
tar xvf patches_and_includes.tar.gz
rm -R /usr/ports/multimedia/camserv/
cp -r patches_and_includes/camserv /usr/ports/multimedia/
cd /usr/ports/multimedia/camserv/
make
===> camserv-0.5.1_7,1 Bad autotool stanza: autoconf:262 libltdl:22 libtool:22.
*** Error code 1
ee Makefile
USE_AUTOTOOLS= autoconf libtool libltdl
make && make install
...
cd /usr/local/share/camserv/
cp camserv.cfg.dist cp camserv.cfg.dist
edit camserv.cfg
cat /usr/local/share/camserv/camserv.cfg | grep -v '^#' | sed '/^$/d'
[video_basic]
path /usr/local/lib/camserv/libvideo_basic.so.0
[video_v4l_qcam]
path /usr/local/lib/camserv/libvideo_v4l.so.0
device_path /dev/video0
color 30000
hue 30000
contrast 30000
brightness 30000
whiteness 30000
autobright 0
[socket]
listen_port 9192
max_frames 0
max_bytes 0
max_seconds 0
[video]
video_section video_v4l_qcam
width 320
height 240
maxfps 5
memhack 1
[main]


camserv
camserv v0.5.1 - by Jon Travis (jtravis@p00p.org)
Syntax: camserv <cfg file>
Will try /root/.camserv and /usr/local/share/camserv/camserv.cfg
2012-02-18 12:32:55 [main] Trying to read config file "/root/.camserv":
2012-02-18 12:32:55 [main] Error reading config "/root/.camserv": No such file or directory
2012-02-18 12:32:55 [main] Trying to read config file "/usr/local/share/camserv/camserv.cfg":
2012-02-18 12:32:55 [main] Success reading config "/usr/local/share/camserv/camserv.cfg"
2012-02-18 12:32:55 [camconfig] Using default of "2359296" for [main]:shm_alloc
2012-02-18 12:32:55 [mainloop] Setup signals
(V4L) GCAP && GWIN: Invalid argument
2012-02-18 12:32:55 [picloop] Failed to initialize video device!
2012-02-18 12:32:55 [main] Picture taker could not be created!

Chuchubi
February 20th, 2012, 18:49
Camserv is a v4l1 program. If you have a uvc webcam you may have to start camserv like this:

LD_PRELOAD=/usr/local/lib/libv4l/v4l1compat.so camserv

Also you could try my configuration files.

wget http://www.rockafunk.org/camserv.tar.gz

Extract camserv.tar.gz and copy the directory to /usr/local/share.

cp -R camserv /usr/local/share/

In my configuration I have a little picture and some text. If you study camserv.cfg you can put your own picture and text there.

Good luck.

Chuchubi
February 20th, 2012, 19:01
@densan

Let me know if you succeed.

qsecofr
February 20th, 2012, 20:38
Quick recap now that there is a port obviating the need for some manual patches?

We need to install:
multimedia/cuse4bsd-kmod
multimedia/linux_v4l2wrapper-kmod
multimedia/webcamd (or the pwc driver depending on hardware)
multimedia/pwcview

Given the v4l2wrapper do we still need to install:
multimedia/libv4l and
multimedia/v4l_compat

densan
February 21st, 2012, 07:39
Thank you very much for your help. It worked.
My mistake is that I turned in my config

[filters]
num_filters a
filter0_section jpg_filter

debguy
March 4th, 2012, 15:04
But only for v4l1? Is that Intel or from China? Intel has the patent for video chips. I'm sure they have drivers to share they give them to Microsoft users frequently enough :) Linux has at least one driver.

You're talking cpio - it's easy to make a unix device for a stream. Then just cat /dev/cam1 >> socket_dumping_to_bitblit_to_video_card.

It's not rocket science. Likely this or that "cam" has other features (i.e., still frame, maybe even IP encoding) if you're getting the signal through yet another Intel chip. Most devices do this.

Anyhow call Intel and complain. It is their technology and they print on their Texas presses all camera chips. It's just an alteration dac chip. Still not amazing really.

debguy
March 4th, 2012, 15:11
OH i'm sorry I though chuchu did not say he offered new software only working with one break. He's trying to get it to work !!

Chuchu? These days I think people are logging in changing things so you continually have to jump through hoops of fixing what had already been working (ie, they make changes that aren't needed but break things). I'm sure some microsoft people have logged in to damage unix.

You might try getting the source and compiling. Often that installs itself correctly when "all else is broken".

debguy
March 4th, 2012, 15:28
Sorry I'm having difficulties with forum posting and was not paying attention and did stick my foot in my mouth.

I had said before Intel / Texas has patent for camera chips and makes them. Complain to Intel if you need a driver. They sure bend over to help Microsoft with them :)

If you don't have a driver that works there's a reason.

Using linux drivers ? Yea. But there is where things "seem to change around" allot.

You might need to get deeper in - run as loadable module that you can debug while you use it - put your own code in that prints what works / does not.

MAKE SURE THE BEEF WORKS - the IRQ/DMA/INP commands that talk to the camera. You might try it manually.

Another NOT SMALL detail. They keep changing the codes in the chips to "new versions". This causes drivers to fail.

Who always seems to have the drivers? Microsoft (and, hardly, sometimes Apple)

debguy
March 4th, 2012, 15:36
damn how do I delete a post?

sk8harddiefast
March 4th, 2012, 16:41
damn how do I delete a post?
Edit-Go advanced

0