Skip to content

Building for RPi

Janez Troha edited this page Nov 23, 2016 · 19 revisions

libmpv

Follow the docs for libmpv https://github.com/mpv-player/mpv-build#instructions-for-debian-and-ubuntu and make sure you are on latest Debian Jessie for RPi.

Add following options for ffmpeg and mpv

$ cat ffmpeg_options

--disable-debug
--disable-doc
--disable-encoders
--disable-ffmpeg
--disable-ffplay
--disable-ffprobe
--disable-ffserver
--disable-indevs
--disable-muxers
--enable-gnutls
--enable-gpl
--enable-libfreetype
--enable-libmp3lame
--enable-libopus
--enable-libtheora
--enable-libvorbis
--enable-libvpx
--enable-libx264
--enable-mmal
--enable-nonfree
$ cat mpv_options

--disable-cdda
--disable-cplayer
--disable-debug-build
--disable-dvbin
--disable-dvdread
--disable-html-build
--disable-jack
--disable-lcms2
--disable-libbluray
--disable-lua
--disable-manpage-build
--disable-pdf-build
--disable-rubberband
--disable-tv
--disable-vaapi
--disable-vapoursynth
--disable-vdpau
--disable-wayland
--disable-x11
--enable-libmpv-shared
--enable-rpi

Additionally install apt install libgles2-mesa-dev libfribidi-dev dh-autoreconf libfontconfig1-dev libgnutls28-dev libmp3lame-dev libopus-dev libtheora-dev libvorbis-dev libx264-dev libvpx-dev libegl1-mesa-dev libguess-dev libuchardet-dev libsmbclient-dev checkinstall libfontconfig1-dev libgl1-mesa-dev libgles2-mesa-dev libpulse-dev libjpeg-dev libasound2 then run ./build -j4 and then ./install

champ

Setup your go toolchain, clone champ then in root run env GOPATH=$(pwd) make rpi

Produced binaries will be in root of project

Systemd unit file for champ

cat /etc/systemd/system/champ.service

[Unit]
Description=Champ
After=network.target remote-fs.target

[Service]
ExecStart=/usr/bin/champ -n RPi

[Install]
WantedBy=multi-user.target

Boot config for RPi

Since render writing directly to hdmi driver you have to set resolution at boot time.

cat /boot/config.txt
gpu_mem=192
disable_overscan=1
hdmi_group=2
hdmi_mode=82
hdmi_drive=2
Clone this wiki locally