Add video_thumbnail_keyframes support - #86
Merged
Conversation
Adds the `video_thumbnail_keyframes` (`vtk`) option. It is documented for processing and image info URLs, so it lives in optionsShared/typesShared and is wired into both generators. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G8Aa3xeVUCaxKtQJDzZhMo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
video_thumbnail_keyframes/vtkoption (imgproxy Pro), which was documented but had no implementation in this package.When set to
1,tortrue, imgproxy uses the latest keyframe before the requested second for video thumbnail generation. This makes thumbnail generation faster, but the frame timestamp will not be exactly the requested one. Redefines theIMGPROXY_VIDEO_THUMBNAIL_KEYFRAMESconfig. Default:false.The option is documented for processing URLs and under
## Info optionsin the image-info docs — the same position asvideo_thumbnail_second, which this package already treats as shared. It therefore lives inoptionsShared/typesSharedand is wired into bothgenerateUrlandgenerateImageInfoUrl.Implementation notes
enforceThumbnailboolean pattern:testuses"key" in options, so an explicitfalsestill emitsvtk:frather than being dropped.**PRO feature**in the typedocs on both the value type and the*OptionsPartialinterface, matchingvideoThumbnailSecondand the rest of the Pro options.Verification
tsc --noEmitclean,eslint src testscleanvitest run→ 98 files / 1106 tests passing (11 new)generateUrl(..., { width: 10, video_thumbnail_keyframes: true, video_thumbnail_second: 5 })→/vtk:t/vts:5/w:10/plain/img;generateImageInfoUrl(..., { vtk: false })→/vtk:f/plain/imgRelation to #85
Independent — branched from
main, no overlap. Unlikebypass_cache/cache_tagsin #85,vtkis already in the released 4.0.x docs, so it works against current imgproxy versions.🤖 Generated with Claude Code
https://claude.ai/code/session_01G8Aa3xeVUCaxKtQJDzZhMo