Skip to content

Join an ExoPlayer DASH stream's segments from its cached manifest - #207

Merged
abrignoni merged 1 commit into
mainfrom
feat/exoplayer-dash
Sep 26, 2026
Merged

abrignoni merged 1 commit into
mainfrom
feat/exoplayer-dash

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Joins DASH streams from an app's ExoPlayer cache into playable files, using the manifest the app cached.

  • Where the MPD is cached, each stream it lists as a SegmentList is joined: the initialization segment, then the media segments in the manifest's order up to the first missing or incomplete one. Items are matched by exact key, resolved the way DashUtil.resolveCacheKey does, never by look-alike addresses.
  • Segments a stream holds are not registered again on their own. App cache names the manifest, the stream, and how many listed segments were joined.
  • Audio streams are recognised from the init segment's hdlr, kept only with other files, and not relabelled as video by processing. Video and audio name each other. Whole-file streams (SegmentBase) name their manifest and the other cached streams it lists.
  • An MP4 whose only track is sound is kept as audio instead of a video with no frames.
  • New fixture tests/fixtures/dash/ is ffmpeg's test pattern and a tone as a SegmentList stream (command in the test).

On three Android images: 19 DASH streams joined, all decoding; joined videos that decode on one image went from 152 of 234 to 158 of 167.

🤖 Generated with Claude Code

ExoPlayer caches each DASH segment as its own item and the manifest the
app played from beside them. Where that manifest is cached, each stream
it lists as a SegmentList is joined: the initialization segment, then
the media segments in the manifest's order up to the first missing or
incomplete one, into one file. Items are matched by exact key, resolved
the way DashUtil.resolveCacheKey does, never by look-alike addresses.
Segments a stream holds are not registered again on their own.

An audio-only stream is recognised from its init segment's hdlr box,
registered only when the source includes other files, and left as audio
by processing. A video and its audio name each other, and a stream
stored as one file names the manifest that lists it and the other
cached streams it lists. An MP4 whose only track is sound is now kept
as audio rather than as a video with no frames.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@abrignoni
abrignoni enabled auto-merge September 26, 2026 20:43
@abrignoni
abrignoni merged commit ec00e3b into main Sep 26, 2026
8 checks passed
@abrignoni
abrignoni deleted the feat/exoplayer-dash branch September 26, 2026 21:30
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.

1 participant