VP9 video playback is broken when hw video accel is enabled
See original GitHub issueDescription
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
- Install latest Fedora release
- Fully update your system
- Install vaapi packages:
sudo dnf install libva libva-utils intel-media-driver libva-intel-driver
- Install Brave nightly
- Enable #ignore-gpu-blacklist flag
- 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:
Some chromium-vaapi articles in the Fedora/Linux world:
- Fedora Magazine: Chromium on Fedora finally gets VAAPI support!
- Archlinux about Chromium and hardware acceleration
- Fedora Updates Chromium With VAAPI Support, Here’s How To Enable Hardware-Accelerated Video Decoding
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:
- Created 4 years ago
- Comments:18 (3 by maintainers)
Top GitHub Comments
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.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.