Question with OPUS codec

aReMiXs

Member
Hello,

I can see that on the srb2 wiki, that opus is supported in the game, but for some reason, I'm having difficulty getting it to load and I don't see any information from my knowledge about it.

Here's what I did:

I used FFmpeg to encode the audio file at both 32k and 64k, and no matter what happens, I end up getting this in the log

ERROR: Mix_LoadMUS_RW: Unrecognized audio format
ERROR: Music SONGT could not be loaded: engine failure!

Is there something I'm missing here?
 
Keep in mind that the game supports audio at 44100hz. It shouldn't cause the audio loader to be unable to recognize the file, merely throw up garbled noise, so perhaps the issue may be that FFmpeg by default uses an Opus variation that is too new for the player to play? 🤔

You should try exporting as Ogg Vorbis instead. It's probably not as small, but it's the most used format and the game recognizes it for both music and sounds.
 
Keep in mind that the game supports audio at 44100hz. It shouldn't cause the audio loader to be unable to recognize the file, merely throw up garbled noise, so perhaps the issue may be that FFmpeg by default uses an Opus variation that is too new for the player to play? 🤔

You should try exporting as Ogg Vorbis instead. It's probably not as small, but it's the most used format and the game recognizes it for both music and sounds.
Ogg Vorbis is my go-to, but I've been wanting file sizes to go lower while trying to preserve the audio as they can be lengthy in size for a server mod.
I'm also pretty sure that opus still works either way because:

1 At 48000hz either way since the srb2wiki acknowledges that opus doesn't support 44100hz.
2 The wiki also mentions that opus is supported but only for music and sound effects (so it should theoretically work according to the wiki as it seems it has been tested).
3 The wiki also mentions that looping audio with opus can potentially have inaccurate loop points.

So based on the wiki, it should be supported but it seems there isn't much information. The sound and music tutorial page of the wiki mentions opus a couple of times.

However if it is due to an opus variation, then it would be confusing to what version of FFmpeg I need to have the correct libopus version that supports it. Information is very scarce about it or the wiki is somehow wrong about the support.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top