Paul Labis: This is a personal blog where everyone can read my experiences, ideas and thoughts about programming, latest gadgets and other information technology related topics, lifestyle and many other stuff I would like to share to the public.

Fix upside-down or inverted webcam 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.


  • Hey thanks!!.. it works!!.. but, check out the scripts links, because are inverted. Cheers.

  • Thanks my friend, you saved my life! I own an Asus K52JU, running Ubuntu 10.04, and I've been searching for months without any success. Anything seemed to work for me, until your solution is the only thing that could help me out.

    I have no clue how to install the scripts, so I decided to modify it by Nautilus. And this is what I suggest to create a launcher.

    1. Open the terminal
    2. Type in the terminal: "sudo nautilus" (your pasworld will be requested)
    3. After a new window with the nautilus is opened, go to the files /usr/share/applications and then look for the "Skype" icon
    4. Copy and paste the icon into your Desktop
    5. In the new icon that is in your Desktop, go to "properties" (with right click on it), and in the de "command" line replace the word "skype" by "export LIBV4LCONTROL_FLAGS=3 && LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype"
    6. Close
    7. Open your personal folder (home), still in the Nautilus window, and in the hidden folders (control+h), look for the ".skype" folder (make sure is the one that starts with a dot "."
    8. Cut the icon that your previously copied and modified on your desktop and paste it into the ".skype" folder.
    9. Open Skype from the icon and you will see that your camara works now, if you have Cairo-Dock, just drag the icon into it. And if you don't, just create a launcher wherever you want.


    And now you have your new Skype working!


    Finally, sorry for my English, I am a Spanish speaker.

  • A friend of mine experienced similar issues with practically all Linux distros on his laptop Asus K51AC. He fixed it and give me some screenshots so I wrote a small article on how this upside-down / inverted webcam issue is resolved.

    The fix is similar to the one you suggested, here is described the whole problem and how it get solved:
    -
    http://www.pc-freak.net/blog/how-to-fix-upside-down-inverted-web-camera-laptop-asus-k51ac-issue-on-ubuntu-linux-and-debian-gnu-linux/

  • On my system the command for Skype was:

    export LIBV4LCONTROL_FLAGS=3 && LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so skype

    Note the 64. :)

  • It worked for me as well!!!

    Thanks man!!