<div dir="ltr">Maik,<div><br></div><div>The new video thumbnailer code based on ffmpeg is reviewed and optimized, excepted the last deprecated warning messages.</div><div><br></div><div>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 :</div><div><br></div><div>- AVPicture struct must be changed as AVFrame or a utils method from libavutil must be used.</div><div><br></div><div>- AVCodecContext <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">struct must be changed as AVCodecParameters.</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">This must be done before to change deprecated methods. A simple migration of deprecated methods introduce more warnings due to use other internal structures.</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">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...</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Gilles</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-06 22:06 GMT+01:00 Gilles Caulier <span dir="ltr"><<a href="mailto:caulier.gilles@gmail.com" target="_blank">caulier.gilles@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">No, i use last stable QtAv 1.12.0 from Mageia6...<span class="HOEnZb"><font color="#888888"><div><br></div><div>Gilles</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2018-03-06 21:20 GMT+01:00 Maik Qualmann <span dir="ltr"><<a href="mailto:metzpinguin@gmail.com" target="_blank">metzpinguin@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Gilles,<br>
<br>
do you use QtAV from the git/master? If so, it may be due to a new signal in<br>
the video frame extractor compared to version 1.12. I could fix that.<br>
<span class="m_9139147927023525867HOEnZb"><font color="#888888"><br>
Maik<br>
</font></span><div class="m_9139147927023525867HOEnZb"><div class="m_9139147927023525867h5"><br>
Am Sonntag, 4. März 2018, 23:00:17 CET schrieb Gilles Caulier:<br>
> And this line :<br>
> <a href="https://cgit.kde.org/ffmpegthumbs.git/tree/CMakeLists.txt#n16" rel="noreferrer" target="_blank">https://cgit.kde.org/ffmpegthu<wbr>mbs.git/tree/CMakeLists.txt#<wbr>n16</a><br>
><br>
> Gilles<br>
><br>
> 2018-03-04 22:58 GMT+01:00 Gilles Caulier <<a href="mailto:caulier.gilles@gmail.com" target="_blank">caulier.gilles@gmail.com</a>>:<br>
> > Look this line :<br>
> ><br>
> > <a href="https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer.h#n21" rel="noreferrer" target="_blank">https://cgit.kde.org/ffmpegthu<wbr>mbs.git/tree/ffmpegthumbnailer<wbr>.h#n21</a><br>
> ><br>
> > Gilles<br>
> ><br>
> > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <<a href="mailto:metzpinguin@gmail.com" target="_blank">metzpinguin@gmail.com</a>>:<br>
> >> Gilles,<br>
> >><br>
> >> libffmpegthumbnailer has no KIO dependencies, only C and FFMpeg. Or I do<br>
> >> not<br>
> >> look right? Does the package exist in your Linux distribution?<br>
> >><br>
> >> <a href="https://github.com/dirkvdb/ffmpegthumbnailer/tree/master/lib" rel="noreferrer" target="_blank">https://github.com/dirkvdb/ffm<wbr>pegthumbnailer/tree/master/lib</a><br>
> >> ffmpegthumbnailer<br>
> >><br>
> >> Maik<br>
> >><br>
> >> Am Sonntag, 4. März 2018, 18:56:48 CET schrieb Gilles Caulier:<br>
> >> > Another one : <a href="https://bugs.kde.org/show_bug.cgi?id=387892" rel="noreferrer" target="_blank">https://bugs.kde.org/show_bug.<wbr>cgi?id=387892</a><br>
> >> ><br>
> >> > not reproducible here, but with FFMPEG, this will kill the bug...<br>
> >> ><br>
> >> > Gilles<br>
> >> ><br>
> >> > 2018-03-04 18:55 GMT+01:00 Gilles Caulier <<a href="mailto:caulier.gilles@gmail.com" target="_blank">caulier.gilles@gmail.com</a>>:<br>
> >> > > For me this entry is valid :<br>
> >> > ><br>
> >> > > <a href="https://bugs.kde.org/show_bug.cgi?id=390443" rel="noreferrer" target="_blank">https://bugs.kde.org/show_bug.<wbr>cgi?id=390443</a><br>
> >> > ><br>
> >> > > and we can try to close this file if we use FFMPEG directly to<br>
> >><br>
> >> generate<br>
> >><br>
> >> > > thumbnailer...<br>
> >> > ><br>
> >> > > Gilles<br>
> >> > ><br>
> >> > > 2018-03-04 17:49 GMT+01:00 Gilles Caulier <<a href="mailto:caulier.gilles@gmail.com" target="_blank">caulier.gilles@gmail.com</a>>:<br>
> >> > >> Hi all,<br>
> >> > >><br>
> >> > >> Since i written the FFMPEG video metadata parser in 6.0.0 branch,<br>
> >> > >> i'm<br>
> >> > >> trying to register a huge video collection from my host computer.<br>
> >> > >><br>
> >> > >> Here, more than 2500 MKV files are present, plus a lots of MP4, MOV,<br>
> >><br>
> >> and<br>
> >><br>
> >> > >> another media taken with cellular and camera.<br>
> >> > >><br>
> >> > >> The registration have been very fast. 2500 file parsed in 2 minutes<br>
> >><br>
> >> and<br>
> >><br>
> >> > >> ready to use. System has SSD, Sqlite, 8 cores, and 32Gb of RAM. No<br>
> >><br>
> >> crash<br>
> >><br>
> >> > >> all work fine... excepted... the video thumbnails.<br>
> >> > >><br>
> >> > >> I facing random dysfunctions with video files. Sometime thumbs are<br>
> >><br>
> >> there,<br>
> >><br>
> >> > >> sometime not. Using F5 always give a different results until i try<br>
> >> > >> to<br>
> >> > >> insist and i can see the DB locked and revival...<br>
> >> > >><br>
> >> > >> The video thumbnailer is based on QtAV frame extractor. My QtAV is<br>
> >><br>
> >> last<br>
> >><br>
> >> > >> stable 1.12.0. I suspect a bug somewhere in QtAV, as i can see<br>
> >> > >> thumbnailer<br>
> >> > >> code including a lots of mutex to prevent concurrency.<br>
> >> > >><br>
> >> > >> This is typically abnormal. FFMPEG API is re-entrant as i checked<br>
> >><br>
> >> with<br>
> >><br>
> >> > >> the multi-threaded metadata parser unit test.<br>
> >> > >><br>
> >> > >> As we depend now directly of FFMPEG API, I propose to rewrite the<br>
> >><br>
> >> video<br>
> >><br>
> >> > >> thumbnailer with libav C function.<br>
> >> > >><br>
> >> > >> We have code ready to use with ffmpeg API here :<br>
> >> > >><br>
> >> > >> <a href="https://cgit.kde.org/ffmpegthumbs.git/tree/" rel="noreferrer" target="_blank">https://cgit.kde.org/ffmpegthu<wbr>mbs.git/tree/</a><br>
> >> > >><br>
> >> > >> Your viewpoint ?<br>
> >> > >><br>
> >> > >> Gilles<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>