thorium icon indicating copy to clipboard operation
thorium copied to clipboard

HEVC on latest thorium not working.

Open thnkman opened this issue 1 year ago • 21 comments

System Details

  • OS: Slackware Current x86_64
  • Thorium Version 122.0.6261.132
  • libva-2.22.0
  • mesa-24.2.0
  • vulkan-sdk-1.3.290.0
  • intel-media-driver-24.2.5
  • libvdpau-va-gl-0.4.2

env variables: export LIBVA_DRIVER_NAME=iHD export VDPAU_DRIVER=va_gl export VAAPI_MPEG4_ENABLED=true

vainfo: vainfo: VA-API version: 1.22 (libva 2.22.0) vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 () 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 VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointFEI VAProfileHEVCMain : VAEntrypointEncSliceLP VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointEncSliceLP VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointEncSliceLP VAProfileVP9Profile1 : VAEntrypointVLD VAProfileVP9Profile1 : VAEntrypointEncSliceLP VAProfileVP9Profile2 : VAEntrypointVLD VAProfileVP9Profile2 : VAEntrypointEncSliceLP VAProfileVP9Profile3 : VAEntrypointVLD VAProfileVP9Profile3 : VAEntrypointEncSliceLP VAProfileHEVCMain12 : VAEntrypointVLD VAProfileHEVCMain12 : VAEntrypointEncSlice VAProfileHEVCMain422_10 : VAEntrypointVLD VAProfileHEVCMain422_10 : VAEntrypointEncSlice VAProfileHEVCMain422_12 : VAEntrypointVLD VAProfileHEVCMain422_12 : VAEntrypointEncSlice VAProfileHEVCMain444 : VAEntrypointVLD VAProfileHEVCMain444 : VAEntrypointEncSliceLP VAProfileHEVCMain444_10 : VAEntrypointVLD VAProfileHEVCMain444_10 : VAEntrypointEncSliceLP VAProfileHEVCMain444_12 : VAEntrypointVLD VAProfileHEVCSccMain : VAEntrypointVLD VAProfileHEVCSccMain : VAEntrypointEncSliceLP VAProfileHEVCSccMain10 : VAEntrypointVLD VAProfileHEVCSccMain10 : VAEntrypointEncSliceLP VAProfileHEVCSccMain444 : VAEntrypointVLD VAProfileHEVCSccMain444 : VAEntrypointEncSliceLP VAProfileAV1Profile0 : VAEntrypointVLD VAProfileHEVCSccMain444_10 : VAEntrypointVLD VAProfileHEVCSccMain444_10 : VAEntrypointEncSliceLP

thorium-browser flags:

Canvas: Hardware accelerated Canvas out-of-process rasterization: Disabled Direct Rendering Display Compositor: Disabled Compositing: Hardware accelerated Multiple Raster Threads: Enabled OpenGL: Enabled Rasterization: Hardware accelerated Raw Draw: Disabled Skia Graphite: Disabled Video Decode: Hardware accelerated Video Encode: Hardware accelerated Vulkan: Enabled WebGL: Hardware accelerated WebGL2: Hardware accelerated WebGPU: Disabled

Problem thorium-browser will no longer playback HEVC videos. Tested using https://thorium.rocks/misc/h265-tester.html Tested latest google chrome, and it works, although without sound.

thnkman avatar Aug 29 '24 15:08 thnkman

https://thorium.rocks/misc/h265-tester.html works for me using latest Thorium (M126).

You use

Thorium Version 122.0.6261.132

Please update and try again.

midzer avatar Aug 30 '24 00:08 midzer

image Same here it doesnt work on Windows with latest thorium build

genesis224 avatar Aug 30 '24 03:08 genesis224

https://thorium.rocks/misc/h265-tester.html works for me using latest Thorium (M126).

You use

Thorium Version 122.0.6261.132

Please update and try again.

Odd, i was sure i was running the latest version. In any regard, i removed 122, deleted all cache files and directories (.cache/thorium & .config/thorium) installed 126, but the problem persists.

Flags tried: thorium-browser --enable-features=VaapiVideoDecodeLinuxGL --ozone-platform=x11 thorium-browser --enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,VaapiVideoEncoder Error: ERROR:vaapi_video_decoder.cc(1212)] failed Initialize()ing the frame pool

chrome://gpu:

Video Acceleration Information

