6.0.0 video thumbnailer...

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

6.0.0 video thumbnailer...

Gilles Caulier-4
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 :


Your viewpoint ?

Gilles 


Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Maik Qualmann
Do we want to use libffmpegthumbnailer as additional dependencies? Also used
by Dolphin here. For that I already have a nearly finished patch, because I
tested it some time ago and it worked very well and fast. I will reactivate
the patch to test...

Maik

Am Sonntag, 4. März 2018, 17:49:39 CET schrieb Gilles Caulier:

> 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




Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4
Hi Maik,

Definitively no, because we need to limit the dependencies puzzle definitively. Look well, this thumbnailer use KIO in background, and you know what i mean about the portability of KIO...

The DK thumbnailer architecture is based on QThread, and we can use here ActionThreadBase/ActionJob instead QObject/Qthread.

But you can include your patch in future internal digiKam core video thumbnailer based on this kind of code (:=)))

Gilles

2018-03-04 18:10 GMT+01:00 Maik Qualmann <[hidden email]>:
Do we want to use libffmpegthumbnailer as additional dependencies? Also used
by Dolphin here. For that I already have a nearly finished patch, because I
tested it some time ago and it worked very well and fast. I will reactivate
the patch to test...

Maik

Am Sonntag, 4. März 2018, 17:49:39 CET schrieb Gilles Caulier:
> 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





Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4
In reply to this post by Gilles Caulier-4
For me this entry is valid :


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 <[hidden email]>:
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 :


Your viewpoint ?

Gilles 



Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4
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 <[hidden email]>:
For me this entry is valid :


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 <[hidden email]>:
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 :


Your viewpoint ?

Gilles 




Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Maik Qualmann
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/libffmpegthumbnailer

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 <[hidden email]>:
> > 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 <[hidden email]>:
> >> 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




Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4

2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]>:
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/libffmpegthumbnailer

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 <[hidden email]>:
> > 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 <[hidden email]>:
> >> 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





Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4

2018-03-04 22:58 GMT+01:00 Gilles Caulier <[hidden email]>:

2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]>:
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/libffmpegthumbnailer

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 <[hidden email]>:
> > 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 <[hidden email]>:
> >> 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






Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Maik Qualmann
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 <[hidden email]>:
> > Look this line :
> >
> > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer.h#n21
> >
> > Gilles
> >
> > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]>:
> >> 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 <[hidden email]>:
> >> > > 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 <[hidden email]>:
> >> > >> 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




Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4
No, i use last stable QtAv 1.12.0 from Mageia6...

Gilles

2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
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 <[hidden email]>:
> > Look this line :
> >
> > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer.h#n21
> >
> > Gilles
> >
> > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]>:
> >> 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 <[hidden email]>:
> >> > > 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 <[hidden email]>:
> >> > >> 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





Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4
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 <[hidden email]>:
No, i use last stable QtAv 1.12.0 from Mageia6...

Gilles

2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
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 <[hidden email]>:
> > Look this line :
> >
> > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer.h#n21
> >
> > Gilles
> >
> > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]>:
> >> 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 <[hidden email]>:
> >> > > 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 <[hidden email]>:
> >> > >> 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






Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4
Else, i tested with the collection of video files from GDrive :


The thumbnailer work as expected and there is no problem as QtAv frame extractor generate.

Note : the thumbnails orientation don't need to be changed. Sound like ffmpeg autorotate the stream automatically. There are few video taken vertically in the collection and without to use exif rotation flag value, all is displayed in right direction as well.

Note2 : The video preview is also auto-rotated by QtAv widget. No need to double rotation of video while playing. Just test with video sample to reproduce the problem.

Gilles Caulier

2018-03-08 15:51 GMT+01:00 Gilles Caulier <[hidden email]>:
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 <[hidden email]>:
No, i use last stable QtAv 1.12.0 from Mageia6...

Gilles

2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
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 <[hidden email]>:
> > Look this line :
> >
> > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer.h#n21
> >
> > Gilles
> >
> > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]>:
> >> 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 <[hidden email]>:
> >> > > 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 <[hidden email]>:
> >> > >> 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







Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Maik Qualmann
Hi Gilles,

great, you are really fast. The QtAV widget does not rotate on its own. I
added this feature a few days ago, as the orientation of the video in
DMetadata with your new FFMpeg code was available.

Maik

Am Donnerstag, 8. März 2018, 15:57:48 CET schrieb Gilles Caulier:

