This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Faster thumbnail generation in dolphin

Tags: dolphin, thumbnail, thumbnailer dolphin, thumbnail, thumbnailer dolphin, thumbnail, thumbnailer
(comma "," separated)
rajaece1
Registered Member
Posts
3
Karma
0
I have used gnome before. I edited the thumbnailers in the folder /usr/share/thumbnailers as follows.
Code: Select all
Exec=/usr/bin/totem-video-thumbnailer -s 32

I have passed 32 instead of %s.
So the thumbnail generation was working in blazing speed. I have a collection of over 1 lakh photos with image size around 10mb. This little tweak gave me good response when browsing files.

Is there any thing i can do in kde that makes this possible?
Thanks in Advance...

Currently Using kubuntu 16.04
User avatar
Rog131
Registered Member
Posts
828
Karma
10
rajaece1 wrote:I have used gnome before. I edited the thumbnailers in the folder /usr/share/thumbnailers as follows.
Code: Select all
Exec=/usr/bin/totem-video-thumbnailer -s 32

I have passed 32 instead of %s.
So the thumbnail generation was working in blazing speed. I have a collection of over 1 lakh photos with image size around 10mb. This little tweak gave me good response when browsing files.

Is there any thing i can do in kde that makes this possible?
Thanks in Advance...

Currently Using kubuntu 16.04


By the https://linux.die.net/man/1/totem-video-thumbnailer
totem-video-thumbnailer - video thumbnailer for the GNOME desktop

-s size
The size of the thumbnail. Example: "64x64". The default is "128x96".


You could use the Dolphin settings to limit the thumbnail size:
Image


About KDE and thumbnails

The KDE is following the freedesktop org standards and the specifications: https://www.freedesktop.org/wiki/Specifications/

By the Thumbnail Managing Standard: https://specifications.freedesktop.org/ ... atest.html
-> https://specifications.freedesktop.org/ ... #DIRECTORY

Code: Select all
The meaning of the directories are as follows:

Normal: The default place for storing thumbnails. The image size must not exceed 128x128 pixel. Programs which need smaller resolutions should read and write the 128x128 thumbnails and downscale them afterwards to the desired dimension. See Thumbnail Creation for more details.

Large: The previous notes apply to this directory too, except that the thumbnail size must be 256x256 pixel.


About speed

With the ffmpegthumbs 17.04.

A quick test with the video thumbnails large and the normal - same as the https://www.kubuntuforums.net/showthrea ... post300694

Writing a perl script:
Code: Select all
#!/usr/bin/perl

use strict;
use warnings;
use Time::HiRes qw( usleep ualarm gettimeofday tv_interval nanosleep
            clock_gettime clock_getres clock_nanosleep clock
                      stat );

# path to the thumbnail directory (large)
my $dir = ("$ENV{HOME}/.cache/thumbnails/large/");
# number of video files
my $stopCount = (200);

my $count = (0);
my $timerSet = (0);
my ($startTime);

