feat: webp native (pure-go) implementation#2143
Open
skrashevich wants to merge 6 commits intoAlexxIT:masterfrom
Open
feat: webp native (pure-go) implementation#2143skrashevich wants to merge 6 commits intoAlexxIT:masterfrom
skrashevich wants to merge 6 commits intoAlexxIT:masterfrom
Conversation
- add CLAUDE.md to the ignored files for better cleanliness
- implement WebP streaming with multipart support - add snapshot endpoint for WebP format with quality options - introduce WebP encoding using pure Go library without FFmpeg - update documentation and links for new WebP features
…e/go-astits and github.com/asticode/go-astikit from go.mod and go.sum to clean up unused imports - update the project dependencies for better maintainability
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.
This pull request adds native WebP snapshot and streaming support to the project, enabling both single-frame (
/api/frame.webp) and multipart streaming (/api/stream.webp) endpoints for WebP images. The implementation uses pure Go (via the (go-webplibrary), allowing for efficient, dependency-free WebP encoding and decoding. The changes include the core WebP API, HTTP handlers, codec conversion utilities, and documentation updates.Key changes:
WebP API and HTTP Endpoints:
internal/webppackage providing/api/frame.webp(snapshot) and/api/stream.webp(multipart stream) endpoints, including request handling, caching, and transcoding from H264/H265/JPEG to WebP. (internal/webp/webp.go, internal/webp/webp.goR1-R160)main.goand updates OpenAPI documentation and web UI links to reflect the new endpoints. (main.go, [1] [2];website/api/openapi.yaml, [3] [4];www/links.html, [5]WebP Codec Support and Conversion Utilities:
pkg/webppackage with helpers for encoding/decoding WebP, converting JPEG and RAW frames to WebP, and handling multipart WebP streaming. (pkg/webp/consumer.go, [1];pkg/webp/helpers.go, [2];pkg/webp/rtp.go, [3];pkg/webp/writer.go, [4]pkg/image/producer.go, [1] [2] [3] [4]Dependency and Schema Updates:
go-webplibrary as an indirect dependency for pure Go WebP support and updates the Go version requirement. (go.mod, [1] [2]www/schema.json, [1] [2]Testing:
internal/webp/webp_test.go, [1];pkg/webp/webp_test.go, [2]These changes collectively provide efficient, modern image streaming capabilities with broad browser support and no external dependencies for WebP processing.