Skip to content

Conversation

@tobbee
Copy link
Contributor

@tobbee tobbee commented Sep 23, 2025

This PR adds options to use DASH Ed. 6 patterns for audio SegmentTimelines with Time or Number.

The URL signaling is segtimeline_pattern and segtimelinenr_pattern instead of segtimeline_1 or segtimelinenr_1.

A good sequence for testing this is testpic_2s where audio has a cycle of 4 segments to align with video.

Should solve #270.

tobbee added 3 commits October 4, 2025 19:31
Implements DASH Edition 6 Pattern mechanism for audio SegmentTimeline
with $Time$ template. Automatically detects repeating duration patterns
caused by audio frame alignment with video segments.

Features:
- Pattern detection with 1.25 cycle threshold for practical use
- Canonical pattern representation starting with longest duration
- Exact pattern entry (PE) calculation for timing alignment
- URL generator option for "SegmentTimeline with $Time$ using Pattern"
- Comprehensive test coverage including complex 24s audio-video cycles
- Support for AAC-LC, AC-3, and HE-AAC frame alignment scenarios

Pattern detection handles cases like:
- 4-segment AAC patterns in 2s video segments
- 8-segment patterns in alternating 4s+2s video (24s LCM cycle)
- Audio frame misalignment creating cyclic duration variations
…ressing

- Add segtimelinenr_pattern/ URL option for SegmentTimeline with $Number$ and Pattern
- Extend pattern detection to support both $Time$ and $Number$ addressing modes
- Update URL generator with new pattern option for number-based addressing
- Tests to check that SegmentTimeline Pattern is same for both modes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants