Wednesday, July 15, 2015

Fix Inverted Camera on Ubuntu Linux

I am running Lucid Lynx 64 bit OS version on my Asus i3 K52J Series laptop. Like everyone else, I like using Skype video/chat as well as Cheese camera for taking pictures and videos. Not until then when I had a problem using it.


NOTE: Not advisable to do "export LIBV4LCONTROL_FLAGS=3", LIBV4LCONTROL_FLAGS is for debugging purposes only. - by Hans De Goede(libv4l author and maintainer)

I was so disappointed that my camera display was inverted! I tried reading several blogs and posting comments on Ubuntu forum threads online for days and but none of their solutions helped solved my problem. It could have been easily solved if only there was an option to invert my camera on Video4Linux Device Preference. Sadly, there was not! So, I decided to find a way to flip the camera by looking into export options on gtk-v4l(Video4Linux). 

Below are the 2 things I did to solve my problem.

1. Add software source where libv4l-0 can be downloaded and install it by running the commands below on your terminal.
  • echo -e "\n# libv4l PPA\ndeb http://ppa.launchpad.net/libv4l/ppa/ubuntu `lsb_release -c | awk '{print $2}'` main" | sudo tee -a /etc/apt/sources.list
  • sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C3FFB4AA
  • sudo apt-get update
  • sudo apt-get install libv4l-0
2. Start cheese or skype from your terminal. (Note: The value of 3 on LIBV4LCONTROL_FLAGS flips the image both vertically and horizontally.)
  • export LIBV4LCONTROL_FLAGS=3 && cheese
  • export LIBV4LCONTROL_FLAGS=3 && LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype
Alternatively, you can create a shortcut(custom application launcher) on your menu or on one of your panels. 
  • Download skype and cheese scripts. 
  • Add custom application launcher on panel and point command to respective bash scripts.
  • Click icon and start using the applications normally!
If your having problem on your sound device on Skype, take a look on my previous article on fixing sound device. Alright then, thats all I did folks! Hope this helps. Have a good one.


No comments:

Post a Comment