gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Thu Oct 12, 2017 10:40 am

Edited Nov. 17th, 2018: There is now a hardware accelerated version of VLC 3.0 available from the Foundation repository. No need to compile anything anymore! The new version supports MMAL HW acceleration both in overlay mode (MMAL) and inside the video window (MMAL X11 splitter). You can use apt-get to install it.
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
If you have already installed the VLC version from the repository before you must remove it now and that means every package belonging to it. A default VLC installation will install the following packages:

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
All of them have to be removed before you can go on!

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
VLC requires quite a lot of shared libraries. Some may be already installed on your system, but we cannot be sure. To get all of them run:

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
These libraries will enable us to run VLC, but to compile a new version we also have to add the matching development (-dev) packages:

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
Now we can start the real work. We download the current stable VLC sources:

Code: Select all

wget https://download.videolan.org/vlc/2.2.8/vlc-2.2.8.tar.xz
This version won't compile on Stretch without a patch which we will download now and apply later:

Code: Select all

wget http://steinerdatenbank.de/software/vlc-2.2.8-ffmpeg3-1.patch
Now it's time to extract the VLC source package

Code: Select all

tar -xJf vlc-2.2.8.tar.xz
and to enter the source folder

Code: Select all

cd vlc-2.2.8
The first command will adapt the sources to the Raspbian Stretch system:

Code: Select all

./bootstrap
Now it's time to add the patch we have downloaded earlier, which requires two commands:

Code: Select all

patch -Np1 -i ../vlc-2.2.8-ffmpeg3-1.patch

Code: Select all

sed -i 's/error-implicit-function-declaration//' configure
We will now set and export some enviroment variables for configuration and compilation:

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"
We will now run the configuration script with some RPi specific options:

Code: Select all

./configure --prefix=/usr --enable-omxil --enable-omxil-vout --enable-rpi-omxil --disable-mmal-codec --disable-mmal-vout --enable-gles2
This will take a few minutes and if it doesn't break with some error message, we are ready for compilation. But before you can go on, you should close as many applications as possible, which includes the web browser showing this tutorial (especially if it is chromium). We will run the compilation on 3 cores and it will need a lot of free memory.

Code: Select all

make -j3
How much time the compilation process needs, depends on your mass storage system. Running from HDD it will take less than 30 minutes, but it may take much longer on slower SD cards.

If the compilation ends without an error (ignore all the warnings), we can install the new VLC version:

Code: Select all

sudo make install
This will also take a few minutes.

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
from within the vlc-2.2.6 directory.

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.
Last edited by gkreidl on Sat Nov 17, 2018 6:45 am, edited 4 times in total.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

cjan
Posts: 1109
Joined: Sun May 06, 2012 12:00 am

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Oct 13, 2017 9:38 am

a bit off topic?

want edit a Makefile to compile vlc-git (today had some mmal patchs), what is right sequence?
1. ./bootstrap
2. edit Makefile
3. patch some file
4. ./configure.....

or any other sequence, thanks.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Oct 13, 2017 10:31 am

cjan wrote:
Fri Oct 13, 2017 9:38 am
a bit off topic?

want edit a Makefile to compile vlc-git (today had some mmal patchs), what is right sequence?
1. ./bootstrap
2. edit Makefile
3. patch some file
4. ./configure.....

or any other sequence, thanks.
I never had much luck with any github version, but two things come to my mind:
1) I'm not sure if the patch can be applied to this release.
2) AFAIK, the Makefiles are created by the configure script.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

cjan
Posts: 1109
Joined: Sun May 06, 2012 12:00 am

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Oct 13, 2017 10:50 am

gkreidl wrote:
Fri Oct 13, 2017 10:31 am
cjan wrote:
Fri Oct 13, 2017 9:38 am
a bit off topic?

want edit a Makefile to compile vlc-git (today had some mmal patchs), what is right sequence?
1. ./bootstrap
2. edit Makefile
3. patch some file
4. ./configure.....

or any other sequence, thanks.
I never had much luck with any github version, but two things come to my mind:
1) I'm not sure if the patch can be applied to this release.
2) AFAIK, the Makefiles are created by the configure script.
sorry, my poor english.

try to compile vlc-3.git, no need to ffmpeg-patch.
had some error -> recipe for target 'libmmal_vout_plugin_la-vout.lo' failed
solution is here, down below the page.
https://forum.videolan.org/viewtopic.php?t=135341

only ask what sequence to edit Makefile? and this Makefile not created by the configure script.

anotherknight
Posts: 3
Joined: Wed Jan 04, 2017 7:40 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Oct 20, 2017 1:58 am

"We will now set and export some environment variables for configuration and compilation"