> Else, i tested with the collection of video files from GDrive :
>
> https://drive.google.com/drive/folders/10-SJNtJZZQd_LIchfav-YQ9a-pNsQStT
>
> The thumbnailer work as expected and there is no problem as QtAv frame
> extractor generate.
>
> Note : the thumbnails orientation don't need to be changed. Sound like
> ffmpeg autorotate the stream automatically. There are few video taken
> vertically in the collection and without to use exif rotation flag value,
> all is displayed in right direction as well.
>
> Note2 : The video preview is also auto-rotated by QtAv widget. No need to
> double rotation of video while playing. Just test with video sample to
> reproduce the problem.
>
> Gilles Caulier
>
> 2018-03-08 15:51 GMT+01:00 Gilles Caulier <[hidden email]>:
> > 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 <[hidden email]>:
> >> No, i use last stable QtAv 1.12.0 from Mageia6...
> >>
> >> Gilles
> >>
> >> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
> >>> 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 <[hidden email]>:
> >>> > > Look this line :
> >>> > >
> >>> > > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer.h#n21
> >>> > >
> >>> > > Gilles
> >>> > >
> >>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]>:
> >>> > >> 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 <
> >>>
> >>> [hidden email]>:
> >>> > >> > > 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 <
> >>>
> >>> [hidden email]>:
> >>> > >> > >> 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




Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4
yes, but i think this code is not necessary. Did you download the video samples from GDrive and try to import these files in your collection ? Look the orientation of thumbnails and the preview.

Gilles

2018-03-08 19:07 GMT+01:00 Maik Qualmann <[hidden email]>:
Hi Gilles,

great, you are really fast. The QtAV widget does not rotate on its own. I
added this feature a few days ago, as the orientation of the video in
DMetadata with your new FFMpeg code was available.

Maik

Am Donnerstag, 8. März 2018, 15:57:48 CET schrieb Gilles Caulier:
> Else, i tested with the collection of video files from GDrive :
>
> https://drive.google.com/drive/folders/10-SJNtJZZQd_LIchfav-YQ9a-pNsQStT
>
> The thumbnailer work as expected and there is no problem as QtAv frame
> extractor generate.
>
> Note : the thumbnails orientation don't need to be changed. Sound like
> ffmpeg autorotate the stream automatically. There are few video taken
> vertically in the collection and without to use exif rotation flag value,
> all is displayed in right direction as well.
>
> Note2 : The video preview is also auto-rotated by QtAv widget. No need to
> double rotation of video while playing. Just test with video sample to
> reproduce the problem.
>
> Gilles Caulier
>
> 2018-03-08 15:51 GMT+01:00 Gilles Caulier <[hidden email]>:
> > 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 <[hidden email]>:
> >> No, i use last stable QtAv 1.12.0 from Mageia6...
> >>
> >> Gilles
> >>
> >> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
> >>> 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 <[hidden email]>:
> >>> > > Look this line :
> >>> > >
> >>> > > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer.h#n21
> >>> > >
> >>> > > Gilles
> >>> > >
> >>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]>:
> >>> > >> 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 <
> >>>
> >>> [hidden email]>:
> >>> > >> > > 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 <
> >>>
> >>> [hidden email]>:
> >>> > >> > >> 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





Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4
Hum wrong interpretation from me. This depend of current thumbnail size displayed on icon view and image in cache. You need to reset the thumbnails DB and try as well... The results are... strange... 
Gilles

2018-03-08 19:12 GMT+01:00 Gilles Caulier <[hidden email]>:
yes, but i think this code is not necessary. Did you download the video samples from GDrive and try to import these files in your collection ? Look the orientation of thumbnails and the preview.

Gilles

2018-03-08 19:07 GMT+01:00 Maik Qualmann <[hidden email]>:
Hi Gilles,

great, you are really fast. The QtAV widget does not rotate on its own. I
added this feature a few days ago, as the orientation of the video in
DMetadata with your new FFMpeg code was available.

Maik

