Gagravarr / VorbisJava

A library for working with Ogg Vorbis files
Apache License 2.0
126 stars 26 forks source link

Can't import OPUS audio into Audacity and Windows shows media length is 0s #49

Closed stodge closed 4 months ago

stodge commented 4 months ago

I copied the code to encode to an OPUS audio file from the following link. The audio file will play back in Windows, and I think it sounds correct. However, Audacity won't import it (incorrect filetype, even though the file extension is ".opus") and the properties for the audio (via the file explorer) show the media length is 0s.

I'm using the following version as it's the only one available:

        <!-- https://mvnrepository.com/artifact/org.gagravarr/vorbis-java-core -->
        <dependency>
            <groupId>org.gagravarr</groupId>
            <artifactId>vorbis-java-core</artifactId>
            <version>0.8</version>
        </dependency>

https://github.com/lostromb/concentus/blob/master/Java/ConcentusTestConsole/src/main/java/org/concentus/console/Program.java#L47

Any suggestions would be appreciated.

Thanks

stodge commented 4 months ago

Sorry, I just realised the problem is probably in the Concentus sample code, not your code that is writing the OPUS file.