Monday, December 27, 2010

Fix Thumbnails in Nautilus with Ffmpegthumbnailer

I had an issue with video thumbnails not created with ffmpegthumbnailer.
Luckily there is a fix :
Create following script :
#!/bin/bash

VIDEO_EXTENSIONS="video@flv video@webm video@mkv video@mp4 video@mpeg \
video@avi video@ogg video@quicktime video@x-avi video@x-flv video@x-mp4 \
video@x-mpeg video@x-webm video@x-mkv application@x-extension-webm \
video@x-matroska video@x-ms-wmv video@x-msvideo video@x-msvideo@avi \
video@x-theora@ogg video@x-theora@ogv video@x-ms-asf video@x-m4v"

THUMBNAIL_COMMAND="/usr/bin/ffmpegthumbnailer -s %s -i %i -o %o -c png -f -t 10"

for i in $VIDEO_EXTENSIONS; do
gconftool-2 -s "/desktop/gnome/thumbnailers/$i/command" -t string "$THUMBNAIL_COMMAND"
gconftool-2 -s "/desktop/gnome/thumbnailers/$i/enable" -t boolean 'true'
done


Delete the failed thumbnail images with:
rm -rf ~/.thumnails/fail/
Open up gconf-editor and take a look at the setting under /desktop/gnome/thumbnailers
After that as root :
killall nautilus

See : https://bbs.archlinux.org/viewtopic.php?pid=804537

1 comment: