Skip to content

Add more audio and video signatures - #219

Open
zcorpan wants to merge 1 commit into
whatwg:mainfrom
zcorpan:zcorpan/media-signatures
Open

zcorpan wants to merge 1 commit into
whatwg:mainfrom
zcorpan:zcorpan/media-signatures

Conversation

@zcorpan

@zcorpan zcorpan commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Add signatures for FLAC, HLS playlists, Matroska, AAC in ADTS, and MPEG-TS, and recognize more MP4 brands, matching Gecko. The Canon CR3 brand is excluded so CR3 files aren't sniffed as MP4.

Tests: web-platform-tests/wpt#64714.

Fixes #149.


This is needed for opaque-response blocking (whatwg/fetch#1755), which blocks unlabeled responses to media requests unless they sniff as audio or video. Differences from Gecko's nsMediaSniffer.cpp: a crx major brand returns false (Gecko returns application/octet-stream, which ORB treats as a match), ADTS requires a frame length of at least 7, and avif isn't included as it's an image. ADTS with large frames can need more than 1445 bytes, see #218.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

Add signatures for FLAC, HLS playlists, Matroska, AAC in ADTS, and MPEG-TS, and recognize more MP4 brands, matching Gecko. The Canon CR3 brand is excluded so CR3 files aren't sniffed as MP4.

Tests: web-platform-tests/wpt#64714.

Fixes whatwg#149.
@annevk

annevk commented Nov 5, 2026

Copy link
Copy Markdown
Member

cc @padenot @jyavenard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Should isom brand be used to detect MP4?

2 participants