Am Donnerstag, 8. März 2018, 15:57:48 CET schrieb Gilles Caulier:
> Else, i tested with the collection of video files from GDrive :
>
> https://drive.google.com/drive/folders/10-SJNtJZZQd_LIchfav-YQ9a-pNsQStT
>
> The thumbnailer work as expected and there is no problem as QtAv frame
> extractor generate.
>
> Note : the thumbnails orientation don't need to be changed. Sound like
> ffmpeg autorotate the stream automatically. There are few video taken
> vertically in the collection and without to use exif rotation flag value,
> all is displayed in right direction as well.
>
> Note2 : The video preview is also auto-rotated by QtAv widget. No need to
> double rotation of video while playing. Just test with video sample to
> reproduce the problem.
>
> Gilles Caulier
>
> 2018-03-08 15:51 GMT+01:00 Gilles Caulier <[hidden email]>:
> > 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 <[hidden email]>:
> >> No, i use last stable QtAv 1.12.0 from Mageia6...
> >>
> >> Gilles
> >>
> >> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
> >>> 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 <[hidden email]>:
> >>> > > Look this line :
> >>> > >
> >>> > > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer.h#n21
> >>> > >
> >>> > > Gilles
> >>> > >
> >>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]>:
> >>> > >> 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 <
> >>>
> >>> [hidden email]>:
> >>> > >> > > 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 <
> >>>
> >>> [hidden email]>:
> >>> > >> > >> 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






Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Maik Qualmann
Yes, QtAV and ffmepegthumbnailer do not rotate themselves. Dolphin uses the
same code from ffmpegthumbnailer here and the videos are not rotated. At the
first scan digiKam rotate the thumbnail because it now knows the orientation,
why not after F5 - I do not know.

Maik

Am Donnerstag, 8. März 2018, 19:16:29 CET schrieb Gilles Caulier:

> Hum wrong interpretation from me. This depend of current thumbnail size
> displayed on icon view and image in cache. You need to reset the thumbnails
> DB and try as well... The results are... strange...
> Gilles
>
> 2018-03-08 19:12 GMT+01:00 Gilles Caulier <[hidden email]>:
> > yes, but i think this code is not necessary. Did you download the video
> > samples from GDrive and try to import these files in your collection ?
> > Look
> > the orientation of thumbnails and the preview.
> >
> > Gilles
> >
> > 2018-03-08 19:07 GMT+01:00 Maik Qualmann <[hidden email]>:
> >> Hi Gilles,
> >>
> >> great, you are really fast. The QtAV widget does not rotate on its own. I
> >> added this feature a few days ago, as the orientation of the video in
> >> DMetadata with your new FFMpeg code was available.
> >>
> >> Maik
> >>
> >> Am Donnerstag, 8. März 2018, 15:57:48 CET schrieb Gilles Caulier:
> >> > Else, i tested with the collection of video files from GDrive :
> >> >
> >> > https://drive.google.com/drive/folders/10-SJNtJZZQd_LIchfav-> >>
> >> YQ9a-pNsQStT
> >>
> >> > The thumbnailer work as expected and there is no problem as QtAv frame
> >> > extractor generate.
> >> >
> >> > Note : the thumbnails orientation don't need to be changed. Sound like
> >> > ffmpeg autorotate the stream automatically. There are few video taken
> >> > vertically in the collection and without to use exif rotation flag
> >>
> >> value,
> >>
> >> > all is displayed in right direction as well.
> >> >
> >> > Note2 : The video preview is also auto-rotated by QtAv widget. No need
> >>
> >> to
> >>
> >> > double rotation of video while playing. Just test with video sample to
> >> > reproduce the problem.
> >> >
> >> > Gilles Caulier
> >> >
> >> > 2018-03-08 15:51 GMT+01:00 Gilles Caulier <[hidden email]>:
> >> > > 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 <[hidden email]>:
> >> > >> No, i use last stable QtAv 1.12.0 from Mageia6...
> >> > >>
> >> > >> Gilles
> >> > >>
> >> > >> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
> >> > >>> 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 <
> >>
> >> [hidden email]>:
> >> > >>> > > Look this line :
> >> > >>> > >
> >> > >>> > > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer
> >>
> >> .h#n21
> >>
> >> > >>> > > Gilles
> >> > >>> > >
> >> > >>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann <[hidden email]
> >> > >>> > >
> >> > >>> > >> 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 <
> >> > >>>
> >> > >>> [hidden email]>:
> >> > >>> > >> > > 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 <
> >> > >>>
> >> > >>> [hidden email]>:
> >> > >>> > >> > >> 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




Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Maik Qualmann
After a restart, the thumbnail is rotated correctly again, was also dependent
on the size, so in the cache.

Maik

