September 22, 2019, 04:29:57 pm

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Armbian Video Kiosk with mpv on Cubietruck

Started by classdroogies, May 10, 2018, 09:32:35 am

Previous topic - Next topic

classdroogies

May 10, 2018, 09:32:35 am Last Edit: May 11, 2018, 04:30:33 pm by classdroogies
Hi,

I wrote a tutorial for create basic video kiosk in few year ago and I decided to update this :)

http://www.cubieforums.com/index.php/topic,879.0.html

I use Armbian with a customized image Ubuntu xenial, with legacy kernel, without desktop packages for minimal fresh installation.

Note video acceleration work only with legacy kernel.

For mainline kernel the development is currently work in progress :

https://linux-sunxi.org/Sunxi-cedrus

Read the Armbian documentation for build your image.

https://docs.armbian.com/Developer-Guide_Build-Preparation/

With this image it's very simple, you must have a few packages :


sudo apt-get install xserver-xorg-core xinit xserver-xorg-video-fbdev xfonts-base libvdpau-sunxi1 nodm mpv


And a fewest configuration :

Add this parameters to /boot/armbianEnv.txt for enable memory reservations

disp_mem_reserves=on
extraargs=cma=96M


Configure nodm with your user which should be automatically logged in, under /etc/default/nodm file :

NODM_ENABLED=true
NODM_USER=cubie


Create ~/.xsession to launch mpv

#! /bin/bash
mpv --vo=vdpau --hwdec=vdpau --hwdec-codecs=all --loop=yes /home/cubie/video/*.mp4


And of course, you must have a video to read :

mkdir ~/video


wget http://samplemedia.linaro.org/H264/big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4 -O ~/video/big_buck_bunny.mp4


Now reboot and  8)