It took me a while to fix this problem with my new ASUS K50AF running Lucid (32 Bit Version).
Finally the following approach worked - I hope this description will save you some time:
1. Check if the wrapper helps your application
Code:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so <your application>
(e.g.
Code:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype
)
If yes, continue as suggested in http://ubuntuforums.org/showpost.php...&postcount=225 (create the wrapper & use it to call the app).
If no, continue as follows:
2. Download current libv4l Sources (I used Version 0.8.0)
2.a Download from http://freshmeat.net/projects/libv4l
2.b Unpack to your Home-Dir (e.g. ~/v4l-utils-0.8.0/)
3. Identify your Webcam & Board
3.a. to get the device ID (Format (hex) <XXXX>:<YYYY>)
BUS ddd Device ddd: ID XXXX:YYYY Your Webcam
3.b. Create a file containing the Board Vendor Name (e.g. vendor.txt)
Code:
cat /sys/devices/virtual/dmi/id/board_vendor > vendor.txt
3.c. Create a file containing the Board Name (e.g. name.txt)
Code:
cat /sys/devices/virtual/dmi/id/board_name > name.txt
4. Update the Upside Down list of libv4l
4.a Open the control-File from the Source Folder in an ASCII editor (e.g.
Code:
gedit ~/v4l-utils-0.8.0/lib/libv4lconvert/control/libv4lcontrol.c
)
4.b. The file contains the list of "Upside down devices" at the start. Add the entry for your Configuration:
Code:
{ 0x<XXXX>, 0x<YYYY>, 0, <VENDOR>, <NAME>,
V4LCONTROL_HFLIPPED | V4LCONTROL_VFLIPPED },
Where: <XXXX> and <YYYY> is the ID of your webcam from lsusb
<VENDOR> is the content of vendor.txt (wioth all white spaces !!)
<NAME> is the content of vendor.txt (with all white spaces !!)
# 5. Compile and Install libv4l
5.a. enter the lib-source directory (e.g.
Code:
cd ~/v4l-utils-0.8.0/lib
5.b. 5.c.
Code:
sudo make PREFIX=/usr
5.d.
Code:
sudo make install PREFIX=/usr
6. Test the result
6.a. Start your application. If the image is correct now, the application uses libv4l. If not continue
6.b. Try the Wrapper:
Code:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so <your application>
(e.g.
Code:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype
) If the image is still upside-down be careful to doublecheck Vendor, Name and ID (everything is case sensitive AND whitespaces are important).
6.c. Alternatively (I did not try this option) you may use the control panel (System->Settings->Video4Linux or Applications->Media->Video4Linux Device Properties). In some versions this panel includes a "Horizontal Flip"-checkbox.
Bookmarks