https://github.com/stephengold/j-ogg-all
Open-source JVM libraries for reading Ogg bitstreams and decoding the media they contain.
https://github.com/stephengold/j-ogg-all
audio codec decoder flac java jvm-library library mdct modified-discrete-cosine-transform ogg ogg-vorbis open-source streaming-audio vorbis
Last synced: 6 months ago
JSON representation
Open-source JVM libraries for reading Ogg bitstreams and decoding the media they contain.
- Host: GitHub
- URL: https://github.com/stephengold/j-ogg-all
- Owner: stephengold
- License: other
- Created: 2021-03-14T08:55:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-01T05:48:21.000Z (8 months ago)
- Last Synced: 2025-03-27T19:51:03.079Z (7 months ago)
- Topics: audio, codec, decoder, flac, java, jvm-library, library, mdct, modified-discrete-cosine-transform, ogg, ogg-vorbis, open-source, streaming-audio, vorbis
- Language: Java
- Homepage:
- Size: 1.87 MB
- Stars: 13
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# J-ogg-all Project
[The J-ogg-all Project][joggall] provides 2 [JVM] libraries
for reading [Ogg] bitstreams and decoding media they contain.It contains 2 subprojects:
1. library: builds the full "j-ogg-all" runtime library, including decoders for
[Vorbis], [Free Lossless Audio Codec (FLAC)][flac], and [Theora] media.
This library also provides optional interfaces to
[the Java Media Framework (JMF)][jmf].
2. vorbis: builds a reduced library ("j-ogg-vorbis") for decoding
Vorbis audio only (no support for FLAC, Theora, or JMF).Complete source code (in [Java]) is provided under
[an informal license][license].## Contents of this document
+ [Important features](#features)
+ [What's missing](#todo)
+ [How to add j-ogg-all to an existing project](#addall)
+ [How to add j-ogg-vorbis to an existing project](#addvorbis)
+ [How to build the project from source](#build)
+ [Downloads](#downloads)
+ [Conventions](#conventions)
+ [External links](#links)
+ [History](#history)## Important features
+ read bitstreams and metadata from [Ogg] containers
+ decode [Vorbis] audio
+ decode [FLAC] audio
+ extract album art from Vorbis comments[Jump to the table of contents](#toc)
## What's missing
+ The [Theora] decoder is very incomplete.
+ No decoders are provided for:
+ Constrained Energy Lapped Transform (CELT) audio
+ Continuous Media Markup Language (CMML)
+ [Daala video][daala]
+ [Opus interactive audio][opus]
+ [Speex audio][speex][Jump to the table of contents](#toc)
## How to add j-ogg-all to an existing project
The j-ogg-all library is available pre-built.
It depends on the Java Media Framework.
Adding j-ogg-all to an existing JVM project should be
a simple matter of adding these libraries to the classpath.For projects built using [Maven] or [Gradle], it is sufficient to add a
dependency on j-ogg-all.
The build tool should automatically resolve the dependency on JMF.### Gradle-built projects
Add to the project’s "build.gradle" or "build.gradle.kts" file:
repositories {
mavenCentral()
}
dependencies {
implementation("com.github.stephengold:j-ogg-all:1.0.6")
}For some older versions of Gradle,
it's necessary to replace `implementation` with `compile`.### Maven-built projects
Add to the project’s "pom.xml" file:
mvnrepository
https://repo1.maven.org/maven2/
com.github.stephengold
j-ogg-all
1.0.6
[Jump to the table of contents](#toc)
## How to add j-ogg-vorbis to an existing project
The j-ogg-vorbis library is available pre-built.
Adding j-ogg-vorbis to an existing JVM project should be
a simple matter of adding this library to the classpath.### Gradle-built projects
Add to the project’s "build.gradle" file:
repositories {
mavenCentral()
}
dependencies {
implementation("com.github.stephengold:j-ogg-vorbis:1.0.6")
}For some older versions of Gradle,
it's necessary to replace `implementation` with `compile`.### Maven-built projects
Add to the project’s "pom.xml" file:
mvnrepository
https://repo1.maven.org/maven2/
com.github.stephengold
j-ogg-vorbis
1.0.6
[Jump to the table of contents](#toc)
## How to build the project from source
1. Install a [Java Development Kit (JDK)][adoptium],
if you don't already have one.
2. Point the `JAVA_HOME` environment variable to your JDK installation:
(In other words, set it to the path of a directory/folder
containing a "bin" that contains a Java executable.
That path might look something like
"C:\Program Files\Eclipse Adoptium\jdk-17.0.3.7-hotspot"
or "/usr/lib/jvm/java-17-openjdk-amd64/" or
"/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home" .)
+ using Bash or Zsh: `export JAVA_HOME="` *path to installation* `"`
+ using [Fish]: `set -g JAVA_HOME "` *path to installation* `"`
+ using Windows Command Prompt: `set JAVA_HOME="` *path to installation* `"`
+ using PowerShell: `$env:JAVA_HOME = '` *path to installation* `'`
3. Download and extract the j-ogg-all source code from [GitHub]:
+ using [Git]:
+ `git clone https://github.com/stephengold/j-ogg-all.git`
+ `cd j-ogg-all`
+ `git checkout -b latest 1.0.6`
+ using a web browser:
+ browse to [the latest release][latest]
+ follow the "Source code (zip)" link
+ save the ZIP file
+ extract the contents of the saved ZIP file
+ `cd` to the extracted directory/folder
4. Run the [Gradle] wrapper:
+ using Bash or Fish or PowerShell or Zsh: `./gradlew build`
+ using Windows Command Prompt: `.\gradlew build`After a successful build,
Maven artifacts will be found
in "library/build/libs" and "vorbis/build/libs".You can install the artifacts to your local Maven repository:
+ using Bash or Fish or PowerShell or Zsh: `./gradlew install`
+ using Windows Command Prompt: `.\gradlew install`You can restore the project to a pristine state:
+ using Bash or Fish or PowerShell or Zsh: `./gradlew clean`
+ using Windows Command Prompt: `.\gradlew clean`[Jump to the table of contents](#toc)
## Downloads
Releases can be downloaded from [GitHub](https://github.com/stephengold/j-ogg-all/releases)
or from the Maven Central Repository:
+ [j-ogg-all](https://central.sonatype.com/artifact/com.github.stephengold/j-ogg-all/1.0.6)
+ [j-ogg-vorbis](https://central.sonatype.com/artifact/com.github.stephengold/j-ogg-vorbis/1.0.6)[Jump to the table of contents](#toc)
## Conventions
Package names begin with `de.jarnbjo.`
The source code is compatible with JDK 7.
The pre-built libraries are compatible with JDK 8.[Jump to the table of contents](#toc)
## External links
+ [reference implementation of the Ogg container format](https://github.com/xiph/ogg)
+ [reference implementation of the Vorbis codec](https://gitlab.xiph.org/xiph/vorbis)
+ [Vorbis samples](https://getsamplefiles.com/sample-audio-files/ogg)[Jump to the table of contents](#toc)
## History
The j-ogg-all project was created by Tor-Einar Jarnbjo circa 2002,
probably based on reference implementations in C.In March 2021, Stephen Gold revived the project at GitHub
and added Gradle build scripts.In September 2022, Robert Pengelly contributed code
to retrieve album art from Vorbis media.In February 2023, the "library" and "vorbis" subprojects split off.
[Jump to the table of contents](#toc)
[adoptium]: https://adoptium.net/releases.html "Adoptium Project"
[daala]: https://xiph.org/daala/ "Daala codec"
[fish]: https://fishshell.com/ "Fish command-line shell"
[flac]: https://xiph.org/flac/ "Free Lossless Audio Codec"
[git]: https://git-scm.com "Git"
[github]: https://github.com "GitHub"
[gradle]: https://gradle.org "Gradle Project"
[java]: https://en.wikipedia.org/wiki/Java_(programming_language) "Java"
[jmf]: https://www.oracle.com/java/technologies/javase/java-media-framework.html "Java Media Framework"
[joggall]: https://github.com/stephengold "J-ogg-all Project"
[jvm]: https://en.wikipedia.org/wiki/Java_virtual_machine "Java Virtual Machine"
[latest]: https://github.com/stephengold/j-ogg-all/releases/latest "latest release"
[license]: https://github.com/stephengold/j-ogg-all/blob/master/LICENSE "j-ogg-all license"
[maven]: https://maven.apache.org "Maven Project"
[ogg]: https://www.xiph.org/ogg/ "Ogg container format"
[opus]: https://opus-codec.org/ "Opus codec"
[speex]: https://speex.org/ "Speex codec"
[theora]: https://theora.org/ "Theora codec"
[vorbis]: https://xiph.org/vorbis/ "Vorbis codec"