Examples not working
i tried the java examples with the provided files. The duration of the generated .opus file is 00:00.
Anyone else got these problems?
Ah, right..... This is happening because the Concentus test project uses VorbisJava to support writing to an ogg file. However, the version of VorbisJava that is currently in Maven does not properly write the granule position (basically the "real time" position of each packet) for opus audio files, and therefore any reader of the outputted .opus file will report that it has zero length even though the data is all there.
This actually appears to have been fixed recently in the master for VorbisJava but I don't think it has been pushed to Maven. I would recommend compiling the latest VorbisJava yourself and referencing that .jar when you run the test project.
thanks, its working now. i created a quick fix for the examples
An alternative to generating .opus files with the Java version of the Concentus library is using the OOOGG library in conjunction with the OOOGG Opus Plugin, a plugin for OOOGG that integrates the same into the Concentus library, allowing, through the Java Sound API, playing and recording .opus files.
https://github.com/allantaborda/ooogg-opus-plugin