dirkvdb / ffmpegthumbnailer

Lightweight video thumbnailer that can be used by file managers to create thumbnails for video files
GNU General Public License v2.0
524 stars 72 forks source link

Added support for generating thumb sequences (ThumbSequenceCreator) #196

Closed alemariusnexus closed 3 years ago

alemariusnexus commented 3 years ago

This adds support for the ThumbSequenceCreator interface to kffmpegthumbnailer, which allows generation of a sequence of thumbs instead of just one. This is useful e.g. for hover previews, where the user sees a slideshow of video frames when they hover over a video file icon.

Also adds some primitive runtime caching to speed this up because due to limitations of ThumbSequenceCreator, there is currently no way for the frontend to know when the sequence starts looping, so it just keeps requesting "new" frames from the plugin indefinitely.

You can take a look here to see what I have done with it in Dolphin, the KDE file manager. There's also a video of it in action over there.

dirkvdb commented 3 years ago

Thanks! Looks good. The only remark I have is replace the c style casts with static_casts.

alemariusnexus commented 3 years ago

Thanks! Looks good. The only remark I have is replace the c style casts with static_casts.

Done! Guess it's finally time for me to get into the habit of avoiding c-style casts.

TiGR commented 3 years ago

@alemariusnexus @dirkvdb Should there be a version bump for kffmpegthumbnailer because of this feature? Currently I'm talking with some Debian maintainers to bring kffmpegthumbnailer back into Debian (which was the original plan when I started working on it). I think they'd take only stable versions, that's why if we want this feature in Debian it is better to make a release.

dirkvdb commented 3 years ago

I think kffmpegthumbnailer will be removed from this archive (see #197). There is a fork in kde that is actually maintained.

TiGR commented 3 years ago

@dirkvdb see https://github.com/dirkvdb/ffmpegthumbnailer/issues/197#issuecomment-883922846