View: 81986|Reply: 71

VPU CedarX drivers for Allwinner H3

[Copy link]

3

threads

15

posts

103

credits

Registered member

Rank: 2

credits
103
Published in 2015-11-17 20:10:07 | Show all floors |Read mode
Edited by magicse at 2015-11-26 15:21

As 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...

5

threads

354

posts

2724

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2724
Published in 2015-12-8 02:27:04 | Show all floors
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!

When you want share something, ulpload it and that's it. Don't make "big" announcements!
My shared google-drive folder with compiled mpv  debian-package:
My shared H3 folder

install it with:
  1. sudo dpkg -i mpv_0.13.0_armhf.deb
Copy code

PS: if you can try first to build it yourself at least you learn something!

Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

5

threads

354

posts

2724

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2724
Published in 2015-12-6 06:01:04 | Show all floors

h3-dev is now merged in master + add mpv

Edited by fritz at 2015-12-6 15:52

OK, 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:
  1. sudo apt-get install build-essential pkg-config git libx11-dev
Copy code

Then libvdpau (0.7.1)is to old on 14.04, you need newer. the simplest is to install it from packages:
  1. wget http://ftp.de.debian.org/debian/pool/main/libv/libvdpau/libvdpau1_1.1.1-3_armhf.deb
  2. wget http://ftp.de.debian.org/debian/pool/main/libv/libvdpau/libvdpau-dev_1.1.1-3_armhf.deb
  3. wget http://ftp.de.debian.org/debian/pool/main/v/vdpauinfo/vdpauinfo_1.0-1+b1_armhf.deb
Copy code

install packages with:
  1. sudo dpkg -i libvdpau1_1.1.1-3_armhf.deb
  2. sudo dpkg -i libvdpau-dev_1.1.1-3_armhf.deb
  3. sudo dpkg -i vdpauinfo_1.0-1+b1_armhf.deb
Copy code

Now compile and install libvdpau-sunxi:
  1. git clone https://github.com/linux-sunxi/libvdpau-sunxi.git
  2. cd libvdpau-sunxi
  3. make
  4. make install
Copy code

Set permissions for disp/ion/cedar devices:

sudo vi /etc/udev/rules.d/50-disp.rules
  1. KERNEL=="disp", MODE="0660", GROUP="video"
Copy code

sudo vi /etc/udev/rules.d/50-ion.rules
  1. KERNEL=="ion", MODE="0660", GROUP="video"
Copy code

sudo vi /etc/udev/rules.d/50-cedar.rules
  1. KERNEL=="cedar_dev", MODE="0660", GROUP="video"
Copy code

Then check if orangepi user is in the group "video"
if not add it. (on lubuntu it was not)
  1. sudo usermod -a -G video orangepi
Copy code

REBOOT

open a terminal and type:
vdpauinfo

It should display something like this:
  1. orangepi@orangepi:~$ vdpauinfo
  2. display: localhost:10.0   screen: 0
  3. Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
  4. Error creating VDPAU device: 1
Copy code

Then export libvdpau-sunxi as VDPAU_DRIVER:
  1. orangepi@orangepi:~$ export VDPAU_DRIVER=sunxi
Copy code

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:

  1. mplayer -fs -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, test.mkv
  2. mpv --vo=vdpau --hwdec=vdpau --hwdec-codecs=all test.mkv
Copy code

Wit the "stock" mplayer you can use this HW-accelerated codecs:
  1. ffmpeg12vdpau ffmpeg    working   FFmpeg MPEG-1/2 (VDPAU)  [mpegvideo_vdpau]
  2. ffwmv3vdpau ffmpeg    problems  FFmpeg WMV3/WMV9 (VDPAU)  [wmv3_vdpau]
  3. ffvc1vdpau  ffmpeg    problems  FFmpeg WVC1 (VDPAU)  [vc1_vdpau]
  4. ffh264vdpau ffmpeg    working   FFmpeg H.264 (VDPAU)  [h264_vdpau]
  5. ffodivxvdpau ffmpeg    working   FFmpeg MPEG-4,DIVX-4/5 (VDPAU)  [mpeg4_vdpau]
Copy code

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:
  1. ffmpeg12vdpau ffmpeg    working   FFmpeg MPEG-1/2 (VDPAU)  [mpegvideo]
  2. ffmpeg12vdpauold ffmpeg    working   FFmpeg MPEG-1/2 (VDPAU)  [mpegvideo_vdpau]
  3. ffwmv3vdpau ffmpeg    problems  FFmpeg WMV3/WMV9 (VDPAU)  [wmv3]
  4. ffwmv3vdpauold ffmpeg    problems  FFmpeg WMV3/WMV9 (VDPAU)  [wmv3_vdpau]
  5. ffvc1vdpau  ffmpeg    problems  FFmpeg WVC1 (VDPAU)  [vc1]
  6. ffvc1vdpauold ffmpeg    problems  FFmpeg WVC1 (VDPAU)  [vc1_vdpau]
  7. ffhevcvdpau ffmpeg    working   FFmpeg HEVC / H.265 (VDPAU)  [hevc]
  8. ffh264vdpau ffmpeg    working   FFmpeg H.264 (VDPAU)  [h264]
  9. ffh264vdpauold ffmpeg    working   FFmpeg H.264 (VDPAU)  [h264_vdpau]
  10. ffodivxvdpau ffmpeg    working   FFmpeg MPEG-4,DIVX-4/5 (VDPAU)  [mpeg4]
  11. ffodivxvdpauold ffmpeg    working   FFmpeg MPEG-4,DIVX-4/5 (VDPAU)  [mpeg4_vdpau]
Copy code

"New" commandline with new mplayer:
  1. mplayer -fs -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau,ffhevcvdpau, test.mkv
Copy code
If 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
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

0

threads

1

posts

14

credits

Novice

Rank: 1

credits
14
Published in 2016-9-21 21:18:30 | Show all floors
@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 adding
  1. ao=alsa:device=[hw:1,0]
Copy code
to ~/.config/mpv/mpv.conf

11

threads

286

posts

1933

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
1933
Published in 2015-11-18 02:41:16 | Show all floors
Outdated driver,we debugging new dev libs from allwinner,post results soon.

5

threads

354

posts

2724

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2724
Published in 2015-11-18 03:25:19 | Show all floors
Where are this new dev libs???????
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

11

threads

286

posts

1933

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
1933
Published in 2015-11-18 03:55:27 | Show all floors
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

5

threads

354

posts

2724

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2724
Published in 2015-11-18 04:01:49 | Show all floors
can you not share this libs?
are this libs from steven?
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

4

threads

1118

posts

9504

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9504
Published in 2015-11-21 17:42:13 | Show all floors
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.

3

threads

38

posts

223

credits

Intermediate member

Rank: 3Rank: 3

credits
223
Published in 2015-11-21 18:45:57 | Show all floors
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 ??

16

threads

104

posts

989

credits

Senior member

Rank: 4

credits
989
Published in 2015-11-21 19:04:10 | Show all floors
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?
OrangePi A20, with Qbee-X_testing

Still waiting for refund/replacement of no working op+2e bought on 11/11 >_<...really serious company

4

threads

1118

posts

9504

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9504
Published in 2015-11-22 01:22:22 | Show all floors
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.

5

threads

354

posts

2724

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
2724
Published in 2015-11-22 05:28:15 | Show all floors
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

libvdpau-sunxi on the A20 works far better then Allwinner's closed source implementation!

Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list