Am Donnerstag, 8. März 2018, 19:24:52 CET schrieben Sie:

> Yes, QtAV and ffmepegthumbnailer do not rotate themselves. Dolphin uses the
> same code from ffmpegthumbnailer here and the videos are not rotated. At the
> first scan digiKam rotate the thumbnail because it now knows the
> orientation, why not after F5 - I do not know.
>
> Maik
>
> Am Donnerstag, 8. März 2018, 19:16:29 CET schrieb Gilles Caulier:
> > Hum wrong interpretation from me. This depend of current thumbnail size
> > displayed on icon view and image in cache. You need to reset the
> > thumbnails
> > DB and try as well... The results are... strange...
> > Gilles
> >
> > 2018-03-08 19:12 GMT+01:00 Gilles Caulier <[hidden email]>:
> > > yes, but i think this code is not necessary. Did you download the video
> > > samples from GDrive and try to import these files in your collection ?
> > > Look
> > > the orientation of thumbnails and the preview.
> > >
> > > Gilles
> > >
> > > 2018-03-08 19:07 GMT+01:00 Maik Qualmann <[hidden email]>:
> > >> Hi Gilles,
> > >>
> > >> great, you are really fast. The QtAV widget does not rotate on its own.
> > >> I
> > >> added this feature a few days ago, as the orientation of the video in
> > >> DMetadata with your new FFMpeg code was available.
> > >>
> > >> Maik
> > >>
> > >> Am Donnerstag, 8. März 2018, 15:57:48 CET schrieb Gilles Caulier:
> > >> > Else, i tested with the collection of video files from GDrive :
> > >> >
> > >> > https://drive.google.com/drive/folders/10-SJNtJZZQd_LIchfav-> >>
> > >>
> > >> YQ9a-pNsQStT
> > >>
> > >> > The thumbnailer work as expected and there is no problem as QtAv
> > >> > frame
> > >> > extractor generate.
> > >> >
> > >> > Note : the thumbnails orientation don't need to be changed. Sound
> > >> > like
> > >> > ffmpeg autorotate the stream automatically. There are few video taken
> > >> > vertically in the collection and without to use exif rotation flag
> > >>
> > >> value,
> > >>
> > >> > all is displayed in right direction as well.
> > >> >
> > >> > Note2 : The video preview is also auto-rotated by QtAv widget. No
> > >> > need
> > >>
> > >> to
> > >>
> > >> > double rotation of video while playing. Just test with video sample
> > >> > to
> > >> > reproduce the problem.
> > >> >
> > >> > Gilles Caulier
> > >> >
> > >> > 2018-03-08 15:51 GMT+01:00 Gilles Caulier <[hidden email]>:
> > >> > > 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
<[hidden email]>:

> > >> > >> No, i use last stable QtAv 1.12.0 from Mageia6...
> > >> > >>
> > >> > >> Gilles
> > >> > >>
> > >> > >> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
> > >> > >>> 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 <
> > >>
> > >> [hidden email]>:
> > >> > >>> > > Look this line :
> > >> > >>> > >
> > >> > >>> > > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer
> > >>
> > >> .h#n21
> > >>
> > >> > >>> > > Gilles
> > >> > >>> > >
> > >> > >>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann
> > >> > >>> > > <[hidden email]
> > >> > >>> > >
> > >> > >>> > >> 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 <
> > >> > >>>
> > >> > >>> [hidden email]>:
> > >> > >>> > >> > > 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 <
> > >> > >>>
> > >> > >>> [hidden email]>:
> > >> > >>> > >> > >> 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




Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Gilles Caulier-4
Maik,
Look well in ffmpeg thumnailer code :


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)

Gilles

2018-03-08 19:28 GMT+01:00 Maik Qualmann <[hidden email]>:
After a restart, the thumbnail is rotated correctly again, was also dependent
on the size, so in the cache.

Maik