If I remove "-mcpu=cortex-a7 -mfpu=neon-vfpv4" from the environment variables, will the ./configure still pull the correct information from my system? I was trying to shortcut the process because I was compiling VLC for my RPi Zero W and removed those two. It compiled and installed successfully, but when I play a DVD it stutters slightly and I was curious if it was because I didn't indicate the mcpu and mfpu which made it un-optimized. The only reason I'm suspicious is because it will play 1080p files off of a USB but can't play a DVD. Anyone out there with success stories for RPi Zero W?

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Oct 20, 2017 7:49 am

anotherknight wrote:
Fri Oct 20, 2017 1:58 am
"We will now set and export some environment variables for configuration and compilation"

If I remove "-mcpu=cortex-a7 -mfpu=neon-vfpv4" from the environment variables, will the ./configure still pull the correct information from my system? I was trying to shortcut the process because I was compiling VLC for my RPi Zero W and removed those two. It compiled and installed successfully, but when I play a DVD it stutters slightly and I was curious if it was because I didn't indicate the mcpu and mfpu which made it un-optimized. The only reason I'm suspicious is because it will play 1080p files off of a USB but can't play a DVD. Anyone out there with success stories for RPi Zero W?
I don't recommend using VLC (even HW accelerated) on a first generation RPi or Zero. Long time ago I created a version for them (and published a tutorial), but it didn't work reliably for full HD videos, for example. The software overhead is much bigger than with omxplayer.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mikerosenthal
Posts: 4
Joined: Sat Oct 21, 2017 2:51 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Sat Oct 21, 2017 2:55 pm

Thank you so much for this tutorial. It's exactly what I needed! I ran through each step and got no errors anywhere along the way (a first for me...).

However, when I got to this:
Settings, simple, Video, output: select "OpenMAX IL video output"
I don't have OpenMax IL in my dropdown of output choices.

These exist in my decoder list when I query it from a command line:
omxil Audio/Video decoder (using OpenMAX IL)
omxil Video encoder (using OpenMAX IL)

So I think it must be installed, but I can't seem to select it in VLC.

Any thoughts on what I might be doing wrong? Or any tips on how to force VLC to use this decoder from a command line instead of in the Preferences?

-Mike

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Sat Oct 21, 2017 8:48 pm

mikerosenthal wrote:
Sat Oct 21, 2017 2:55 pm
Thank you so much for this tutorial. It's exactly what I needed! I ran through each step and got no errors anywhere along the way (a first for me...).

However, when I got to this:
Settings, simple, Video, output: select "OpenMAX IL video output"
I don't have OpenMax IL in my dropdown of output choices.

These exist in my decoder list when I query it from a command line:
omxil Audio/Video decoder (using OpenMAX IL)
omxil Video encoder (using OpenMAX IL)

So I think it must be installed, but I can't seem to select it in VLC.

Any thoughts on what I might be doing wrong? Or any tips on how to force VLC to use this decoder from a command line instead of in the Preferences?

-Mike
Can you show me your list of output devices (snapshot)?
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mikerosenthal
Posts: 4
Joined: Sat Oct 21, 2017 2:51 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Sun Oct 22, 2017 3:56 pm

Sure thing, here you go:
Image

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Mon Oct 23, 2017 10:43 am

This looks more like the default version. After compiling it with the settings in the OP, it should look like this:
vlcint.jpg
vlcint.jpg (61.68 KiB) Viewed 64555 times
You must have done something wrong.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mikerosenthal
Posts: 4
Joined: Sat Oct 21, 2017 2:51 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Mon Oct 23, 2017 6:27 pm

OK. Well I finally got it working by reinstalling my OS, running through the tutorial again, and doing about a dozen apt-get install xxxxx commands on all the libraries that didn't seem to get installed with this command for some reason:

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
And it now works smooth and fullscreen on the pi via the HDMI output. However, it's still incredibly choppy and jittery when streaming out over http. Is there a particular codec that should be used with this hardware acceleration method? I've tried h264, mp4a, mp1a, mp2a, etc with almost no difference in quality.

I'm happy to start a new thread for this, it just seems like people who need this tutorial might also have similar problems, so wanted to keep it here for later reference.

Thanks.

-mike

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Mon Oct 23, 2017 8:03 pm

mikerosenthal wrote:
Mon Oct 23, 2017 6:27 pm
OK. Well I finally got it working by reinstalling my OS, running through the tutorial again, and doing about a dozen apt-get install xxxxx commands on all the libraries that didn't seem to get installed with this command for some reason:

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
And it now works smooth and fullscreen on the pi via the HDMI output. However, it's still incredibly choppy and jittery when streaming out over http. Is there a particular codec that should be used with this hardware acceleration method? I've tried h264, mp4a, mp1a, mp2a, etc with almost no difference in quality.

