3 3
Hopkins_88

BananaPiPro. Video Accelerated No Work.

Recommended Posts

Hello Igor!
Please help.

What am I doing wrong?

 

My device:
LeMaker BananaPiPro (black board with yellow GPIO).
http://www.armbian.com/banana-pi-pro/
Your build:
Debian jessie Legacy Kernel 3.4.109
uname -a
Linux bananapi 3.4.109-banana #5 SMP PREEMPT Wed Sep 30 14:20:25 CEST 2015 armv7l GNU/Linux

I need the following:
1. Install light gui (i were install xfce4 (+goodies) + lightdm)
2. Internet browser (i use iceweasel)
3. On-line film and serials from internet
4. Sound from HDMI (bananapipro connect to my tv)

The items 1, 2 and 4 - No problem.
The item 3 - Very poor quality video.

What has been done:
http://linux-sunxi.org/Mali_binary_driver
http://wiki.lemaker.org/BananaPro/Pi:GPU

I see a smoothed triangle. The console were tell me which renderer is being used:
...
GL Vendor: "ARM"
GL Renderer: "Mali-400 MP"
GL Version: "OpenGL ES 2.0"
...
OK
Everything must be in order as I understand?

O-la-la

On-line videos from Internet is still very poor quality.

Please any help!

P.S.:
If insert Android-sdcard to my device then on-line video is good.

 

I apologize for my English.

Share this post


Link to post
Share on other sites

Thank you.
I see what you mean.
But what it is possible to make about the online Internet of video (YouTube)?

Are there any options besides the android?

Share this post


Link to post
Share on other sites

Well.
There is other way?
How to establish a Flash player?
For example Pepper flash. Together with Iceweasel?
Where to find a pepper flash for armhf?
Or where I can find Cromium browser for armhf?

Share this post


Link to post
Share on other sites

You can install chromium and pepperflash for armhf, but again it won't use hardware acceleration either with flash or HTML5 based video services.

 

If you want to watch videos from some online services (including Youtube), your best chance is using programs that pipe online video to local player, GUI - smplayer (should be installable with apt-get), CLI - Livestreamer, Whitey.

You'll need to tweak these programs to use mplayer/mpv with hardware acceleration (vdpau) (as @tkaiser pointed out). I would recommend trying smplayer with mpv first.

P.S. I don't recommend trying to set video resolution higher then 720p for initial tests.

Share this post


Link to post
Share on other sites

I have a Debian Jessie with 3.4.109 kernel. How can I install chromium on Banana? It is not available on repository and I searched on Google without success.

 

If you want to watch videos from some online services (including Youtube), your best chance is using programs that pipe online video to local player

 

 

 

It is new to me. How can I do it? I'm able to see h264 video using mpv with hardware decoding.

 

Thanks

Share this post


Link to post
Share on other sites

About chromium - armhf package is available here: https://launchpad.net/ubuntu/trusty/armhf/chromium-browser, or here: https://launchpad.net/ubuntu/wily/armhf/chromium-browser (they are for different versions of Ubuntu, but they should be installable on Debian).

It has a giant list of dependencies, you probably will need to install some packages (cromium-codecs for sure) manually before you can install it. Please make a backup of your system before attempting to install it.

I managed to install it and even activate pepperflash maybe 1.5 years ago or even earlier, using this article (in Russian). Now link to pepperflash there is dead, and I'm not sure if new versions of chromium support it even if you get this library.

 

 

About video - install smplayer, set it to use mpv (new versions should support it, older versions work only with mplayer), append needed parameters for mpv in settings (Advanced/Options for MPlayer/MPV), enable youtube support (Network), try to use Open/URL and paste any Youtube link there.

Share this post


Link to post
Share on other sites

It seems that the support for MPV in the SMPlayer has been added in the version 15.x, but I wasn't able to find such version for Debian Jessie. The latest version of SMPlayer available for Debian Jessie is the 14.9.0.

How can I install the SMPlayer version that support MPV integration on Debian Jessie? Is it possible?

 

Thanks

Share this post


Link to post
Share on other sites

MPV works, but mplayer doesn't.

When I run this

mpv --vo=vdpau --hwdec=vdpau --hwdec-codecs=all test.h264.mp4

it works and this is the output

Playing: /home/bananapi/Videos/test.h264.mp4
[libav/demuxer] h264: Estimating duration from bitrate, this may be inaccurate
[stream] Video (+) --vid=1 (h264)
[VDPAU SUNXI] VE version 0x1623 opened.
Trying to use hardware decoding.
No video PTS! Making something up.
VO: [vdpau] 1920x1080 => 1920x1080 vdpau
[VDPAU SUNXI] Presentation time not supported
V: 00:00:00 / 00:00:00 (0%)
No video PTS! Making something up.

