Tag does not show up for .opus files renamed to .ogg

Tested with the latest v2.87c, if a file was encoded in opus and renamed file extension to .ogg, then mp3tag will not be able to read tags.

as shown above, foobar2000 v1.4 beta 11 is able to handle tags correctly regardless the extension name, but mp3tag can only read/write tags for opus files that end with .opus

While The recommended filename extension for Ogg Opus files is .opus. according to https://wiki.xiph.org/OggOpus, changing file extension name to .ogg is the only way to make Android mediaserver pick up these files. In addition, Android is able to play opus files with .ogg extension and read their tags w/o any problem since Marshmallow, according to https://android.stackexchange.com/questions/37970/what-can-play-ogg-opus-on-android. I'm also able to comfirm this on my Nexus 6P running Android 8.1.

You would get the same behaviour, if you renamed an mp3 file to flac or an mp4 file to wav or whatever.
Right now MP3tag does not do a lot of guessing what kind of file you have - because the absence of tags at a certain position or in a certain format could mean that there are not tags at all and MP3tag has to add them.
AFAIK MP3tag does not analyze the audio data (as perhaps the players do).
This is the current situation.

I haven't done much research yet but I assume both Ogg Vorbis and Ogg Opus use the same Ogg container and VorbisComment for metadata?

You're correct and this is exactly why it's not the same as renaming mp3 to flac.

Mp3tag doesn't support codec detection inside Ogg containers currently and assumes Vorbis by default. It's on my list, but for the time being, Opus needs to come with the *.opus file extension to be usable inside Mp3tag.

How about reading file metadata using external library like ffmpeg/ffprobe or mediainfo instead of writing your own detection method?

I understand that media detection within an ogg container would be effortful to implement.

I use the file extension .opus.ogg for Android to detect opus files because Android does not detect files ending with .opus.

I'd like to ask if support for the file extension .opus.ogg (in addition to .opus) could be added to detect opus files.

I think that you can use an action to rename the extension, using %_filename_ext% as field.
So you can rename files so that they reflect the proper file type in WIndows and add further information for the Android programs.

If I understand you correctly, I'd have to rename the files each time before and after tagging?

Yes, that's what I meant. Or you can wait until such a feature is implemented, if ever.

OK. Thanks for your suggestion.

Just wanted to let the community and Florian know about the extension idea which might be simpler to implement than anayzing container metadata.

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

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.