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

WARNING : This is only for advanced users !
MMAL support is buggy (or I don't know how to make it work better).
It works on some video files but not all and sometimes crashes and core dump.
This is only for advanced users who want to try it and maybe help me to make it work :slightly_smiling:
If you just want to play HD videos with vlc see :

Install regular vlc
open a termnial then type :

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

Download vlc with MMAL support

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

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

Check the sha1 :

echo "2ca75b8190d149474459aaec6e0d4cb2399eac5b 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 MMAL support

open a termnial then type :

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vlc
sudo apt-get build-dep vlc
apt-get source vlc
cd vlc-2.2.1

Edit the debian/vlc-nox.install.in file :

pluma debian/vlc-nox.install.in

Add this two lines at the end of the file :

usr/lib/vlc/plugins/video_output/libmmal_vout_plugin.so
usr/lib/vlc/plugins/codec/libmmal_codec_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

launch vlc and go to tools -> Preferences -> Video and select "MMAL for raspberry pi" for video output.

I play some video well with it, but a lot only show the first frames and video freeze and sound continues.
If you try it, tell me what works or not for you. Maybe we can found what is wrong.

Enjoy

Aworan

1 Like

Sometimes it only show first frames and stop with no error in the console.
Audio continues and error in console :

[6b23e928] mmal_codec decoder error: Failed to retrieve buffer header for input data

For another videos films it work without problem !

Sir,

 I have followed your steps but i am unable to view the video in the vlc player