After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 140679 - nautilus sometimes chooses bad frames for video thumbnails
nautilus sometimes chooses bad frames for video thumbnails
Status: RESOLVED WONTFIX
Product: totem
Classification: Core
Component: Thumbnailer
1.1.x
Other Linux
: Normal enhancement
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2004-04-21 04:53 UTC by Ian McIntosh
Modified: 2006-08-25 08:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
My config.log (71.83 KB, text/plain)
2005-01-30 17:33 UTC, Jorge Bernal "Koke"
  Details
patch (1.12 KB, patch)
2005-06-05 07:05 UTC, Michaël Arnauts
none Details | Review
patch (1.14 KB, patch)
2005-06-05 11:59 UTC, Michaël Arnauts
rejected Details | Review

Description Ian McIntosh 2004-04-21 04:53:05 UTC
This applies to thumbnails of video files only.

When picking a frame to serve as the thumbnail, Nautilus sometimes selects
all-black frames, or other frames that don't show anything interesting.

Instead of trying to make it "smart" about the selection, maybe Nautilus should
allow the user to request a new thumbnail frame be chosen.

This would require two things:

1) The frame selection appears to be deterministic (if you delete a thumbnail
and reload, the same frame will be selected).  Frame selection would have to be
made more random.  (Would this break anything?)

2) Some sort of UI would have to be added to refresh the thumbnail.  (As a user,
the first thing I tried was to click on the thumbnail image in the Properties
dialog.)  This is somewhat related to bug 43335 and bug 106092.
Comment 1 Sebastien Bacher 2004-10-19 20:29:11 UTC
do you still get this problem ? nautilus doesn't make video thumbnails but totem
and nautilus-media do, are you using one of them ?
Comment 2 Ian McIntosh 2004-10-20 19:22:30 UTC
Yes, the behavior is still the same.  To be clear, there is no problem in the
thumbnail creation.  It does pick and display valid and proper-looking frames
from the movies.

However, I don't like the frames it chooses for some movies, and would like a
way to request that a new frame be choosen.

I do have Totem installed, but I'm not using it when thumbnails are made.  I'm
viewing the directory with Nautilus (in icon view) and can see each thumbnail
being created as it grinds on the disk.

Does Nautilus ask Totem to make the thumbnails?
Comment 3 Sebastien Bacher 2004-10-20 19:29:27 UTC
yes, nautilus doesn't make video thumbnails, this job is made by totem. I'm
reassiging the bug.
Comment 4 Ian McIntosh 2004-10-20 19:43:57 UTC
Ok, although Nautilus would still need a way to request that a new thumbnail be
created.
Comment 5 Sebastien Bacher 2004-10-20 20:08:35 UTC
new thumbnail -> "Bug 43335: we need an explicit "Make Thumbnail" command."
Comment 6 Jorge Bernal "Koke" 2005-01-30 17:33:08 UTC
Created attachment 36731 [details]
My config.log
Comment 7 Jorge Bernal "Koke" 2005-01-30 17:34:33 UTC
Oops, sorry this attachment was for another bug :(
Comment 8 Michaël Arnauts 2005-06-05 07:05:44 UTC
Created attachment 47254 [details] [review]
patch

with my small c/c++ knowledge, i created a small patch that adds some
randomeness to the chosen frame.

instead of taking the frame at 1/3th of the file, it takes one at 100+x/300
where x ranges between -30 and 30.
Comment 9 Michaël Arnauts 2005-06-05 11:59:01 UTC
Created attachment 47264 [details] [review]
patch

it's my first time, i am allowed to make mistakes :)
Comment 10 Bastien Nocera 2005-06-24 13:12:49 UTC
"
1) The frame selection appears to be deterministic (if you delete a thumbnail
and reload, the same frame will be selected).  Frame selection would have to be
made more random.  (Would this break anything?)
"

Hmm, this is expected. Say you copy a file to a CD or whatever, you know that
you have the same video because the 2 files show the same thumbnail.
Comment 11 Ian McIntosh 2005-08-04 23:07:35 UTC
Good point; it does need to be deterministic.  So how about just choosing a
second frame if the first is too dark?  I don't think it would break anything.
Comment 12 Bastien Nocera 2005-08-29 17:06:00 UTC
And how do you check if the video is too dark?
Comment 13 Ian McIntosh 2005-08-29 21:23:26 UTC
There must be an established way to determine the "brightness" of an image.

What comes to mind, and this may be too simplistic, is to just take the average
of all three components of all pixels in the chosen frame.  If the average is
less than X, move to the next spot (deterministically) and try again.

The next spot could be 3-5 seconds forward-- after the 'fade out', and maybe
already in the disk cache.  If it turns out to just be a very dark movie, it
should probably give up and go with the original frame chosen, so as not to
change legacy thumbnails.
Comment 14 Bastien Nocera 2005-10-22 17:25:18 UTC
Feel free to re-open this bug if you know a way to "determine the brightness of
an image", and have some code for it.
Comment 15 Paul Betts 2006-08-25 08:19:54 UTC
I've written a patch for this issue, I've described it in bug #352802