I'm happy to start a new thread for this, it just seems like people who need this tutorial might also have similar problems, so wanted to keep it here for later reference.

Thanks.

-mike
HW acceleration in VLC works only for screen display, not for streaming.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mikerosenthal
Posts: 4
Joined: Sat Oct 21, 2017 2:51 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Mon Oct 23, 2017 9:54 pm

Ah. Too bad. VLC on the pi would otherwise make an excellent streaming video server...
Thanks for your help!

-Mike

VulcanRaven
Posts: 1
Joined: Thu Oct 26, 2017 1:13 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Thu Oct 26, 2017 1:27 pm

The make step [make -j3] doens't take long and returns the following error:

libtool: error: 'meta_engine/libtaglib_plugin_la-taglib.lo' is not a valid libtool object

I can't find an answer elsewhere to this, so perhaps the issue is known here? I executed all statements exactly as posted here.

Also, I want to express my appreciation for this guide, since for a newbie installing programs seems very different [and more difficult!] when compared to OSX of Windows.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Thu Oct 26, 2017 3:16 pm

VulcanRaven wrote:
Thu Oct 26, 2017 1:27 pm
The make step [make -j3] doens't take long and returns the following error:

libtool: error: 'meta_engine/libtaglib_plugin_la-taglib.lo' is not a valid libtool object

I can't find an answer elsewhere to this, so perhaps the issue is known here? I executed all statements exactly as posted here.

Also, I want to express my appreciation for this guide, since for a newbie installing programs seems very different [and more difficult!] when compared to OSX of Windows.
It's hard to tell what went wrong. Run all the "apt-get" lines again, then enter the vlc folder again and start again with the "export ..." line and run all following commands again; watch the output of the configure command.

BTW, installing software (e. g. VLC) from a repository is really simple. But in this case we want to compile and install a VLC version from source with special options, which are not supported by the repository version.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

howardmoon
Posts: 4
Joined: Thu Nov 02, 2017 4:35 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Thu Nov 02, 2017 5:31 pm

configure is giving me, "configure: error: No package 'libavcodec' found. Pass --disable-avcodec to ignore this error."

When I try sudo apt-get install libavcodec* I get:

libavcodec57 is already the newest version (7:3.2.8-1~deb9u1).
libavcodec57 set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libavcodec-extra57 : Conflicts: libavcodec57 but 7:3.2.8-1~deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.


EDIT:
Removed/reinstalled libavcodec57 and got rid of the dependency error, but still had the no package 'libavcodec' error from configure. It's there according to dpkg (version problem?). Ran configure with the --disable-avcodec switch just for fun and was able to compile and run the vlc gui, but when pIaying a video I get:

vlc
VLC media player 2.2.6 Umbrella (revision 2.2.6-0-g1aae78981c)
[01e40918] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libEGL warning: DRI2: failed to authenticate

** (vlc:1122): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
[69b6ecb8] lua probe error: Error loading script /usr/lib/vlc/lua/sd/fmc.luac: /usr/lib/vlc/lua/sd/fmc.luac: version mismatch in precompiled chunk
[69b6ecb8] lua probe error: Error loading script /usr/lib/vlc/lua/sd/icast.luac: /usr/lib/vlc/lua/sd/icast.luac: version mismatch in precompiled chunk
[69b6ecb8] lua probe error: Error loading script /usr/lib/vlc/lua/sd/icecast.luac: /usr/lib/vlc/lua/sd/icecast.luac: version mismatch in precompiled chunk
[69b6ecb8] lua probe error: Error loading script /usr/lib/vlc/lua/sd/jamendo.luac: /usr/lib/vlc/lua/sd/jamendo.luac: version mismatch in precompiled chunk
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Thu Nov 02, 2017 10:48 pm

howardmoon wrote:
Thu Nov 02, 2017 5:31 pm
configure is giving me, "configure: error: No package 'libavcodec' found. Pass --disable-avcodec to ignore this error."

When I try sudo apt-get install libavcodec* I get:

libavcodec57 is already the newest version (7:3.2.8-1~deb9u1).
libavcodec57 set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libavcodec-extra57 : Conflicts: libavcodec57 but 7:3.2.8-1~deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.


EDIT:
Removed/reinstalled libavcodec57 and got rid of the dependency error, but still had the no package 'libavcodec' error from configure. It's there according to dpkg (version problem?). Ran configure with the --disable-avcodec switch just for fun and was able to compile and run the vlc gui, but when pIaying a video I get:

vlc
VLC media player 2.2.6 Umbrella (revision 2.2.6-0-g1aae78981c)
[01e40918] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libEGL warning: DRI2: failed to authenticate

