Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Available as/for:
Description:
Hi everyone ! I have a lot of video on my hard drive and I have i think there is a problem with the video thumbs. I think it should be better to take an random frame in the film like in nautilus. The tumbs are useless in konqueror because most of time, the first frame is just black.
Just see the screenshot. I love konqueror so i think it should be better like that. Sorry for my bad english !
thank you

Ratings & Comments

10 Comments

Shahid

By applying this patch, we have a random frames as thumbnails diff -purN xine-thumbnail/thumbnail/videocreator.cpp xine-thumbnail.new/thumbnail/videocreator.cpp --- xine-thumbnail/thumbnail/videocreator.cpp 2006-05-30 18:18:51.000000000 +0400 +++ xine-thumbnail.new/thumbnail/videocreator.cpp 2007-06-26 15:54:06.000000000 +0400 @@ -32,11 +32,13 @@ #include <qimage.h> #include <qpainter.h> #include <qpaintdevice.h> +#include <qdatetime.h> #include <iostream> #include <kstandarddirs.h> #include <kapplication.h> +#include <krandomsequence.h> #define XINE_ENABLE_EXPERIMENTAL_FEATURES 1 @@ -260,13 +262,18 @@ bool VideoCreator::create(const QString int length; bool canPlay = false; - /* For streams for which length info is available seek to 1/3 file + /* For streams for which length info is available seek from 1/6 to 5/6 file * or else play for the first 5-10 seconds and get the frame */ - - if ( ((!xine_get_pos_length( stream, NULL, NULL, &length )) && xine_play( stream, 0, 5000 )) || - xine_play (stream, 21845, 0)) + KRandomSequence* rand = new KRandomSequence(QDateTime::currentDateTime().toTime_t()); + unsigned long rand_frame = rand -> getLong (45535) + 10000; + unsigned long rand_msec = rand -> getLong (5000) + 5000; + + if ( ((!xine_get_pos_length( stream, NULL, NULL, &length )) && xine_play( stream, 0, rand_msec )) || + xine_play (stream, rand_frame, 0)) canPlay = true; - + + // Destructor of KRandomSequence + rand -> ~KRandomSequence(); bool hasVideo = xine_get_stream_info (stream, XINE_STREAM_INFO_HAS_VIDEO); bool videoHandled = xine_get_stream_info (stream, XINE_STREAM_INFO_VIDEO_HANDLED);

RockMan81

I've started taking random frames in mplayerthumbs too. Check it (it's here in kde-apps.org, too)

Ekardnam

It seems like some of the previews already shows random (?) frame. At least it's not the first frame(s). Yes, I'm using Konqueror (3.5.2)

ktulu77

yes, for some video format, it is random (just for mpeg if i remember) but all the others videos, it is the first frame.

ktulu77

ok, i have tried campusloop's patch, it works ! thank you very much ! why have we to wait kde 4 for this so small patch ? it is too bad.

Superstoned

it might end up in kde 3.5.4, if enough ppl ask for it...

ktulu77

i had allready submited the idea on bugs.kde.org but no-one did anything.

campusloop

I have a patch which already does this but it rewrites the related kde installed files .. As such i don't want to upload it to kde-apps.org If anybody wants it please suggest a site/place where i can upload the tarball.

abhay

Why don't you create a bug on bugs.kde.org and upload the patch? If the patch is stable enough then you might find it in official KDE release some day ;)

campusloop

There is no point putting it up on bugs.kde.org. KDE4 is in active development and the videothumbnailer is going to be switched to phonon and the current code might be totally replaced.

Pling
0 Affiliates
Details
license
version 0.1
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 4

Other Various KDE 1.-4. Improvements:

Slicker Debian Package for Woody
cirrusgr
last update date: 22 years ago

Score 5.0

Konqueror/kdesktop suggestion
PovMan
last update date: 22 years ago

Score 5.0

Biiig buttons
dbojan
last update date: 20 years ago

Score 5.0

Yet Another KControl
Frans
last update date: 21 years ago

Score 5.0

Next window and next/previos window
dbojan
last update date: 20 years ago

Score 5.0

Fantasie Toolbar
katoe
last update date: 19 years ago

Score 5.0