[Tutorial] - Build (or download) VLC with hardware acceleration video decoding [OPENMAX-IL]

This tutorial explains how to build vlc with hardware acceleration for the raspberry pi 2 under ubuntu mate, xubuntu and lubuntu 15.10.1.
You can play HD videos in fullscreen mode with it !

Install regular vlc
open a termnial then type :

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vlc

Download vlc with Openmax-IL

If you don't want to build it, you can download my build, open a termnial then type :

wget http://dl.free.fr/v7xVbfE51 -O vlc-nox_2.2.1-3_armhf.deb

Check the sha1 :

echo "af76abfc289f76b5b070176ef1042e81da22369a vlc-nox_2.2.1-3_armhf.deb" | sha1sum -c -

You must have :

vlc-nox_2.2.1-3_armhf.deb: OK

If you don't the archive is corrupted or hacked !

Go to Install the package section

Build vlc with Openmax-IL

If you want to build it from sources, open a new terminal then :

sudo apt-get build-dep vlc
apt-get source vlc
cd vlc-2.2.1

Edit the debian/rules file :

pluma debian/rules

Edit the file to add to confflags : "--enable-rpi-omxil", "--disable-mmal-codec" and "--disable-mmal-vout"

# configure features
confflags +=
--enable-a52
--enable-aa
...
--with-kde-solid=/usr/share/kde4/apps/solid/actions/
--enable-rpi-omxil
--disable-mmal-codec
--disable-mmal-vout
$(NULL)

save & quit file.

Now, edit the debian/vlc-nox.install.in file :

pluma debian/vlc-nox.install.in

Add the line "usr/lib/vlc/plugins/codec/libomxil_vout_plugin.so" :

...
usr/lib/vlc/plugins/codec/libomxil_plugin.so
usr/lib/vlc/plugins/codec/libomxil_vout_plugin.so
...

save & quit file.

Launch the build :

debuild -i -us -uc -b

Wait some time, then when the build is done :

cd ..

Install the package

sudo dpkg -i vlc-nox_2.2.1-3_armhf.deb

If you do some upgrade (sudo apt-get upgrade), you will loose the package because it will be updated by the repository version.

You need to deactivate updates on this package :

sudo apt-mark hold vlc-nox

If you want to update it again from the repository, you can activate updates with :

sudo apt-mark unhold vlc-nox

Configure vlc

Launch vlc :

vlc

Go to tools -> Preferences -> Video and select "OpenMax IL".

And save.

Play a video :wink:

Enjoy !

Aworan

5 Likes

Good work, I was able to get VLC playing a Bluray rip on my system.

And to get it to properly install, use this configure:

./configure --enable-omxil --enable-omxil-vout --enable-rpi-omxil --disable-mmal-codec --disable-mmal-vout --prefix=/usr

I have not tested this yet, but I think for even better performance, try this configure:

./configure CFLAGS="-O2" --enable-omxil --enable-omxil-vout --enable-rpi-omxil --disable-mmal-codec --disable-mmal-vout --prefix=/usr

Adding --prefix=/usr will allow

sudo make install

to work.

I did get a lot of warnings about re-linking libraries when doing sudo make install. That was probably because I already had the stock version of VLC installed.

2 Likes

Thank you it was simple :slight_smile: I added it to my first post !

I tried again, with a small change that Iā€™d recommend adding. I didnā€™t notice any difference with this change, but using compiler optimizations (which is what my latest change adds) is normally a good idea. This is the configure that Iā€™d recommend:

./configure CFLAGS="-O2" --enable-omxil --enable-omxil-vout --enable-rpi-omxil --disable-mmal-codec --disable-mmal-vout --prefix=/usr

Note the the -O2 is letter O, not a number 0

I added CFLAGS="-O2" to the first post configure :slightly_smiling:

Post updated to build a package instead of basic compile.
So you can save the package somewhere if you want to install it later.
I uploaded the package I build, if you donā€™t want to build it, you can download it :slight_smile:
I have some experiments with MMAL, I manage to have a package for it too, it plays some videos but anothers not ā€¦
I will publish a tutorial too for it for advanced users who want to play with it :wink:
I work on some new great tutorials too, stay tune !

Aworan

1 Like

