Skip to content

Sniffer.sniffFragmented() fails on MP4 files with uuid atom between ftyp and moov #3046

Closed

Description

@brAzzi64

Version

Media3 1.8.0

More version details

No response

Devices that reproduce the issue

Pixel 8 Pro, Android 16.0

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Obtain an MP4 file with a uuid atom positioned between ftyp and moov (e.g., a video with C2PA Content Credentials metadata)
  2. Play the file using ProgressiveMediaSource with default extractors
  3. Observe playback failure

Expected result

Video plays successfully. The uuid atom is a valid extension per ISO 14496-12 and should be skipped by the sniffer.

Actual result

Sniffer fails to identify the file as fragmented MP4. ExoPlayer reports 0 tracks and throws:

ParserException: Loading finished before preparation is complete. {contentIsMalformed=true, dataType=1}

The file structure is:
ftyp @ 0, size=36
uuid @ 36, size=16776 <-- C2PA manifest (valid per ISO 14496-12)
moov @ 16812, size=1213
moof @ 18025, size=4708
mdat @ 22733, size=469611

Note: FragmentedMp4Extractor CAN parse this file correctly when forced directly (bypassing sniffing). The bug is only in the sniffing phase.

Media

Will email sample video to android-media-github@google.com.

Bug Report

Activity

  1. self-assigned this
    on Feb 3, 2026
  2. icbaker commented on Feb 3, 2026

    @icbaker
    Collaborator

    Thanks for reporting, I've sent a change for internal review that increases the sniff limit when encountering a uuid box - this makes the provided video playable with the ExoPlayer demo app on the tip of the main branch. The change will be linked here when it's submitted.

  3. icbaker commented on Feb 5, 2026

    @icbaker
    Collaborator

    This is fixed by the commit linked above.

  4. locked and limited conversation to collaborators on Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions