Is OGG-Opus (libopus
) decoding widespread enough, that a decoder does not need to be packaged within an offline program/binary?
- Probably yeah
- No idea
- Probably not
EDIT: Result of this inquiry is here
Is OGG-Opus (libopus
) decoding widespread enough, that a decoder does not need to be packaged within an offline program/binary?
EDIT: Result of this inquiry is here
I couldn’t say for sure for Linux, much less for any other OS, but for what its worth, Opus is the audio codec used by most YouTube videos.
I wouldn’t worry about Linux; Linux-users on the whole are used to dealing with dependencies and installing libraries. I’d be more concerned about Windows, and I have no idea how widespread it is there.
What’s the context for this question? Are you intending the game to play the file itself? If so can you just bundle the codex? Most frameworks would support that.
Or will it be an external file for the player to play themselves? If so I’d like probably recommend MP3 instead as it’s supported almost everywhere now that the patents are expired.
This is Plan A, yes. The question is being asked for Fallback Plan B. I’m still working on Plan A, but I’m also one-foot-into-implementing and one-foot-into-planning.
Woah, really?? I didn’t know the patents expired!
EDIT: Also, fwiw, I’m interested in the compression properties of opus in particular, but I’m absolutely noting the MP3 patents expiring for another (future) project
Yeah they expired in the EU in 2012 and 2017 in the US. It’s not the best format by any means, but it is incredibly well supported now.
I believe Opus is the only audio codec supported by the WebRTC streaming protocol, so every web browser supports it. Given how many devices have web-browsers, that’s pretty widespread support!
If you mean “can I write a program that dynamically links with libopus
and assume it’ll work”, probably not. A lot of platforms will use an generic API like FFMPEG or DirectShow or QuickTime or whatever rather than providing individual format-specific libraries.
I guess the question is, how is your program intending to play Opus files?
The program will be available both as a web app, and also as an offline, all-in-one-file executable.
I use Linux, so, yes
If you mean “Opus” the voice codec, i would absolutely bundle it with the runtime. You can be sure it won’t “just work” on some systems.
If you can say exactly what tools, development framework, game engine, etc. you’re using there’ll probably be more precise answers.
The program will be available both as a web app, and also as an offline, all-in-one-file executable.
If you’re coding a desktop application from scratch …
If it’s a web page built on HTML+JS or something like that (including Twine), all major modern browsers should support OGG audio/video out of the box.
If you’re bundling the web page using something like Electron, it should have built-in OGG support. Though I guess if you choose a very light alternative to Electron, it might have features stripped out, which could include some types of audio/video codec support.
If it’s some other non web-based game engine (Unity etc) the engine’s documentation should help.
Setting this closed, to reflect the state of the poll. I’m a lot further into the planning process, and everyone’s comments have been extremely helpful!
More wisdom and advice is always welcome! Once I figure out exactly how I’m going to solve this, I’ll post an update.
Okay, so the most sensible option, which I have successfully confirmed to work, is to use OGG Vorbis, package the codec with the runtime, and call it there.
Opus sits right on the edge of niche, and there were way too many technical difficulties getting that format to behave with my compiler and build system. Meanwhile, Vorbis has just a few more advantages over MP3.
That being said, though, if Vorbis would have also failed me, then I was planning to go with MP3.
Thanks again, everyone!