mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
Opus files with ID3 metadata fail to play with the web client under Firefox #6945
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @amini-allight on GitHub (Apr 23, 2025).
Reproduction Steps
ffmpeg -f lavfi -i "sine=frequency=440:duration=1" file.opus.id3v2 -t "My Title" file.opus.Explanation
The error presented to the user by the client is directly caused by Firefox's HTML audio player object returning
NotSupportedErrorin 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 typeaudio/mpeg. This includes ID3-tagged Opus files, amongst others like ID3-tagged AAC. This behavior apparently overrides both the server-returnedContent-Typeheader and the client-side playback settings (e.g. thetypeattribute 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:
@felix920506 commented on GitHub (Apr 23, 2025):
Fix your broken files.
@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.
@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.
@amini-allight commented on GitHub (Apr 23, 2025):
@felix920506 Understood, thank you! I'll switch to Vorbis comments.