Step 1: Log in as root
We're not going to dick around with sudo in this tutorial, so set your root password and log in as root. Then, update for kicks.cubie@Cubian:~$ sudo passwd root Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully cubie@Cubian:~$ exit Cubian login: root Password: root@Cubian:~# apt-get update root@Cubian:~# apt-get upgrade
Step 2: Write stuff in config files
Since MPV isn't part of Debian Wheezy, first add the Debian Jessie repo to /etc/apt/sources.list.root@Cubian:~# cd /etc/apt root@Cubian:/etc/apt# nano sources.listOn the bottom of the page add the following linedeb http://http.us.debian.org/debian jessie mainNow press ctrl + x It will ask if you want to save. Press y. It will ask what filename to use. Press enter. Now update atp-get again.root@Cubian:/etc/apt# apt-get update
Change the amount of memory dedicated to the VPU from 80 megabytes to 256 megabytes.root@Cubian:/etc/apt# cd /boot/ root@Cubian:/boot# nano uEnv.txtThe last line of uEnv.txt should start with "extraargs=". Addsunxi_ve_mem_reserve=256to the file. Save it. By default the VPU only has access to 80 megs of memory. Now it has access to 256.
Change some user permissions for video and audioroot@Cubian:/boot# cd /lib/udev/rules.d root@Cubian:/lib/udev/rules.d# nano 90-sunxi-disp-permission.rulesAdd the following linesKERNEL=="disp", MODE="0777", GROUP="video" KERNEL=="cedar_dev", MODE="0777", GROUP="video" KERNEL=="g2d", MODE="0777", GROUP="video"Save and exit nano. Now add the default user "cubie" to the some needed groups. Alternatively if you have a different user prepared for this, use that.root@Cubian:/lib/udev/rules.d# usermod -G sudo,video,audio cubie
Enable the sunxi VDPAU driver and it's experiment OSD support.root@Cubian:/lib/udev/rules.d# cd /etc/ root@Cubian:/etc# nano environmentAdd these lines:VDPAU_DRIVER=sunxi VDPAU_OSD=1
Step 3: Install stuff
Use apt-get to grab almost everything you need.root@Cubian:/etc# apt-get install xorg build-essential git libvdpau-dev mpvOnce that finishes use git to get the latest source for the video driver and then compile the drivers.root@Cubian:/etc# cd ~ root@Cubian:~# git clone https://github.com/linux-sunxi/libvdpau-sunxi.git root@Cubian:~# cd libvdpau-sunxi root@Cubian:~/libvdpau-sunxi# make root@Cubian:~/libvdpau-sunxi# make install
Step 4: More configuration and Testing
All the necessary software should be installed at this point. Let's throw some basic configuration at MPV.root@Cubian:~/libvdpau-sunxi# cd /etc/mpv root@Cubian:/etc/mpv# nano mpv.confAdd these lines:vo=vdpau hwdec=vdpau hwdec-codecs=all ao=alsa:device=[hw:1,0], pulse slang=en, fs=yes force-rgba-osd-rendering=yesReboot.root@Cubian:/etc/mpv# rebootNow we're ready to test MPV with your favorite video file. Login as cubie or whoever you usermodded above. Then try playing a video file.cubie@Cubian:~$ cd ~/yourmoviesfolder cubie@Cubian:~/yourmoviesfolder$ startx -e "mpv yourvideofile.mkv"