Opus files with ID3 metadata fail to play with the web client under Firefox #6945

Closed
opened 2026-02-07 04:19:26 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @amini-allight on GitHub (Apr 23, 2025).

Reproduction Steps

  1. Create an audio file encoded in the Opus format, e.g. ffmpeg -f lavfi -i "sine=frequency=440:duration=1" file.opus.
  2. Add ID3 metadata to it, e.g. id3v2 -t "My Title" file.opus.
  3. Place it into a Jellyfin music library.
  4. Attempt to play it from the web client, running inside of Firefox.
  5. Playback will fail with an error reading "Playback failed because the media is not supported by this client".

Explanation

The error presented to the user by the client is directly caused by Firefox's HTML audio player object returning NotSupportedError in response to being asked to play the provided stream URL. This occurs because Firefox, unlike most other browsers, conforms to the W3C standard for audio MIME type sniffing. The standard states that files that begin with "ID3" are to be interpreted as being of MIME type audio/mpeg. This includes ID3-tagged Opus files, amongst others like ID3-tagged AAC. This behavior apparently overrides both the server-returned Content-Type header and the client-side playback settings (e.g. the type attribute of a <source> tag).

See the discussion here and the standard itself here for more details.

Scope

This issue should effect any non-MPEG audio files with ID3 metadata when used in conjunction with any browser that conforms to the W3C standard. However I have only personally confirmed it occurs with Opus files and with Firefox and its fork LibreWolf.

Possible Solutions

There are a few ways the Jellyfin server could resolve this issue:

  1. ID3 tags could be stripped from all non-MPEG audio files destined for Firefox web clients.
  2. Opus streams destined for Firefox web clients could be placed inside of a Webm container prior to sending.
  3. ID3-tagged Opus audio destined for Firefox web clients could be transcoded to MP3.
Originally created by @amini-allight on GitHub (Apr 23, 2025). **Reproduction Steps** 1. Create an audio file encoded in the Opus format, e.g. `ffmpeg -f lavfi -i "sine=frequency=440:duration=1" file.opus`. 2. Add ID3 metadata to it, e.g. `id3v2 -t "My Title" file.opus`. 3. Place it into a Jellyfin music library. 4. Attempt to play it from the web client, running inside of Firefox. 5. Playback will fail with an error reading "Playback failed because the media is not supported by this client". **Explanation** The error presented to the user by the client is directly caused by Firefox's HTML audio player object returning `NotSupportedError` in response to being asked to play the provided stream URL. This occurs because Firefox, unlike most other browsers, conforms to the W3C standard for audio MIME type sniffing. The standard states that files that begin with "ID3" are to be interpreted as being of MIME type `audio/mpeg`. This includes ID3-tagged Opus files, amongst others like ID3-tagged AAC. This behavior apparently overrides both the server-returned `Content-Type` header and the client-side playback settings (e.g. the `type` attribute of a `<source>` tag). See the discussion [here](https://bugzilla.mozilla.org/show_bug.cgi?id=1603150) and the standard itself [here](https://mimesniff.spec.whatwg.org/#matching-an-audio-or-video-type-pattern) for more details. **Scope** This issue should effect any non-MPEG audio files with ID3 metadata when used in conjunction with any browser that conforms to the W3C standard. However I have only personally confirmed it occurs with Opus files and with Firefox and its fork LibreWolf. **Possible Solutions** There are a few ways the Jellyfin server could resolve this issue: 1. ID3 tags could be stripped from all non-MPEG audio files destined for Firefox web clients. 2. Opus streams destined for Firefox web clients could be placed inside of a Webm container prior to sending. 3. ID3-tagged Opus audio destined for Firefox web clients could be transcoded to MP3.
OVERLORD added the wontfix label 2026-02-07 04:19:26 +03:00
Author
Owner

@felix920506 commented on GitHub (Apr 23, 2025):

Fix your broken files.

@felix920506 commented on GitHub (Apr 23, 2025): Fix your broken files.
Author
Owner

@amini-allight commented on GitHub (Apr 23, 2025):

@felix920506 Are Opus files with ID3 metadata a violation of the Opus standard? I wasn't able to find much information about that. The metadata is detected and parsed correctly by FFmpeg, MPV, Audacity and even Jellyfin itself. The files play under Chromium-based browsers as well.

@amini-allight commented on GitHub (Apr 23, 2025): @felix920506 Are Opus files with ID3 metadata a violation of the Opus standard? I wasn't able to find much information about that. The metadata is detected and parsed correctly by FFmpeg, MPV, Audacity and even Jellyfin itself. The files play under Chromium-based browsers as well.
Author
Owner

@felix920506 commented on GitHub (Apr 23, 2025):

@amini-allight .opus files are opus audio streams contained inside ogg containers, which are supposed to have Vorbiscomment.

@felix920506 commented on GitHub (Apr 23, 2025): @amini-allight .opus files are opus audio streams contained inside ogg containers, which are supposed to have Vorbiscomment.
Author
Owner

@amini-allight commented on GitHub (Apr 23, 2025):

@felix920506 Understood, thank you! I'll switch to Vorbis comments.

@amini-allight commented on GitHub (Apr 23, 2025): @felix920506 Understood, thank you! I'll switch to Vorbis comments.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#6945