PryntTrimmerView icon indicating copy to clipboard operation
PryntTrimmerView copied to clipboard

Thumbnails are Black

Open omarojo opened this issue 5 years ago • 3 comments

Hi and thank you for building this library. AVFoundation is soo hard.

So I have a VideoComposition that has 5 videos stitched together one after the other. And then played in a AVPlayer, when I export into a .mp4 file all videos get stiched together well (no black frames). In other words... Im not playing a .mp4 file but a AVComposition. Im assigning a AVAsset that is generated from a composition of several mp4 files.

But the problem is when I try to load the playerItem into PryntTimmerView. It loads black frames on every pair index. For example the first clip is fine, but second and fourth clips show black frames as thumbnails. always pairs. If I keep adding clips to the composition, it's always the pair index that will show black frames.

I read that maybe using requestedTimeToleranceAfter may help.

    assetImgGenerate.requestedTimeToleranceAfter = .zero
    assetImgGenerate.requestedTimeToleranceBefore = .zero

Video Attached: https://youtu.be/mYFcBLS1DQE

omarojo avatar Aug 01 '20 07:08 omarojo

I think I figure it out. I had to modify your library to accept having custom ImageGenerator.

omarojo avatar Aug 04 '20 21:08 omarojo

I also found this problem, and even with these two properties, the scrolling thumbnails overlapped

Monkey-X-Byte avatar Aug 27 '20 08:08 Monkey-X-Byte

Hi @omarojo, do you have a repo with an example ? If you have a fix you can open a PR, contributions are welcome !

HHK1 avatar Sep 18 '20 07:09 HHK1