Am Donnerstag, 8. März 2018, 19:24:52 CET schrieben Sie:
> Yes, QtAV and ffmepegthumbnailer do not rotate themselves. Dolphin uses the
> same code from ffmpegthumbnailer here and the videos are not rotated. At the
> first scan digiKam rotate the thumbnail because it now knows the
> orientation, why not after F5 - I do not know.
>
> Maik
>
> Am Donnerstag, 8. März 2018, 19:16:29 CET schrieb Gilles Caulier:
> > Hum wrong interpretation from me. This depend of current thumbnail size
> > displayed on icon view and image in cache. You need to reset the
> > thumbnails
> > DB and try as well... The results are... strange...
> > Gilles
> >
> > 2018-03-08 19:12 GMT+01:00 Gilles Caulier <[hidden email]>:
> > > yes, but i think this code is not necessary. Did you download the video
> > > samples from GDrive and try to import these files in your collection ?
> > > Look
> > > the orientation of thumbnails and the preview.
> > >
> > > Gilles
> > >
> > > 2018-03-08 19:07 GMT+01:00 Maik Qualmann <[hidden email]>:
> > >> Hi Gilles,
> > >>
> > >> great, you are really fast. The QtAV widget does not rotate on its own.
> > >> I
> > >> added this feature a few days ago, as the orientation of the video in
> > >> DMetadata with your new FFMpeg code was available.
> > >>
> > >> Maik
> > >>
> > >> Am Donnerstag, 8. März 2018, 15:57:48 CET schrieb Gilles Caulier:
> > >> > Else, i tested with the collection of video files from GDrive :
> > >> >
> > >> > https://drive.google.com/drive/folders/10-SJNtJZZQd_LIchfav-> >>
> > >>
> > >> YQ9a-pNsQStT
> > >>
> > >> > The thumbnailer work as expected and there is no problem as QtAv
> > >> > frame
> > >> > extractor generate.
> > >> >
> > >> > Note : the thumbnails orientation don't need to be changed. Sound
> > >> > like
> > >> > ffmpeg autorotate the stream automatically. There are few video taken
> > >> > vertically in the collection and without to use exif rotation flag
> > >>
> > >> value,
> > >>
> > >> > all is displayed in right direction as well.
> > >> >
> > >> > Note2 : The video preview is also auto-rotated by QtAv widget. No
> > >> > need
> > >>
> > >> to
> > >>
> > >> > double rotation of video while playing. Just test with video sample
> > >> > to
> > >> > reproduce the problem.
> > >> >
> > >> > Gilles Caulier
> > >> >
> > >> > 2018-03-08 15:51 GMT+01:00 Gilles Caulier <[hidden email]>:
> > >> > > 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
<[hidden email]>:
> > >> > >> No, i use last stable QtAv 1.12.0 from Mageia6...
> > >> > >>
> > >> > >> Gilles
> > >> > >>
> > >> > >> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
> > >> > >>> 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 <
> > >>
> > >> [hidden email]>:
> > >> > >>> > > Look this line :
> > >> > >>> > >
> > >> > >>> > > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer
> > >>
> > >> .h#n21
> > >>
> > >> > >>> > > Gilles
> > >> > >>> > >
> > >> > >>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann
> > >> > >>> > > <[hidden email]
> > >> > >>> > >
> > >> > >>> > >> 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 <
> > >> > >>>
> > >> > >>> [hidden email]>:
> > >> > >>> > >> > > 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 <
> > >> > >>>
> > >> > >>> [hidden email]>:
> > >> > >>> > >> > >> 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





Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Maik Qualmann
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.

Maik

2018-03-10 9:13 GMT+01:00 Gilles Caulier <[hidden email]>:
Maik,
Look well in ffmpeg thumnailer code :


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)

Gilles

2018-03-08 19:28 GMT+01:00 Maik Qualmann <[hidden email]>:
After a restart, the thumbnail is rotated correctly again, was also dependent
on the size, so in the cache.

Maik

