Setting Up VLC Development Environment In Debian
Before setting up the development environment, let’s get to know why you should prefer VLC over other media players, why it’s the best, its cool features and a lot more!
Play a video or audio from terminal:
You can play the audio/video by running a command in the terminal:
$ vlc <path to the file>
Play a youtube video in VLC:
Now let’s see how you can download a youtube video using VLC. Follow the above steps. Then,
- While the video is playing, press ctrl+j to open the Codec box.
- Then find an option called location and you can see a string. Copy the whole string and paste in your web browser and click enter.
- You will see a downward arrow in the bottom right. Click on it and Voila! Your video is getting downloaded!
Playback your desktop:
You can record desktop screen using VLC media player. Lets see how you can do it.
- Open VLC and click on media.
- Click on Open Capture Device.
- Now, click on the capture device tab and select Desktop from the Capture mode drop down box.
- Now go down and set the frame rate to 15 frames per second.
- Click the down arrow next to the Play button and select Convert.
- The convert box will open up. Now go to the profile section and choose what you need.
- Now add your destination file by clicking on the browse option.
- Click on start to start recording.
- Click on the stop button to stop recording.
Setting it up:
I had referred to this link I will be mostly mentioning about the commands mentioned there. So let us begin.
1. To get the GNU build system:
sudo apt-get install git build-essential pkg-config libtool automake autopoint gettext
2. Get the source code:
- Clone it
git clone https://github.com/videolan/vlc.git
- Get into the directory
cd vlc
- Bootstrap the source tree
./bootstrap
3. Get all the needed libraries
- First update your package lists using:
sudo apt-get update
- Then get the required libraries:
sudo apt-get build-dep vlc
4. Check whether your system is able to compile VLC
./configure
This step might give you the following error:
configure: error: No package 'xcb-xkb' found. Pass --disable-xcb to skip X11 support.
Don’t disable xcb. Instead install it. Find the required package for your system and then install it using a package manager. I used aptitude.
- Install aptitude using:
sudo apt-get install aptitude
- Now, search package using:
aptitude search xcb
- After you find it, install it by running (below is the package I needed, you need to find for your distribution) :
sudo aptitude install libxcb-xkb-dev
- Run the command again:
./configure
5. Now compile :
make
6. Run it :
./vlc
7. Now install XCB libraries by running :
sudo apt-get install libxcb-shm0-dev libxcb-xv0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-composite0-dev