Skip to content

Sniff audio-only ISO-BMFF files as other instead of video - #20

Merged
abrignoni merged 1 commit into
mainfrom
fix/isobmff-audio-brands
Sep 3, 2026
Merged

abrignoni merged 1 commit into
mainfrom
fix/isobmff-audio-brands

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Sniffs an ISO base media file whose major brand is an audio brand as other instead of video. An .m4a was being registered as a video and then failing with "no video frames could be read".

  • gleapp/ingest.py: the major brands the MP4 Registration Authority lists for audio (M4A , M4B , M4P and the CMAF, OMAF, IFE and IAMF audio media profiles) return other. GLEAPP has no audio kind.
  • tests/test_ingest_sniff.py: synthetic 16-byte headers only. The audio brands assert other; isom, mp42, mp41, iso5, dash, M4V and qt still assert video; the HEIF and AVIF brands still assert image. Every audio case failed against the unmodified function.

Fragmented MP4 handling is unchanged; an ExoPlayer chunk whose own brand is an audio brand follows the brand. A brand such as mp42 or 3gp4 says nothing about audio versus video, so an audio-only file carrying one still sniffs as video.

🤖 Generated with Claude Code

_kind_from_magic read any ftyp box as a video unless the major brand said
HEIF or AVIF. Audio files such as .m4a carry the M4A brand, so they were
registered as videos and then failed with "no video frames could be read".

The major brands the MP4 Registration Authority lists for audio (the iTunes
audio family and the CMAF, OMAF, IFE and IAMF audio media profiles) now
sniff as other. GLEAPP has no audio kind. Fragmented MP4 brands such as
iso5 and dash are untouched and the new test pins them as video.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@abrignoni
abrignoni merged commit d159673 into main Sep 3, 2026
8 checks passed
@abrignoni
abrignoni deleted the fix/isobmff-audio-brands branch September 3, 2026 17:51
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