sindresorhus / file-type

Detect the file type of a file, stream, or data
MIT License
3.7k stars 351 forks source link

Incorrect MIME type for Opus files. #677

Closed scgehin closed 4 days ago

scgehin commented 1 week ago

Description

Opus files are given the MIME type "audio/opus", which is not correct. The problem originates from #53, which incorrectly references the RFC for RTP payloads. The correct MIME type for Opus files is "audio/ogg; codecs=opus", as seen in sections 9 and 10 of this RFC defining the Opus file format. This issue appears to be the root cause of thelounge/thelounge#4429.

Existing Issue Check

ESM (ECMAScript Module) Requirement Acknowledgment

File-Type Scope Acknowledgment

Borewit commented 6 days ago

I agree @scgehin, do you want to create a PR to improve the MIME type mapping?