But when I run this

mplayer -fs -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau test.h264.mp4

I have this error

MPlayer2 2.0-728-g2c378c7-4+b1 (C) 2000-2012 MPlayer Team
Cannot open file '/home/bananapi/.mplayer/input.conf': No such file or directory
Failed to open /home/bananapi/.mplayer/input.conf.
Cannot open file '/etc/mplayer/input.conf': No such file or directory
Failed to open /etc/mplayer/input.conf.

Playing /home/bananapi/Videos/test.h264.mp4.
Detected file format: raw H.264 video (libavformat)
[h264 @ 0xb5d6d5b8]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
Load subtitles in /home/bananapi/Videos/
[VDPAU SUNXI] VE version 0x1623 opened.
Forced video codec: ffmpeg12vdpau
Forced video codec: ffh264vdpau
Cannot find codec 'h264_vdpau' in libavcodec...
Video decoder init failed for codecs.conf entry "ffh264vdpau".
Cannot find codec matching selected -vo and video format 0x34363248.

I know that is shoud be mplayer instead of mplayer2. I removed mplayer2 and tried to install mplayer, but this is the result.

root@bananapipro:/home/bananapi/Downloads# apt-get install mplayer
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mplayer2' instead of 'mplayer'
The following NEW packages will be installed:
  mplayer2
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

What is wrong?

Share this post


Link to post
Share on other sites

You can try compiling latest smplayer on your device.

http://sourceforge.net/projects/smplayer/files/SMPlayer/15.11.0/smplayer-15.11.0.tar.bz2/download

You'll need to install required dependencies (search or ask on forum.smplayer.info) and run create_deb.sh

 

Edit: according to mpv manual, more or less recent mpv versions support playing online video natively if youtube-dl is installed. I recommend installing youtube-dl manually or with pip/pip3 since Debian package doen't update as often as it needs to do.

Share this post


Link to post
Share on other sites

I was able to build smplayer and now it works with mpv, although there is a strange flickering on the bottom bar. I have to check better all the options.

 

Thanks for support.

Share this post


Link to post
Share on other sites

so is it true that there's currently no way to enable h.264 hardware acceleration on the mainline kernel? I have a great Armbian based mainline kernel build running on my Allwinner A20 based Banana Pi but would really benefit to have h.264 hardware acceleration for improved NoMachine remote desktop support. NoMachine is infinitely faster and better than VNC, and without an arm based version of TeamViewer it's the best thing going for remote desktop control.

Share this post


Link to post
Share on other sites

mplayer was working with HW acceleration on wheezy and trusty, but today I loaded jessie image and I got that:

Cannot find codec 'h264_vdpau' in libavcodec...
Video decoder init failed for codecs.conf entry "ffh264vdpau".

I'm puzzled, what's wrong with it? Outdated libs in jessie?

Share this post


Link to post
Share on other sites

AFAIK we only prepare mpv ... which gives a prove of video playing capabilities.

 

Armbian desktop development is very limited so this will probably stay as is. I would also like to see everything working :)

 

The project is open.

Share this post


Link to post
Share on other sites

Mplayer doesn't work in my system too, with the very same error, even if h264 is present and libvdpau-sunxi with h264 also. This is when i installed it from repository.

But, when i compiled it from source everything is ok. Just in case i install latest x264 first:

git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static --enable-shared
make -j2
sudo make install
sudo ldconfig

And about mplayer, first install this:

sudo apt-get update
sudo apt-get install build-essential subversion checkinstall git-core docbook-xml docbook-xsl xsltproc libxml2-utils

then some dependencies (some may be skipped):

sudo apt-get install libaa1-dev libasound2-dev libcaca-dev libcdparanoia-dev libdca-dev libdirectfb-dev libenca-dev libesd0-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgif-dev libgl1-mesa-dev libjack-jackd2-dev libopenal1 libpulse-dev libsdl1.2-dev libvdpau-dev libxinerama-dev libxv-dev libxvmc-dev libxxf86dga-dev libxxf86vm-dev librtmp-dev libsctp-dev libass-dev libfaac-dev libsmbclient-dev libtheora-dev libogg-dev libxvidcore-dev libspeex-dev libvpx-dev libschroedinger-dev libdirac-dev libdv4-dev libopencore-amrnb-dev libopencore-amrwb-dev libmp3lame-dev liblivemedia-dev libtwolame-dev libmad0-dev libgsm1-dev libbs2b-dev liblzo2-dev ladspa-sdk libopenjpeg-dev libfaad-dev libmpg123-dev libopus-dev libbluray-dev libaacs-dev

