Video thumbnails
Berthold Stoeger
bstoeger at mail.tuwien.ac.at
Tue Jul 10 06:14:34 PDT 2018
Hi Robert,
On Friday, 6 July 2018 15:38:33 CEST Robert Helling wrote:
> > On 6. Jul 2018, at 15:32, Berthold Stoeger <bstoeger at mail.tuwien.ac.at>
> > wrote:
> > Can't ffmpeg write the image to stdout? Then we could just read it in a
> > thread and send it via signal/slot to the thumbnailing system. I always
> > prefer "push" over "pull" interfaces.
>
> I don’t know about writing to stdout, maybe. But still those would be
> several, wouldn’t it? What do you think is a good rate, one image per
> minute?
>
> Let me modify my proposal: Trigger the generation upon opening the dive (and
> not having thumbnails) in a background task. Store the images in a
> temporary directory. Upon completion of the ffmpeg process add those images
> to the Subsurface thumbnails. Does that sound better (that would be a
> signal based push if you like).
I pushed a very rudimentary PR to github, which shows how this could be
married with the current thumbnailing system. In a first test on Linux, I was
amazed how nicely this works!
But it is of course still very rough. ffmpeg muse be in the current path. The
difficult case will be what to do if no ffmpeg is installs or it fails. I
think we shouldn't show a "broken" icon in order not to penalize users without
ffmpeg. But should we add an entry into the thumbnail cache, etc?
I can dig up the my old code that added a watermark to the thumbnails to
signal "video file".
Hope that is useful,
Berthold
More information about the subsurface
mailing list