Some video thumbnails on Nautilus are not generated on Silverblue 40

Hello, I am currently using Silverblue 40 and I am experiencing an issue where Nautilus is not generating thumbnails for certain videos. Do you have any suggestions on how to resolve this issue?

Hello, welcome to the Fedora community.

By default, Nautilus does not generate thumbnails for videos due to patent restrictions. To enable thumbnail generation for common video formats like MP4 and MKV, you first need to add the RPM Ffusion repository, and then install the necessary thumbnailer and software codec. You also need to delete existing thumbnails.

This command adds the RPM Fusion free and non-free repositories and will reboot once completed:

rpm-ostree install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -r

After rebooting, this command transfers the rpm-fusion repositories from local packages to layered packages, reducing potential issues during major updates:

rpm-ostree update --uninstall rpmfusion-free-release --uninstall rpmfusion-nonfree-release --install rpmfusion-free-release --install rpmfusion-nonfree-release

This command installs the thumbnailer and codecs for thumbnail generation and will reboot once completed:

rpm-ostree install ffmpegthumbnailer libavcodec-freeworld -r

After rebooting, delete the existing thumbnails:

rm -rf ~/.cache/thumbnails
3 Likes

why do you uninstall and install the same packages?

See Simplifying updates for RPM Fusion packages (and other packages shipping their own RPM repos)

4 Likes

Thank you so much for the solution, It would be great if in the welcome screen there would be an option to install those codecs in the same way you can activate third party repositories nowadays.

This is not possible due to legal reasons.

Why Ubuntu can put it as an option on the installer and Fedora can’t?

I can not speak about Ubuntu as I don’t know. For Fedora, see:

Hi again,

Thank you so much for your help, I was wondering, is there a way to achieve the same thing but by adding just those specific files on the repo line somehow, I’m afraid that the repo will change other native packages or break within a Fedora release upgrade

1 Like

I think it is possible, but libavcodec-freeworld and ffmpegthumbnailer seldom cause issues during upgrades.

You can use distrobox to create a Fedora 40 container and install RPMFusion repo,
ffmpegthumbnailer, and libavcodec-freeworld in the container. Then, within the distrobox container, use the following commands:

distrobox-export --bin $(which ffmpeg) --export-path $HOME/.local/bin
distrobox-export --bin $(which ffmpegthumbnailer) --export-path $HOME/.local/bin

to export those binary files to your home directory. Check that $HOME/.local/bin is in your environment path, and then you can use these packages independently from the host system.

However, there is few documentation available, and I’m not sure if this method will cause other issues.

More details about additional codec and thumbnailer can be found here:

2 Likes

libavcodec-freeworld is your package of choice. It is really just a plugin for Fedoras restricted codecs, and adds them in.

there may always be sync issues, but if you do automatic upgrades in the background, this will not be noticeable. You might not get an update for 1-2 days but this is simply human error and legal-induced-technological error

For UX I would always avoid Distrobox or Toolbox

  • there is no native way to system-upgrade a fedora box. You need to reinstall it with a new version
  • Toolbx, which is preinstalled, has no option to change the home directory. On Immutable distros, the stuff in /var is the stuff YOU should be concerned about, as only you manage that. Having maybe different distro versions or even distros (like using Arch or OpenSUSE TW in the box, point 1) might cause the same dotfiles, in the same locations (your home folder) to conflict and break things.
  • It causes additional memory consumption.
  • It slows down your PC. either you launch the box on login, so it runs in the background, or you hook it into the usage of the ffmpegthumbnailer, e.g. Nautilus. this means nautilus would start slower.
  • The binaries may not be accessible to the tools actually using the thumbnailer for example, so this is worth nothing. But GNOME has the previewer “Sushi” which can work as a flatpak. Dont know if it serves the thumbnails though, I think it does something completely different.
  • systemd sysextensions via flatpaks will be our solution. They can be installed as system flatpaks and add libraries to the other RPM system apps.
  • OR we just use Nautilus and Dolphin as Flatpaks. These are already available. not sure if they can do the stuff you need though, like mounting drives etc.
1 Like

I see that there’s no easy fix, I hope Fedora will implement at least the option to enable a codec repo on gnome-software like they currently do with steam and nvidia.

Thank you all for your support!! :grinning:

I tried following your instructions, but the third step failed with the following output (EDIT: The problem is with libavcodec-freeworld, I could install ffmpegthumbnailer just fine). Is that a conflicting hash, or am I misreading the error message?

Any help would be appreciated, I’m new to Fedora and OSTree:


martin@fedora:~$ rpm-ostree install ffmpegthumbnailer libavcodec-freeworld -r
Checking out tree 7ea3754... done
Enabled rpm-md repositories: fedora-cisco-openh264 updates fedora rpmfusion-free-updates rpmfusion-free rpmfusion-nonfree-updates rpmfusion-nonfree copr:copr.fedorainfracloud.org:phracek:PyCharm rpmfusion-nonfree-nvidia-driver rpmfusion-nonfree-steam google-chrome updates-archive
Importing rpm-md... done
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2024-03-12T11:45:42Z solvables: 3
rpm-md repo 'updates' (cached); generated: 2024-08-26T01:59:52Z solvables: 25367
rpm-md repo 'fedora' (cached); generated: 2024-04-14T18:51:11Z solvables: 74881
rpm-md repo 'rpmfusion-free-updates' (cached); generated: 2024-08-22T08:59:43Z solvables: 149
rpm-md repo 'rpmfusion-free' (cached); generated: 2024-04-20T12:11:51Z solvables: 422
rpm-md repo 'rpmfusion-nonfree-updates' (cached); generated: 2024-08-22T09:26:26Z solvables: 80
rpm-md repo 'rpmfusion-nonfree' (cached); generated: 2024-04-20T12:18:23Z solvables: 194
rpm-md repo 'copr:copr.fedorainfracloud.org:phracek:PyCharm' (cached); generated: 2024-03-18T11:54:41Z solvables: 14
rpm-md repo 'rpmfusion-nonfree-nvidia-driver' (cached); generated: 2024-08-22T08:39:27Z solvables: 29
rpm-md repo 'rpmfusion-nonfree-steam' (cached); generated: 2024-08-15T19:28:49Z solvables: 2
rpm-md repo 'google-chrome' (cached); generated: 2024-08-23T16:54:25Z solvables: 3
rpm-md repo 'updates-archive' (cached); generated: 2024-08-21T03:52:59Z solvables: 36142
Resolving dependencies... done
Will download: 99 packages (103,8 MB)
Downloading from 'updates'... done
Downloading from 'fedora'... done
Downloading from 'rpmfusion-free-updates'... done
Downloading from 'rpmfusion-free'... done
Importing packages... done
Checking out packages... done
error: Checkout libstdc++-14.2.1-1.fc40.i686: Hardlinking ac/859321dfe787f24d016e20e585da522713d84edbf0f6fb4e021543ece37264.file to __init__.cpython-312.opt-1.pyc: Die Datei existiert bereits

Unfortunately, libavcodec-freeworld is currently causing an issue specifically in rpm-ostree. There is nothing you can do to resolve it until ffmpeg-free from Fedora updates to version 6.1.2. Instead, it is recommended to switch to the full version of ffmpeg from RPM Fusion using the following command:

rpm-ostree override remove libavdevice-free libavcodec-free libavfilter-free libavformat-free libavutil-free libpostproc-free libswresample-free libswscale-free ffmpeg-free --install ffmpeg

This workaround provides H.264 and HEVC codecs without using libavcodec-freeworld, but it removes several free packages from the base image in order to install the full version of ffmpeg. To undo this change, use the following command:

rpm-ostree override reset libavdevice-free libavcodec-free libavfilter-free libavformat-free libavutil-free libpostproc-free libswresample-free libswscale-free ffmpeg-free --uninstall ffmpeg
1 Like

Thanks a lot, that did the trick - everything is thumbnailing fine now.

Sadly, the files that used to be missing thumbnails still cannot be played by Videos or Celluloid, but can be played without issue by VLC - I suppose there’s a missing link between ffmpeg and GStreamer? I tried installing gstreamer1-plugins-ugly and gstreamer1-plugins-bad-freeworld, but that didn’t change anything. What packages might I still be missing to make this work?

Could you check if those are system or Fedora Flatpak packages?

flatpak list
1 Like

There you go. They should be Fedora Flatpaks.

martin@fedora:~$ flatpak list
N… Anwendungskennu… Version                  Zweig        Ursprung Installation
[...]
C… …layer.Celluloid 0.27                     stable       fedora   system
[...}
V… org.gnome.Totem  43.0                     stable       fedora   system
[...]

Fedora Flatpaks do not use the system ffmpeg or come with the full ffmpeg. To get full ffmpeg, you need to use Flatpaks from Flathub instead.

You can uninstall them and install the Flathub versions by running:

flatpak uninstall io.github.celluloid_player.Celluloid org.gnome.Totem && flatpak install flathub io.github.celluloid_player.Celluloid org.gnome.Totem

Also, could you check if VLC is a system package:

rpm -q vlc
1 Like

Ah, that makes sense. VLC was indeed from Flathub, and the Flathub versions of Celluloid and Totem also play my video files without issue.

Thanks a lot for your help!

I attempted to follow deactivating and installing these packages, but Nautilus still does not load thumbnails. I’m not exactly sure what’s wrong here, or how to proceed from here. This is the output of my current deployment in rpm-ostree status:

State: idle
Deployments:
â—Ź fedora:fedora/40/x86_64/silverblue
                  Version: 40.20240829.0 (2024-08-29T00:59:46Z)
               BaseCommit: b09730d8423f91b1d764251993b9a6466c5cfbe973f223e169f279d6dde93e98
             GPGSignature: Valid signature by 115DF9AEF857853EE8445D0A0727707EA15B79CC
      RemovedBasePackages: libavdevice-free libavfilter-free libavformat-free ffmpeg-free libpostproc-free libswresample-free libavutil-free libavcodec-free libswscale-free 6.1.1-19.fc40
                           mesa-va-drivers 24.1.6-1.fc40
          LayeredPackages: ffmpeg ffmpegthumbnailer gstreamer1-plugins-bad-free-extras
                           gstreamer1-plugins-bad-freeworld gstreamer1-plugins-ugly
                           gstreamer1-vaapi mesa-va-drivers-freeworld sushi
            LocalPackages: rpmfusion-free-release-40-1.noarch
                           rpmfusion-nonfree-release-40-1.noarch