PDA

View Full Version : How to get Video Thumbnails working in Nautilus


buddha
7th March 2006, 08:15 PM
I think I've finally figured out how to get video thumbnails to show up in Nautilus, the Gnome file manager. I'm running FC4.

Quick Steps

If you have the default totem installed, remove it,
yum remove totemInstall totem-xine from the Livna repository,
yum install totem-xineUnder your regular user account (not root), delete everything in the ~/.thumbnails/fail directory,
cd ~/.thumbnails/fail
rm -r *Close any open Nautilus windows
Open Nautilus (View as Icons) and go to a directory with video files.
After a few seconds new video thumbnails should be automatically generated and appear!

Details

The "Totem Movie Player" that comes with a default install of FC4 is practically useless. When you remove the totem package and install the totem-xine package, you now have an excellent video player that actually works since totem-xine uses the Xine library as its backend video engine.

The totem-xine package contains a utility program called “totem-video-thumbnailer” which hooks into the gnome system and is automatically called by nautilus to generate video thumbnails. You can see the hooks in the Configuration Editor (/desktop/gnome/thumbnailers).

Now nautilus should be happy to generate preview images of your video files and show you nice thumbnails, right? Almost. There currently does not seem to be any mechanism for gnome to realize that you have added video thumbnailing capability. So how can we make gnome understand this?

That's where the ~/.thumbnails directory comes in. Your ~/.thumbnails directory is where Gnome applications store preview images (thumbnails) for file types they recognize such as PDFs or PNGs or JPEGs. This thumbnail cache is used to speed up subsequent thumbnail display in Gnome applications like Nautilus and gthumb by avoiding generating thumbnails again.

There can be three subdirectories of your ~/.thumbnails directory: normal, large, and fail. They may not all exist depending on how much file browsing you have done.

Before you installed totem-xine, gnome was unable to create video thumbnails for your video files, so it put entries in the “fail” subdirectory so it would know it need not try again next time you browsed those video files.

After you install the totem-xine package, video thumbnails can be generated, but gnome still sees entries in the "fail" directory so it doesn't even try. To force gnome to realize that you can now generate valid video thumbnails, you need to delete everything in the “fail” subdirectory.

Once you clear out the "fail" subdirectory, new thumbnails can be created and they will be placed in the "normal" subdirectory. Video thumbnailing should now work.

Gnome thumbnailing seems to be a work in progress. For more information about Gnome thumbnailing, see the Thumbnail Managing Standard, http://jens.triq.net/thumbnail-spec/directory.html

FYI, the video thumbnail is a snapshot taken 1/3 of the way through the video.

overboard
24th May 2006, 02:37 PM
I hope I'm not breaking any rules by replying to an old post. :rolleyes:

But I've been looking for this, thanks mate! ;)

spacelobsters
20th December 2006, 07:12 PM

yes, the same goes for me. Even though running FC6, same old solution.

cooney
21st December 2006, 01:18 AM
I think I've finally figured out how to get video thumbnails to show up in Nautilus, the Gnome file manager. I'm running FC4. ...




Hey buddha,

Thanx for the info.

I've read about the remove totem/replace w/ totem-xine somewhere way in the past, but upon finding this post tonight, I decided to finally try it. It works! Totem finally works too!

I did have to clean out both failed and normal caches before it would work, but I have a bash script that does that for me on all my logons that I wrote sometime ago.

I'm still running fc4 too, but santa promised me a new hard disk this christmas so I can finally install fc6 in parallel with fc4 in case I have problems.

Man. the news about fedora legacy folding is depressing. I usually like to get about two years out of an OS before a major upgrade. :(

Oh well. Looking forward to applying it to fc6.

Thanx again,

bob

buddha
21st December 2006, 02:54 AM
To cooney, spacelobsters, and overboard:

Glad this old post helped you out. It's been a while since I've seen it.

Cheers

Duli
23rd December 2006, 05:07 AM
Hello, guys!

Well, I did a fresh FC6 install and removed totem right away, without replacing it with totem-xine.

Then, following your great instructions, I've tried to erase the fail folder and also installed totem-xine. But it didn't work yet.

In order to make the totem thumbnailer work I had to do a
yum -y install xine xine-lib xine-lib-extras-nonfree
Then I could both watch movies in totem and I got video thumbnails.

But I still don't have thumbnails for some of the s*ck*ng .WMV videos that people send me. I have the w32 codecs installed, as described here (http://www.fedoraforum.org/forum/showthread.php?t=135568).

Some .wmv I'm able to watch in totem (those that also has a thumbnail). But some of them I cannot watch in totem (and also don't get a thumbnail). When trying to watch I get the message: The MS WMV 9 (win32) codec is not supported. You may have to install additional plugins to play some kind of videos..."

