-
Notifications
You must be signed in to change notification settings - Fork 42
feat: introduce LiveVOD service and consolidate storage backend to S3 #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1e6f671
feat: s3-only recorder index and ack/delete flow
4627488 68a236f
feat: jsonl recorder index with compaction
4627488 9b18614
feat: livevod service and async upload queue
4627488 dab3393
chore: polish livevod and uploader
4627488 3939363
feat: livevod time lookup and upload docs
4627488 b01f766
chore: clippy cleanups
4627488 69e1472
refactor: clippy
4627488 0864411
refactor: simplify pattern matching in storage config tests
4627488 d06c236
refactor recordings sync endpoints to RESTful
4627488 577f581
fix: remove unused routing imports in recorder route
4627488 94f8f0c
fix: upgrade opendal to 0.55.0 to resolve version conflict
4627488 d2fb7c8
feat: add local filesystem storage backend (basic maintenance)
4627488 34979e1
docs: update recorder/livevod/liveman docs to reflect fs storage support
4627488 d1f301d
feat: update storage configuration for local filesystem support in li…
4627488 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| [http] | ||
| # Http Server Listen Address | ||
| # listen = "0.0.0.0:8899" | ||
|
|
||
| [log] | ||
| # Env: `LOG_LEVEL` | ||
| # Default: info | ||
| # Values: off, error, warn, info, debug, trace | ||
| # level = "info" | ||
|
|
||
| # Playback index path (JSONL or JSON array) | ||
| index_path = "./recordings/index.json" | ||
|
|
||
| # Storage backend configuration | ||
| [storage] | ||
| # Local filesystem (default) | ||
| type = "fs" | ||
| root = "./recordings" | ||
|
|
||
| # AWS S3 with explicit credentials | ||
| #type = "s3" | ||
| #bucket = "my-live777-bucket" | ||
| #root = "/recordings" | ||
| #region = "us-east-1" | ||
| #access_key_id = "AKIAIOSFODNN7EXAMPLE" | ||
| #secret_access_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" | ||
|
|
||
| # AWS S3 with IAM role (recommended for EC2/ECS) | ||
| #type = "s3" | ||
| #bucket = "my-live777-bucket" | ||
| #root = "/recordings" | ||
| #region = "us-east-1" | ||
|
|
||
| # Optional: custom endpoint for S3-compatible storage | ||
| #endpoint = "http://localhost:9000" | ||
|
|
||
| [playback] | ||
| # Whether to use signed redirects for non-MPD objects | ||
| # signed_redirect = false | ||
| # signed_ttl_seconds = 60 |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # LiveVOD | ||
|
|
||
| LiveVOD is a lightweight playback service that depends on a local `index.json` (JSONL) and a storage backend (filesystem or S3). | ||
|
|
||
| ## Configuration | ||
|
|
||
| ```toml | ||
| [http] | ||
| # listen = "0.0.0.0:8899" | ||
|
|
||
| # Playback index path (JSONL or JSON array) | ||
| index_path = "./storage/index.json" | ||
|
|
||
| # Local filesystem storage (default) | ||
| [storage] | ||
| type = "fs" | ||
| root = "./storage" | ||
|
|
||
| # AWS S3 storage | ||
| # [storage] | ||
| # type = "s3" | ||
| # bucket = "my-live777-bucket" | ||
| # root = "/recordings" | ||
| # region = "us-east-1" | ||
|
|
||
| [playback] | ||
| # signed_redirect = false # S3 only: redirect media segments via presigned URLs | ||
| # signed_ttl_seconds = 60 | ||
| ``` | ||
|
|
||
| ## APIs | ||
|
|
||
| - List streams: `GET /api/playback` | ||
| - List records for stream: `GET /api/playback/{stream}` | ||
| - Find record by timestamp: `GET /api/playback/{stream}/at?ts=...` | ||
| - `ts` accepts seconds, milliseconds, or microseconds. | ||
| - Proxy object: `GET /api/record/object/{path}` | ||
|
|
||
| When `playback.signed_redirect = true`, non-MPD objects are redirected using presigned URLs. This requires S3 storage; it has no effect with the filesystem backend. |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