while ($count < $stopCount) {
   if (($count > 0) && ($timerSet == 0)) {
      $startTime = gettimeofday;
      $timerSet = 1;
   }
   my @files = <$dir/*>;
   $count = @files;
}

my $endTime=gettimeofday;
print "Time: ", $endTime-$startTime, " s \n";


Image

1) Cleaning the thumbnail cache.
2) Starting the perl script.
3 Turning the thumbnailing on.

The results at here, with the 200 random video clips:

Dolphin 128 pixel:
Time: 19.5201258659363 s
Time: 19.0951890945435 s
Time: 19.0263259410858 s


Dolphin 32 pixel:
Time: 9.0935640335083 s
Time: 9.07924795150757 s
Time: 9.20771980285645 s


=> Smaller, low quality thumbnails are faster to make.


May interest you

How thumbnails creation works? viewtopic.php?f=19&t=137000
Dolphin feature request; Flexible thumbnail size: viewtopic.php?f=223&t=122874
rajaece1
Registered Member
Posts
3
Karma
0
Rog131 wrote:
rajaece1 wrote:I have used gnome before. I edited the thumbnailers in the folder /usr/share/thumbnailers as follows.
Code: Select all
Exec=/usr/bin/totem-video-thumbnailer -s 32

I have passed 32 instead of %s.
So the thumbnail generation was working in blazing speed. I have a collection of over 1 lakh photos with image size around 10mb. This little tweak gave me good response when browsing files.

Is there any thing i can do in kde that makes this possible?
Thanks in Advance...

Currently Using kubuntu 16.04


By the https://linux.die.net/man/1/totem-video-thumbnailer
totem-video-thumbnailer - video thumbnailer for the GNOME desktop

-s size
The size of the thumbnail. Example: "64x64". The default is "128x96".


You could use the Dolphin settings to limit the thumbnail size:
Image


About KDE and thumbnails

The KDE is following the freedesktop org standards and the specifications: https://www.freedesktop.org/wiki/Specifications/

By the Thumbnail Managing Standard: https://specifications.freedesktop.org/ ... atest.html
-> https://specifications.freedesktop.org/ ... #DIRECTORY

Code: Select all
The meaning of the directories are as follows:

Normal: The default place for storing thumbnails. The image size must not exceed 128x128 pixel. Programs which need smaller resolutions should read and write the 128x128 thumbnails and downscale them afterwards to the desired dimension. See Thumbnail Creation for more details.

Large: The previous notes apply to this directory too, except that the thumbnail size must be 256x256 pixel.


About speed

With the ffmpegthumbs 17.04.

A quick test with the video thumbnails large and the normal - same as the https://www.kubuntuforums.net/showthrea ... post300694

Writing a perl script:
Code: Select all
#!/usr/bin/perl

use strict;
use warnings;
use Time::HiRes qw( usleep ualarm gettimeofday tv_interval nanosleep
            clock_gettime clock_getres clock_nanosleep clock
                      stat );

# path to the thumbnail directory (large)
my $dir = ("$ENV{HOME}/.cache/thumbnails/large/");
# number of video files
my $stopCount = (200);

my $count = (0);
my $timerSet = (0);
my ($startTime);

while ($count < $stopCount) {
   if (($count > 0) && ($timerSet == 0)) {
      $startTime = gettimeofday;
      $timerSet = 1;
   }
   my @files = <$dir/*>;
   $count = @files;
}

my $endTime=gettimeofday;
print "Time: ", $endTime-$startTime, " s \n";


Image

1) Cleaning the thumbnail cache.
2) Starting the perl script.
3 Turning the thumbnailing on.

The results at here, with the 200 random video clips:

Dolphin 128 pixel:
Time: 19.5201258659363 s
Time: 19.0951890945435 s
Time: 19.0263259410858 s


Dolphin 32 pixel:
Time: 9.0935640335083 s
Time: 9.07924795150757 s
Time: 9.20771980285645 s


=> Smaller, low quality thumbnails are faster to make.


May interest you

How thumbnails creation works? viewtopic.php?f=19&t=137000
Dolphin feature request; Flexible thumbnail size: viewtopic.php?f=223&t=122874


I have changed the thumbnail size to 22 in Dolphin settings. But still the thumbnail generation is slow. In thunar the thumbnail generation was very fast. Is there any other ways i could make this process faster. I don't need video thumbnails. I only need image thumbnails(around 10mb images. Thunar makes thumbnails in amazing speed for this sizes too).
User avatar
Rog131
Registered Member
Posts
828
Karma
10
rajaece1 wrote:I have changed the thumbnail size to 22 in Dolphin settings. But still the thumbnail generation is slow. In thunar the thumbnail generation was very fast. Is there any other ways i could make this process faster. I don't need video thumbnails. I only need image thumbnails(around 10mb images. Thunar makes thumbnails in amazing speed for this sizes too).


Maybe someone with the same kind of problem will know the solution - meanwhile:

Could you add the image file type (raw/jpg/something else ?)
Are your images at the home directory/external hard drive/another partition ?
Are there error messages when you are thumbnailing ? (.xsession-errors / if the Dolphin is launched from the konsole - do you see error messages ?)
rajaece1
Registered Member
Posts
3
Karma
0
Rog131 wrote:
rajaece1 wrote:I have changed the thumbnail size to 22 in Dolphin settings. But still the thumbnail generation is slow. In thunar the thumbnail generation was very fast. Is there any other ways i could make this process faster. I don't need video thumbnails. I only need image thumbnails(around 10mb images. Thunar makes thumbnails in amazing speed for this sizes too).


Maybe someone with the same kind of problem will know the solution - meanwhile:

Could you add the image file type (raw/jpg/something else ?)
Are your images at the home directory/external hard drive/another partition ?
Are there error messages when you are thumbnailing ? (.xsession-errors / if the Dolphin is launched from the konsole - do you see error messages ?)

Both raw and jpg files. Files are in another partition. There are no errors...


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], rockscient, Yahoo [Bot]