Videos crashing, it seems to be the system codecs, Fedora 38!

Hello, good afternoon everyone.I have a problem with Fedora version 38, the videos being played by MPV Media Player or Videos (totem) are crashing, choking, locking, the only solution is to use VLC.

It has been known for a long time that fedora does not ship many codecs for audio/video due to licensing/copyright/proprietary issues.
VLC is not distributed directly by fedora for the same reasons.

1 Like

Please post the output of mpv -v your_crashing_video and also rpm -qa ffmpeg\* libav\*. Then we can try to help.

1 Like

Some video even open with MPV.
There has been a little improvement now but this even me in the video progress bar, which makes the frame not correspond to audio and vice versa.

Output of the video that does not open, using the MPV -V command:
[cplayer] Command line options: ‘-v’ ‘Tempo 2021 1080p BluRay FULL x265 10bit DUAL 5.1.mkv’
[cplayer] mpv 0.35.1 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
[cplayer] built on UNKNOWN
[cplayer] FFmpeg library versions:
[cplayer] libavutil 58.2.100
[cplayer] libavcodec 60.3.100
[cplayer] libavformat 60.3.100
[cplayer] libswscale 7.1.100
[cplayer] libavfilter 9.3.100
[cplayer] libswresample 4.10.100
[cplayer] FFmpeg version: 6.0
[cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib64 --mandir=/usr/share/man --docdir=/usr/share/doc/mpv --confdir=/etc/mpv --disable-build-date --enable-libmpv-shared --enable-sdl2 --enable-libarchive --enable-dvdnav --enable-cdda --enable-html-build --enable-dvbin --enable-gl-x11 --enable-wayland
[cplayer] List of enabled features: alsa asm av-channel-layout caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build dmabuf-interop-gl dmabuf-interop-pl dmabuf-wayland drm drm-is-kms dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg jpegxl lcms2 libarchive libass libavdevice libbluray libdl libm libmpv-shared libplacebo libplacebo-next librt linux-fstatfs linux-input-event-codes lua lua_5_1 memfd_create optimize pipewire plain-gl posix posix-or-mingw pthreads pulse rubberband rubberband-3 sdl2 sdl2-audio sdl2-gamepad sdl2-video shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-libplacebo vaapi-wayland vaapi-x-egl vaapi-x11 vapoursynth vdpau vdpau-gl-x11 vector vt.h vulkan wayland wayland-protocols wayland-protocols-1-24 x11 xv zimg zlib
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Applying profile ‘default’…
[cplayer] Setting option ‘v’ = ‘’ (flags = 8)
[cplayer] Waiting for scripts…
[osd/libass] libass API version: 0x1700000
[osd/libass] libass source: tarball: 0.17.0
[osd/libass] Shaper: FriBidi 1.0.12 (SIMPLE) HarfBuzz-ng 7.1.0 (COMPLEX)
[osd/libass] Setting up fonts…
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[cplayer] Set property: shared-script-properties → 1
[cplayer] Set property: shared-script-properties → 1
[cplayer] Done loading scripts.
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook
[ytdl_hook] not a ytdl:// url
[ifo_dvdnav] Opening Tempo 2021 1080p BluRay FULL x265 10bit DUAL 5.1.mkv
[bdmv/bluray] Opening Tempo 2021 1080p BluRay FULL x265 10bit DUAL 5.1.mkv
[file] Opening Tempo 2021 1080p BluRay FULL x265 10bit DUAL 5.1.mkv
[demux] Trying demuxers for level=normal.
[cplayer] Set property: shared-script-properties → 1
[mkv] Seeking to 5171339921 to read header element 0x1c53bb6b.
[file] stream level seek from 131072 to 5171339921
[mkv] Parsing cues…
[osd/libass] libass API version: 0x1700000
[osd/libass] libass source: tarball: 0.17.0
[osd/libass] Shaper: FriBidi 1.0.12 (SIMPLE) HarfBuzz-ng 7.1.0 (COMPLEX)
[osd/libass] Setting up fonts…
[mkv] Seeking to 5171398757 to read header element 0x1254c367.
[file] stream level seek from 5171400735 to 8070
[mkv] All headers are parsed!
[demux] Detected file format: Matroska
[cplayer] Opening done: Tempo 2021 1080p BluRay FULL x265 10bit DUAL 5.1.mkv
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[find_files] Loading external files in .
[cplayer] Set property: shared-script-properties → 1
[cplayer] Running hook: ytdl_hook/on_preloaded
[mkv] select track 0
[mkv] select track 1
[mkv] select track 3
[cplayer] (+) Video --vid=1 () (hevc 1920x804 23.976fps)
[cplayer] (+) Audio --aid=1 --alang=por (
) ‘PT-BR 5.1’ (ac3 6ch 48000Hz)
[cplayer] Audio --aid=2 --alang=eng (aac 6ch 48000Hz)
[cplayer] (+) Subs --sid=1 --slang=por (*) ‘FORÇADA’ (subrip)
[cplayer] Subs --sid=2 --slang=por ‘COMPLETA’ (subrip)
[display-tags] File tags:
[display-tags] Title: Tempo 2021 - Comando.To
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context ‘wayland’
[vo/gpu/wayland] Registered for protocol wl_compositor
[vo/gpu/wayland] Registered for protocol wl_shm
[vo/gpu/wayland] Registered for protocol wl_output
[vo/gpu/wayland] Registered for protocol wl_data_device_manager
[vo/gpu/wayland] Registered for protocol wl_subcompositor
[vo/gpu/wayland] Registered for protocol xdg_wm_base
[vo/gpu/wayland] Registered for protocol wp_viewporter
[vo/gpu/wayland] Registered for protocol wl_seat
[vo/gpu/wayland] Registered for protocol zwp_linux_dmabuf_v1
[vo/gpu/wayland] Registered for protocol wp_presentation
[vo/gpu/wayland] GNOME’s wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
[vo/gpu/wayland] Compositor doesn’t support the zxdg_decoration_manager_v1 protocol!
[vo/gpu/wayland] Compositor doesn’t support the zwp_idle_inhibit_manager_v1 protocol!
[vo/gpu/wayland] Registered output BOE 0x0812 (0x4):
[vo/gpu/wayland] x: 0px, y: 0px
[vo/gpu/wayland] w: 1920px (340mm), h: 1080px (190mm)
[vo/gpu/wayland] scale: 1
[vo/gpu/wayland] Hz: 59.996000
[vo/gpu/opengl] EGL_VERSION=1.5
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/wayland] GL_VERSION=‘4.6 (Core Profile) Mesa 23.0.2’
[vo/gpu/wayland] Detected desktop OpenGL 4.6.
[vo/gpu/wayland] GL_VENDOR=‘Intel’
[vo/gpu/wayland] GL_RENDERER=‘Mesa Intel(R) Xe Graphics (TGL GT2)’
[vo/gpu/wayland] GL_SHADING_LANGUAGE_VERSION=‘4.60’
[vo/gpu/wayland] Loaded extension GL_KHR_debug.
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] Resize: 0x0
[vd] Container reported FPS: 23.976024
[vd] Codec list:
[vd] (no decoders)
[vd] Failed to initialize a decoder for codec ‘hevc’.
[vo/gpu/wayland] Deregistering output BOE 0x0812 (0x4)
[mkv] deselect track 0
[cplayer] Video: no video
[ad] Codec list:
[ad] ac3 - ATSC A/52A (AC-3)
[ad] Opening decoder ac3
[ad] Requesting 1 threads for decoding.
[ad] Selected codec: ac3 (ATSC A/52A (AC-3))
[af] User filter list:
[af] (empty)
[sub/ass] libass API version: 0x1700000
[sub/ass] libass source: tarball: 0.17.0
[sub/ass] Shaper: FriBidi 1.0.12 (SIMPLE) HarfBuzz-ng 7.1.0 (COMPLEX)
[sub/ass] Setting up fonts…
[sub/ass] Using font provider fontconfig
[sub/ass] Done.
[cplayer] Starting playback…
[cplayer] EOF code: 6
[cplayer] finished playback, something happened (reason 4)
[cplayer] Exiting… (Errors when loading file)
[cplayer] Set property: shared-script-properties → 1
[cplayer] Set property: shared-script-properties → 1