Am Donnerstag, 8. März 2018, 19:24:52 CET schrieben Sie:
> Yes, QtAV and ffmepegthumbnailer do not rotate themselves. Dolphin uses the
> same code from ffmpegthumbnailer here and the videos are not rotated. At the
> first scan digiKam rotate the thumbnail because it now knows the
> orientation, why not after F5 - I do not know.
>
> Maik
>
> Am Donnerstag, 8. März 2018, 19:16:29 CET schrieb Gilles Caulier:
> > Hum wrong interpretation from me. This depend of current thumbnail size
> > displayed on icon view and image in cache. You need to reset the
> > thumbnails
> > DB and try as well... The results are... strange...
> > Gilles
> >
> > 2018-03-08 19:12 GMT+01:00 Gilles Caulier <[hidden email]>:
> > > yes, but i think this code is not necessary. Did you download the video
> > > samples from GDrive and try to import these files in your collection ?
> > > Look
> > > the orientation of thumbnails and the preview.
> > >
> > > Gilles
> > >
> > > 2018-03-08 19:07 GMT+01:00 Maik Qualmann <[hidden email]>:
> > >> Hi Gilles,
> > >>
> > >> great, you are really fast. The QtAV widget does not rotate on its own.
> > >> I
> > >> added this feature a few days ago, as the orientation of the video in
> > >> DMetadata with your new FFMpeg code was available.
> > >>
> > >> Maik
> > >>
> > >> Am Donnerstag, 8. März 2018, 15:57:48 CET schrieb Gilles Caulier:
> > >> > Else, i tested with the collection of video files from GDrive :
> > >> >
> > >> > https://drive.google.com/drive/folders/10-SJNtJZZQd_LIchfav-> >>
> > >>
> > >> YQ9a-pNsQStT
> > >>
> > >> > The thumbnailer work as expected and there is no problem as QtAv
> > >> > frame
> > >> > extractor generate.
> > >> >
> > >> > Note : the thumbnails orientation don't need to be changed. Sound
> > >> > like
> > >> > ffmpeg autorotate the stream automatically. There are few video taken
> > >> > vertically in the collection and without to use exif rotation flag
> > >>
> > >> value,
> > >>
> > >> > all is displayed in right direction as well.
> > >> >
> > >> > Note2 : The video preview is also auto-rotated by QtAv widget. No
> > >> > need
> > >>
> > >> to
> > >>
> > >> > double rotation of video while playing. Just test with video sample
> > >> > to
> > >> > reproduce the problem.
> > >> >
> > >> > Gilles Caulier
> > >> >
> > >> > 2018-03-08 15:51 GMT+01:00 Gilles Caulier <[hidden email]>:
> > >> > > 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
<[hidden email]>:
> > >> > >> No, i use last stable QtAv 1.12.0 from Mageia6...
> > >> > >>
> > >> > >> Gilles
> > >> > >>
> > >> > >> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <[hidden email]>:
> > >> > >>> 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 <
> > >>
> > >> [hidden email]>:
> > >> > >>> > > Look this line :
> > >> > >>> > >
> > >> > >>> > > https://cgit.kde.org/ffmpegthumbs.git/tree/ffmpegthumbnailer
> > >>
> > >> .h#n21
> > >>
> > >> > >>> > > Gilles
> > >> > >>> > >
> > >> > >>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann
> > >> > >>> > > <[hidden email]
> > >> > >>> > >
> > >> > >>> > >> 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 <
> > >> > >>>
> > >> > >>> [hidden email]>:
> > >> > >>> > >> > > 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 <
> > >> > >>>
> > >> > >>> [hidden email]>:
> > >> > >>> > >> > >> 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






Reply | Threaded
Open this post in threaded view
|

Re: 6.0.0 video thumbnailer...

Maik Qualmann
Everything fine with the video thumbnail size. The size of 128 is just a
preset value. We set the correct size, 256 or for HiDPI then 512 pixels.

Maik

Am Samstag, 10. März 2018, 09:47:22 CET schrieben Sie:

