Hacker News new | ask | show | jobs
by a1o 28 days ago
I think the biggest issue with Opus is the problem with its specification being lacking, see:

https://nothings.org/stb/stb_opus.html

This essentially causes opus to never be used in games or in things in stores that may have issues with specific licenses.

6 comments

That’s going a bit far. I’m in the games industry and have used opus regularly, it’s a great codec for games, often the hardware decoding is so restricted that we’re using software regardless so we might as well use something like opus.

The licensing restriction is unfortunate, but only restrictive for those with very specific goals, under normal conditions BSD is a wonderful license for game devs since you’re free to use the code and only have to add an acknowledgement somewhere.

I suppose a public domain game might hit the same limitation, though as a non-lawyer I would guess the chance of anyone with standing trying to sue anyone implementing from this spec is realistically zero (though I don’t fault stb for being unwilling to roll those dice!)

> under normal conditions BSD is a wonderful license for game devs since you’re free to use the code and only have to add an acknowledgement somewhere.

And it's not as though libopus is an outlier in using a BSD license. A lot of other commonly used libraries have similar licenses; a few examples that come to mind which are likely to show up in games are zlib, curl, Lua, and SDL.

libopus isn't even an outlier in using it for a media format specifically. See: everything coming out of the Alliance for Open Media
The game doesn’t have to be publicly licensed, the issue is for a library used by this game - or their engine. This remark is what blocks anyone from Valve making their own opus compatible library to use on their engines and supported libraries from what I could tell.
This essay says it's not possible to make a public-domain implementation of Opus. But it could be released under BSD (as libopus is), which is fine for games, as evidenced by the Licenses section of the credits in many games.
Most games use the sound support that comes with their game engine or choice of sound system, so I don't think the lack of an STB version is an issue. Performance is more of a problem. Audiokinetic, the makers of the popular Wwise audio system, estimate that Opus takes ~3-5x the CPU of Vorbis:

https://www.audiokinetic.com/en/community/blog/a-guide-for-c...

He's definitely being way over pedantic. Reading the law like HN programmers imagine it works, rather than how it actually works.

The intent of the legal language in that spec is pretty clearly that you have to use the BSD license if you copy that code, but if you merely read it to understand the spec then you don't.

The linked article makes the argument that looking at the BSD licensed example code in the RFC that defines Opus would mean that code written based on that understanding would be a derivative work and would have to be BSD licensed. This seems to have something to do with the fact that "clean-room design"[1] is a thing. But as the Wikipedia article points out:

>Clean-room design is usually employed as best practice, but not strictly required by law.

As the article points out, if this was actually true then we could change the licensing on code examples found in RFCs to fix the issue, but there doesn't seem to be any actual issue here. Imagine a world where simply reading some code caused licensing issues...

[1] https://en.wikipedia.org/wiki/Clean-room_design

Opus is used in games.