question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VP9 video playback is broken when hw video accel is enabled

See original GitHub issue

Description

In a Linux system (Fedora 31) with VAAPI and hardware video acceleration enabled ( #ignore-gpu-blacklist ), if a webpage has a video encoded in VP9 format, the video playback is stuck. Hardware-accelerated video playback works normally for h624-encoded videos. This means that either you play all videos in software-mode or only play h264-encoded videos when hardware acceleration is available.

  • Hardware accelerated video playback works for h264
  • If hardware acceleration is available, then VP9 video playback doesn’t work
  • Software playback works for all videos
  • Hardware acceleration works for both VP9 and h264 when running chromium-vaapi in the same test scenario

In chromium, despite having #ignore-gpu-blacklist and accelerated video playback, it doesn’t affect VP9. So, chromium is not affected

This leads that the underling Chromium that Brave is using is missing some library/feature/compilation flag.

Steps to Reproduce

  1. Install latest Fedora release
  2. Fully update your system
  3. Install vaapi packages: sudo dnf install libva libva-utils intel-media-driver libva-intel-driver
  4. Install Brave nightly
  5. Enable #ignore-gpu-blacklist flag
  6. Try to open an youtube (or any other video) that is encoded in VP9 (e.g.: this one )

Actual result:

Video playback is stuck.

brave://media-internals/

render_id: 9
player_id: 41
origin_url: https://www.youtube.com/
kFrameUrl: https://www.youtube.com/watch?v=MZEUGR3Q21I
kFrameTitle: YouTube
url: blob:https://www.youtube.com/500eda88-a298-41e4-a3d6-874d47deecfd
info: Selected MojoVideoDecoder for video decoding, config: codec: vp9, profile: vp9 profile0, alpha_mode: is_opaque, coded size: [640,360], visible rect: [0,0,640,360], natural size: [640,360], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}
pipeline_state: kPlaying
kVideoTracks: [object Object]
kAudioTracks: [object Object]
kIsAudioDecryptingDemuxerStream: false
kAudioDecoderName: FFmpegAudioDecoder
kIsPlatformAudioDecoder: false
event: PLAY
kIsVideoDecryptingDemuxerStream: false
kVideoDecoderName: MojoVideoDecoder
kIsPlatformVideoDecoder: true
audio_buffering_state: BUFFERING_HAVE_ENOUGH
duration: 169.821

Expected result:

Videos playing normally with hardware acceleration enabled

Reproduces how often:

Every time

Brave version (brave://version info)

Brave 1.4.96 Chromium: 80.0.3987.132 (Official Build) (64-bit)
Revision fcea73228632975e052eb90fcf6cd1752d3b42b4-refs/branch-heads/3987@{#974}
OS Linux
JavaScript V8 8.0.426.26
Flash (Disabled)
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Command Line /opt/brave.com/brave/brave --enable-dom-distiller --disable-domain-reliability --no-pings --extension-content-verification=enforce_strict --extensions-install-verification=enforce --sync-url=https://no-thanks.invalid --enable-features=PasswordImport,WebUIDarkMode,SimplifyHttpsIndicator --disable-features=AutofillServerCommunication,AllowPopupsDuringPageUnload,NotificationTriggers,AudioServiceOutOfProcess,SmsReceiver,LookalikeUrlNavigationSuggestionsUI,WebXR,VideoPlaybackQuality,WebXrGamepadModule --flag-switches-begin --ignore-gpu-blacklist --flag-switches-end --disable-webrtc-apm-in-audio-service --disable-sync
Executable Path /opt/brave.com/brave/brave
Profile Path /home/gjc/.config/BraveSoftware/Brave-Browser/Default

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Yes
  • Can you reproduce this issue with the dev channel? Don’t know
  • Can you reproduce this issue with the nightly channel? YEs

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? No
  • Does the issue resolve itself when disabling Brave Rewards? No
  • Is the issue reproducible on the latest version of Chrome? No

Miscellaneous Information:

Related bugs: #1024 and #7706

Some chromium-vaapi articles in the Fedora/Linux world:

vainfo:

libva info: VA-API version 1.6.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.6 (libva 2.6.0.pre1)
vainfo: Driver version: Intel iHD driver - 1.0.0
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
akarshanbiswascommented, Apr 21, 2020

Someone need to add this patch to brave. It will fix the Intel VP9 issue. Honestly there are many issues with chromium atm. (egl backend is busted in the current build and issue with Mesa).

@Nuc1eoN Your issue is with mesa rgb10 configs. You need to disable it. Add export allow_rgb10_configs=false in your environment and relaunch.

3reactions
Nuc1eoNcommented, Mar 26, 2020

This is funny because for me it is exactly the other way around.

With HW acceleration enabled I can watch VP9 videos, but h264 video content is severely broken #7706

It is true that Chromium with enabled HW accel has no issues, so it is Brave specific.

Read more comments on GitHub >

github_iconTop Results From Across the Web

1530083 - vp9 hardware acceleration broken - Bugzilla@Mozilla
when playing the vp9 video, press Ctrl-Shift-I go to the Media-Webrtc tab and select the URL to the video element playing. Expand it...
Read more >
Poor VP9 video decoding performance on youtube (AMD RX ...
HW acceleration is definitely working as I see my video decode usage go up to about 70% when playing back 4K youtube videos....
Read more >
Broken VP9 video playback colors on AMD Ryzen 5 (PRO ...
When playing video on YouTube using Chromium I see broken colors. ... from using Video Acceleration including VP9 hardware decoding.
Read more >
Video playback with VAAPI is broken since chromium-73.0 ...
Description of problem: Since chromium-73-*, video playback doesn't work if it's accelerated through VAAPI. Version-Release number of selected component (if ...
Read more >
499696 - Windows vp9 hardware decode hangs chrome when ...
The video should play, but it spins forever even though the video has fully ... So it seems very likely it is the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found