Thank you for all the above steps. but Iā€™m facing a little problem when I try to change the directory to :
cd vlc-2.2.1
it does not recognize it and I get :
bash: cd : cd vlc-2.2.1: no such a file or directory
can you help me to exceed this step and continue.

Allawi

I just got this working, itā€™s because the version of VLC has changed since the tutorial was posted. The directory should be ā€œvlc-2.2.2ā€

My question is wheter there is a way to configure the OpenmaxIL output. Itā€™s always in full-screen with no resize option, itā€™s a secondary popup window from VLC.

ā€˜sudo dpkg -i vlc-nox_2.2.1-3_armhf.debā€™ gave me an error, and I think it also had something to do with the version number of VLC changing. I simply used:

ā€˜cd vlc-2.2.2ā€™
ā€˜sudo make installā€™

Got VLC 2.2.2 Weatherwax installed as it comes with UbuntuMATE 16.04 distro, however on my RPi 2 device, thereā€™s no video output when playing an MP4 media file, albeit video output settings have been manually set to ā€œOpenMAX IL viedo outputā€.

Has something changed in the meanwhile?

I have followed everything given above. But when I click a video it will play with a given aspect ration, I canā€™t quit the video not a single shortcut works. After the video is over it will quit. Is there any solution to prevent this?

Hello

I have fresh install of mate 16.04 on Raspberry Pi 3, I have followed all steps above (except VLC 2.2.2 was downloaded instead of 2.2.1) and Im getting error during build:

configure: exit 77 dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/arm-linux-gnueabihf --libexecdir=${prefix}/lib/arm-linux-gnueabihf --disable-maintainer-mode --disable-dependency-tracking --config-cache --disable-update-check --enable-fast-install --docdir=/usr/share/doc/vlc-data --libdir=/usr/lib --with-binary-version=2.2.2-5 --enable-a52 --enable-aa --enable-bluray --enable-bonjour --enable-caca --enable-chromaprint --enable-dbus --enable-dca --enable-directfb --enable-dvbpsi --enable-dvdnav --enable-faad --enable-flac --enable-fluidsynth --enable-freerdp --enable-freetype --enable-fribidi --enable-gles1 --enable-gles2 --enable-gnutls --enable-jack --enable-kate --enable-libass --enable-libmpeg2 --enable-libxml2 --enable-lirc --enable-live555 --enable-mad --enable-mkv --enable-mod --enable-mpc --enable-mtp --enable-mux_ogg --enable-ncurses --enable-notify --enable-ogg --enable-opus --enable-pulse --enable-qt --enable-realrtsp --enable-samplerate --enable-schroedinger --enable-sdl --enable-sdl-image --enable-sftp --enable-shine --enable-shout --enable-skins2 --enable-speex --enable-svg --enable-svgdec --enable-taglib --enable-theora --enable-twolame --enable-upnp --enable-vcdx --enable-vdpau --enable-vnc --enable-vorbis --enable-x264 --enable-x265 --enable-zvbi --with-kde-solid=/usr/share/kde4/apps/solid/actions/ --enable-rpi-omxil --disable-mmal-codec --disable-mmal-vout --disable-decklink --disable-dxva2 --disable-fdkaac --disable-gnomevfs --disable-goom --disable-libtar --disable-mfx --disable-opencv --disable-projectm --disable-sndio --disable-telx --disable-vpx --disable-vsxu --disable-wasapi --enable-alsa --enable-atmo --enable-dc1394 --enable-dv1394 --enable-linsys --enable-omxil --enable-udev --enable-v4l2 --enable-libva --enable-vcd --enable-smbclient --disable-oss --disable-crystalhd --disable-mmx --disable-sse --disable-neon --disable-altivec returned exit code 77 debian/rules:245: recipe for target 'override_dh_auto_configure' failed make[1]: *** [override_dh_auto_configure] Error 255 make[1]: Leaving directory '/home/mate/vlc-2.2.2' debian/rules:235: recipe for target 'build' failed make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 debuild: fatal error at line 1376: dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed

What am I doing wrong?

Wimpy add it to Ubuntu mate 16.04 you donā€™t need to recompile it anymore ! So use VLC of Ubuntu mate !
Ubuntu MATE 16.04 added OpemMAX IL hardware accelerated video playback to VLC
To enable hardware accelerated video playback in VLC go to Tools -> Preferences -> Video and select OpenMax IL.