Feat: video preview generation and subtitle support#15
Merged
Conversation
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 introduces several enhancements and documentation updates related to external subtitle support, preview clip endpoints, and recommended chunk size handling, along with improvements to environment configuration and CI checks. The most significant changes are the addition of new API endpoints for subtitle discovery and preview clips, updates to API documentation, and expanded environment variable support for subtitles and previews.
API and Feature Documentation Updates:
/api/tokens/{download_token}/uploads/{upload_id}/subtitles(for listing external subtitle tracks),/api/tokens/{download_token}/uploads/{upload_id}/subtitles/{source_format}(for serving subtitle content), and/api/tokens/{download_token}/uploads/{upload_id}/preview.mp4(for serving preview clips for embeds). These endpoints are now fully described inAPI.md, including authentication, parameters, responses, and error codes. [1] [2]/api/metadata/extractendpoint, which extracts metadata from filenames based on regex patterns defined in the dynamic metadata schema. [1] [2]recommended_chunk_bytesfield for uploads, guiding clients on optimal TUS chunk size for resumable uploads. [1] [2] [3] [4] [5]Environment and Configuration:
FBC_SUBTITLE_PATH,FBC_SUBTITLE_CACHE_TTL_SECONDS) and for preview clip generation (FBC_EMBED_PREVIEW_CLIP_SECONDS,FBC_EMBED_PREVIEW_MIN_SIZE_BYTES). These are now validated and documented inREADME.mdandbackend/app/config.py. [1] [2] [3] [4] [5]en_US.UTF-8to ensure consistent Unicode support. [1] [2]CI/CD Improvements:
bun run format:check) to the build and main GitHub Actions workflows to enforce code style in pull requests. [1] [2]These changes enhance the usability and robustness of the uploader, especially for users needing subtitle support and improved client guidance for resumable uploads.