Welcome to the Opus demo for Linux server.
The is a demo on how to use Opus codec for Linux server. It can encode an opus file to a memory buffer and decode the buffer to an opus file.
- pre-requisites
- JDK v1.7 or higher
- Eclipse
- Summary of set up:
- Get the source code.[Git] (https://bitbucket.org/louisyoung/opus_linux.git)
- Open it in Eclipse.
- Compile and run.
OpusTool tool = new OpusTool();
String fin = "xxx", fout = "xxx";
ByteBuffer buf = tool.decode(fin, null);
..dosomething(buf)... //modify the PCM data if you want to
tool.encode(buf, fout, null);
tool.releaseByteBuffer(buf);//free memory
- top.oply.opuslib.OpusTool contains the basic codec functions.
- If Ubuntu 64 bit server, the native library libopusTool.so under the folder "libs" can be used directly.
- Compiling Native code is easy, just go to "\src\jni", and issue command "make". Then copy libopusTool.so to "libs".
-
Opus (git://git.opus-codec.org/opus.git)
-
Opus-tools (git://git.xiph.org/opus-tools.git)
-
Opusfile (git://git.xiph.org/opusfile.git)