All Projects → Trilarion → java-vorbis-support

Trilarion / java-vorbis-support

Licence: LGPL-3.0 license
Combination of JOrbis, JavaSPI and Tritonus-Share.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to java-vorbis-support

nipper
🌶 💽 Nipper - Youtube playlist (& video) ripper
Stars: ✭ 23 (+15%)
Mutual labels:  ogg, vorbis
NVorbis
C# Ogg Vorbis decoder
Stars: ✭ 65 (+225%)
Mutual labels:  ogg, vorbis
libwinmedia
[Archived] A cross-platform simple media playback library for C/C++.
Stars: ✭ 35 (+75%)
Mutual labels:  ogg, vorbis
audio-metadata
A library for reading and, in the future, writing audio metadata. https://audio-metadata.readthedocs.io/
Stars: ✭ 41 (+105%)
Mutual labels:  ogg, vorbis
simple-web-audio-recorder-demo
A simple HTML/JS demo that uses WebAudioRecorder.js to record audio on a web page
Stars: ✭ 141 (+605%)
Mutual labels:  ogg, vorbis
sox-stream
📣 A stream-friendly wrapper around SoX
Stars: ✭ 50 (+150%)
Mutual labels:  ogg
Recorder
html5 js 录音 mp3 wav ogg webm amr 格式,支持pc和Android、ios部分浏览器、和Hybrid App(提供Android IOS App源码),微信也是支持的,提供H5版语音通话聊天示例 和DTMF编解码
Stars: ✭ 2,891 (+14355%)
Mutual labels:  ogg
lplayer
lplayer is a simple audio player for simply listening
Stars: ✭ 40 (+100%)
Mutual labels:  ogg
java-stream-player
🌌Java Advanced Audio Controller Library (WAV, AU, AIFF, MP3, OGG VORBIS, FLAC, MONKEY's AUDIO and SPEEX audio formats )
Stars: ✭ 112 (+460%)
Mutual labels:  ogg
record-encode-audio-from-browser
Record/Encode Audio on Browser using the WebAudio API and "ported" libraries.
Stars: ✭ 55 (+175%)
Mutual labels:  ogg
y2mp3
An Electron app to download youtube playlist
Stars: ✭ 118 (+490%)
Mutual labels:  ogg
opus-recorder
A library for encoding and decoding web audio as OggOpus.
Stars: ✭ 852 (+4160%)
Mutual labels:  ogg
ears
Easy Api in Rust to play Sounds
Stars: ✭ 81 (+305%)
Mutual labels:  ogg
sox.js
📢 NodeJS wrapper for the SoX audio tool
Stars: ✭ 18 (-10%)
Mutual labels:  ogg
libopusenc
Library for encoding .opus audio files and live streams.
Stars: ✭ 92 (+360%)
Mutual labels:  ogg
uos
United Open-libraries of Sound. United procedures for open-source audio libraries. For FPC/Lazarus/fpGUI/MSEgui.
Stars: ✭ 112 (+460%)
Mutual labels:  ogg
Spell4Wiki
Spell4Wiki is a mobile application to record and upload audio for Wiktionary words to Wikimedia commons. Also act as a Wiki-Dictionary.
Stars: ✭ 17 (-15%)
Mutual labels:  ogg
a2mp3
convert (nearly) every type of (audio)file to mp3 in a quick, easy, batch-enabled way!
Stars: ✭ 43 (+115%)
Mutual labels:  ogg
Miniaudio
Single file audio playback and capture library written in C.
Stars: ✭ 1,889 (+9345%)
Mutual labels:  vorbis
audio-tag-analyzer
Extracts metadata music metadata found in audio files
Stars: ✭ 18 (-10%)
Mutual labels:  vorbis

java-vorbis-support

Combination and continuation of JOrbis, JavaSPI and Tritonus-Share to provide Ogg/Vorbis playback capabilities for Java using the Sound SPI.

Download, License, Feedback

On Maven Central:

Introduction

Ogg/Vorbis is a widely used free audio format featuring high compression ratios and there are libraries who enable support for Ogg in Java. Among them are JOrbis by JCraft - a pure Java Ogg/Vorbis decoder and Ogg Vorbis SPI by JavaZoom which registers JOrbis as a service for the Java Sound API. The later also relies partly on the Tritonus share library. All three projects are inactive for several years now.

The reference implementation for Ogg/Vorbis is libvorbis written in C.

Vorbis support is the all-in-one combination and possibly continuation of JOrbis, JavaSPI and Tritonus-Share.

Alternatives are Paul's SoundSystem (full support of Java Sound, JOAL, LWJGL gaming libraries, wrappers around JOrbis, J-OGG), Vorbis-Java (Java encoder and decoder at xiph.org), EasyOgg (wrapper around JOrbis) and J-OGG (independent ogg/vorbis decode). These projects are mostly inactive for years now.

Why this project?

All three libraries, Jorbis, Vorbis SPI and Tritonus Share are almost always bundled together. Together they constitute a complete plattform independent Ogg/Vorbis support for the Java Sound API. Fortunately they share the same open source license (LGPL). Combining them together makes distribution and handling easier, can reduce the size of the download and makes testing and debugging easier. Last but not least, increasing the efficiency by optimizing the code will be a bit easier.

However since these libraries already exist, we do not need to take care of backwards compatibility, since there is always the fallback to the original libraries. Therefore to be able to use newer features of the Java language, the required Java version currently is 7 or later.

Example

This library used the Services Provider Interface to enable Ogg/Vorbis playback under the hood without changing any of the code on the client's library side. Just put this library in the classpath and access your sound resources (SourceDataLine or Clip) as you would without Ogg/Vorbis support. See the Java Tutorial on Playing Back Audio for more information. And here is also an example that would play an entire ogg file.

try {
    AudioInputStream in = AudioSystem.getAudioInputStream(new File("xyz.ogg");
    if (in != null) {
        AudioFormat baseFormat = in.getFormat();

        AudioFormat targetFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, baseFormat.getSampleRate(),
        16, baseFormat.getChannels(), baseFormat.getChannels() * 2, baseFormat.getSampleRate(), false);

        AudioInputStream dataIn = AudioSystem.getAudioInputStream(targetFormat, in);

        byte[] buffer = new byte[4096];

        // get a line from a mixer in the system with the wanted format
        DataLine.Info info = new DataLine.Info(SourceDataLine.class, targetFormat);
        SourceDataLine line = (SourceDataLine) AudioSystem.getLine(info);

        if (line != null) {
            line.open();

            line.start();
            int nBytesRead = 0, nBytesWritten = 0;
            while (nBytesRead != -1) {
                nBytesRead = dataIn.read(buffer, 0, buffer.length);
                if (nBytesRead != -1) {
                    nBytesWritten = line.write(buffer, 0, nBytesRead);
                }
            }

            line.drain();
            line.stop();
            line.close();

            dataIn.close();
        }

        in.close();
        // playback finished
    }
} catch (UnsupportedAudioFileException | IOException | LineUnavailableException e) {
    // failed
}

Run an example with

./gradlew run :examples:run

Alternatives

VorbisJava by Gagravarr.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].