HLS VOD playback for browser (supplements MP4 proxy) #170
No reviewers
Labels
No labels
bug
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: WildDragonLLC/dragonflight#170
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/hls-vod-playback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Moves browser playback of recorded assets to HLS, retiring the MP4 range-stitching path for VOD. The MP4 proxy is kept (Premiere panel + downloads).
Why
The MP4
/videopath streams the proxy through Node and stitches around a RustFS ranged-GET bug (streams from byte 0, drops bytes — wasteful per seek). HLS segments are small whole-file GETs, so the bug doesn't apply, andhls.jsis already wired in the player for live.Changes
worker/hls.js:remuxToHls()stream-copies the proxy MP4 → fMP4 HLS (playlist.m3u8+init.mp4+segment_*.m4s) via the existingsegmentToHls, uploads tohls/<id>/, setsassets.hls_s3_key.hlsWorkerbackfills from an existing proxy.proxy.js: generate HLS inline after the MP4 upload (local file, no re-download/re-encode); best-effort/non-fatal.worker/index.js: registerhlsworker whereverproxyruns.mam-api:GET /assets/:id/hls/:fileserves playlist/init/segments as whole-object GETs (strict filename validation, no Range)./streamprefershls_s3_key(type: 'hls').reprocess?type=hlsbackfills. Migration 025 addsassets.hls_s3_key.type: 'hls').Verified live (zampp1)
reprocess?type=hls→ worker remuxed →hls_s3_keyset/stream→type: hlsplaylist.m3u8→ 200application/vnd.apple.mpegurl(valid HLS v7 fMP4)init.mp4+segment_00000.m4s→ 200 whole-file (video/mp4), no 206/RangeNotes
/videountil backfilled viareprocess?type=hls(a bulk backfill could be a follow-up).🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.