Skip to content

Comments

fix(ios): use precise time tolerance for thumbnail generation#142

Open
Kavakliyski wants to merge 1 commit intosouvik-ghosh:masterfrom
Kavakliyski:master
Open

fix(ios): use precise time tolerance for thumbnail generation#142
Kavakliyski wants to merge 1 commit intosouvik-ghosh:masterfrom
Kavakliyski:master

Conversation

@Kavakliyski
Copy link

Summary

Sets requestedTimeToleranceBefore and requestedTimeToleranceAfter to kCMTimeZero
to ensure thumbnails are generated at the exact requested timestamp.

Problem

Without explicit tolerance settings, AVAssetImageGenerator snaps to the nearest
keyframe, which can result in thumbnails from significantly different timestamps
than requested.

Solution

Configure zero tolerance to force precise frame extraction.

Set precise time tolerance for image generation to avoid snapping to keyframes.

Sets `requestedTimeToleranceBefore` and `requestedTimeToleranceAfter` to `kCMTimeZero` 
to ensure thumbnails are generated at the exact requested timestamp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant