All Projects → goxr3plus → java-stream-player

goxr3plus / java-stream-player

Licence: GPL-3.0 license
🌌Java Advanced Audio Controller Library (WAV, AU, AIFF, MP3, OGG VORBIS, FLAC, MONKEY's AUDIO and SPEEX audio formats )

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to java-stream-player

loudgain
ReplayGain 2.0 loudness normalizer based on the EBU R128/ITU BS.1770 standard (-18 LUFS, FLAC, Ogg, MP2, MP3, MP4, M4A, AAC, ALAC, Opus, ASF, WMA, WAV, AIFF, WavPack, APE)
Stars: ✭ 127 (+13.39%)
Mutual labels:  mp3, wav, flac, aiff
audio-metadata
A library for reading and, in the future, writing audio metadata. https://audio-metadata.readthedocs.io/
Stars: ✭ 41 (-63.39%)
Mutual labels:  mp3, wav, flac, ogg
uos
United Open-libraries of Sound. United procedures for open-source audio libraries. For FPC/Lazarus/fpGUI/MSEgui.
Stars: ✭ 112 (+0%)
Mutual labels:  mp3, wav, flac, ogg
sox.js
📢 NodeJS wrapper for the SoX audio tool
Stars: ✭ 18 (-83.93%)
Mutual labels:  mp3, wav, flac, ogg
sox-stream
📣 A stream-friendly wrapper around SoX
Stars: ✭ 50 (-55.36%)
Mutual labels:  mp3, wav, flac, ogg
Audio Steganography Algorithms
A Library of Audio Steganography & Watermarking Algorithms
Stars: ✭ 146 (+30.36%)
Mutual labels:  mp3, wav, flac
Ni Media
NI Media is a C++ library for reading and writing audio streams.
Stars: ✭ 158 (+41.07%)
Mutual labels:  mp3, wav, flac
Audioplayer
Audio Player for Nextcloud and ownCloud
Stars: ✭ 179 (+59.82%)
Mutual labels:  mp3, wav, flac
Music Metadata Browser
Browser version of music-metadata parser Supporting a wide range of audio and tag formats.
Stars: ✭ 105 (-6.25%)
Mutual labels:  mp3, wav, flac
Atldotnet
Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
Stars: ✭ 180 (+60.71%)
Mutual labels:  mp3, wav, flac
Symphonia
Pure Rust multimedia format demuxing, tag reading, and audio decoding library
Stars: ✭ 191 (+70.54%)
Mutual labels:  mp3, wav, flac
audio-playback
Ruby/Command Line Audio File Player
Stars: ✭ 20 (-82.14%)
Mutual labels:  mp3, wav, aiff
simple-web-audio-recorder-demo
A simple HTML/JS demo that uses WebAudioRecorder.js to record audio on a web page
Stars: ✭ 141 (+25.89%)
Mutual labels:  mp3, wav, ogg
Mediafile
A unified reader of metadata from audio & video files.
Stars: ✭ 138 (+23.21%)
Mutual labels:  mp3, wav, flac
Miniaudio
Single file audio playback and capture library written in C.
Stars: ✭ 1,889 (+1586.61%)
Mutual labels:  mp3, wav, flac
Youtube-DL-GUI
Graphical User Interace built around youtube-dl CLI
Stars: ✭ 38 (-66.07%)
Mutual labels:  mp3, wav, flac
Format parser
file metadata parsing, done cheap
Stars: ✭ 46 (-58.93%)
Mutual labels:  mp3, wav, flac
Av Converter
[av-converter.com] Audio and Video Converter, and YouTube downloader. Convert to MP3, MP4, AAC, FLAC, AC3, WAV, etc.
Stars: ✭ 97 (-13.39%)
Mutual labels:  mp3, wav, flac
Recorder
html5 js 录音 mp3 wav ogg webm amr 格式,支持pc和Android、ios部分浏览器、和Hybrid App(提供Android IOS App源码),微信也是支持的,提供H5版语音通话聊天示例 和DTMF编解码
Stars: ✭ 2,891 (+2481.25%)
Mutual labels:  mp3, wav, ogg
Flacon
Audio File Encoder. Extracts audio tracks from an audio CD image to separate tracks.
Stars: ✭ 252 (+125%)
Mutual labels:  mp3, wav, flac

AlexKent Support me joining PI Network app with invitation code AlexKent AlexKent


Java Stream Player ( Library )

🎶

Java Audio Controller Library with (skip,skipTo,start,stop,pause,play,restart) This is the next version of JavaZoom BasicPlayer


Latest Version HitCount Patreon donate button PayPal donate button

What audio formats it supports?

  • Fully Supported ✔️
    • WAV
    • MP3
  • Partially not full tested 🚧
    • OGG VORBIS
    • FLAC
    • MONKEY's AUDIO
    • SPEEX
  • Not Supported Yet
    • AAC
    • THEORA
    • ... all the others

Step 1. Add the JitPack repository to your build file

https://jitpack.io/private#goxr3plus/java-stream-player

<repositories>
	<repository>
	   <id>jitpack.io</id>
	   <url>https://jitpack.io</url>
        </repository>
</repositories>

Step 2. Add the dependency

<dependency>
   <groupId>com.github.goxr3plus</groupId>
   <artifactId>java-stream-player</artifactId>
   <version>9.0.4</version>
</dependency>

Example usage :

import java.io.File;
import java.util.Map;

import com.goxr3plus.streamplayer.enums.Status;
import com.goxr3plus.streamplayer.stream.StreamPlayer;
import com.goxr3plus.streamplayer.stream.StreamPlayerListener;
import com.goxr3plus.streamplayer.stream.StreamPlayerEvent;
import com.goxr3plus.streamplayer.stream.StreamPlayerException;

/**
 * @author GOXR3PLUS
 *
 */
public class Main extends StreamPlayer implements StreamPlayerListener {

    private final String audioAbsolutePath = "Logic - Ballin [Bass Boosted].mp3";

    /**
     * Constructor
     */
    public Main() {

        try {

            // Register to the Listeners
            addStreamPlayerListener(this);

            // Open a File
            // open(new File("...")) //..Here must be the file absolute path
            // open(INPUTSTREAM)
            // open(AUDIOURL)

            // Example
            open(new File(audioAbsolutePath));

            // Seek by bytes
            // seekBytes(500000L);

            // Seek +x seconds starting from the current position
            seekSeconds(15);
            seekSeconds(15);

            /* Seek starting from the begginning of the audio */
            // seekTo(200);

            // Play it
            play();
            // pause();

        } catch (final Exception ex) {
            ex.printStackTrace();
        }

    }

    @Override
    public void opened(final Object dataSource, final Map<String, Object> properties) {

    }

    @Override
    public void progress(final int nEncodedBytes, final long microsecondPosition, final byte[] pcmData,
            final Map<String, Object> properties) {

        // System.out.println("Encoded Bytes : " + nEncodedBytes);

        // Current time position in seconds:) by GOXR3PLUS STUDIO
        // This is not the more precise way ...
        // in XR3Player i am using different techniques .
        // https://github.com/goxr3plus/XR3Player
        // Just for demostration purposes :)
        // I will add more advanced techniques with milliseconds , microseconds , hours
        // and minutes soon

        // .MP3 OR .WAV
        final String extension = "mp3"; // THE SAMPLE Audio i am using is .MP3 SO ... :)

        long totalBytes = getTotalBytes();
        if ("mp3".equals(extension) || "wav".equals(extension)) {

            // Calculate the progress until now
            double progress = (nEncodedBytes > 0 && totalBytes > 0) ? (nEncodedBytes * 1.0f / totalBytes * 1.0f)
                    : -1.0f;
            // System.out.println(progress*100+"%");

            System.out.println("Seconds  : " + (int) (microsecondPosition / 1000000) + " s " + "Progress: [ "
                    + progress * 100 + " ] %");

            // .WHATEVER MUSIC FILE*
        } else {
            // System.out.println("Current time is : " + (int) (microsecondPosition /
            // 1000000) + " seconds");
        }

    }

    @Override
    public void statusUpdated(final StreamPlayerEvent streamPlayerEvent) {

        // Player status
        final Status status = streamPlayerEvent.getPlayerStatus();
        // System.out.println(streamPlayerEvent.getPlayerStatus());

        // Examples

        if (status == Status.OPENED) {

        } else if (status == Status.OPENING) {

        } else if (status == Status.RESUMED) {

        } else if (status == Status.PLAYING) {

        } else if (status == Status.STOPPED) {

        } else if (status == Status.SEEKING) {

        } else if (status == Status.SEEKED) {

        }

        // etc... SEE XR3PLAYER https://github.com/goxr3plus/XR3Player for advanced
        // examples
    }

    public static void main(final String[] args) {
        new Main();
    }

}

Java Audio Tutorials and API's by GOXR3PLUS STUDIO


Looking for a ffmpeg wrapper in Java ?

Check this -> jave2 , currently updating it :)


Originally being developed for XR3Player Application

Are you curious on how to make spectrum analysers in Java? Well the below tutorials plus the above code are the solution :)

I hope you enjoy these tutorials and actually you can watch the youtube videos about them below:

Java Spectrum Analyser Tutorial

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].