How to play h265 videos and E-ac-3 audio

Hello everybody, i have some videos that i am getting mad to play in fedora

one is a h265 video with e-ac-3 audio, some others do play but due to e-ac-3 audio, i have no audio at all

here’s what i tried

  • totem (taken from fedora’s repo) complain about missing h265 codec
  • clapper (rpm version from eithor fedora or author’s repo) complain h265 main 10 profile is missing
  • showtime (rpm taken from fedora’s repo) complain about e-ac-3 codec not being installed and asks me to install, but when i click on the install button i get redirected to an already installed codec

rpmfusion is already enabled, libav is installed, i switched already from ffmpeg-free to ffmpeg, and x264 and ac3 libraries are already installed, but there’s no way to play this video

quite weirdly i have no problems at all with mpv taken from fedora’s repo too (so i assume it should use same codecs), and with same apps taken from flathub (so in flatpak)

for the record, i am in fedora workstation 41

any hint?

have you tried vlc?

there is a bunch of similar questions re h265 codec on this forum. Have you tried the suggestions in Unable to play H.265 Video - #2 by nickavem or Codec (no longer) supported? - #8 by xeo32

(you can skip the install rpmfusion repo command(s))

also, run rpm -qa |grep -e mesa-va-drivers -e mesa-vdpau-drivers to find our which mesa freeworld packages are required.

for mesa-va-drivers-freeworld (VA-API):
sudo dnf swap mesa-va-drivers mesa-va-drivers-freeworld

for mesa-vdpau-drivers-freeworld (VDPAU / Nvidia):
sudo dnf swap mesa-vdpau-drivers mesa-vdpau-drivers-freeworld

additional info: [Fedora 37] Mesa w/ h264, h265, and vc1 decoding support · Issue #110 · rpmfusion-infra/fedy · GitHub

Make sure gstreamer1-plugins-bad-freeworld is installed
Then delete the gst registry as gst is too dumb to detect any codec changes.

rm ~/.cache/gstreamer-1.0/registry.x86_64.bin
2 Likes

I tried a h265/e-ac3 video and it seems to work on my system using MPV and ffmpeg from rpmfusion.

None of the freeworld packages mentioned by @augenauf or by @leigh123linux are on my system, so i don’t think those are necessary:

$  rpm -qa | grep freeworld | wc -l
0

I feel OP’s pain though. It would be really nice if we could (together?) undertake an effort to consolidate all the information about the needed packages for all the codecs and libraries. Currently it’s mostly shooting with hail, randomly installing or replacing packages (from the main repos and rpmfusion, flatpaks or otherwise), in the hope that it magically starts to work. This should/could be easier.

1 Like

The native version of VLC available from Fedora 41 rpm didn’t play H.265 videos for me either. No matter what codecs I’d install. The Flatpak version of VLC does work fine though with H.265 videos.

I’m using this video to test, playback is okay in mpv:

cosmos_laundromat_480p_eac3.mkv

Media packages on my system:

$ rpm -qa |grep gstreamer

gstreamer1-1.24.11-2.fc42.x86_64
gstreamer1-plugins-base-1.24.11-2.fc42.x86_64
gstreamer1-plugins-bad-free-libs-1.24.11-3.fc42.x86_64
gstreamer1-plugins-good-1.24.11-2.fc42.x86_64
pipewire-gstreamer-1.2.7-4.fc42.x86_64
gstreamer1-plugin-gtk4-0.13.4-1.fc42.x86_64

$ rpm -qa |grep ffmpeg

ffmpeg-libs-7.1-1.fc42.x86_64
ffmpeg-7.1-1.fc42.x86_64

$ rpm -qa |grep mesa

mesa-filesystem-25.0.0-2.fc42.x86_64
mesa-libgbm-25.0.0-2.fc42.x86_64
mesa-dri-drivers-25.0.0-2.fc42.x86_64
mesa-libGL-25.0.0-2.fc42.x86_64
mesa-libEGL-25.0.0-2.fc42.x86_64
mesa-vulkan-drivers-25.0.0-2.fc42.x86_64
mesa-libGLU-9.0.3-6.fc42.x86_64
mesa-va-drivers-25.0.0-2.fc42.x86_64

$ rpm -qa |grep libav
libavdevice-7.1-1.fc42.x86_64
libavif-1.1.1-1.fc42.x86_64

$ rpm -qa |grep libva

libva-2.22.0-4.fc42.x86_64

$ rpm -qa |grep vdpau

libvdpau-1.5-9.fc42.x86_64

$ rpm -qa |grep mpv

mpv-0.39.0-4.fc42.x86_64

There is no indication that mpv is using gstreamer, only ffmpeg:

