HEVC/265 not working in chromium based browsers

Hi there,

I’ve been trying to get any Chromium based browser to work with HEVC/265 and am not having any luck. I’ve followed the fusion instructions to no avail.

I am able to use both VLC and Dragon to play an HEVC video, but all Chromium based browsers give the same error:

Warning, FFmpegDemuxer failed to create a valid/supported video decoder configuration from muxed stream, config:codec: hevc, profile: hevc main, level: not available, alpha_mode: is_opaque, coded size: [3840,2160], visible rect: [0,0,3840,2160], natural size: [3840,2160], has extra data: true, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}

and yet ffplay will happily play the file.

ffprobe:

ffprobe version 7.1 Copyright (c) 2007-2024 the FFmpeg developers
  built with gcc 14 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --enable-chromaprint --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-lcms2 --enable-libaom --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libass --enable-libbluray --enable-libbs2b --enable-libcodec2 --enable-libcdio --enable-libdrm --enable-libjack --enable-libjxl --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libilbc --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-libplacebo --enable-librsvg --enable-librav1e --enable-librubberband --enable-libqrencode --enable-libsmbclient --enable-version3 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libshaderc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-avfilter --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libvpl --enable-runtime-cpudetect
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.100 / 61. 19.100
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/xxx/Downloads/hevc_4k30P_main_3.mp4':
  Metadata:
    major_brand     : iso4
    minor_version   : 1
    compatible_brands: iso4hvc1
    creation_time   : 2013-12-02T09:56:57.000000Z
  Duration: 00:00:10.00, start: 0.100000, bitrate: 12292 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv), 3840x2160, 12289 kb/s, 30 fps, 30 tbr, 30k tbn (default)
      Metadata:
        creation_time   : 2013-12-02T09:56:57.000000Z
        handler_name    : hevc:FMT=HEVC@GPAC0.5.1-DEV-rev4841
        vendor_id       : [0][0][0][0]

I’m probably not allowed to post links, but the sample files on x265 dot com do not work for me in the browser.

I have tried:

  • Flags on the Arch wiki
  • Flatpak / non flatpak browsers
  • Chromium/Brave/Chrome
  • X11/Wayland
  • RPM Fusion

I’m a little lost at what to try next. The core specs are:

  • Fedora KDE 41
  • Nvidia 4080 Super (565 driver)
  • AMD 5950x

I’m not trying to do anything too special and all the test files are copyright free so I’d love to see if anyone else is able to play them.

Here is a simple test file that works in VLC/Dragon, but not the browser: https://test-videos.co.uk/vids/bigbuckbunny/mp4/h265/1080/Big_Buck_Bunny_1080_10s_1MB.mp4

I gave it a try on my Fedora 41 install and the linked video doesn’t work in Firefox from Fedora packages, Vivaldi from Flatpak or Ungoogled Chromium from Flatpak.

I also spun up my KDE Neon VM and it doesn’t work with the default Firefox browser or Vivaldi installed from Snap.

Slightly off topic but I found it funny that you wrote ungoogled Chromium. :stuck_out_tongue: Chromium by default is without Google. It’s the Googled version of Chromium that’s Chrome, not the other way around.

Thank you, this is a really useful datapoint.

I’ve just managed to get something working but it requires Firefox nightly. With the introduction of hardware accelerated HEVC it seems they’ve quietly added the ability to use software as well. So I’ve managed to use both software (just enabling HEVC in about:config and hardware (following VAAPI instructions for Nvidia). Both appear to work great so far.

I’ve sort of come to the conclusion that Chrome is now reliant on VAAPI on Linux and because Nvidia don’t officially support Intels API, it just doesn’t work. Weirdly AMD support is pretty poor as well.

That doesn’t really explain why I couldn’t get software hevc in chrome though. I’d even pay for the codec!

1 Like

This is not the case unfortunately. The base Chromium code is reliant upon more than a dozen Google API’s for which Google distributed keys are required. You need to manually remove these APIs from the code to compile and use Chromium without Google.

Chromium, as built in many open-source distributions, uses a per-distribution Google API key for service access. [1] [2] [3]

If built without API keys, Chromium warns ‘Google API keys are missing. Some functionality of Google Chrome will be disabled.’ [4] [5]

The APIs used include [6]:

  • Calendar API

  • Contacts API

  • Drive API (Optional)

  • Chrome Remote Desktop API

  • Chrome Spelling API

  • Chrome Suggest API

  • Chrome Sync API

  • Chrome Translate Element

  • Chrome Web Store API

  • Chrome OS Hardware ID API (Optional, Chrome OS)

  • Device Registration API (Optional, Chrome OS)

  • Google Cloud DNS API

  • Google Cloud Storage

  • Google Cloud Storage JSON API

  • Google Maps Geolocation API (Optional)

  • Google Maps Time Zone API

  • Google Now For Chrome API (Optional)

  • Nearby Messages API

  • Safe Browsing API

  • Speech API

[1] https://git.alpinelinux.org/aports/tree/community/chromium/A…

[2] https://github.com/archlinux/svntogit-packages/blob/packages…

[3] https://git.launchpad.net/~chromium-team/chromium-browser/+g…

[4] https://chromium.googlesource.com/chromium/src/+/9a11dadde80…

[5] https://sources.debian.org/patches/chromium/83.0.4103.116-1~…

[6] API Keys

2 Likes

Interesting. Has it always been the case? I could swear the very first Google Chrome was built on the open-source Chromium browser…

Wikipedia describes it as such:

Chromium has been a Google project since its inception,[1][3] and Google employees have done the bulk of the development work.[15]

The base code is open source, but a number of aspects that Chromium integrates such as account synchronisation, translation functionality etc. are external Google projects so they are not included in the code. For these aspects Chromium relies on API keys supplied by Google that fetch this data from (Google-controlled) external locations.

1 Like

It’s also along the lines of “Ungoogled” Android-based operating systems that build from AOSP but removing a lot of (or even all) the hooks back to Google APIs, tracking and fingerprinting stuff.

Thorium works with HEVC