VPU CedarX drivers for Allwinner H3
Edited by magicse at 2015-11-26 15:21As there already is a thread about the GPU which successfully managed to get GPU drivers to work with the Allwinner H3 boards i now need help in getting video acceleration to work. There are no official drivers for linux, that work with the H3, but there seems to be an Android driver, that works. Here i read, that it is possible to use the Android drivers on Linux with libhybris:
http://linux-sunxi.org/CedarX/libve
Did anyone of you try it yet? Or are there other ways to get video acceleration to work? H264 in the beginning would be sufficiant already, although i want to have h265 support later as well...
Edited by fritz at 2015-12-7 19:37
@jacer
Please don't use words like:will upload soon, it will be released in three weeks, you need to wait, we are debugging mali driver........,
This words are reserved and can only be used by @steven and some others mod's here!
:D
When you want share something, ulpload it and that's it. Don't make "big" announcements!
My shared google-drive folder with compiled mpvdebian-package:
My shared H3 folder
install it with:
sudo dpkg -i mpv_0.13.0_armhf.deb
PS: if you can try first to build it yourself at least you learn something!
:)
h3-dev is now merged in master + add mpv
Edited by fritz at 2015-12-6 15:52OK, here is the corrected How-To on a Lubuntu 14.04 (I don't have other debian based images and I don't want download others):
First you don't need mali for this!!!
install some packages:
sudo apt-get install build-essential pkg-config git libx11-dev
Then libvdpau (0.7.1)is to old on 14.04, you need newer. the simplest is to install it from packages:
wget http://ftp.de.debian.org/debian/pool/main/libv/libvdpau/libvdpau1_1.1.1-3_armhf.deb
wget http://ftp.de.debian.org/debian/pool/main/libv/libvdpau/libvdpau-dev_1.1.1-3_armhf.deb
wget http://ftp.de.debian.org/debian/pool/main/v/vdpauinfo/vdpauinfo_1.0-1+b1_armhf.deb
install packages with:
sudo dpkg -i libvdpau1_1.1.1-3_armhf.deb
sudo dpkg -i libvdpau-dev_1.1.1-3_armhf.deb
sudo dpkg -i vdpauinfo_1.0-1+b1_armhf.deb
Now compile and install libvdpau-sunxi:
git clone https://github.com/linux-sunxi/libvdpau-sunxi.git
cd libvdpau-sunxi
make
make install
Set permissions for disp/ion/cedar devices:
sudo vi /etc/udev/rules.d/50-disp.rules
KERNEL=="disp", MODE="0660", GROUP="video"
sudo vi /etc/udev/rules.d/50-ion.rules
KERNEL=="ion", MODE="0660", GROUP="video"
sudo vi /etc/udev/rules.d/50-cedar.rules
KERNEL=="cedar_dev", MODE="0660", GROUP="video"
Then check if orangepi user is in the group "video"
if not add it. (on lubuntu it was not)
sudo usermod -a -G video orangepi
REBOOT
open a terminal and type:
vdpauinfo
It should display something like this:
orangepi@orangepi:~$ vdpauinfo
display: localhost:10.0 screen: 0
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1
Then export libvdpau-sunxi as VDPAU_DRIVER:
orangepi@orangepi:~$ export VDPAU_DRIVER=sunxi
Retype vdpauinfo and now if all is correct you should see something like this:
http://pastebin.com/4zBxArGF
Now you are ready to play some videos with mplayer or mpv:
mplayer -fs -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, test.mkv
mpv --vo=vdpau --hwdec=vdpau --hwdec-codecs=all test.mkv
Wit the "stock" mplayer you can use this HW-accelerated codecs:
ffmpeg12vdpau ffmpeg working FFmpeg MPEG-1/2 (VDPAU)
ffwmv3vdpau ffmpeg problemsFFmpeg WMV3/WMV9 (VDPAU)
ffvc1vdpauffmpeg problemsFFmpeg WVC1 (VDPAU)
ffh264vdpau ffmpeg working FFmpeg H.264 (VDPAU)
ffodivxvdpau ffmpeg working FFmpeg MPEG-4,DIVX-4/5 (VDPAU)
If you want to play HEVC/H.265 files you need to compile mplayer or mpv from source.
With a compiled mplayer 1.2 from source you can use this HW-accelerated codecs:
ffmpeg12vdpau ffmpeg working FFmpeg MPEG-1/2 (VDPAU)
ffmpeg12vdpauold ffmpeg working FFmpeg MPEG-1/2 (VDPAU)
ffwmv3vdpau ffmpeg problemsFFmpeg WMV3/WMV9 (VDPAU)
ffwmv3vdpauold ffmpeg problemsFFmpeg WMV3/WMV9 (VDPAU)
ffvc1vdpauffmpeg problemsFFmpeg WVC1 (VDPAU)
ffvc1vdpauold ffmpeg problemsFFmpeg WVC1 (VDPAU)
ffhevcvdpau ffmpeg working FFmpeg HEVC / H.265 (VDPAU)
ffh264vdpau ffmpeg working FFmpeg H.264 (VDPAU)
ffh264vdpauold ffmpeg working FFmpeg H.264 (VDPAU)
ffodivxvdpau ffmpeg working FFmpeg MPEG-4,DIVX-4/5 (VDPAU)
ffodivxvdpauold ffmpeg working FFmpeg MPEG-4,DIVX-4/5 (VDPAU)
"New" commandline with new mplayer:
mplayer -fs -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, test.mkvIf you need to compile mplayer or mpv chose mpv it works better!
https://github.com/mpv-player/mpv-build#instructions-for-debian-and-ubuntu
This will build a debian-package mpv_0.13.0_armhf.deb
That's it
:) @lex replied at 2016-1-15 07:33
@Tokka,
I tried your conf without success, no hdmi sound output.
Since this has nothing to do with ...
Probably too late for you, but I had the same problem with no sound on HDMI, and solved it by addingao=alsa:device=to ~/.config/mpv/mpv.conf
Outdated driver,we debugging new dev libs from allwinner,post results soon. Where are this new dev libs??????? fritz replied at 2015-11-18 03:25
Where are this new dev libs???????
on my system,im developing kind of player to play videos,coming soon can you not share this libs?
are this libs from steven?
That source code at https://github.com/allwinner-zh/media-codec seams good enough to try to make video acceleration working. Certanly I will try with my OpenELEC port. melanrz replied at 2015-11-18 03:55
on my system,im developing kind of player to play videos,coming soon
Could you tell us more about that new libs ??
If my memory don't faults, libhybris are needed only xbmc. If you want to use mplayer the are not necessary.
On my A20 img mplayer play smooth 1080 without libhybris (using libvdpau), and xbmc play 1080 with libhybris.
Melanrz, which player are you developing? :) libhybris is always needed when you want to use android binary on linux distribution, which is based on GNU lib C library. libvpdau supports only a few codecs in comparison of CedarX or android based libraries. tokka replied at 2015-11-21 12:04
If my memory don't faults, libhybris are needed only xbmc. If you want to use mplayer the are not ne ...
@tokka
facebookplayer
:lol
libvdpau-sunxi on the A20 works far better then Allwinner's closed source implementation!