All video thumbnails fail to be generated

Not a single video thumbnail is being generated and shown in Nautilus. The folder ~/.cache/thumbnails/fail/gnome-thumbnail-factory/ keeps getting filled for all of them.

I tried removing all the thumbnails from the folder, reinstalling the gstreamer-plugins-... and totem packages, changing the thumbnail settings (Always, 4 GB) in the Preview section of the Nautilus preferences. All to no avail. Some recommend to install packages like libxine1 and ffmpegthumbnailer but this didn't not solve it either.

There used to be an .xsession-errors error log file generated in the home folder in previous version of Ubuntu but that doesn't seem to be the case any more.

I'm running Ubuntu 12.10 GNOME remix (x64) with the GNOME3 ppa packages installed.

What could be the cause of the problem and how can I fix it?


Solution 1:

I wrote a small script to fix this very issue. It replaces totem-video-thumbnailer with ffmpegthumbnailer as the default video thumbnailer. I also found that ffmpegthumbnailer works faster than totem-video-thumbnailer for generating the thumbnails. Copy the code bellow into a file and run as root.

#!/bin/bash

apt-get install ffmpegthumbnailer

mv /usr/share/thumbnailers/totem.thumbnailer /usr/share/thumbnailers/totem.thumbnailer.old

echo "[Thumbnailer Entry]
TryExec=/usr/bin/ffmpegthumbnailer
Exec=/usr/bin/ffmpegthumbnailer -s %s -i %i -o %o -c png -f
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;" > /usr/share/thumbnailers/totem.thumbnailer

rm -rf ~/.cache/thumbnails/fail

Solution 2:

After looking at Alex Posner's solution, I was reminded of the fact that totem-video-thumbnailer is run to generate the thumbnails. I figured I might as well see what happens if I run it manually. It gave me the same kind of error for different types of files (note that you need the --verbose option for it to output anything at all). It couldn't find a video stream in the file. Opening the files in Totem to play them as a test (who uses that program when we have VLC?) gave me the notification that the file could not be played. Letting it search for a solution resulted in the recommendation to install the library gstreamer1.0-libav. This fixed the playback and thumbnail generation.

Run the following commands one by one to fix the issue:

sudo apt-get install gstreamer1.0-libav
rm ~/.cache/thumbnails/fail/gnome-thumbnail-factory/*