$ mpv -v cosmos_laundromat_480p_eac3.mkv
[cplayer] Command line options: '-v' 'cosmos_laundromat_480p_eac3.mkv'
[cplayer] mpv 0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
[cplayer] libplacebo version: v7.349.0
[cplayer] FFmpeg version: 7.1
[cplayer] FFmpeg library versions:
[cplayer]    libavcodec      61.3.100 (runtime 61.19.100)
[cplayer]    libavdevice     61.1.100 (runtime 61.3.100)
[cplayer]    libavfilter     10.1.100 (runtime 10.4.100)
[cplayer]    libavformat     61.1.100 (runtime 61.7.100)
[cplayer]    libavutil       59.8.100 (runtime 59.39.100)
[cplayer]    libswresample   5.1.100 (runtime 5.3.100)
[cplayer]    libswscale      8.1.100 (runtime 8.3.100)
[cplayer] Configuration: -Dalsa=enabled -Dbuild-date=false -Dcaca=enabled -Dcdda=enabled -Dcplayer=true -Dcplugins=enabled -Dcuda-hwaccel=enabled -Dcuda-interop=enabled -Ddmabuf-wayland=enabled -Ddrm=enabled -Ddvbin=enabled -Ddvdnav=enabled -Degl-drm=enabled -Degl-wayland=enabled -Degl-x11=enabled -Degl=enabled -Dgbm=enabled -Dgl-x11=enabled -Dgl=enabled -Dhtml-build=enabled -Diconv=enabled -Djack=enabled -Djavascript=enabled -Djpeg=enabled -Dlcms2=enabled -Dlibarchive=enabled -Dlibavdevice=enabled -Dlibbluray=enabled -Dlibmpv=true -Dlua=enabled -Dmanpage-build=enabled -Dopenal=enabled -Dopensles=disabled -Doss-audio=disabled -Dpipewire=enabled -Dplain-gl=enabled -Dpulse=enabled -Drubberband=enabled -Dsdl2-audio=enabled -Dsdl2-gamepad=enabled -Dsdl2-video=enabled -Dsdl2=enabled -Dshaderc=disabled -Dsndio=disabled -Dspirv-cross=disabled -Duchardet=enabled -Dvaapi-drm=enabled -Dvaapi-wayland=enabled -Dvaapi-x11=enabled -Dvaapi=enabled -Dvapoursynth=enabled -Dvdpau-gl-x11=enabled -Dvdpau=enabled -Dvector=enabled -Dvulkan=enabled -Dwayland=enabled -Dwerror=false -Dx11=enabled -Dxv=enabled -Dzimg=enabled -Dzlib=enabled -Dprefix=/usr -Dbindir=/usr/bin -Ddatadir=/usr/share -Dincludedir=/usr/include -Dinfodir=/usr/share/info -Dlibdir=/usr/lib64 -Dlibexecdir=/usr/libexec -Dlocaledir=/usr/share/locale -Dlocalstatedir=/var -Dmandir=/usr/share/man -Dsbindir=/usr/bin -Dsharedstatedir=/var/lib -Dsysconfdir=/etc -Dauto_features=auto -Dbuildtype=plain -Dwrap_mode=nodownload
[cplayer] List of enabled features: alsa caca cdda cplugins cuda-hwaccel cuda-interop dmabuf-interop-gl dmabuf-wayland drm dvbin dvdnav egl egl-drm egl-wayland egl-x11 ffmpeg ffnvcodec gbm gl gl-x11 glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg lcms2 libarchive libass libavdevice libbluray libdl libplacebo linux-fstatfs lua-5.1 memfd-create memrchr openal pipewire posix posix-shm ppoll pthread-condattr-setclock pulse rubberband rubberband-3 sdl2 sdl2-audio sdl2-gamepad sdl2-video uchardet vaapi vaapi-drm vaapi-wayland vaapi-x11 vapoursynth vdpau vdpau-gl-x11 vector vk-khr-display vt.h vulkan wayland wayland-protocols-1-32 x11 xv zimg zimg-st428 zlib

Note: in this scenario software rendering is being used by mpv to play the h265.

hello

so, it’s automagically working now

as of yesterday i had already installed all the relevant codecs from rpmfusion, installed also the x265 package (other than the already installed gstreamer x265 packages) then swapped ffmpeg-free with ffmpeg, tried clapper, totem and showtime (all in rpm from fedora’s repo) and none was able to read the file

i am also sure i had cleaned the gstreamer cache, and it wasn’t working

some minutes ago i cleaned the gstreamer cache again with
rm ~/.cache/gstreamer-1.0/registry.x86_64.bin
as suggested by @leigh123linux and it’s automagically working

i don’t have an explanation for this as i am sure i did clean the cache yesterday but wasn’t working so i don’t know what to think

tried anyway with either clapper and showtime and both are working now

should i mark a solution?

x265 is an encoder, you don’t need that if you only want to play back h265.

According to the mpv log gstreamer shouldn’t be used, so i’m not sure if cleaning this file could be related.

Hmm i would advise no unless you know which part is the solution, otherwise it wouldn’t really help other people stuck in a similar situation.

My guess is that swapping ffmpeg-free for ffmpeg was the main thing that helped, but your session needed a restart for the libraries to be used. Did you logout from your user session in the meantime?

welli swapped ffmpeg yesterday, but i can’t recall if i cleaned the cache prior or after the swap

As was mentioned the gstreamer cache may have nothing to do with it, since gstreamer isn’t used by mpv.

There are two different playback backends: ffmpeg and gstreamer. Some software uses ffmpeg and other software uses gstreamer. Mpv uses ffmpeg by default, so clearing the gstreamer cache in principle doesn’t have influence in that scenario.

ok but, i have stated multiple times that i mainly use showtime and clapper, which are gstreamer based and i have tried also totem, everything was related to them which weren’t working yesterday for 265 and now are

i also tried mvp which had video but no audio and got it when i switched ffmpeg

that’s why i am saying that the cache cleaning of gstreamer “might” be the solution

Alright, i guess i was focusing on the wrong thing in that case, my apologies.

If you feel that renewing the gstreamer cache may have fixed the issue for you then you can ofcourse mark it as the solution.

1 Like