and the mplayer finally:

wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.3.0.tar.xz
wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2
tar xjvf all-20110131.tar.bz2
sudo mkdir /usr/local/lib/codecs
sudo cp -v all-20110131/* /usr/local/lib/codecs
tar xJvf MPlayer-1.3.0.tar.xz
cd MPlayer-1.3.0
./configure
make -j2
sudo make install

Usage:

mplayer -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau,ffvc1vdpau [filename]

or put this into mplayer.conf to make it permanent and use only "mplayer [filename]"

  - sudo nano /usr/local/etc/mplayer/mplayer.conf :

vo=vdpau
vc=ffmpeg12vdpau,ffh264vdpau,ffvc1vdpau
ao=alsa:device=hw=1.0

Adjust the lst line to much your audio output configuration.

But mpv is better :).

Share this post


Link to post
Share on other sites

I know the OP is talking about leveraging the video acceleration, so I wanted to throw in a few of my experiences...

 

For a faster desktop experience (which is not what I understand is the focus of Armbian) you want to install the fbturbo_drv Xorg driver.  Instructions for that can be found here:  http://linux-sunxi.org/Xorg

This works with or without the Cedar and MALI drivers.  Typical desktops used on ARM platforms don't use compositing and therefore get no real boost from these drivers.  the Cedar (vdpau) driver is the one for accelerated video playback.  It uses the NEON functions.  There's a great writeup here: http://www.cnx-software.com/2013/12/10/most-embedded-gpus-do-not-support-hardware-video-decoding-acceleration-the-vpu-does/ 

 

I was recently *chastised* by one of the authors of the lima driver, which is reverse engineering of the ARM MALI binary blob, for asking for video acceleration via the MALI subsystem...  

 

I've used the guides here: https://archlinuxarm.org/forum/viewtopic.php?f=33&t=5979 and here: https://blog.eldajani.net/banana-pi-arch-linux-accelerated-mali-gpu/ to get both Cedar and Mali to work.  The caveat is that both of these methods rely on vendor provided proprietary binary blobs that are only compatible with the 3.4 kernel...

 

I've found the same issues that RagnerBG pointed out regarding mplayer having the vdpau components not compiled in the repository.  The steps outlined in the previous post work for me as well.

 

Anyway, apologies for the rambling..  good day all!

Share this post


Link to post
Share on other sites

For a faster desktop experience (which is not what I understand is the focus of Armbian) you want to install the fbturbo_drv Xorg driver.

 

It should be noted that we already started to include this whole stuff to desktop builds. These will be from now on either Jessie or in the future Ubuntu Xenial to avoid a dependency hell (when including the most recent mpv binary): https://github.com/igorpecovnik/lib/commits/master/desktop.sh

 

That means starting with Armbian 5.05 it should not be necessary to go through the whole process, just use the desktop image (when available) or in case you want to compile yourself, clone the Armbian build environment and give it a try (see Readme.md on Github).

 

I've created a test image a few days ago and that worked pretty well on Banana Pi/Pro (I replaced the window manager with metacity and then also window movement was a lot faster). Feedback welcomed.

Share this post


Link to post
Share on other sites

RagnerBG

mpv has sound sync issue on my jessie, I will try to comple mplayer myself. Thanks

Is it better to use mplayer2?

 

I have consern that mplayer2 have incomatibility with the latest libavcodec. And that's the root cause. Previous libavcodec versions (e.g. libavcodec53libavcodec54) worked fine with mplayer2

 

BTW. This says  that udev rules for /dev/ion is only for H3; while A10/A20, A13, requires udev rules for /dev/g2d (it's missing in Armbian now)

Share this post


Link to post
Share on other sites

I had sound sync issue in all players when i install Mali Binary Driver for framebuffer. Last time i checked it was that way in Armbian Desktop images. To deal with this simply set players in fullscreen by adding -fs . Or add fs=yes in mpv.conf/mplayer.conf . But i found X11 for more convenient without such issues in window mod, so i simply install Mali Binary Driver for X11 and no sound/video desync in players anymore.

mplayer2? Is this project still live? I tried to find some source but everything was down. Eventually i found something and install it (from repositories i think) but i found no difference with latest mplayer. I don't know what cause this incompatibility but i tried everything i thought about - install x264, install libx264-dev, compile ffmpeg, still official mplayer cant find codec. So as i wrote, compile mplayer from source do the trick.

About /dev/g2d,  it is where it should be. You probably need to load some modules:

ump
mali
drm
mali_drm
sunxi_cedar_mod

with modprobe, or put them in /etc/modules , ion is not for A20. And you need proper permissions.

 

My problem right now is damned OSD/subtitles support. Same libraries versions, same conditions, or works, or not in random (mostly not) in every new installation. If work in some miracle, only work with root account. I found some versions in staging branch, where OSD is enabled by default and work like a charm, but they are so unstable, that this is the only thing working.

Sometimes i am a big moron and write bullshits when angry. OSD and subtitles work very well, i only had to put the correct environment variables in the right places. Those sunxi guys are great, they even made OSD support for H3 with pixman. Work very well.

Share this post


Link to post
Share on other sites

Could we talk about mali again for a second?

 

The directions in the link for sunxi-mali have you run 

   make config

which check for /dev/mali !? Aren't these instructions intended to INSTALL the mali device?

 

How do you bootstrap the mali driver. I'm working with Cubieboards if that's important.

 

This is the output from make config:

cubie@cubieboard2:~/Apps/sunxi-mali$ make config
rm -f config.mk
make config.mk
make[1]: Entering directory `/home/cubie/Apps/sunxi-mali'
make -f Makefile.config
ABI="armhf" (Detected)
Error: Failed to open /dev/mali: No such file or directory
VERSION="" (Detected)
Error: Failed to open /dev/mali: No such file or directory
Error: Failed to open /dev/mali: No such file or directory
Error: Failed to open /dev/mali: No such file or directory
Error: Failed to open /dev/mali: No such file or directory
Error: Failed to open /dev/mali: No such file or directory
make[2]: Entering directory `/home/cubie/Apps/sunxi-mali'
Makefile.config:57: Unknown/unhandled Mali Version ""
Makefile.config:58: Use VERSION=(r2p4,r3p0,r3p1,r3p2-01rel1) instead
Error: Failed to open /dev/mali: No such file or directory
Makefile.config:59: *** Unknown/unhandled Mali Version "".  Stop.
make[2]: Leaving directory `/home/cubie/Apps/sunxi-mali'
make[1]: *** [config.mk] Error 2
make[1]: Leaving directory `/home/cubie/Apps/sunxi-mali'
make: *** [config] Error 2

Thanks!

Share this post


Link to post
Share on other sites
Error: Failed to open /dev/mali: No such file or directory

I am not sure what you asking. But about this error, you need to load some modules first - (sudo) modprobe mali  and /dev/mali file will show up. But you need some more. I am usually put this in /etc/modules :

disp
ump
disp_ump
mali
drm
mali_drm
sunxi_cedar_mod

some of this is automatically loaded and is not need to be there, but it doesn't hurt. For mali binary driver you basically need only mali and ump modules (modprobe mali, modprobe ump). Then you need proper permissions for this files, it's already written in the instructions,so read carefully.

Share this post


Link to post
Share on other sites

I am not sure what you asking. But about this error, you need to load some modules first - (sudo) modprobe mali  and /dev/mali file will show up. But you need some more. I am usually put this in /etc/modules :

disp
ump
disp_ump
mali
drm
mali_drm
sunxi_cedar_mod

some of this is automatically loaded and is not need to be there, but it doesn't hurt. For mali binary driver you basically need only mali and ump modules (modprobe mali, modprobe ump). Then you need proper permissions for this files, it's already written in the instructions,so read carefully.

 

In another distro which is working at full speed, I have these modules loaded: 

 

disp_ump

drm

mali

mali_drm

sunxi_cedar_mod

ump

 

I'll see if I can match your list under Armbian.

 

Thanks

Share this post


Link to post
Share on other sites

Hi back, newbie here.

Got an old Cubietruck, trying to make a simple youtube player for kids out of it.

Installed mali (triangle ok) and fbturbo (x11 logs fine, but can't start test! sunxi_disp_init() failed - ???)

Started firefox and youtube - swaaamp, freezes every frame with 100% cpu load....

 

Read this topic shortly. Feel confused! If there's a dedicated h.264 (or whatever) player capable of using hw acceleration - why no youtube plugin for iceweasel????

 

Thanks in advance.

And, hey, yes, what's wrong with fbturbo tests?

 

Share this post


Link to post
Share on other sites

Many thanks Igor. Youtube-dl looks like a downloader tho. Still can't get the idea of using crutches in a place they're not for.

No way for a video overlay in a plugin? Theoretically? Or WIP?

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
3 3