Repository navigation
Put a DASH video and its audio in one file without re-encoding - #208
Merged
Merged
Conversation
DASH serves picture and sound as separate streams, so the ExoPlayer cache holds a silent video and a separate audio track. The new gleapp/mp4mux.py rewrites the track boxes into one header and copies every sample unchanged, for fragmented MP4 (fragments interleaved by decode time, track ids and sequence numbers renumbered, absolute base offsets moved) and for progressive MP4 (both files carried whole, chunk offsets shifted and written as co64). The cache pass combines a video with the one cached audio stream its manifest lists, joined DASH streams and whole-file streams alike, and registers the result as exoplayer_av_*.mp4; with two or more audio streams the pairing would be a guess, so none is combined. A whole-file input cut short at a gap is not combined. The silent video stays in the case as what was cached. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Puts a DASH video and its audio from an app's ExoPlayer cache into one playable file, without re-encoding.
gleapp/mp4mux.pyrewrites the track boxes into one header and copies every sample unchanged. Fragmented MP4: fragments interleaved by decode time, audio track renumbered, sequence numbers and absolute base offsets rewritten. Progressive MP4: both files carried whole, chunk offsets shifted asco64.exoplayer_av_*.mp4. With two or more audio streams the pairing would be a guess, so none is combined. A whole-file input cut short at a gap is not combined. The silent video stays in the case.tests/fixtures/mux/are ffmpeg test sources (commands in the test). Where ffmpeg is installed, a test compares each stream's per-frame MD5 with the inputs'.On two Android images: 100 combined files, each matching its separate inputs frame for frame in video and audio, all decoded by GLEAPP.
🤖 Generated with Claude Code