If you have installed a self-compiled version, you must remove it first by running
sudo make uninstall
from inside your vlc directory (used for compiling)
Edited Dec. 17th, 2017: Updated to version 2.2.8 and added a few missing dependencies.
If you had installed a previous version following this tutorial, you should uninstall it first.
VLC is a great media player but the version from the Raspbian repository does not support the GPU of the RPi and is not able to run high resolution videos. We have to compile our own version to add hardware accelerated video.
Note: This version will display video in an overlay, similar to omxplayer, and not within a window. If you need this you might prefer my omxplayerGUI.
We will have to add quite a number of libraries and tools. Before doing this, you should update your system:
Code: Select all
sudo apt-get update
sudo apt-get upgrade
Code: Select all
vlc libvlc-bin libvlc5 libvlccore8 vlc-bin vlc-data vlc-l10n vlc-plugin-base vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba vlc-plugin-skins2 vlc-plugin-video-output vlc-plugin-video-splitter vlc-plugin-visualization
The whole work will be done in a terminal. Open one and run each of the commands shown below.
The first step is to make sure, that we have a number of essential building tools installed:
Code: Select all
sudo apt-get install autopoint pkg-config libtool build-essential autoconf
Code: Select all
sudo apt-get install liba52-0.7.4 libasound2 libass5 libavahi-client3 libavahi-common3 libavc1394-0 libbasicusageenvironment1 libbluray1 libbz2-1.0 libc6 libcairo2 libcddb2 libcdio13 libchromaprint1 libdbus-1-3 libdc1394-22 libdca0 libdirectfb-1.2-9 libdvbpsi10 libdvdnav4 libdvdread4 libebml4v5 libfaad2 libflac8 libfontconfig1 libfreetype6 libfribidi0 libgcc1 libgcrypt20 libglib2.0-0 libgme0 libgnutls30 libgpg-error0 libgroupsock8 libgsm1 libjpeg62-turbo libkate1 liblirc-client0 liblivemedia57 liblua5.2-0 liblzma5 libmad0 libmatroska6v5 libmodplug1 libmp3lame0 libmpcdec6 libmpeg2-4 libmtp9 libncursesw5 libogg0 libopus0 libpng16-16 libpulse0 libraw1394-11 libresid-builder0c2a librsvg2-2 librtmp1 libsamplerate0 libsdl-image1.2 libsdl1.2debian libshine3 libshout3 libsidplay2 libsnappy1v5 libsndio6.1 libspeex1 libspeexdsp1 libssh-gcrypt-4 libssh2-1 libstdc++6 libtag1v5 libtheora0 libtinfo5 libtwolame0 libudev1 libupnp6 libusageenvironment3 libva-drm1 libva-x11-1 libva1 libvcdinfo0 libvorbis0a libvorbisenc2 libvpx4 libwavpack1 libwebp6 libwebpmux2 libx11-6 libx264-148 libx265-95 libxcb-keysyms1 libxcb1 libxml2 libxvidcore4 libzvbi0 zlib1g libgdk-pixbuf2.0-0 libgtk2.0-0 libnotify4 libqt5core5a libqt5gui5 libqt5widgets5 libqt5x11extras5 libxi6 libsmbclient libxext6 libxinerama1 libxpm4 fonts-freefont-ttf libaa1 libcaca0 libegl1-mesa libgl1-mesa-glx libgles1-mesa libgles2-mesa libxcb-shm0 libxcb-xv0 libxcb-randr0 libxcb-composite0
Code: Select all
sudo apt-get install liba52-0.7.4-dev libasound2-dev libass-dev libavahi-client-dev libavc1394-dev libbluray-dev libbz2-dev libc6-dev libcairo2-dev libcddb2-dev libcdio-dev libchromaprint-dev libdbus-1-dev libdc1394-22-dev libdca-dev libdirectfb-dev libdvbpsi-dev libdvdnav-dev libdvdread-dev libebml-dev libfaad-dev libflac-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgcc-6-dev libgcrypt20-dev libglib2.0-dev libgme-dev libgnutls28-dev libgpg-error-dev libgsm1-dev libjpeg62-turbo-dev libkate-dev liblircclient-dev liblivemedia-dev liblua5.2-dev liblzma-dev libmad0-dev libmatroska-dev libmodplug-dev libmp3lame-dev libmpcdec-dev libmpeg2-4-dev libmtp-dev libncursesw5-dev libogg-dev libopus-dev libpng-dev libpulse-dev libraw1394-dev libresid-builder-dev librsvg2-dev librtmp-dev libsamplerate0-dev libsdl-image1.2-dev libsdl1.2-dev libshine-dev libshout3-dev libsidplay2-dev libsnappy-dev libsndio-dev libspeex-dev libspeexdsp-dev libssh-gcrypt-dev libssh2-1-dev libstdc++-6-dev libtag1-dev libtheora-dev libtinfo-dev libtwolame-dev libudev-dev libupnp6-dev libva-dev libvcdinfo-dev libvorbis-dev libvpx-dev libwavpack-dev libwebp-dev libx11-dev libx264-dev libx265-dev libxcb-keysyms1-dev libxcb1-dev libxml2-dev libxvidcore-dev libzvbi-dev zlib1g-dev libgdk-pixbuf2.0-dev libgtk2.0-dev libnotify-dev libqt5x11extras5-dev libxi-dev libsmbclient-dev libxext-dev libxinerama-dev libxpm-dev libaa1-dev libcaca-dev libegl1-mesa-dev libgles1-mesa-dev libgles2-mesa-dev libxcb-shm0-dev libxcb-xv0-dev libxcb-randr0-dev libxcb-composite0-dev libavcodec-dev libavformat-dev libgstreamer1.0-dev libswscale-dev
Code: Select all
wget https://download.videolan.org/vlc/2.2.8/vlc-2.2.8.tar.xz
Code: Select all
wget http://steinerdatenbank.de/software/vlc-2.2.8-ffmpeg3-1.patch
Code: Select all
tar -xJf vlc-2.2.8.tar.xz
Code: Select all
cd vlc-2.2.8
Code: Select all
./bootstrap
Code: Select all
patch -Np1 -i ../vlc-2.2.8-ffmpeg3-1.patch
Code: Select all
sed -i 's/error-implicit-function-declaration//' configure
Code: Select all
export CFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/mmal -I/opt/vc/include/interface/vchiq_arm -I/opt/vc/include/IL -I/opt/vc/include/GLES2 -I/opt/vc/include/EGL -mfloat-abi=hard -mcpu=cortex-a7 -mfpu=neon-vfpv4" CXXFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/mmal -I/opt/vc/include/interface/vchiq_arm -I/opt/vc/include/IL -mfloat-abi=hard -I/opt/vc/include/GLES2 -I/opt/vc/include/EGL -mcpu=cortex-a7 -mfpu=neon-vfpv4" LDFLAGS="-L/opt/vc/lib"
Code: Select all
./configure --prefix=/usr --enable-omxil --enable-omxil-vout --enable-rpi-omxil --disable-mmal-codec --disable-mmal-vout --enable-gles2
Code: Select all
make -j3
If the compilation ends without an error (ignore all the warnings), we can install the new VLC version:
Code: Select all
sudo make install
Note: Due to the way the "Raspberry Pi Desktop" (modifications) handle default desktop files, VLC will not appear immediately within the start menu (it usually needs a reboot). For a first test you can start it from the terminal by just typing "vlc".
After starting VLC for the first time, change the following options:
Settings, simple, Audio: make sure, ALSA and bcm2835 are selected
Settings, simple, Video, output: select "OpenMAX IL video output"
VLC will remember these settings.
Video is displayed in an overlay, similar to omxplayer, not inside a window. While playing, you can only control it from the keyboard.
On both RPi2 and 3 VLC will play up to 1080p30 video. It did not play some 1080p60 videos which are playing well with omxplayer.
If audio is jerky and out of sync check, if pulseaudio is installed on your system and remove or disable it.
SD video and some 720p video (RPi3) can also be played using software codecs, if you select SDL video output.
To remove VLC again, run
Code: Select all
sudo make uninstall
Do not try to install the repository version without uninstalling the compiled version first!
Important note: I do not consider this version (and older ones) completely stable. It definitely crashes when I stop playing recorded TS streams typing "s". Live TV stream are playing well (same format).
Thanks to cjan who discovered the patch and showed how to apply it.