6.0.0 video thumbnailer...

Gilles Caulier caulier.gilles at gmail.com
Thu Mar 8 14:51:39 GMT 2018


Maik,

The new video thumbnailer code based on ffmpeg is reviewed and optimized,
excepted the last deprecated warning messages.

These last one are relevant of change of FFMPEG API. It's not only some
method call changes (+arguments). The type of structures have also changed.
Typically :

- AVPicture struct must be changed as AVFrame or a utils method from
libavutil must be used.

- AVCodecContext struct must be changed as AVCodecParameters.

This must be done before to change deprecated methods. A simple migration
of deprecated methods introduce more warnings due to use other internal
structures.

The most tedious method to port is avcodec_decode_video2() which must e
replaced by 2 calls :  avcodec_send_packet() and avcodec_receive_frame().
The last one must be pooled with a loop. It's not simple...

Gilles




2018-03-06 22:06 GMT+01:00 Gilles Caulier <caulier.gilles at gmail.com>:

> No, i use last stable QtAv 1.12.0 from Mageia6...
>
> Gilles
>
> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <metzpinguin at gmail.com>:
>
>> Gilles,
>>
>> do you use QtAV from the git/master? If so, it may be due to a new signal
>> in
>> the video frame extractor compared to version 1.12. I could fix that.
>>
>> Maik
>>
>> Am Sonntag, 4. März 2018, 23:00:17 CET schrieb Gilles Caulier:
>> > And this line :
>> > https://cgit.kde.org/ffmpegthumbs.git/tree/CMakeLists.txt#n16
>> >
>> > Gilles
>> >
>> > 2018-03-04 22:58 GMT+01:00 Gilles Caulier <caulier.gilles at gmail.com>:
>> > > Look this line :
>> > >
>> > > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer.h#n21
>> > >
>> > > Gilles
>> > >
>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <metzpinguin at gmail.com>:
>> > >> Gilles,
>> > >>
>> > >> libffmpegthumbnailer has no KIO dependencies, only C and FFMpeg. Or
>> I do
>> > >> not
>> > >> look right? Does the package exist in your Linux distribution?
>> > >>
>> > >> https://github.com/dirkvdb/ffmpegthumbnailer/tree/master/lib
>> > >> ffmpegthumbnailer
>> > >>
>> > >> Maik
>> > >>
>> > >> Am Sonntag, 4. März 2018, 18:56:48 CET schrieb Gilles Caulier:
>> > >> > Another one : https://bugs.kde.org/show_bug.cgi?id=387892
>> > >> >
>> > >> > not reproducible here, but with FFMPEG, this will kill the bug...
>> > >> >
>> > >> > Gilles
>> > >> >
>> > >> > 2018-03-04 18:55 GMT+01:00 Gilles Caulier <
>> caulier.gilles at gmail.com>:
>> > >> > > For me this entry is valid :
>> > >> > >
>> > >> > > https://bugs.kde.org/show_bug.cgi?id=390443
>> > >> > >
>> > >> > > and we can try to close this file if we use FFMPEG directly to
>> > >>
>> > >> generate
>> > >>
>> > >> > > thumbnailer...
>> > >> > >
>> > >> > > Gilles
>> > >> > >
>> > >> > > 2018-03-04 17:49 GMT+01:00 Gilles Caulier <
>> caulier.gilles at gmail.com>:
>> > >> > >> Hi all,
>> > >> > >>
>> > >> > >> Since i written the FFMPEG video metadata parser in 6.0.0
>> branch,
>> > >> > >> i'm
>> > >> > >> trying to register a huge video collection from my host
>> computer.
>> > >> > >>
>> > >> > >> Here, more than 2500 MKV files are present, plus a lots of MP4,
>> MOV,
>> > >>
>> > >> and
>> > >>
>> > >> > >> another media taken with cellular and camera.
>> > >> > >>
>> > >> > >> The registration have been very fast. 2500 file parsed in 2
>> minutes
>> > >>
>> > >> and
>> > >>
>> > >> > >> ready to use. System has SSD, Sqlite, 8 cores, and 32Gb of RAM.
>> No
>> > >>
>> > >> crash
>> > >>
>> > >> > >> all work fine... excepted... the video thumbnails.
>> > >> > >>
>> > >> > >> I facing random dysfunctions with video files. Sometime thumbs
>> are
>> > >>
>> > >> there,
>> > >>
>> > >> > >> sometime not. Using F5 always give a different results until i
>> try
>> > >> > >> to
>> > >> > >> insist and i can see the DB locked and revival...
>> > >> > >>
>> > >> > >> The video thumbnailer is based on QtAV frame extractor. My QtAV
>> is
>> > >>
>> > >> last
>> > >>
>> > >> > >> stable 1.12.0. I suspect a bug somewhere in QtAV, as i can see
>> > >> > >> thumbnailer
>> > >> > >> code including a lots of mutex to prevent concurrency.
>> > >> > >>
>> > >> > >> This is typically abnormal. FFMPEG API is re-entrant as i
>> checked
>> > >>
>> > >> with
>> > >>
>> > >> > >> the multi-threaded metadata parser unit test.
>> > >> > >>
>> > >> > >> As we depend now directly of FFMPEG API, I propose to rewrite
>> the
>> > >>
>> > >> video
>> > >>
>> > >> > >> thumbnailer with libav C function.
>> > >> > >>
>> > >> > >> We have code ready to use with ffmpeg API here :
>> > >> > >>
>> > >> > >> https://cgit.kde.org/ffmpegthumbs.git/tree/
>> > >> > >>
>> > >> > >> Your viewpoint ?
>> > >> > >>
>> > >> > >> Gilles
>>
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20180308/16387380/attachment.html>


More information about the Digikam-devel mailing list