** (vlc:1122): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
[69b6ecb8] lua probe error: Error loading script /usr/lib/vlc/lua/sd/fmc.luac: /usr/lib/vlc/lua/sd/fmc.luac: version mismatch in precompiled chunk
[69b6ecb8] lua probe error: Error loading script /usr/lib/vlc/lua/sd/icast.luac: /usr/lib/vlc/lua/sd/icast.luac: version mismatch in precompiled chunk
[69b6ecb8] lua probe error: Error loading script /usr/lib/vlc/lua/sd/icecast.luac: /usr/lib/vlc/lua/sd/icecast.luac: version mismatch in precompiled chunk
[69b6ecb8] lua probe error: Error loading script /usr/lib/vlc/lua/sd/jamendo.luac: /usr/lib/vlc/lua/sd/jamendo.luac: version mismatch in precompiled chunk
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Did you apply the patch?
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

howardmoon
Posts: 4
Joined: Thu Nov 02, 2017 4:35 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Nov 03, 2017 11:20 am

Yes. Configure is what tossed the error. Compile worked if I bypassed that.

I noticed the configure script is looking for "libavcodec >= 53.34.0 and mine is 7:3.2.8-1~deb9u1.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Nov 03, 2017 12:32 pm

howardmoon wrote:
Fri Nov 03, 2017 11:20 am
Yes. Configure is what tossed the error. Compile worked if I bypassed that.

I noticed the configure script is looking for "libavcodec >= 53.34.0 and mine is 7:3.2.8-1~deb9u1.
check if libavcodec-dev is installed.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

howardmoon
Posts: 4
Joined: Thu Nov 02, 2017 4:35 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Nov 03, 2017 1:26 pm

pi@raspberrypi:~ $ apt list libavcodec*
Listing... Done
libavcodec-dev/stable 7:3.2.8-1~deb9u1 armhf
libavcodec-extra/stable 7:3.2.8-1~deb9u1 all
libavcodec-extra57/stable 7:3.2.8-1~deb9u1 armhf
libavcodec57/stable,now 7:3.2.8-1~deb9u1 armhf [installed]

guess not. I'll retry

do I need the "extra"s too?

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Nov 03, 2017 2:59 pm

howardmoon wrote:
Fri Nov 03, 2017 1:26 pm
pi@raspberrypi:~ $ apt list libavcodec*
Listing... Done
libavcodec-dev/stable 7:3.2.8-1~deb9u1 armhf
libavcodec-extra/stable 7:3.2.8-1~deb9u1 all
libavcodec-extra57/stable 7:3.2.8-1~deb9u1 armhf
libavcodec57/stable,now 7:3.2.8-1~deb9u1 armhf [installed]

guess not. I'll retry

do I need the "extra"s too?
They are not installed on my Stretch system.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

howardmoon
Posts: 4
Joined: Thu Nov 02, 2017 4:35 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Fri Nov 03, 2017 3:45 pm

when running from terminal:

lua probe error: Error loading script /usr/lib/vlc/lua/sd/jamendo.luac: /usr/lib/vlc/lua/sd/jamendo.luac: version mismatch in precompiled chunk
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
[6880f470] xcb_xv vout display error: no available XVideo adaptor


I give up

User avatar
QBall1977
Posts: 101
Joined: Thu Aug 09, 2012 10:06 am
Location: Hull, East Yorkshire

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Mon Nov 06, 2017 11:37 pm

Quick question, if using VLC to convert MKV files to MP4, will the Hardware Acceleration make any difference, or is this only for playback?
____________________________________________
Looking for where to start - try Kernel Panic - http://goo.gl/EEQ5J

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Tue Nov 07, 2017 8:23 am

QBall1977 wrote:
Mon Nov 06, 2017 11:37 pm
Quick question, if using VLC to convert MKV files to MP4, will the Hardware Acceleration make any difference, or is this only for playback?
Only for playback.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

anotherknight
Posts: 3
Joined: Wed Jan 04, 2017 7:40 pm

Re: Tutorial: Compile VLC with HW acceleration - Stretch, RPi 2/3

Thu Nov 09, 2017 12:58 pm

by howardmoon » Fri Nov 03, 2017 9:45 am
when running from terminal:

lua probe error: Error loading script /usr/lib/vlc/lua/sd/jamendo.luac: /usr/lib/vlc/lua/sd/jamendo.luac: version mismatch in precompiled chunk
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
[6880f470] xcb_xv vout display error: no available XVideo adaptor


I give up
For what it's worth, I hope you don't give up. I compiled VLC for my Pi Zero W which takes significantly longer in every respect; so much so that I had to start "sudo make" in the evening just so it would finish before I left for work the next morning. It's rather satisfying playing videos from my Zero W now though...
I got a similar error "No available XVideo adaptor" when trying to compile MPV; something to do with OpenGL support I think but it has been some time since I did that.

Return to “Raspberry Pi OS”