No hardware acceleration for H264 decoding of Flash videos on Chromium with Pepper Flash plugin

Bug #1596027 reported by mm7
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
adobe-flashplugin (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Despite VDPAU and VA API are configured and show that H264 acceleration is available
There is still no harware acceleration for H264 Video Decoding in Pepper Flush Plugin.
Checked by right click - Show statustics.

user@nettop:~$ uname -a
Linux nettop 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

user@nettop:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

user@nettop:~$ lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 14h Processor Root Complex
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Wrestler [Radeon HD 6310]

user@nettop:~$ sudo lshw -c video
  *-display
       description: VGA compatible controller
       product: Wrestler [Radeon HD 6310]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 1
       bus info: pci@0000:00:01.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:31 memory:c0000000-cfffffff ioport:f000(size=256) memory:feb00000-feb3ffff

user@nettop:~$ DISPLAY=:0.0 vdpauinfo
display: :0.0 screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name width height types
-------------------------------------------
420 16384 16384 NV12 YV12
422 16384 16384 UYVY YUYV
444 16384 16384 Y8U8V8A8 V8U8Y8A8

Decoder capabilities:

name level macbs width height
----------------------------------------------------
MPEG1 --- not supported ---
MPEG2_SIMPLE 3 9216 2048 1152
MPEG2_MAIN 3 9216 2048 1152
H264_BASELINE 41 9216 2048 1152
H264_MAIN 41 9216 2048 1152
H264_HIGH 41 9216 2048 1152
VC1_SIMPLE 1 9216 2048 1152
VC1_MAIN 2 9216 2048 1152
VC1_ADVANCED 4 9216 2048 1152
MPEG4_PART2_SP 3 9216 2048 1152
MPEG4_PART2_ASP 5 9216 2048 1152
DIVX4_QMOBILE --- not supported ---
DIVX4_MOBILE --- not supported ---
DIVX4_HOME_THEATER --- not supported ---
DIVX4_HD_1080P --- not supported ---
DIVX5_QMOBILE --- not supported ---
DIVX5_MOBILE --- not supported ---
DIVX5_HOME_THEATER --- not supported ---
DIVX5_HD_1080P --- not supported ---
H264_CONSTRAINED_BASELINE --- not supported ---
H264_EXTENDED --- not supported ---
H264_PROGRESSIVE_HIGH --- not supported ---
H264_CONSTRAINED_HIGH --- not supported ---
H264_HIGH_444_PREDICTIVE --- not supported ---
HEVC_MAIN --- not supported ---
HEVC_MAIN_10 --- not supported ---
HEVC_MAIN_STILL --- not supported ---
HEVC_MAIN_12 --- not supported ---
HEVC_MAIN_444 --- not supported ---

user@nettop:~$ set |grep DRIVER
LIBVA_DRIVER_NAME=vdpau
VDPAU_DRIVER=r600

user@nettop:~$ DISPLAY=:0.0 vainfo
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'vdpau'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple : VAEntrypointVLD
      VAProfileMPEG2Main : VAEntrypointVLD
      VAProfileMPEG4Simple : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple : VAEntrypointVLD
      VAProfileH264Baseline : VAEntrypointVLD
      VAProfileH264Main : VAEntrypointVLD
      VAProfileH264High : VAEntrypointVLD
      VAProfileVC1Simple : VAEntrypointVLD
      VAProfileVC1Main : VAEntrypointVLD
      VAProfileVC1Advanced : VAEntrypointVLD

Revision history for this message
Naël (nathanael-naeri) wrote :

If using the Pepper Flash plugin from e.g. adobe-flashplugin through the PPAPI/NPAPI wrapper from browser-plugin-freshplayer-pepperflash in a Mozilla-based browser: hardware accelerated decoding is disabled by default, you can switch it on in ~/.config/freshwrapper.conf (enable_hwdec = 1, enable_vaapi = 1, enable_vdpau = 1). See https://github.com/i-rinat/freshplayerplugin/blob/master/data/freshwrapper.conf.example.

If using the Pepper Flash plugin from e.g. adobe-flashplugin in a Chrome-based browser: no idea, sorry.

Revision history for this message
Naël (nathanael-naeri) wrote : Re: No hardware acceleration for H264 Decoding in Pepper Flash Plugin

What browser are you using the Pepper Flash plugin in?

summary: - No harware acceleration for H264 Decoding in Pepper Flush Plugin
+ No hardware acceleration for H264 Decoding in Pepper Flash Plugin
Changed in adobe-flashplugin (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for adobe-flashplugin (Ubuntu) because there has been no activity for 60 days.]

Changed in adobe-flashplugin (Ubuntu):
status: Incomplete → Expired
Revision history for this message
mm7 (mm7-4forums) wrote :

Browser is Chromium.

packages installed:

ii chromium-browser 55.0.2883.87-0ubu amd64 Chromium web browser, open-source version of Chrome
ii chromium-browser-l10n 55.0.2883.87-0ubu all chromium-browser language packages
ii chromium-codecs-ffmpeg-extra 55.0.2883.87-0ubu amd64 Extra ffmpeg codecs for the Chromium Browser

Revision history for this message
mm7 (mm7-4forums) wrote :

Also

ii adobe-flash-properties-gtk 1:20161213.1-0ubuntu0.1 amd64 GTK+ control panel for Adobe Flash Player plugin
ii adobe-flashplugin 1:20161213.1-0ubuntu0.1 amd64 Adobe Flash Player plugin

Revision history for this message
Naël (nathanael-naeri) wrote :

Flash with Chromium-based browsers is out of my knowledge, sorry.

A quick Google search shows that apparently, at least a few years ago, Chromium/Chrome used to disable hardware acceleration for certain graphic cards. Knowing the limited capabilities of the AMD/ATI Radeon HD 6310 (an APU-integrated graphic card that equipped my dad's early 2010s mini-desktop computer), perhaps hardware acceleration is indeed disabled for this card. In which case, it might be forced, and perhaps the following (dated) links can still help:

http://askubuntu.com/questions/325431/hardware-acceleration-of-chromes-flash-plugin
http://www.webupd8.org/2014/01/enable-hardware-acceleration-in-chrome.html

You should also install a Mozilla-based browser (and the PPAPI/NPAPI wrapper browser-plugin-freshplayer-pepperflash), enable hardware accelerated decoding (see comment 1), and see if you can reproduce this issue (no hardware accelerated H.264 in Flash videos). This would help find out whether it's the browser's fault or the plugin's fault (cause I'm not sure this bug should be filed against the plugin).

Changed in adobe-flashplugin (Ubuntu):
status: Expired → Incomplete
summary: - No hardware acceleration for H264 Decoding in Pepper Flash Plugin
+ No hardware acceleration for H264 decoding of Flash videos on Chromium
+ with Pepper Flash plugin
Revision history for this message
mm7 (mm7-4forums) wrote :

It is definetely PPAPI plugin's fault.
Firefox with NPAPI plugin (same adobe-flashplugin) was using HW acceleration both for decoding and rendering.
until recently. Then recently NPAPI FlashPlayer stopped to work completely. I suspect it is now completly desupported.

Revision history for this message
Naël (nathanael-naeri) wrote :

You shouldn't compare the PPAPI plugin and the NPAPI plugin. They are not exactly the same. This was obvious in the past when the NPAPI plugin was frozen at version 11.2, but it is still true now even though both plugins are version 24.0 (since Dec 13).

In particular, the new 24.0 NPAPI plugin is a security initiative that does not include certain features implemented in the PPAPI version, most notably GPU acceleration of 3D graphics and support of videos with DRM [1]. This new 24.0 NPAPI plugin is shipped by the adobe-flashplugin package, version 20161213, that you are using. Perhaps GPU acceleration of H.264 videos is not supported either? Although that is surprising, that fits your experience of hardware acceleration stopping working recently.

In any case, it's the PPAPI plugin in Chromium and the PPAPI plugin in Firefox (through the PPAPI-to-NPAPI wrapper, browser-plugin-freshplayer-pepperflash) that you should compare. If you do, please consider installing the wrapper from ppa:nilarimogard/webupd8 [2] or ppa:jonathonf/pepperflashplugin-nonfree [3] instead of the one available in Xenial's official archive [4], as this version is already old and hasn't benefited yet of several bug fixes (e.g. bug 1633678).

Also make sure that hardware accelerated decoding is enabled by the wrapper [5]: switch enable_hwdec to 1 in the wrapper's configuration file, and check that enable_vaapi and enable_vdpau are also set to 1 so that hardware accelerated decoding uses VA-API/VDPAU.

[1] http://blogs.adobe.com/flashplayer/2016/08/beta-news-flash-player-npapi-for-linux.html
[2] https://launchpad.net/~nilarimogard/+archive/ubuntu/webupd8
[3] https://launchpad.net/~jonathonf/+archive/ubuntu/pepperflashplugin-nonfree
[4] http://packages.ubuntu.com/browser-plugin-freshplayer-pepperflash
[5] https://github.com/i-rinat/freshplayerplugin/blob/master/data/freshwrapper.conf.example

Have you had any luck with the links I posted in comment 6?

Revision history for this message
mm7 (mm7-4forums) wrote :

Hi Nathanaël

I did not have chance to try PPAPI-to-NPAPI wrapper.

When I've posted this issue here I was hoping that someone tells how to turn on H264 decoding HW acceleration for flashplayer PPAPI itself in Chromium. I tried this and that - no luck.

You are saying that PPAPI-to-NPAPI wrapper can turn it on.
I'll try and let you know.

Just one thing is not clear. Will it work this way? :
adobe-flashplugin(PPAPI) - PPAPI-to-NPAPI - Firefox

Or browser-plugin-freshplayer-pepperflash has to be installed?

Revision history for this message
Naël (nathanael-naeri) wrote :

Hi, sorry I didn't reply sooner. I've been busy with bugs in other software.

Still no hardware accelerated decoding of H.264 Flash videos in Chromium?

I still can not help you with that particular browser more than what I suggested in comment 6.

If you would like to determine whether the issue comes from the PPAPI plugin or the from browser, you can try the same plugin in another browser, as I explained:

1. Make sure you have the latest available versions of the packages adobe-flashplugin (the PPAPI plugin and also the NPAPI plugin but we are not going to use this one, see comment 8), browser-plugin-freshplayer-pepperflash (the PPAPI-to-NPAPI wrapper), and Firefox (an NPAPI-only compatible browser), from the official Ubuntu archive (sections partner, multiverse, and main, respectively). No longer needed to use PPAs contrary to what I wrote in comment 8.

2. Enable hardware accelerated decoding of Flash videos *in the wrapper* (that will NOT make it available if it is not available *in the plugin*, but that will stop blocking it if it is available *in the plugin*): write "enable_hwdec = 1" in ~/.config/freshwrapper.conf (create this file) and check that "enable_vaapi = 1, enable_vdpau = 1" in /usr/share/doc/browser-plugin-freshplayer-pepperflash/freshwrapper.conf.example (default config for the wrapper).

3. Test if you can reproduce this issue (no hardware accelerated H.264 in Flash videos). Of course, make sure you are testing with an actual Flash video encoded in H.264, not an HTML5 video or a video encoded in another codec.

4. Report here! :-)

Also, to reply more directly to your last comment:

> You are saying that PPAPI-to-NPAPI wrapper can turn it on.
> I'll try and let you know.
It will only make it available to NPAPI-compatible browsers IF it is available in the plugin. The wrapper is only an adapter between two APIs (two software interfaces), it is not a video decoder or anything.

> Just one thing is not clear. Will it work this way? :
adobe-flashplugin(PPAPI) - PPAPI-to-NPAPI - Firefox
Yes.

> Or browser-plugin-freshplayer-pepperflash has to be installed?
browser-plugin-freshplayer-pepperflash *is* the PPAPI-to-NPAPI wrapper (the adapter).

I have written a memo on Flash support in Linux (because it's quite convoluted) that I recommend you read if things are not clear for you. I've just updated it too.

https://gist.github.com/nathanael-naeri/0ba3d8aba09743221d76142e896ab2c0

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for adobe-flashplugin (Ubuntu) because there has been no activity for 60 days.]

Changed in adobe-flashplugin (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.