[KPhotoAlbum] Would like an option to not extract multiple frames for video thumbnails

Johannes Zarl-Zierl johannes at zarl-zierl.at
Mon Jun 26 17:59:38 CEST 2017


Hi Robert,

On Sonntag, 18. Juni 2017 21:02:16 CEST Robert Krawitz wrote:
> The video thumbnail process is unpleasantly slow and CPU-intensive;
> I'd prefer to simply be able to extract the first frame of the video
> and use that.  But before I hare off and do that, I'd like to get
> other thoughts on this and possible alternatives.

Sorry for not coming back to you sooner (and I haven't forgotten about your 
patches, either). I wanted to take the time to think about the issue and 
answer afterwards. As I don't see that happening for the foreseeable future, 
here are my ad-hoc thoughts:

Thought A:
I just saw that we call ffmpeg with the "-ss" parameter after "-i". This means 
that we do an accurate seek[1]. Changing this could possibly improve 
performance.

Thought B:
If we make this configurable, my gut instinct for the UI would be:
Let the user decide how many frames per minute to extract.

The downside to this is that I'm not sure if we always know the video duration 
when we start the thumbnail extraction. So a (configurable but) fixed number 
of frames is probably better from the implementation point of view.

Thought C:
Changing the number of video thumbnails to 1 means that the "select the next 
thumbnail" won't work anymore.

Thought D:
With a low number of video thumbnails, choosing a good offset becomes ever 
more important. Taking e.g. the first/last frame of a video is almost 
guaranteed to give you a bad preview image.


  Johannes



[1] https://trac.ffmpeg.org/wiki/Seeking


More information about the KPhotoAlbum mailing list