.ogg/.opus weirdness

Hi,

MP3tag seems to act weirdly with files produced using opusenc, the reference libopus encoder implementation. It will happily edit these files, as long as they have a .opus extension. It's my understanding that opusenc produces an Opus audio stream inside a bog-standard Ogg container, but if the file is renamed to have a .ogg extension, MP3tag will refuse to write (or even read) the Vorbis comment metadata.

Any thoughts? This looks a lot like a bug to me; does anyone think otherwise? Do Opus ogg files differ in some way where this is somehow the proper and expected behaviour?

I've attached an image: the top panel is the metadata of a file with a .opus extension: MP3tag can read the metadata left by the encoder, and write a track title. The middle panel is the metadata of the same file, but renamed to a .ogg: the metadata can no longer be read. The bottom panel is the result of trying to write new metadata into the .ogg file (it "cannot be opened for writing").

You should be able to reproduce this behaviour if you have a .wav file and opusenc on hand. I don't want to bother the developer, so I'll file a bug report in the correct place if there's general agreement this is incorrect behaviour.


Hi Earl,

Mp3tag uses the file extension to determine if the file is an Opus file (.opus) or an Ogg Vorbis file (.ogg).

It's correct that Opus is essentially stored in an Ogg container, which would imply that software handling Ogg should also detect the codec that is used for the audio stream.

This is on my internal wish list. Currently, you need to use the different file extensions if you want to use Mp3tag with your Opus files.

Kind regards
— Florian

I've added support for detecting Opus inside *.ogg files with Mp3tag v2.95a.

1 Like