fix(streaming): missing HLS segments in edge requests #10

Merged
dylan merged 6 commits from fix/stream-edge-handling into master 2026-07-29 18:50:00 +01:00
Owner

Clipping sections from recorded streams had two bugs:

  • Segment overlap check assumed a fixed 3s segment length instead of using real timestamps, so segments near boundaries/gaps were wrongly included or excluded.
  • Trimming used the concat: byte protocol with -ss applied to the whole stream, not just the first segment, so short trims could start on garbage frames before the real cut point.

Fix

  • Segment end is now derived from the next segment's start timestamp instead of a fixed length.
  • First segment gets re-encoded into a small trimmed head fragment, then joined to the rest via the concat demuxer (-f concat -safe 0) instead of concat: - needed because the demuxer rebases PTS across the join, which the byte protocol can't do once the head isn't stream-aligned.
  • If the requested start lands in a gap after the first segment (probed duration < trim offset), that segment gets dropped and the selection starts at the next real one.
# Clipping sections from recorded streams had two bugs: - Segment overlap check assumed a fixed 3s segment length instead of using real timestamps, so segments near boundaries/gaps were wrongly included or excluded. - Trimming used the concat: byte protocol with -ss applied to the whole stream, not just the first segment, so short trims could start on garbage frames before the real cut point. ## Fix - Segment end is now derived from the next segment's start timestamp instead of a fixed length. - First segment gets re-encoded into a small trimmed head fragment, then joined to the rest via the concat demuxer (-f concat -safe 0) instead of concat: - needed because the demuxer rebases PTS across the join, which the byte protocol can't do once the head isn't stream-aligned. - If the requested start lands in a gap after the first segment (probed duration < trim offset), that segment gets dropped and the selection starts at the next real one.
dylan added 1 commit 2026-07-25 13:45:41 +01:00
fix incorrect hls segment handling
All checks were successful
CI / Maven unit tests (push) Successful in 15s
CI / Build and push images (push) Has been skipped
CI / Deploy to server (push) Has been skipped
02ceae73d5
dylan force-pushed fix/stream-edge-handling from 02ceae73d5 to dfff51e9d8 2026-07-25 19:15:56 +01:00 Compare
dylan added 1 commit 2026-07-26 14:37:00 +01:00
re-encode first segment
Some checks failed
CI / Maven unit tests (push) Failing after 15s
CI / Build and push images (push) Has been skipped
CI / Deploy to server (push) Has been skipped
99209654e3
dylan added 1 commit 2026-07-26 18:56:55 +01:00
fix broken unit tests
All checks were successful
CI / Maven unit tests (push) Successful in 14s
CI / Build and push images (push) Has been skipped
CI / Deploy to server (push) Has been skipped
41a580a531
dylan added 1 commit 2026-07-26 22:19:10 +01:00
fix edge case where first segment is longer than offset
All checks were successful
CI / Maven unit tests (push) Successful in 15s
CI / Build and push images (push) Has been skipped
CI / Deploy to server (push) Has been skipped
b4e450a122
dylan added 1 commit 2026-07-27 22:10:11 +01:00
first segment's duration is probed to exclude it if needed
All checks were successful
CI / Maven unit tests (push) Successful in 15s
CI / Build and push images (push) Has been skipped
CI / Deploy to server (push) Has been skipped
e19bc68006
dylan added 1 commit 2026-07-27 23:00:41 +01:00
cleaned up StreamActions interface
All checks were successful
CI / Maven unit tests (push) Successful in 15s
CI / Build and push images (push) Has been skipped
CI / Deploy to server (push) Has been skipped
df8afcb428
dylan force-pushed fix/stream-edge-handling from df8afcb428 to 2011029dc5 2026-07-29 18:49:26 +01:00 Compare
dylan changed title from WIP: fix(streaming): missing HLS segments in edge requests to fix(streaming): missing HLS segments in edge requests 2026-07-29 18:49:39 +01:00
dylan merged commit 29bc60d417 into master 2026-07-29 18:50:00 +01:00
dylan deleted branch fix/stream-edge-handling 2026-07-29 18:50:00 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dylan/vod-system#10