I've built mpv on the raspberry pi 3b+ (stretch-2018-06-27) using the following procedure from:

Run Updates

sudo apt-get update -y && sudo apt-get upgrade -y
sudo rpi-update 

increase memory ( advanced options > Memory Split > 256 )

sudo raspic-config 

Restart then run the following (I added a few new installations due to errors, libmp3lame-dev and libx264-dev)

sudo apt-get install -y gperf bison flex autoconf automake make texinfo help2man libtool libtool-bin ncurses-dev git yasm mercurial cmake cmake-curses-gui libfribidi-dev checkinstall libfontconfig1-dev libgl1-mesa-dev libgles2-mesa-dev gnutls-dev libsmbclient-dev libpulse-dev libbluray-dev libdvdread-dev libluajit-5.1-dev libjpeg-dev libv4l-dev libcdio-cdda-dev libcdio-paranoia-dev libmp3lame-dev libx264-dev

git clone https://github.com/mpv-player/mpv-build.git

cd mpv-build

echo "--enable-libx264
--disable-v4l2-m2m" > ffmpeg_options

export LIBRARY_PATH=/opt/vc/lib
export PKG_CONFIG_PATH=/opt/vc/lib/pkgconfig/

./rebuild -j4
sudo scripts/mpv-install 


Everything seems to compile, but when I run a video with the command

sudo mpv-build/mpv/build/mpv --hwdec=mmal --vo=rpi ElephantsDream.mp4 

Then no application is opened. The command line continues to show the video playing

enter image description here

The mpv log file doesn't seem to have produced any errors

1 Answer 1


Looking at the manual they linked:


Video output drivers are interfaces to different video output facilities. The syntax is:

--vo=<driver1,driver2,...[,]> Specify a priority list of video output drivers to be used.

If the list has a trailing ,, mpv will fall back on drivers not contained in the list.



rpi (Raspberry Pi)

Native video output on the Raspberry Pi using the MMAL API.

This is deprecated. Use --vo=gpu instead, which is the default and provides the same functionality. The rpi VO will be removed in mpv 0.23.0. Its functionality was folded into --vo=gpu, which now uses RPI hardware decoding by treating it as a hardware overlay (without applying GL filtering). Also to be changed in 0.23.0: the --fs flag will be reset to "no" by default (like on the other platforms).

The following deprecated global options are supported by this video output:

--rpi-display=<number> Select the display number on which the video overlay should be shown (default: 0).

--rpi-layer=<number> Select the dispmanx layer on which the video overlay should be shown (default: -10). Note that mpv will also use the 2 layers above the selected layer, to handle the window background and OSD. Actual video rendering will happen on the layer above the selected layer.

--rpi-background=<yes|no> Whether to render a black background behind the video (default: no). Normally it's better to kill the console framebuffer instead, which gives better performance.

--rpi-osd=<yes|no> Enabled by default. If disabled with no, no OSD layer is created. This also means there will be no subtitles rendered.

Otherwise you could try the --hwdec=rpi the answers suggests for some reason!

  • 1
    definitely useful, but even with --vo=gpu (or/& --hwdec=rpi) the application window still wont open
    – Alter
    Jul 12, 2018 at 20:14
  • going to add another note, but though it is officially listed as deprecated, I get an error Failed initializing any suitable GPU context! on top of my original error when I use --vo=gpu instead of --vo=rpi
    – Alter
    Jul 14, 2018 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.