Easier way to install or build mpv with mmal hardware decoding and ffmpeg/libass

Install

mkdir rpimpv && cd rpimpv

wget https://awesome.nwgat.ninja/deb/mpv/mpv_0.20.0_armhf.deb https://awesome.nwgat.ninja/deb/mpv/libass_0.13.3-1_armhf.deb https://awesome.nwgat.ninja/deb/mpv/ffmpeg_3.1.3-1_armhf.deb

sudo dpkg -i *.deb

sudo apt-get -f install

sudo apt-get install libluajit

wget https://awesome.nwgat.ninja/deb/mpv/mpv.conf -O $HOME/.config/mpv/mpv.conf

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl

Play a file

mpv http://ow.ly/10tB0C (Big Buck Bunny 1080p30)

(Big Buck Bunny 1080p30) mpv https://www.youtube.com/watch?v=aqz-KE-bpKQ (Big Buck Bunny 1080p30)

mmal error

sudo su

echo "gpu_mem=159" >> /boot/config.txt

echo "gpu_mem=256" >> /boot/config.txt (rpi2/rpi3)

(rpi2/rpi3) sudo reboot

you can tweak the settings in mpv config file, if you need to move the window or change resolution of youtube, it currently defaults to 1080p30

nano $HOME/.config/mpv/mpv.conf

note: it will default to borderless non-movable window, this is a limitation of raspberry pi

Build it yourself