6

When I installed Ubuntu Gnome 17.04 thumbnails for .mkv were not showing up at all, Then it automatically got fixed, now it's generating the Thumbnails but as weird as it may sound, they're all green (or purple or pink but they are all monochromatic for sure). files are not affected by this only the thumbnails. other video file formats are okay as well, .mp4 .flv, just the .mkv's are affected.

I've no idea where should I start to fix this.

Screenshot

affected .mkv files

screenshot2

not affected .mp4 files

  • It happens sometime for some reason that I don't know of. Try changing the default media player for the .mkv files to some other application (like vlc). And clear the thumbnail cache. It worked for me. – Kameshwaran Apr 24 '17 at 9:08
  • 1
    @SumeetDeshmukh Check the files in /usr/share/thumbnailers/ to see which thumbnailer is responsible for x-matroska. I use xfce which uses ffmpegthumbnailer by default. Here is (a bit older) example how to use ffmpegthumbnailer with Nautilus. I think your problem with the thumbnailer you actually use is a bug and you should report it to the developers. – mook765 Apr 24 '17 at 11:40
  • 1
    @SumeetDeshmukh Check the link I mentioned. – mook765 Apr 24 '17 at 11:46
  • 1
    Please edit the output of grep matroska /usr/share/thumbnailers/totem.thumbnailer into your post. It would also be helpful to know what codecs are in use for the files that present the discolored thumbnails and the files that don't. mediainfo can provide this. – Elder Geek Apr 24 '17 at 14:25
  • 2
    Instead of just saying "Doesn't work" - it would be helpful if you posted all the details that were included in the previous question. The same people are bound to ask for the same troubleshooting output to help solve your problem. – RobotHumans Apr 29 '17 at 8:47
7

This answer is based on Another answer posted by Elder Geek, this just makes it easy for new users to execute

Original Work


For 17.04

Enable Multiverse and Universe repositories

Open the software and updates app and select multiverse and universe repositories

software and update screenshot

and run the following command after enabling them

sudo apt-get update

Install ubuntu-restricted-extras

sudo apt-get install ubuntu-restricted-extras

This command should do it, You'll need to use the Tab key to highlight the OK button for the mscore fonts package and hit enter to accept the agreement, How do I install the ubuntu-restricted extras package? (for more details)

You don't need to install ubuntu-restricted-extras if you've already installed media drivers while installing ubuntu

Install ffmpeg

sudo apt-get install ffmpeg ffmpegthumbnailer

These commands will install ffmpeg, after that delete all the existing thumbnails. by doing

rm -r ~/.cache/thumbnails

Change the job of creating thumbnails from Totem to ffmpeg

sudo nano /usr/share/thumbnailers/totem.thumbnailer

a text file will open up, replace all the text inside it with the following

[Thumbnailer Entry]
TryExec=ffmpegthumbnailer
Exec=ffmpegthumbnailer -s %s -i %i -o %o -c png -f -t 10
MimeType=application/mxf;application/ogg;application/ram;application/sdp;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/x-extension-m4a;application/x-extension-mp4;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktimeplayer;application/x-shorten;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/x-google-video-pointer;video/3gpp;video/dv;video/fli;video/flv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vivo;video/vnd.divx;video/vnd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flic;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-ms-asf;video/x-ms-asx;video/x-msvideo;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-nsv;video/x-ogm+ogg;video/x-theora+ogg;video/x-totem-stream;audio/x-pn-realaudio;audio/3gpp;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/midi;audio/mp2;audio/mp4;audio/mpeg;audio/ogg;audio/prs.sid;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-ape;audio/x-flac;audio/x-gsm;audio/x-it;audio/x-m4a;audio/x-matroska;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;audio/x-musepack;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-realaudio;audio/x-real-audio;audio/x-sbc;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-xm;application/x-flac;

To save updated file in Nano press Ctrl + X and then type y and enter. How to edit files in a terminal with nano?

You can use other text editing apps to edit /usr/share/thumbnailers/totem.thumbnailer file if you're not comfortable using nano

and the restart nautilus

nautilus -q

Clear all the thumbnails again and check if you're problem is solved

rm -r ~/.cache/thumbnails

The command above will clear all the thumbnails again, go check them, they will not be monochromatic now'


If you're losing Mp3/flac thumbnails after doing this, then try this approach instead

  • 1
    Already reversed the vote and requested the merge this morning. – RobotHumans Apr 30 '17 at 15:01
4
+50

Based on the results of our testing, I believe that the issue is totem generation of thumbnails for nautilus when utilizing the HEVC codec. As I recall, totem utilizes gstreamer plugins for this task. While I would normally expect the installation of the ubuntu-restricted-extras package to resolve most codec issues, in this case it appears that's not true. It seems that the the x265 HEVC support isn't included. There are a couple of options, I can suggest.

Edit: After testing on 17.04 live media created from ubuntu-17.04-desktop-amd64.iso today (after confirming that the downloaded iso was uncorrupted by checking the hash)I can confirm that the following approach produces the desired results of appropriately colored thumbnails.

Enable both the multiverse and universe repositories via Software & Updates on the Ubuntu Software Tab by checking the aforementioned boxes. Install ubuntu-restricted-extras via either the software center or CLI with sudo apt update && sudo apt install ubuntu-restricted-extras You'll need to use the Tab key to highlight the OK button for the mscore fonts package and hit enter to accept the agreement. Then all the requisite packages will be downlowded and installed. Close Nautilus if it's open and then refresh your thumbnails with rm -r ~/.cache/thumbnails

The options below may have some value in certain situations so I'll leave them as is.


A) Install the libavcodec-extra57 package and all it's dependencies. This package contains the ffmpeg library with additional de/encoders for audio/video codecs. I believe the critical dependency here is the libx265-110 library that the aforementioned libavcodec-extra57 package relies on for HEVC encoding/decoding.

You can install the libavcodec-extra57 package after first completing the instrucions at How do I enable the "Universe" repository? and then installing the package either through the software center or via the command line with sudo apt-get update && sudo apt-get install libavcodec-extra57

If this by itself doesn't resolve the issue, you can add the step of changing to a different thumb nailer using one of the options described in Way to make video-thumbnails generate from VLC instead of Totem?

B) If that doesn't do the trick, utilize the libde265 package also in the Universe repository. I had good results with this package on 14.04 (I had to install it via PPA back then) It looks like I'm still using it successfully under 16.04 (likely an upgrade rather than a clean install.

dpkg -l libde265
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                        Version            Architecture       Description
+++-===========================-==================-==================-===========================================================
ii  libde265:amd64              1.0.2-1ppa1~trusty amd64              Open H.265 video codec implementation

Regardless of the approach you'll have to regenerate your thumbnails again.

Note: I always recommend backups to make it easy to revert back if changes don't have the appropriate result. It's become clear to me that many don't bother to do this any where near as often as they should.

1

Just to add.. I found the root cause of this. I switched my personal encodes from h.264 to H.EVC, no green thumbnails. Switched to 10-bit H.EVC encodes, green thumbnails. ffmpeg-thumbnailer it is then...

I'm using .mp4 container with 10-bit H.265, but I would not be surprised to find a lot of .mkv online are 10-bit encodes with a lot of the .mp4 containing more traditional 8-bit h.264 video.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.