libv4l provides a thin abstraction layer that does 2 things, 1. converts v4l1 applications to work with v4l2 devices, 2. for v4l2 devices with strange (proprietary) formats, converts them into something useable (i.e. Bayer -> RGB) Reproducible: Always Steps to Reproduce: http://fedoraproject.org/wiki/Features/BetterWebcamSupport http://linuxtv.org/v4lwiki/index.php/Libv4l_Progress
Created attachment 167365 [details, diff] libv4l-0.5.0 ebuild I've placed this in media-libs/libv4l
Created attachment 167366 [details] libv4l-0.5.0 ebuild whacked eutils, not necessary
without this and all application patches we're losing webcam support for all users with gspca driver need. Please prioritize and include in the tree. Fedora already support most of it, 32 and 64 bit too. http://fedoraproject.org/wiki/Features/BetterWebcamSupport
Created attachment 168510 [details] libv4l-0.5.1.ebuild Updated ebuild. Supports amd64 and multilib, and respects user CFLAGS. Also: this package *needs* to be added to the tree soon. This library is required for webcams that use the 2.6.27 kernel's gspca driver (i.e. most USB webcams in existence).
Comment on attachment 167366 [details] libv4l-0.5.0 ebuild obsoleted by 0.5.1 ebuild
Created attachment 168854 [details] improved ebuild Ebuild improved with the advice of people in #gentoo-sunrise
now in the tree, thanks everyone!
how to use it with skype in a 64bit environment? seems not working... LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so skype ERROR: ld.so: object '/usr/lib64/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored. file /usr/lib64/libv4l/v4l1compat.so /usr/lib64/libv4l/v4l1compat.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped LD_PRELOAD=/usr/lib64/libv4l/v4l2compat.so skype ERROR: ld.so: object '/usr/lib64/libv4l/v4l2compat.so' from LD_PRELOAD cannot be preloaded: ignored. ERROR: ld.so: object '/usr/lib64/libv4l/v4l2compat.so' from LD_PRELOAD cannot be preloaded: ignored.
It will not work because you're using a 32 bit precompiled binary, and libv4l libraries are built for 64 bit. You'd need 32 bit compatibility libraries. You can however persuade the skype people to either release a 64 bit binary or to upgrade the program for newer kernels (adding support for libv4l). In either case, it's not gentoo's fault.
i suspected it :) what if we add th emul package too?
Created attachment 169004 [details] skype-compatible ebuild Patrizio: good point, I forgot about 32-bit binary apps like flash and skype. Here is an ebuild that will build both 32-bit and 64-bit compatibility libraries on amd64. To use the 32-bit library with skype, you will need to edit the /usr/bin/skype file and add export LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so before the "exec" line.
doesn't work... LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype ERROR: ld.so: object '/usr/lib32/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored. file /usr/lib32/libv4l/v4l1compat.so /usr/lib32/libv4l/v4l1compat.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
(In reply to comment #12) Read what I said again. You must edit /usr/bin/skype with a text editor and add the line export LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so somewhere before the "exec" line. If you simply try to run 'LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype', of course it will not work, because /usr/bin/skype is actually a bash script, and your bash is 64-bit, so it won't accept 32-bit preloads.
you're right :) but i notice quality is so low, compared to old driver....even tweaking colors...lots of noise...
doing the 63->32 bit trick with libv4l-0.5.3, I have a 'floating point execption' when starting skype. dmesg says : m5602-s5k83a/m5602_v4l2.c: BisonCam on /dev/video0 opened compat_ioctl32: v4l2 ioctl VIDIOC_ENUM_FRAMESIZES, dir=rw (0xc02c564a) ioctl32(skype:11264): Unknown cmd fd(9) cmd(c02c564a){t:'V';sz:44} arg(f69f1b88) on /dev/v4l/video0 compat_ioctl32: v4l2 ioctl VIDIOC_ENUM_FRAMESIZES, dir=rw (0xc02c564a) ioctl32(skype:11264): Unknown cmd fd(9) cmd(c02c564a){t:'V';sz:44} arg(f69f1b88) on /dev/v4l/video0 compat_ioctl32: v4l2 ioctl VIDIOC_ENUM_FRAMESIZES, dir=rw (0xc02c564a) ioctl32(skype:11264): Unknown cmd fd(9) cmd(c02c564a){t:'V';sz:44} arg(f69f1b88) on /dev/v4l/video0 skype[11264] trap divide error ip:f79cf454 sp:f69f1dc0 error:0 in libv4l1.so.0[f79cd000+4000] does the trick only work for libv4l-5.1?
well, I have tried with 0.5.1 version and it does exactly the same error. I will be happy to provide more infos..
maybe it's because I'm using kernel 2.6.25-r7...
(In reply to comment #17) > maybe it's because I'm using kernel 2.6.25-r7... Obviously! This library is only useful for the in-kernel drivers, which were only released with 2.6.27. With previous versions you should use the gspcav1 module (it's in portage).
Rostovtsev`s skype trick works great, thank you. I just renamed the ebuild to libv4l-0.5.8 digested it and voila it builds libv4l-0.5.8 :D
Why hasn't this multilib ebuild been merged into the main Portage tree? I have libv4l-0.5.3 but no related files in /usr/lib32.
I am in the same situation fow. The Skype tricks mentioned here do not work as we do not have the option for lib32 even in a multilib install. Should we open a new bug?
As we want Alexandre's above ebuild to go into portage perhaps opening a new bug is not a good idea and instead we should reopen this bug. What do you think is the best way to proceed? I feel an ebuild like Alexandre's should replace the one in portage.
I think we need to change the ebuilds for this for libv4l-0.6.0 and any future releases that come out so that we don't have to manually digest our ebuilds or make a custom overlay just for the 32-bit libraries. This doesn't break any existing functionality, so it doesn't hurt.
Regarding libv4l-0.6.1 and Skype 2.1.0.47 My machine: amd64 - 2.6.29r5 Using UVC webcam Skype needs this multilib ebuild overlay for libv4l-0.6.1 Additionally requires edits to /usr/bin/skype: # Added for amd64 export LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so
(In reply to comment #24) > export LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so This doesn't work for me; I have this in /usr/bin/skype (amd64, uvc webcam) export LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so Otherwise, I renamed the ebuild to 0.6.1, and it works fine. +1 for replacing the in-portage version with this.
I don't get it. Is current version of libv4l - media-libs/libv4l-0.6.1 - in portage has multilib support? Because none of the tricks worked for me in Skype 2.1.0.81 ? I had problem with camera vertically flipped and it should have been resolved with LD_PRELOAD, but it didn't worked for me.
(In reply to comment #26) Currently, 32-bit libv4l binaries are included in >=emul-linux-x86-medialibs-20091231. The 20091231 version uses the thoroughly obsolete libv4l-0.5.3; I believe that 20100220 also uses version 0.5.*. Naturally, those old versions of libv4l fail to correctly support many webcams. I have filed bug #306419 to mark libv4l-0.6.1 stable and to add it to emul-linux-x86-medialibs.