Decoding : Decode h264 baseline : 16x16 to 4096x4096 pixels Decode h264 main : 16x16 to 4096x4096 pixels Decode h264 high : 16x16 to 4096x4096 pixels Decode vp8 : 16x16 to 4096x4096 pixels Decode vp9 profile0 : 16x16 to 16384x16384 pixels Decode vp9 profile2 : 16x16 to 16384x16384 pixels Decode hevc main : 16x16 to 16384x16384 pixels Decode hevc main 10 : 16x16 to 16384x16384 pixels Decode hevc main still-picture: 16x16 to 16384x16384 pixels Decode av1 profile main : 16x16 to 16384x16384 pixels

thnkman avatar Aug 30 '24 06:08 thnkman

@midzer @genesis224 @thnkman I am not able to recreate this on any of my machines. I have one with a core 2 duo and integrated graphics, a 4th gen laptop with AMD graphics, and my main system with nvidia graphics. Two of those have no hardware HEVC decoding support, which is what Thorium's patches are for, to allow HEVC and AC3 no matter what, falling back to software FFMPEG decoding if needed.

I can play HEVC videos on test sites, as well as the AC3 test files on my site.

Alex313031 avatar Sep 01 '24 19:09 Alex313031

@midzer @genesis224 @thnkman I am not able to recreate this on any of my machines. I have one with a core 2 duo and integrated graphics, a 4th gen laptop with AMD graphics, and my main system with nvidia graphics. Two of those have no hardware HEVC decoding support, which is what Thorium's patches are for, to allow HEVC and AC3 no matter what, falling back to software FFMPEG decoding if needed.

I can play HEVC videos on test sites, as well as the AC3 test files on my site.

Then i am at a loss. Thanks for checking.

thnkman avatar Sep 01 '24 19:09 thnkman

@thnkman Are you using the regular AVX build? Because I think I may have found why

Alex313031 avatar Sep 04 '24 06:09 Alex313031

@thnkman Are you using the regular AVX build? Because I think I may have found why

Yes, i am using the AVX2 build

thnkman avatar Sep 04 '24 09:09 thnkman

@thnkman Are you using the regular AVX build? Because I think I may have found why

Yes, i am using the AVX2 build

Please try these flags

https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/diff/launcher/chromium.launcher?id=146a69e604ba05ff2b59ccdc3b0e647cd4d61139

gz83 avatar Sep 04 '24 09:09 gz83

@thnkman Are you using the regular AVX build? Because I think I may have found why

Yes, i am using the AVX2 build

Please try these flags

https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/diff/launcher/chromium.launcher?id=146a69e604ba05ff2b59ccdc3b0e647cd4d61139

Still getting ERROR:vaapi_video_decoder.cc(1212)] failed Initialize()ing the frame pool

thnkman avatar Sep 04 '24 13:09 thnkman

Today, 20th October 2024 I upgraded from thorium-browser_126.0.6478.231_AVX to thorium-browser_128.0.6613.189_AVX

Now I can NOT play HEVC video clips stored from my cameras with Zoneminder surveillance. Previous 126 version worked fine - actually was the only web browser with HEVC play support on my Slackware64 machine. So I was forced to downgrade to version 126 that was the last playing HEVC clips.

Please patch/reenable version 128 to support HEVC.

Thank you in advance.

zd59 avatar Oct 20 '24 14:10 zd59

HEVC hardware acceleration support on Linux is not available out of the box for Chrome/Chromium

gz83 avatar Oct 20 '24 15:10 gz83

Thank you gz83.

I am very well aware of that. I searched a lot to finally found a Linux browser that supports HEVC play. I use Slackware over 20 years and when I switched from AVC to HEVC in my video surveillance (speed of store and disk space savings), I searched all over the place, as Chrome/Chromium/Firefox/Thorium/Konqueror and others do not support HEVC. Pure luck was discovery of Alex313031 compilation of Thorium with added HEVC support. My wish is HEVC support in That Thorium from 126 above, else I'm left without it in Linux, forced to use Window$ only to watch my video surveillance clips. And I think, I'm not alone, as Zoneminder is pure and only Linux supported.

zd59 avatar Oct 20 '24 15:10 zd59

You may need to make sure you have an Intel or AMD graphics card + a newer operating system + X11 + VAAPI + the right graphics driver + some appropriate chromium command line parameters, only by doing this can you increase your chances of getting HEVC hardware acceleration.

