concentus icon indicating copy to clipboard operation
concentus copied to clipboard

Examples not working

Open PhilippKath opened this issue 6 years ago • 3 comments

i tried the java examples with the provided files. The duration of the generated .opus file is 00:00.

Anyone else got these problems?

PhilippKath avatar Feb 14 '19 15:02 PhilippKath

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.

lostromb avatar Feb 14 '19 16:02 lostromb

thanks, its working now. i created a quick fix for the examples

PhilippKath avatar Feb 19 '19 16:02 PhilippKath

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

allantaborda avatar Feb 20 '19 02:02 allantaborda