How to play H264 & H.265 videos on Chromium

Issues related to applications and software problems and general support
Post Reply
inoton
Posts: 6
Joined: 2020/08/20 00:53:21

How to play H264 & H.265 videos on Chromium

Post by inoton » 2020/08/20 12:16:58

Official repository of Chromium , How to play H264 & H265 videos?
(Referring specifically to Chromium in official repositories)

html5test.com Video codecs:
MPEG-4 ASP support No ✘
H.264 support No ✘
H.265 support No ✘
Audio track selection No ✘
Video track selection No ✘

Tried installing the following packages, but it doesn't work:
1、chromium-ffmpeg (snapd version)
2、ffmpeg-libs


Chromium: 84.0.4147.89-1.el8.x86_64
CentOS 8 Workstation
kernel:4.18.0-193.14.2.el8_2.x86_64

Thanks!

bonedome
Posts: 173
Joined: 2017/04/22 08:11:04

Re: How to play H264 & H.265 videos on Chromium

Post by bonedome » 2020/08/20 19:47:46

Yes a very strange state of affairs, I'm guessing chromium devs have decided h264 has licencing issues (or something like that) and does not build with support for it, but reading this https://www.linuxuprising.com/2019/01/f ... vaapi.html would suggest there is a version available for fedora.
I don't have CentOS 8 so can't check.
I have fedora 31 running on a vm and has the chromium-libs-media-freeworld package available from rpmfusion free repo.
So I don't quite get why mozilla, rpmfusion and others are ok with it and others are not.
I've checked all the browsers I have.
h264 supported:
brave
firefox esr and latest binary (79)
chrome
tor browser

Not supported
chromium
ungoogled chrome
opera
midori (says h264 and h265 are supported but no video on https://www.bbc.co.uk/news/av/newsbeat-53818567 but youtube works fine)
So essentially the short answer is you can't watch h264 encoded video with (official) chromium.
Personally I'm leaning towards brave being my go to browser :D .

inoton
Posts: 6
Joined: 2020/08/20 00:53:21

Re: How to play H264 & H.265 videos on Chromium

Post by inoton » 2020/08/20 21:54:41

Thanks for your info, bonedome.

Oh yes! because I read such reports that rompted me to explore Linux as my operating system , chromium finally supports hardware acceleration(just centos/cedora/redhat version) , which makes me very excited.
I often watch 8K live on a 55" LCD monitor, I need a browser that supports hardware acceleration, is there any other browser supports besides this particular version of chromium?
(Firefox Nightly also supports hardware acceleration, I'll intall it later.)

I have tried Fedora before, but its driver makes my screen look too white, and I can't fix it.
About the "chromium-libs-media-freeworld", unfortunately it was rarely kept up to date with the version of chromium in the Fedora repos. A recent update forced the newer version of Chromium and broke video playback etc, so chromium-libs-media-freeworld isn't the solution any longer.
In fedora there's another version of chromium called chromium-freeworld ,you can try it.

bonedome
Posts: 173
Joined: 2017/04/22 08:11:04

Re: How to play H264 & H.265 videos on Chromium

Post by bonedome » 2020/08/20 23:20:24

In the latest firefox binary you can enable hardware acceleration by going to about:config and look for gfx.webrender.enabled and set to true.
You'll see a process called GPU Process if it's working.
The alternative is to install mpv and youtube-dl, then copy the url and play from the terminal.
Add this to ~/.config/mpv/mpv.conf

Code: Select all

ytdl-format="bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best"
My gpu doesn't support vp8 or vp9 hwaccel hence [vcodec!=?vp9] if yours does you won't need that line.
bestvideo[height<=?720] sets the maximum video to 720p
you'll also need to experiment with

Code: Select all

vo=gpu
vo=vaapi
hwdec
hwdec=vaapi
to see what works for you.
I see a reduction of around 2/3 cpu and the fan almost never comes on.

inoton
Posts: 6
Joined: 2020/08/20 00:53:21

Re: How to play H264 & H.265 videos on Chromium

Post by inoton » 2020/08/21 01:53:58

Thank you so much, bonedome : :D

Following your tips,I turned on the "gfx.webrender.enabled" option.
Plan 2 I have tried before, it's a really good solution, just a little bit inconvenient.

Post Reply

Return to “CentOS 8 - General Support”