Here is the departure of the second command:

Note: I’m new to Fedora but I’ve had a brief with Ubuntu, overall I’m new to GNU/Linux.

That seems to tell it all.
The probable fix would be to install the proper codec
dnf install libheif-hevc which is a codec package from rpmfusion that should support decoding that video.

You also have this with restricted codec support from fedora.
which could be replaced with the non-restricted version from rpmfusion.
dnf swap libavcodec-free libavcodec-freeworld

You also have ffmpeg-free which could be replaced with the one from rpmfusion
dnf swap ffmpeg-free ffmpeg

1 Like

libheif-hevc only contains the HEVC decoder/encoder plugin for libheif, it will not add HEVC support to mpv (which uses ffmpeg).

Which is why I suggested the other 2 packages from rpmfusion. :cowboy_hat_face:

And it’s libheif-freeworld, not libheif-hevc now. The former should obsolete the latter.

Guys, next sabbath I see it right, is running here for me, work, exercise haha. At the moment I am using the VLC.

Ever get this solved. I did a fresh install of F38, and oh my getting media playback has been fun. I get why everyone says to use VLC which just works. But it would be nice if i can get the default video player to work also. I followed Howto/Multimedia - RPM Fusion But i was still unable to play H265 or AC-3 encodes. I noticed there was one set of Multimedia codecs not installed according to Software Center, so i installed those. That made the problem slightly worse. Now totem crashes instead of presenting with a codec error. I’m curious what the final resolution of this thread was.

