Does WaveLab 12 encapsulate Opus files in the Ogg container?

As stated in the title. In other words, is it safe to manually change the .opus extension to .ogg, if needed.

When I render a file as Opus (generic), it looks like this in MediaInfo:

As you can see, the default file extension is .opus, but I can rename this to .ogg and it will still play in VLC.

Strictly speaking, the player test is only valid for that specific player. That’s why gaining insight into the encoding methodology would be valuable.

According to FFmpeg (FFprobe), the .opus file encoded with WaveLab reports “Input #0, ogg,” which suggests it is encapsulated in the Ogg container. I just want to be certain.

Both MediaInfo and FFProbe agree that it’s an Ogg container. If you require an Ogg file, why not render that directly, rather than rendering an Opus file and renaming it?

It is not safe if you want to reopen the file in WaveLab again. I noticed this quite some time ago, it seems that WaveLab is mainly checking for the file extension when trying/deciding how to decode a file, but not checking the actual content/header.
Using your example, if I rename the .opus to .ogg and try to open it in WaveLab again, it will show an error, most likely because WaveLab expects a Vorbis encoded file within the OGG container.
Another example, in the past I stumbled upon a few files with a .wav extension although they actually contained MPEG Layer 3 audio data (for whatever reason that was) and WaveLab would not load these files properly, unless renamed correctly.
Maybe WaveLab could be more intelligent in that regard, but I’m not sure how often such a situation would occur for most users anyway.

2 Likes

Because I need the Opus, not the Vorbis encoding in the Ogg container. Off the top of my head (can’t check it right now), WaveLab 12 reserves the Ogg container, including the .ogg extension, only to the Vorbis files.

Thanks for catching this! That indeed indicates that changing the extension is not the right way.

1 Like
  1. I remuxed an .opus file into an .ogg file using ffmpeg -i input.opus -c:a copy output.ogg.

  2. I then made a copy of the original .opus file and manually changed its extension to .ogg.

  3. Next, I compared the MD5 hashes of the two resulting .ogg files, which did match. This indicates that changing the extension might, in fact, be a valid method—even though WaveLab 12 fails to open either of the .ogg files.