At the same time, Linux DE is fragmented, different DEs may have different performance, and under Wayland, Chromium may become even worse.

In summary, enabling hardware acceleration on Linux is a complex matter, with the exception of ChromeOS/ChromiumOS/Android, which have slightly better support for hardware acceleration. This is also true for devices that use V4L2 (which have slightly better support for hardware acceleration).

@zd59

gz83 avatar Oct 21 '24 00:10 gz83

@zd59 @gz83 @genesis224 @thnkman I am at a loss. Software decoding of HEVC and AC3 should work. It is working fine for me here on Linux, and I am on NVidia, so there is for SURE no hardware acceleration going on, no matter what codec the video uses.

IDK why it seems that every release, I have a new random subgroup of users that HEVC seems to break on. Then the next release it will be fixed for some people, and broken for others.

Just to rule out that there is some conflict with it trying to use hardware acceleration when it shouldn't, can you try launching thorium with --no-gpu --disable-gpu --disable-features=VaapiVideoDecodeLinuxGL then see if it plays.

Alex313031 avatar Oct 29 '24 05:10 Alex313031

--no-gpu --disable-gpu --disable-features=VaapiVideoDecodeLinuxGL

Created TensorFlow Lite XNNPACK delegate for CPU. [6452:8206:1104/152520.108367:ERROR:vaapi_video_decoder.cc(1212)] failed Initialize()ing the frame pool

thnkman avatar Nov 04 '24 14:11 thnkman

Finally I managed to set proper feature on your latest Thorium to play HEVC. It is not enough, to disable graphic acceleration in settings. Hidden config should be changed as above last --disable-features=VaapiVideoDecodeLinuxGL. chrome://flags/ --> GL Vaapi Video Decode should be set to "disasbled" instead of "default" After Thorium restart, it can play HEVC.

Thanks to @Alex313031 @thnkman.

zd59 avatar Nov 04 '24 15:11 zd59

Finally I managed to set proper feature on your latest Thorium to play HEVC. It is not enough, to disable graphic acceleration in settings. Hidden config should be changed as above last --disable-features=VaapiVideoDecodeLinuxGL. chrome://flags/ --> GL Vaapi Video Decode should be set to "disasbled" instead of "default" After Thorium restart, it can play HEVC.

Thanks to @Alex313031 @thnkman.

Can confirm, HEVC playback works by setting GL VAAPI flag to disabled. Nice one!

thnkman avatar Nov 05 '24 04:11 thnkman

In my case just turning off hardware acceleration got it to work. Running Version 128.0.6613.189 on Arch using the standard thorium-browser-bin aur build.

leto-ux avatar Nov 21 '24 07:11 leto-ux

@zd59 @genesis224 @thnkman I'm gonna disable VaapiVideoDecodeLinuxGL by default next release.

Alex313031 avatar Nov 27 '24 21:11 Alex313031

Finally I managed to set proper feature on your latest Thorium to play HEVC. It is not enough, to disable graphic acceleration in settings. Hidden config should be changed as above last --disable-features=VaapiVideoDecodeLinuxGL. chrome://flags/ --> GL Vaapi Video Decode should be set to "disasbled" instead of "default" After Thorium restart, it can play HEVC.

Thanks to @Alex313031 @thnkman.

Yep, that's what fixed it for me. i'm on a fresh install of linux mint (22.1) cinnamon on a dell latitude 7490 with the latest install of thorium browser 128.0.6613.189

starlosgalaxy avatar Jan 22 '25 19:01 starlosgalaxy

Hello there. I am running Thorium on Windows 11. The latest version, 130.0.6723.174, does not play ac3 audio.

As shown here, the audio button is grayed out on the test site:

Image

The latest version that DOES work is: BETA "Th24" build - M126.0.6478.251 M126.0.6478.231 - 41st Release also works.

The same pattern of behavior also occurred when I tested on a Windows 10 laptop, with the latest version not working and the ones I mentioned above working.

I have tried disabling hardware decoding in chrome://flags, as well as running with the flags --no-gpu --disable-gpu. Perhaps there is a windows equivalent of the --disable-features=VaapiVideoDecodeLinuxGL that I can try? Thank you for any help!

daringdrew avatar Sep 28 '25 20:09 daringdrew