I believe the libheif-freeworld package provides that codec.

Installing software from the software center (as I understand it) installs the packages from the official fedora repo so you get the crippled multimedia packages. That is a good start but far from complete as far as available codecs are concerned.

Personally I install

Those packages (mostly from rpmfusion) seem to provide all the codecs I have needed to date.
Installation may require the use of the --best and/or the --allowerasing option with dnf.

Installing ffmpeg and libavcodec-freeworld at the same time is not possible without overriding some rpm safeguards as they conflict. Please settle on one or the other to avoid any issues.

EDIT: It doesn’t make sense to install libavcodec-freeworld without ffmpeg-free, which conflicts with ffmpeg, hence my statement above.

This comment seems strange to me. Those packages, both from rpmfusion, have never shown any form of conflict. Potentially there could be a version mismatch somewhere, but the packages themselves do not seem to have any form of conflict otherwise.

The conflict I see is between libavcodec-free (from fedora) and libavcodec-freeworld (from rpmfusion). Those two do not play well together and thus one needs to dnf swap libavcodec-free libavcodec-freeworld to switch them out.

I was thinking about the whole ffmpeg-free stack, for which libavcodec-freeworld is an add-on from RPM Fusion. If you have that installed, you can’t install ffmpeg from RPM Fusion due to conflicts. So, while you’re technically correct that it’s possible to install both ffmpeg and libavcodec-freeworld, it doesn’t make sense to do so. The *-free packages, for which libavcodec-freeworld would be useful have to be removed first (e.g. using --allowerasing dnf option).

True in the conflicts, Not true about the -free packages in relation to the -freeworld packages.

The packages from rpmfusion contain many codecs to allow access to different media where the codec is restricted from fedora distribution. The -free packages thus have limited codecs and one often finds that they are unable to access particular media as a result. Replacing the -free packages with the corresponding -freeworld packages gives one access to the full codec range that is otherwise not available.

Each user must choose what works for them.