Skip to content

Instantly share code, notes, and snippets.

@yangxuan8282
Last active June 3, 2020 14:23
Show Gist options
  • Save yangxuan8282/c5819e8c74848420739e45e19f66cce9 to your computer and use it in GitHub Desktop.
Save yangxuan8282/c5819e8c74848420739e45e19f66cce9 to your computer and use it in GitHub Desktop.
compile mpv with hardware acceleration (mmal) on RPi, no windows borders

mpv

The latest working mpv version for this guides is 0.27.2, tested on 2018-03-13-raspbian-stretch.

sudo apt-get update && sudo apt-get upgrade -y && 
sudo apt-get install -y git devscripts equivs &&
sudo apt-get install -y libgles2-mesa-dev
sudo rpi-update &&
sudo reboot
mkdir -p ~/src/mpv &&
git clone https://github.com/mpv-player/mpv-build.git ~/src/mpv-build &&
cd ~/src/mpv-build &&
echo --enable-mmal >> ffmpeg_options
export PKG_CONFIG_PATH=/opt/vc/lib/pkgconfig/ &&
export LIBRARY_PATH=/opt/vc/lib 
./use-mpv-custom v0.27.2 &&
./update 
sed -i '0,/check_cc(lib="EGL")/s//check_cc(lib="EGL", linkflags="-lGLESv2")/' mpv/wscript
rm -f mpv-build-deps_*_*.deb &&
mk-build-deps -s sudo -i
time dpkg-buildpackage -uc -us -b -j"$(getconf _NPROCESSORS_ONLN)"
sudo dpkg -i ../mpv_*.deb
@code0nwheels
Copy link

no window is opening for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment