Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for fragmented mp4 with multiple sidx boxes #2186

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anthonybajoua
Copy link

@anthonybajoua anthonybajoua commented Feb 25, 2025

Summary:

Addresses Github issue #9373
Implements solution 1 proposed by Google maintainer.

  • Added test. Generated test file using below command:

ffmpeg -i short_1080p_videoonly_lowbitrate.mp4 -c copy -movflags frag_keyframe+delay_moov+empty_moov+dash sample_fragmented_seekable_multi_sidx.mp4 (Above movflags flags actually result in an unplayable file on this player until this fix.)

Algorithm/Solution

  1. Upon encountering multiple sidx atom in track:
  2. For each atom in the track:
    1. If sidx atom then aggregate ChunkIndex into master list, else skip
    2. Merge them all into one large chunk index.
    3. Reset the seek pointer to where it was last
      Retry above on I/O failures.

Copy link

google-cla bot commented Feb 25, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@anthonybajoua anthonybajoua force-pushed the meta/fragmented-mp4-multiple-sidx-seek-squashed branch from 476504f to ef35943 Compare February 25, 2025 18:19
@colinkho
Copy link
Contributor

Hey @tonihei @icbaker , would you guys be able to take a look? This would help us maintain a vanilla fMp4 extractor!

@icbaker
Copy link
Collaborator

icbaker commented Feb 26, 2025

We can take a look once the CLA check is passing.

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.

3 participants