Can you help me?

Thanks a lot!
Duli

Duli
24th December 2006, 04:22 AM
Hi again.

Just solved it with this (http://me2030581.googlepages.com/).

It's a mplayer script to thumbnail videos. You this intead of totem thumbnailing.

Now those WMV that totem couldn't thumbnail have been thumbnailed with mplayer.

Cheers,
Duli

cleece
6th January 2007, 04:44 PM
I have read through this guide and understand what is expected, except I am still having problems getting it to work.

I have two computers:
* 1 Fedora Core 6 Desktop
* 1 Fedora Core 6 Laptop

The thumbnails are generated with no problems on the Laptop. They refuse to generate on the Desktop.

On both computers I have:
* Un-installed totem
* Installed totem-xine
* Installed mplayer
* Updated mplayer
* Installed gconf-editor

On the Desktop only:
* I installed mplayer-video-thumbnailer from Duli's link.

Is it possible mplayer-video-thumbnailer and totem-video-thumbnailer are conflicting?
Or perhaps I am using mplayer-video-thumbnailer incorrectly.
Are there more verbose instructions how to use mplayer-video-thumbnailer?
Any other ideas/suggestions?

Duli
6th January 2007, 05:53 PM
Is it possible mplayer-video-thumbnailer and totem-video-thumbnailer are conflicting? Or perhaps I am using mplayer-video-thumbnailer incorrectly.
Are there more verbose instructions how to use mplayer-video-thumbnailer?
Any other ideas/suggestions?

Hello, I would advise you to have just one of them.

If you plan to have just mplayer-thumbnailer, be sure to remove totem and totem-xine and also other xine libraries (do a "yum list | grep -i xine" in order to chek what is installed).

Then, in order to get mplayer-thumbnailer working, download it from the link, unpack it and then run setup.sh as root. Then run gconf.sh as normal user. The gconf.sh will register the command lines that does the thumbnails in you configurations.

You may see the hooks in the Configuration Editor (/desktop/gnome/thumbnailers), to check if they are alright. You should see some "mplayer %u %whatever" in the configurations for mpeg, wmv etc.

That´s it. You may need to erase the foldes under .thumbnails in you home folder to refresh everything. And you´re good to go.

I personally don´t like totem or xine or totem-xine, that´s why I just use mplayer both as video player and thumbnailer. Works pretty well!

If you have problems, let me know!

Cheers,
Duli

cleece
6th January 2007, 06:19 PM
Hi Duli,

Thanks for the support. I uninstalled totem-xine.

When I do: yum list | grep -i xine, my output is:

yum list | grep -i xine
libXinerama.i386 1.0.1-2.1 installed
libXinerama-devel.i386 1.0.1-2.1 installed
gxine.i386 0.4.1-1.1.fc3.rf dag
openssh-xinetd.noarch 0.2-2.1.fc3.rf dag
openssh-xinetd.i386 0.2-1.1.fc3.rf dag
totem-xine.i386 2.16.2-2.lvn6 livna
totem-xine-devel.i386 2.16.2-2.lvn6 livna
totem-xine-mozplugin.i386 2.16.2-2.lvn6 livna
xine.i386 0.99.4-10.lvn6 livna
xine-lib.i386 1.1.3-3.fc6 extras
xine-lib-devel.i386 1.1.3-3.fc6 extras
xine-lib-extras.i386 1.1.3-3.fc6 extras
xine-lib-extras-nonfree.i386 1.1.3-3.lvn6 livna
xine-skins.noarch 1.10-2.0.rf dag
xinetd.i386 2:2.3.14-8 core

I tried to uninstall: libXinerama.i386 and libXinerama-devel.i386, but it looked like it was going to uninstalled a bunch of other needed packages.

I ran setup.sh as root and gconf.sh as user. I have checked gconf-editor and all the video files have referenes to /usr/bin/mplayer-video-thumb.sh %u %o.

I did a rm -r *, in .thumbnails/

It still is not producing thumbnails though.

Duli
6th January 2007, 06:25 PM
Yep, do not remove libxinerama. It´s not necessary.

Are you able to watch the video files?

When you type "mplayer somevideo.mpg" what happens?

cleece
6th January 2007, 06:26 PM
All videos play perfectly with mplayer.

cleece
6th January 2007, 06:28 PM
Oh...wait. When i right click on a video, it gives me an option to "Open with xine." But when I choose that option, nothing happens. Is it possible something was left over from the totem-xine install? and thus causing problems?

Sorry for th double post.

Duli
6th January 2007, 06:30 PM
Well, then I´m running out of ideas here.. Hum..

Have you tried to logout and login again?

What is your configuration under "edit > preferences > preview" in any nautilus window? Did you check the "only for files smaller than" option?

Duli
6th January 2007, 06:34 PM
Oh...wait. When i right click on a video, it gives me an option to "Open with xine." But when I choose that option, nothing happens. Is it possible something was left over from the totem-xine install? and thus causing problems?

Sorry for th double post.

I don´t think so... Very unlike to have something to do with it. See the next post, please.

cleece
6th January 2007, 06:43 PM
Well, then I´m running out of ideas here.. Hum..

Have you tried to logout and login again?

What is your configuration under "edit > preferences > preview" in any nautilus window? Did you check the "only for files smaller than" option?

I have "only for files smaller than 1 GB" set. I just tried restarting X and it didn't work. "Show thumbnails" is set to "always."

Is there a way to uninstall mplayer-video-thumb.sh? Maybe I should just try and use totem-xine for thumbnails and mplayer for actually playing videos.

Duli
6th January 2007, 07:09 PM
I have "only for files smaller than 1 GB" set. I just tried restarting X and it didn't work. "Show thumbnails" is set to "always."

Is there a way to uninstall mplayer-video-thumb.sh? Maybe I should just try and use totem-xine for thumbnails and mplayer for actually playing videos.

Removing it I think would consist in just erasing the files copied by setup.sh from the target folders and, also, removing the lines in the gconf-editor.

Then, you should follow the first post again...

cleece
6th January 2007, 11:01 PM
I have everything back to working with totem-xine. But I thought of an additional question.

Couldnt you use both totem-xine and mplayer and just tell gconf-editor to use mplayer to thumbnail the files that totem-xine cannot thumbnail?

Duli
6th January 2007, 11:06 PM
I have everything back to working with totem-xine. But I thought of an additional question.

Couldnt you use both totem-xine and mplayer and just tell gconf-editor to use mplayer to thumbnail the files that totem-xine cannot thumbnail?
Good! Glad you got it working!

Yes, you sure have a good idea. I think you would have to manually edit gconf options, or mess a little with gconf.sh cript that comes with mplayer-thumbnailer, in order for it to change just the type of files you´re targeting!

BUT, since mplayer-thumbnailer did not work in your system at all, I don´t think it will work for some specified file types...

If you have success, let me know!
cheers
duli

cleece
6th January 2007, 11:16 PM
So this is weird, but I copied two *wmv files to my laptop and thumbnails was generated. I never installed mplayer-thumbnailer on the laptop. So, is it possible to get wmv thumbs from totem-xine? Where should I check on my laptop? I looked in gconf-editor and it says it is using totem-video-thumbnailer.

Duli
6th January 2007, 11:23 PM
So this is weird, but I copied two *wmv files to my laptop and thumbnails was generated. I never installed mplayer-thumbnailer on the laptop. So, is it possible to get wmv thumbs from totem-xine? Where should I check on my laptop? I looked in gconf-editor and it says it is using totem-video-thumbnailer.
No, it´s not weird!! Some wmv files are indeed thumbnailed by totem-xine. Some aren´t. What I could verify is that mplayer had more compatibility than totem-xine when the subject is wmv files...

cooney
7th January 2007, 01:58 AM
I have read through this guide and understand what is expected, except I am still having problems getting it to work.

I have two computers:
* 1 Fedora Core 6 Desktop
* 1 Fedora Core 6 Laptop

The thumbnails are generated with no problems on the Laptop. They refuse to generate on the Desktop.

On both computers I have:
* Un-installed totem
* Installed totem-xine
* Installed mplayer
* Updated mplayer
* Installed gconf-editor

On the Desktop only:
* I installed mplayer-video-thumbnailer from Duli's link.

Is it possible mplayer-video-thumbnailer and totem-video-thumbnailer are conflicting?
Or perhaps I am using mplayer-video-thumbnailer incorrectly.
Are there more verbose instructions how to use mplayer-video-thumbnailer?
Any other ideas/suggestions?

Like you, when I followed the guide, the thumbnails did not work. So I tried removing the normal cache files in addition to the failed ones too. 'rm -R normal'. I deleted both caches from all logins including root. Then rebooted the computer and the thumbnails started appearing.

I have no idea what 'mplayer-video-thumbnailer' is. And I have no desire to research it at this time. No flames please.

hope this helps,

bob