<div dir="ltr"><div>Hmm, the thumbnail size is setting in the video thumbnailerjob.cpp. I know that the QImage size is always 256 from a site. I check it again with HiDPI support.<br><br></div>Maik<br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-10 9:13 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"><div>Maik,<br></div><div>Look well in ffmpeg thumnailer code :</div><div><br></div><div><a href="https://cgit.kde.org/digikam.git/tree/libs/threadimageio/ffmpegthumbnailer/videothumbnailer.cpp?h=development/6.0.0#n56" target="_blank">https://cgit.kde.org/digikam.<wbr>git/tree/libs/threadimageio/<wbr>ffmpegthumbnailer/<wbr>videothumbnailer.cpp?h=<wbr>development/6.0.0#n56</a><br></div><div><br></div><div>The video thumbnail size is set at 128, which is too low. It must be set externally when user switch to Hdpi support (typically 512 in this case)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Gilles</div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-08 19:28 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">After a restart, the thumbnail is rotated correctly again, was also dependent<br>
on the size, so in the cache.<br>
<br>
Maik<br>
<br>
Am Donnerstag, 8. März 2018, 19:24:52 CET schrieben Sie:<br>
<div class="m_-754937472641987498HOEnZb"><div class="m_-754937472641987498h5">> Yes, QtAV and ffmepegthumbnailer do not rotate themselves. Dolphin uses the<br>
> same code from ffmpegthumbnailer here and the videos are not rotated. At the<br>
> first scan digiKam rotate the thumbnail because it now knows the<br>
> orientation, why not after F5 - I do not know.<br>
><br>
> Maik<br>
><br>
> Am Donnerstag, 8. März 2018, 19:16:29 CET schrieb Gilles Caulier:<br>
> > Hum wrong interpretation from me. This depend of current thumbnail size<br>
> > displayed on icon view and image in cache. You need to reset the<br>
> > thumbnails<br>
> > DB and try as well... The results are... strange...<br>
> > Gilles<br>
> ><br>
> > 2018-03-08 19:12 GMT+01:00 Gilles Caulier <<a href="mailto:caulier.gilles@gmail.com" target="_blank">caulier.gilles@gmail.com</a>>:<br>
> > > yes, but i think this code is not necessary. Did you download the video<br>
> > > samples from GDrive and try to import these files in your collection ?<br>
> > > Look<br>
> > > the orientation of thumbnails and the preview.<br>
> > ><br>
> > > Gilles<br>
> > ><br>
> > > 2018-03-08 19:07 GMT+01:00 Maik Qualmann <<a href="mailto:metzpinguin@gmail.com" target="_blank">metzpinguin@gmail.com</a>>:<br>
> > >> Hi Gilles,<br>
> > >><br>
> > >> great, you are really fast. The QtAV widget does not rotate on its own.<br>
> > >> I<br>
> > >> added this feature a few days ago, as the orientation of the video in<br>
> > >> DMetadata with your new FFMpeg code was available.<br>
> > >><br>
> > >> Maik<br>
> > >><br>
> > >> Am Donnerstag, 8. März 2018, 15:57:48 CET schrieb Gilles Caulier:<br>
> > >> > Else, i tested with the collection of video files from GDrive :<br>
> > >> ><br>
> > >> > <a href="https://drive.google.com/drive/folders/10-SJNtJZZQd_LIchfav-" rel="noreferrer" target="_blank">https://drive.google.com/drive<wbr>/folders/10-SJNtJZZQd_LIchfav-</a><wbr>> >><br>
> > >><br>
> > >> YQ9a-pNsQStT<br>
> > >><br>
> > >> > The thumbnailer work as expected and there is no problem as QtAv<br>
> > >> > frame<br>
> > >> > extractor generate.<br>
> > >> ><br>
> > >> > Note : the thumbnails orientation don't need to be changed. Sound<br>
> > >> > like<br>
> > >> > ffmpeg autorotate the stream automatically. There are few video taken<br>
> > >> > vertically in the collection and without to use exif rotation flag<br>
> > >><br>
> > >> value,<br>
> > >><br>
> > >> > all is displayed in right direction as well.<br>
> > >> ><br>
> > >> > Note2 : The video preview is also auto-rotated by QtAv widget. No<br>
> > >> > need<br>
> > >><br>
> > >> to<br>
> > >><br>
> > >> > double rotation of video while playing. Just test with video sample<br>
> > >> > to<br>
> > >> > reproduce the problem.<br>
> > >> ><br>
> > >> > Gilles Caulier<br>
> > >> ><br>
> > >> > 2018-03-08 15:51 GMT+01:00 Gilles Caulier <<a href="mailto:caulier.gilles@gmail.com" target="_blank">caulier.gilles@gmail.com</a>>:<br>
> > >> > > Maik,<br>
> > >> > ><br>
> > >> > > The new video thumbnailer code based on ffmpeg is reviewed and<br>
> > >><br>
> > >> optimized,<br>
> > >><br>
> > >> > > excepted the last deprecated warning messages.<br>
> > >> > ><br>
> > >> > > These last one are relevant of change of FFMPEG API. It's not only<br>
> > >><br>
> > >> some<br>
> > >><br>
> > >> > > method call changes (+arguments). The type of structures have also<br>
> > >> > > changed.<br>
> > >> > > Typically :<br>
> > >> > ><br>
> > >> > > - AVPicture struct must be changed as AVFrame or a utils method<br>
> > >> > > from<br>
> > >> > > libavutil must be used.<br>
> > >> > ><br>
> > >> > > - AVCodecContext struct must be changed as AVCodecParameters.<br>
> > >> > ><br>
> > >> > > This must be done before to change deprecated methods. A simple<br>
> > >><br>
> > >> migration<br>
> > >><br>
> > >> > > of deprecated methods introduce more warnings due to use other<br>
> > >><br>
> > >> internal<br>
> > >><br>
> > >> > > structures.<br>
> > >> > ><br>
> > >> > > The most tedious method to port is avcodec_decode_video2() which<br>
> > >> > > must<br>
> > >><br>
> > >> e<br>
> > >><br>
> > >> > > replaced by 2 calls :  avcodec_send_packet() and<br>
> > >><br>
> > >> avcodec_receive_frame().<br>
> > >><br>
> > >> > > The last one must be pooled with a loop. It's not simple...<br>
> > >> > ><br>
> > >> > > Gilles<br>
> > >> > ><br>
> > >> > > 2018-03-06 22:06 GMT+01:00 Gilles Caulier<br>
<<a href="mailto:caulier.gilles@gmail.com" target="_blank">caulier.gilles@gmail.com</a>>:<br>
> > >> > >> No, i use last stable QtAv 1.12.0 from Mageia6...<br>
> > >> > >><br>
> > >> > >> Gilles<br>
> > >> > >><br>
> > >> > >> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <<a href="mailto:metzpinguin@gmail.com" target="_blank">metzpinguin@gmail.com</a>>:<br>
> > >> > >>> Gilles,<br>
> > >> > >>><br>
> > >> > >>> do you use QtAV from the git/master? If so, it may be due to a<br>
> > >> > >>> new<br>
> > >> > >>> signal in<br>
> > >> > >>> the video frame extractor compared to version 1.12. I could fix<br>
> > >><br>
> > >> that.<br>
> > >><br>
> > >> > >>> Maik<br>
> > >> > >>><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 <<br>
> > >><br>
> > >> <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" rel="noreferrer" target="_blank">https://cgit.kde.org/ffmpegthu<wbr>mbs.git/tree/ffmpegthumbnailer</a><br>
> > >><br>
> > >> .h#n21<br>
> > >><br>
> > >> > >>> > > Gilles<br>
> > >> > >>> > ><br>
> > >> > >>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann<br>
> > >> > >>> > > <<a href="mailto:metzpinguin@gmail.com" target="_blank">metzpinguin@gmail.com</a><br>
> > >> > >>> > ><br>
> > >> > >>> > >> Gilles,<br>
> > >> > >>> > >><br>
> > >> > >>> > >> libffmpegthumbnailer has no KIO dependencies, only C and<br>
> > >><br>
> > >> FFMpeg. Or<br>
> > >><br>
> > >> > >>> I do<br>
> > >> > >>><br>
> > >> > >>> > >> not<br>
> > >> > >>> > >> look right? Does the package exist in your Linux<br>
> > >> > >>> > >> 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<br>
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<br>
> > >><br>
> > >> bug...<br>
> > >><br>
> > >> > >>> > >> > Gilles<br>
> > >> > >>> > >> ><br>
> > >> > >>> > >> > 2018-03-04 18:55 GMT+01:00 Gilles Caulier <<br>
> > >> > >>><br>
> > >> > >>> <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<br>
> > >><br>
> > >> directly to<br>
> > >><br>
> > >> > >>> > >> generate<br>
> > >> > >>> > >><br>
> > >> > >>> > >> > > thumbnailer...<br>
> > >> > >>> > >> > ><br>
> > >> > >>> > >> > > Gilles<br>
> > >> > >>> > >> > ><br>
> > >> > >>> > >> > > 2018-03-04 17:49 GMT+01:00 Gilles Caulier <<br>
> > >> > >>><br>
> > >> > >>> <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<br>
> > >> > >>> > >> > >> 6.0.0<br>
> > >> > >>><br>
> > >> > >>> branch,<br>
> > >> > >>><br>
> > >> > >>> > >> > >> i'm<br>
> > >> > >>> > >> > >> trying to register a huge video collection from my host<br>
> > >> > >>><br>
> > >> > >>> computer.<br>
> > >> > >>><br>
> > >> > >>> > >> > >> Here, more than 2500 MKV files are present, plus a lots<br>
> > >> > >>> > >> > >> of<br>
> > >> > >>><br>
> > >> > >>> 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<br>
> > >> > >>> > >> > >> in<br>
> > >><br>
> > >> 2<br>
> > >><br>
> > >> > >>> minutes<br>
> > >> > >>><br>
> > >> > >>> > >> and<br>
> > >> > >>> > >><br>
> > >> > >>> > >> > >> ready to use. System has SSD, Sqlite, 8 cores, and 32Gb<br>
> > >> > >>> > >> > >> of<br>
> > >> > >>><br>
> > >> > >>> RAM. No<br>
> > >> > >>><br>
> > >> > >>> > >> crash<br>
> > >> > >>> > >><br>
> > >> > >>> > >> > >> all work fine... excepted... the video thumbnails.<br>
> > >> > >>> > >> > >><br>
> > >> > >>> > >> > >> I facing random dysfunctions with video files. Sometime<br>
> > >><br>
> > >> thumbs<br>
> > >><br>
> > >> > >>> are<br>
> > >> > >>><br>
> > >> > >>> > >> there,<br>
> > >> > >>> > >><br>
> > >> > >>> > >> > >> sometime not. Using F5 always give a different results<br>
> > >><br>
> > >> until i<br>
> > >><br>
> > >> > >>> try<br>
> > >> > >>><br>
> > >> > >>> > >> > >> to<br>
> > >> > >>> > >> > >> insist and i can see the DB locked and revival...<br>
> > >> > >>> > >> > >><br>
> > >> > >>> > >> > >> The video thumbnailer is based on QtAV frame extractor.<br>
> > >> > >>> > >> > >> My<br>
> > >> > >>><br>
> > >> > >>> QtAV is<br>
> > >> > >>><br>
> > >> > >>> > >> last<br>
> > >> > >>> > >><br>
> > >> > >>> > >> > >> stable 1.12.0. I suspect a bug somewhere in QtAV, as i<br>
> > >><br>
> > >> can see<br>
> > >><br>
> > >> > >>> > >> > >> thumbnailer<br>
> > >> > >>> > >> > >> code including a lots of mutex to prevent concurrency.<br>
> > >> > >>> > >> > >><br>
> > >> > >>> > >> > >> This is typically abnormal. FFMPEG API is re-entrant as<br>
> > >> > >>> > >> > >> i<br>
> > >> > >>><br>
> > >> > >>> 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<br>
> > >><br>
> > >> rewrite<br>
> > >><br>
> > >> > >>> 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>
</blockquote></div><br></div>