> 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.
>
> Maik
>
> 2018-03-10 9:13 GMT+01:00 Gilles Caulier <[hidden email]>:
> > Maik,
> > Look well in ffmpeg thumnailer code :
> >
> > https://cgit.kde.org/digikam.git/tree/libs/threadimageio/
> > ffmpegthumbnailer/videothumbnailer.cpp?h=development/6.0.0#n56
> >
> > 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)
> >
> > Gilles
> >
> > 2018-03-08 19:28 GMT+01:00 Maik Qualmann <[hidden email]>:
> >> After a restart, the thumbnail is rotated correctly again, was also
> >> dependent
> >> on the size, so in the cache.
> >>
> >> Maik
> >>
> >> Am Donnerstag, 8. März 2018, 19:24:52 CET schrieben Sie:
> >> > Yes, QtAV and ffmepegthumbnailer do not rotate themselves. Dolphin uses
> >>
> >> the
> >>
> >> > same code from ffmpegthumbnailer here and the videos are not rotated.
> >>
> >> At the
> >>
> >> > first scan digiKam rotate the thumbnail because it now knows the
> >> > orientation, why not after F5 - I do not know.
> >> >
> >> > Maik
> >> >
> >> > Am Donnerstag, 8. März 2018, 19:16:29 CET schrieb Gilles Caulier:
> >> > > Hum wrong interpretation from me. This depend of current thumbnail
> >>
> >> size
> >>
> >> > > displayed on icon view and image in cache. You need to reset the
> >> > > thumbnails
> >> > > DB and try as well... The results are... strange...
> >> > > Gilles
> >> > >
> >> > > 2018-03-08 19:12 GMT+01:00 Gilles Caulier <[hidden email]>:
> >> > > > yes, but i think this code is not necessary. Did you download the
> >>
> >> video
> >>
> >> > > > samples from GDrive and try to import these files in your
> >>
> >> collection ?
> >>
> >> > > > Look
> >> > > > the orientation of thumbnails and the preview.
> >> > > >
> >> > > > Gilles
> >> > > >
> >> > > > 2018-03-08 19:07 GMT+01:00 Maik Qualmann <[hidden email]>:
> >> > > >> Hi Gilles,
> >> > > >>
> >> > > >> great, you are really fast. The QtAV widget does not rotate on its
> >>
> >> own.
> >>
> >> > > >> I
> >> > > >> added this feature a few days ago, as the orientation of the video
> >>
> >> in
> >>
> >> > > >> DMetadata with your new FFMpeg code was available.
> >> > > >>
> >> > > >> Maik
> >> > > >>
> >> > > >> Am Donnerstag, 8. März 2018, 15:57:48 CET schrieb Gilles Caulier:
> >> > > >> > Else, i tested with the collection of video files from GDrive :
> >> > > >> >
> >> > > >> > https://drive.google.com/drive/folders/10-SJNtJZZQd_LIchfav-> >>
> >> > > >>
> >> > > >> YQ9a-pNsQStT
> >> > > >>
> >> > > >> > The thumbnailer work as expected and there is no problem as QtAv
> >> > > >> > frame
> >> > > >> > extractor generate.
> >> > > >> >
> >> > > >> > Note : the thumbnails orientation don't need to be changed.
> >> > > >> > Sound
> >> > > >> > like
> >> > > >> > ffmpeg autorotate the stream automatically. There are few video
> >>
> >> taken
> >>
> >> > > >> > vertically in the collection and without to use exif rotation
> >>
> >> flag
> >>
> >> > > >> value,
> >> > > >>
> >> > > >> > all is displayed in right direction as well.
> >> > > >> >
> >> > > >> > Note2 : The video preview is also auto-rotated by QtAv widget.
> >> > > >> > No
> >> > > >> > need
> >> > > >>
> >> > > >> to
> >> > > >>
> >> > > >> > double rotation of video while playing. Just test with video
> >>
> >> sample
> >>
> >> > > >> > to
> >> > > >> > reproduce the problem.
> >> > > >> >
> >> > > >> > Gilles Caulier
> >> > > >> >
> >> > > >> > 2018-03-08 15:51 GMT+01:00 Gilles Caulier <
> >>
> >> [hidden email]>:
> >> > > >> > > 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
> >>
> >> <[hidden email]>:
> >> > > >> > >> No, i use last stable QtAv 1.12.0 from Mageia6...
> >> > > >> > >>
> >> > > >> > >> Gilles
> >> > > >> > >>
> >> > > >> > >> 2018-03-06 21:20 GMT+01:00 Maik Qualmann <
> >>
> >> [hidden email]>:
> >> > > >> > >>> 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 <
> >> > > >>
> >> > > >> [hidden email]>:
> >> > > >> > >>> > > Look this line :
> >> > > >> > >>> > >
> >> > > >> > >>> > > https://cgit.kde.org/ffmpegthu
> >>
> >> mbs.git/tree/ffmpegthumbnailer
> >>
> >> > > >> .h#n21
> >> > > >>
> >> > > >> > >>> > > Gilles
> >> > > >> > >>> > >
> >> > > >> > >>> > > 2018-03-04 19:27 GMT+01:00 Maik Qualmann
> >> > > >> > >>> > > <[hidden email]
> >> > > >> > >>> > >
> >> > > >> > >>> > >> 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/ffm
> >>
> >> pegthumbnailer/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 <
> >> > > >> > >>>
> >> > > >> > >>> [hidden email]>:
> >> > > >> > >>> > >> > > 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 <
> >> > > >> > >>>
> >> > > >> > >>> [hidden email]>:
> >> > > >> > >>> > >> > >> 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