How to Compile VLC on Ubuntu


The VLC media player is an open source multimedia player for DVD, audio and compressed video files including DivX/XviD and MP4. Because it is open source, its source code is available and it can be compiled directly on the target computer. Building on the target computer optimizes the player for the available hardware. The whole process is quite simple. Download the sources, download the necessary libraries and dependencies, compile VLC and install it.

  • Download the latest VLC source code tarball using the link in the Resources section. Make a note of where the file was downloaded.

  • Click the "Applications" menu, select "Accessories" and click "Terminal." A black terminal window appears.

  • Type "cd " followed by the path name of the folder that contains the VLC tarball downloaded in Step 1. Press the "Enter" key. For example, if the source file archive was downloaded to the "Downloads" folder, type "cd Downloads."

  • Type "tar -jxvf vlc-1.1.9.tar.bz2" to extract the sources from the archive file. Replace the number "1.1.9" with the number of the downloaded version.

  • Type "cd vlc-1.1.9" and press the "Enter" key to change directory into the sources folder. Replace the number "1.1.9" with the number of the downloaded version.

  • Type "sudo apt-get install -y libdbus-1-dev lua5.1 liblua5.1-dev libmad0-dev libavcodec-dev libavformat-dev libswscale-dev libpostproc-dev liba52-dev libxcb1-dev libxcb-shm0-dev libxcb-xv0-dev libx11-xcb-dev libgl1-mesa-dev libqt4-dev libgcrypt11-dev" and press the "Enter" key. Type the password and press the "Enter" key. The various libraries and dependencies needed to build VLC are downloaded.

  • Type "./configure --prefix=/usr" and press the "Enter" key. If successful, this command will end with the message: "To build vlc and its plugins, type ./compile' ormake'." See the Tips section for help on resolving any possible problems during this step.

  • Type "make" and press the "Enter" key to build VLC. This process may take between 5 and 15 minutes depending on your hardware.

  • Type "sudo make install" and press the "Enter" key. Type the password and press the "Enter" key. The VLC software will now install onto the system.

Tips & Warnings

  • Many dependencies and libraries are needed to build VLC. If during Step 7 the "configure" process doesn't finish successfully, then read the advice given and install the missing dependency using the "apt-get install" command. For example, the error "configure: error: Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error" is resolved with the command "sudo apt-get install lua5.1"


  • Photo Credit Thinkstock Images/Comstock/Getty Images
Promoted By Zergnet



You May Also Like

  • What Is a VLC Player?

    VLC Media Player is a free program produced by the nonprofit group VideoLAN. It's capable of playing various video and audio files---even...

Related Searches

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!