{"id":14985081,"url":"https://github.com/hendriks73/ffsampledsp","last_synced_at":"2025-04-10T23:25:10.413Z","repository":{"id":46224856,"uuid":"10840336","full_name":"hendriks73/ffsampledsp","owner":"hendriks73","description":"FFmpeg based service provider for javax.sound.sampled.","archived":false,"fork":false,"pushed_at":"2024-09-03T21:34:02.000Z","size":21018,"stargazers_count":25,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-03-24T20:12:31.621Z","etag":null,"topics":["audio","audio-decoder","ffmpeg","java","java-library","macos","sound","ubuntu","windows"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hendriks73.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-06-21T10:18:48.000Z","updated_at":"2025-01-25T07:26:49.000Z","dependencies_parsed_at":"2022-09-26T21:51:25.974Z","dependency_job_id":"aecac7d7-9ca8-44a7-8fe2-f108eaf2cbcf","html_url":"https://github.com/hendriks73/ffsampledsp","commit_stats":{"total_commits":312,"total_committers":2,"mean_commits":156.0,"dds":"0.012820512820512775","last_synced_commit":"cd8fbd71fe47e115f6c12be15ae7add6a3b586f0"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendriks73%2Fffsampledsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendriks73%2Fffsampledsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendriks73%2Fffsampledsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hendriks73%2Fffsampledsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hendriks73","download_url":"https://codeload.github.com/hendriks73/ffsampledsp/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248313648,"owners_count":21082892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-decoder","ffmpeg","java","java-library","macos","sound","ubuntu","windows"],"created_at":"2024-09-24T14:10:16.023Z","updated_at":"2025-04-10T23:25:10.368Z","avatar_url":"https://github.com/hendriks73.png","language":"Java","readme":"[![LGPL 2.1](https://img.shields.io/badge/License-LGPL_2.1-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.tagtraum/ffsampledsp/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.tagtraum/ffsampledsp)\n[![Build and Test](https://github.com/hendriks73/ffsampledsp/workflows/Build%20and%20Test/badge.svg)](https://github.com/hendriks73/ffsampledsp/actions)\n[![CodeCov](https://codecov.io/gh/hendriks73/ffsampledsp/branch/main/graph/badge.svg?token=7K9ACGFWY4)](https://codecov.io/gh/hendriks73/ffsampledsp/branch/main)\n\n\n# FFSampledSP\n\n*FFSampledSP* is an implementation of the\n[javax.sound.sampled](https://docs.oracle.com/javase/10/docs/api/javax/sound/sampled/spi/package-summary.html)\nservice provider interfaces based on [FFmpeg](https://www.ffmpeg.org), a complete, cross-platform solution to record,\nconvert and stream audio and video.\nFFSampledSP is part of the [SampledSP](https://www.tagtraum.com/sampledsp.html) collection of `javax.sound.sampled`\nlibraries.\n\nIts main purpose is to decode audio files or streams to signed\n[linear PCM](https://en.wikipedia.org/wiki/Pulse-code_modulation).\n\nSupported platforms are currently:\n\n- macOS x64 (\u003e=10.8) and aarch64 (\u003e=11)\n- Windows i686 and x64\n- Linux (Ubuntu 20) x64 and aarch64 (arm64)\n\nFFSampledSP makes use of the [tagtraum FFmpeg package](https://www.tagtraum.com/ffmpeg).\n\nBinaries and more info can be found at its [tagtraum home](https://www.tagtraum.com/ffsampledsp/).\n\n\n## Installation\n\nFFSampledSP is released via [Maven](https://maven.apache.org).\nYou can install it via the following dependency:\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.tagtraum\u003c/groupId\u003e\n        \u003cartifactId\u003effsampledsp-complete\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n\n## Usage\n\nTo use the library, simply use\n[javax.sound.sampled](https://docs.oracle.com/javase/10/docs/api/javax/sound/sampled/spi/package-summary.html)\nlike you normally would.\n\nNote that opening an `AudioInputStream` of compressed audio (e.g. mp3), does\n*not* decode the stream. To obtain PCM you still have to transcode to PCM like this:\n\n```java\nimport javax.sound.sampled.AudioFormat;\nimport javax.sound.sampled.AudioInputStream;\nimport javax.sound.sampled.AudioSystem;\n\npublic class DecodeExample {\n    public static void main(final String[] args) {\n        // compressed stream\n        final AudioInputStream mp3In = AudioSystem.getAudioInputStream(new File(args[0]));\n        // AudioFormat describing the compressed stream\n        final AudioFormat mp3Format = mp3In.getFormat();\n        // AudioFormat describing the desired decompressed stream \n        final AudioFormat pcmFormat = new AudioFormat(\n            AudioFormat.Encoding.PCM_SIGNED,\n            mp3Format.getSampleRate(),\n            16,\n            mp3Format.getChannels(),\n            16 * mp3Format.getChannels() / 8,\n            mp3Format.getSampleRate(),\n            mp3Format.isBigEndian()\n            );\n        // actually decompressed stream (signed PCM)\n        final AudioInputStream pcmIn = AudioSystem.getAudioInputStream(mp3In, pcmFormat);\n        // do something with the raw audio stream pcmIn... \n    }\n}\n```\n\n\n## Build\n\nYou can build this library locally on macOS, Windows, or Linux (Ubuntu is tested).\nWhen doing so, only the appropriate  native libraries are included in the \"complete\" jar.\nThe GitHub-based build also adds native libraries for other platforms.\n\nTo do so, you also need:\n\n- [Maven](https://maven.apache.org/)\n- For macOS: [Apple Command Line Tools](https://developer.apple.com/)\n  or [XCode](https://developer.apple.com/xcode/)\n- For Windows: [MSYS2](https://www.msys2.org) with GCC etc.\n- a JDK (to run Maven and get the JNI headers)\n- [Doxygen](https://www.doxygen.nl), available via [MacPorts](https://www.macports.org), [HomeBrew](https://brew.sh) or [MSYS2](https://www.msys2.org).\n\nNote, that the C sources in the `ffsampledsp-x86_64-macos` module are expected to compile\non all supported platforms. In fact, the very same sources *are* compiled in the modules\nfor other platforms.\n\n\n## Release Notes\n\nYou can find the release notes/history [here](NOTES.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendriks73%2Fffsampledsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhendriks73%2Fffsampledsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhendriks73%2Fffsampledsp/lists"}