Video thumbnails

Berthold Stoeger bstoeger at mail.tuwien.ac.at
Fri Jul 6 06:32:23 PDT 2018


Hi Robert,

On Friday, 6 July 2018 14:23:25 CEST Robert Helling wrote:

> I might to have some time over the weekend for coding. Would you mind
> sharing what you already have by pushing that branch to your GitHub
> account? I would then try to start hooking up ffmpeg.

You can see what I have in my branch video6, but it will not be very useful, 
owing to the thread peculiarities of QMediaPlayer (you have to start it in the 
UI thread).

My intention was that instead of calling the UI thread with  

QMetaObject::invokeMethod(VideoFrameExtractor::instance(), "extract", 
Qt::AutoConnection, Q_ARG(QString, originalFilename), Q_ARG(QString, 
filename));

run a thread with 'QtConcurrent::run' which then uses signal/slots to send the 
extracted thumbnail.

> My idea for how it works would be something like:
> 
> From the images tab, after associating a video to a dive, you can (maybe by
> a context menu entry) trigger the generation of thumbnails. For those, I
> would create a directory

We already do all that. And the code should also recognize if thumbnails are 
older than the file. So I'm not sure if implementing a parallel thumbnail-
system for videos is a UI improvement.

> videofile.mpeg.thumbnails
> 
> and create image files there.
> 
> From there, Subsurface could look for such a directory and then display the
> thumbnails as images (at the given time intervals). So the idea would be to
> trade disk space (people who have videos should have plenty of that) for
> runtime generating the thumbnails on the fly for each run of Subsurface.
> 
> What do you think?

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'm off to a concert-weekend with probably limited internet access. So I won't 
be able to do much on weekend.

Berthold




More information about the subsurface mailing list