{"id":13905593,"url":"https://github.com/nextbreakpoint/ffmpeg4java","last_synced_at":"2025-06-13T08:05:57.734Z","repository":{"id":82319813,"uuid":"63818912","full_name":"nextbreakpoint/ffmpeg4java","owner":"nextbreakpoint","description":"FFmpeg4Java provides a Java wrapper of FFmpeg library","archived":false,"fork":false,"pushed_at":"2024-07-16T17:33:43.000Z","size":1102,"stargazers_count":35,"open_issues_count":0,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T08:05:16.158Z","etag":null,"topics":["ffmpeg","ffmper-wrapper","java","java-library","java-wrapper"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextbreakpoint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-07-20T22:26:36.000Z","updated_at":"2025-05-30T14:15:16.000Z","dependencies_parsed_at":"2024-11-17T20:44:55.615Z","dependency_job_id":"1734d17c-9a31-410a-824f-2721d76810dd","html_url":"https://github.com/nextbreakpoint/ffmpeg4java","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/nextbreakpoint/ffmpeg4java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbreakpoint%2Fffmpeg4java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbreakpoint%2Fffmpeg4java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbreakpoint%2Fffmpeg4java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbreakpoint%2Fffmpeg4java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextbreakpoint","download_url":"https://codeload.github.com/nextbreakpoint/ffmpeg4java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextbreakpoint%2Fffmpeg4java/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259606868,"owners_count":22883556,"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":["ffmpeg","ffmper-wrapper","java","java-library","java-wrapper"],"created_at":"2024-08-06T23:01:19.391Z","updated_at":"2025-06-13T08:05:57.709Z","avatar_url":"https://github.com/nextbreakpoint.png","language":"Java","readme":"# FFmpeg4Java 7.0.1-1.2\n\nFFmpeg4Java provides a Java wrapper of FFmpeg library version 7.0.1.\n\nPlease note that starting from version 7.0.1-1.0 the wrapper requires Java 22 and the Java FFM API (which is still in preview). \nOlder versions of the wrapper still work with Java 11 or later, but they use JNI with an old version of FFmpeg.     \n\n\n## License\n\nFFmpeg4Java is distributed under the terms of BSD 3-Clause License.\n\n    Copyright (c) 2016-2024, Andrea Medeghini\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice, this\n        list of conditions and the following disclaimer.\n\n    * Redistributions in binary form must reproduce the above copyright notice,\n        this list of conditions and the following disclaimer in the documentation\n        and/or other materials provided with the distribution.\n\n    * Neither the name of FFmpeg4Java nor the names of its\n        contributors may be used to endorse or promote products derived from\n        this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n## Notice\n\nFFmpeg4Java is distributed as independent JAR files, one for each supported operating system.\nEach JAR file contains a native library which must be installed in the library path of the Java runtime.\n\nPlease note that the native library is statically liked with FFmpeg library under the terms of GNU Lesser General Public License, version 2.1. \nYou should have received a copy of the LGPL v2.1 license with FFmpeg4Java. See http://ffmpeg.org for more information about FFmpeg.\n\n\n## Get binaries \n\nFFmpeg4Java is available in Maven Central Repository and [GitHub](https://github.com/nextbreakpoint/ffmpeg4java).\n\nIf you are using Maven, add one of the following dependencies in your POM:\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.nextbreakpoint\u003c/groupId\u003e\n        \u003cartifactId\u003ecom.nextbreakpoint.ffmpeg4java.macos\u003c/artifactId\u003e\n        \u003cversion\u003e7.0.1-1.2\u003c/version\u003e\n    \u003c/dependency\u003e\n    \n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.nextbreakpoint\u003c/groupId\u003e\n        \u003cartifactId\u003ecom.nextbreakpoint.ffmpeg4java.linux\u003c/artifactId\u003e\n        \u003cversion\u003e7.0.1-1.2\u003c/version\u003e\n    \u003c/dependency\u003e\n    \n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.nextbreakpoint\u003c/groupId\u003e\n        \u003cartifactId\u003ecom.nextbreakpoint.ffmpeg4java.windows\u003c/artifactId\u003e\n        \u003cversion\u003e7.0.1-1.2\u003c/version\u003e\n    \u003c/dependency\u003e\n\nAlso, add one of the following to download the native library:\n\n    \u003cplugin\u003e\n        \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n        \u003cartifactId\u003emaven-dependency-plugin\u003c/artifactId\u003e\n        \u003cexecutions\u003e\n            \u003cexecution\u003e\n                \u003cid\u003ecopy-lib\u003c/id\u003e\n                \u003cphase\u003epackage\u003c/phase\u003e\n                \u003cgoals\u003e\n                    \u003cgoal\u003eunpack\u003c/goal\u003e\n                \u003c/goals\u003e\n                \u003cconfiguration\u003e\n                    \u003cartifactItems\u003e\n                        \u003cartifactItem\u003e\n                            \u003cgroupId\u003ecom.nextbreakpoint\u003c/groupId\u003e\n                            \u003cartifactId\u003ecom.nextbreakpoint.ffmpeg4java.macos\u003c/artifactId\u003e\n                            \u003cclassifier\u003ex86_64\u003c/classifier\u003e\n                            \u003ctype\u003ejar\u003c/type\u003e\n                            \u003coverWrite\u003etrue\u003c/overWrite\u003e\n                            \u003coutputDirectory\u003e${project.build.directory}/lib\u003c/outputDirectory\u003e\n                        \u003c/artifactItem\u003e\n                    \u003c/artifactItems\u003e\n                    \u003cincludes\u003e**/*.dylib\u003c/includes\u003e\n                \u003c/configuration\u003e\n            \u003c/execution\u003e\n        \u003c/executions\u003e\n    \u003c/plugin\u003e\n\n    \u003cplugin\u003e\n        \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n        \u003cartifactId\u003emaven-dependency-plugin\u003c/artifactId\u003e\n        \u003cexecutions\u003e\n            \u003cexecution\u003e\n                \u003cid\u003ecopy-lib\u003c/id\u003e\n                \u003cphase\u003epackage\u003c/phase\u003e\n                \u003cgoals\u003e\n                    \u003cgoal\u003eunpack\u003c/goal\u003e\n                \u003c/goals\u003e\n                \u003cconfiguration\u003e\n                    \u003cartifactItems\u003e\n                        \u003cartifactItem\u003e\n                            \u003cgroupId\u003ecom.nextbreakpoint\u003c/groupId\u003e\n                            \u003cartifactId\u003ecom.nextbreakpoint.ffmpeg4java.linux\u003c/artifactId\u003e\n                            \u003cclassifier\u003ex86_64\u003c/classifier\u003e\n                            \u003ctype\u003ejar\u003c/type\u003e\n                            \u003coverWrite\u003etrue\u003c/overWrite\u003e\n                            \u003coutputDirectory\u003e${project.build.directory}/lib\u003c/outputDirectory\u003e\n                        \u003c/artifactItem\u003e\n                    \u003c/artifactItems\u003e\n                    \u003cincludes\u003e**/*.so\u003c/includes\u003e\n                \u003c/configuration\u003e\n            \u003c/execution\u003e\n        \u003c/executions\u003e\n    \u003c/plugin\u003e\n\n    \u003cplugin\u003e\n        \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n        \u003cartifactId\u003emaven-dependency-plugin\u003c/artifactId\u003e\n        \u003cexecutions\u003e\n            \u003cexecution\u003e\n                \u003cid\u003ecopy-lib\u003c/id\u003e\n                \u003cphase\u003epackage\u003c/phase\u003e\n                \u003cgoals\u003e\n                    \u003cgoal\u003eunpack\u003c/goal\u003e\n                \u003c/goals\u003e\n                \u003cconfiguration\u003e\n                    \u003cartifactItems\u003e\n                        \u003cartifactItem\u003e\n                            \u003cgroupId\u003ecom.nextbreakpoint\u003c/groupId\u003e\n                            \u003cartifactId\u003ecom.nextbreakpoint.ffmpeg4java.windows\u003c/artifactId\u003e\n                            \u003cclassifier\u003ex86_64\u003c/classifier\u003e\n                            \u003ctype\u003ejar\u003c/type\u003e\n                            \u003coverWrite\u003etrue\u003c/overWrite\u003e\n                            \u003coutputDirectory\u003e${project.build.directory}/lib\u003c/outputDirectory\u003e\n                        \u003c/artifactItem\u003e\n                    \u003c/artifactItems\u003e\n                    \u003cincludes\u003e**/*.dll\u003c/includes\u003e\n                \u003c/configuration\u003e\n            \u003c/execution\u003e\n        \u003c/executions\u003e\n    \u003c/plugin\u003e\n\n\n## Build libraries\n\nWe recommend to use a Mac to build FFmpeg4Java, because you can compile the library for all systems in one place, but that is not strictly required. \nA Linux system can be used to compile the library for Linux and Windows (via cross compilation), and use a Mac system only to compile the library for MacOS. \n\nWe assume you have a Mac, however the same build instructions work for Linux (but only for compiling the library for Linux and Windows).\n\nMake sue you have installed Xcode command line tools (only for MacOS), Docker, git, make, maven, and Java 22.\n\n    We use Docker to simplify the toolchain configuration and ensure to have a consistent environment\n\n### Build library for MacOS\n\nCompile and install the library:\n\n    make -C ffmpeg4java-macos/native build-lib install\n\nThe library will be installed in the resources directory of the module:\n\n    ffmpeg4java-macos/src/main/resources/libffmpeg4java.dylib\n\nInspect the symbols exported by the library:\n\n    nm -gU ffmpeg4java-macos/src/main/resources/libffmpeg4java.dylib\n\nInspect the libraries linked with the library: \n\n    otool -L ffmpeg4java-macos/src/main/resources/libffmpeg4java.dylib\n\n### Build library for Linux\n\nCompile and install the library:\n\n    make -C ffmpeg4java-linux/native build-lib install\n\nThe library will be installed in the resources directory of the module:\n\n    ffmpeg4java-linux/src/main/resources/libffmpeg4java.so\n\nInspect the symbols exported by the library:\n\n    objdump -t ffmpeg4java-linux/src/main/resources/libffmpeg4java.so\n\nInspect the libraries linked with the library:\n\n    objdump -p ffmpeg4java-linux/src/main/resources/libffmpeg4java.so | grep .so\n\n### Build library for Windows\n\nCompile and install the library:\n\n    make -C ffmpeg4java-windows/native build-lib install\n\nThe library will be installed in the resources directory of the module:\n\n    ffmpeg4java-windows/src/main/resources/ffmpeg4java.dll\n\nInspect the symbols exported by the library:\n\n    objdump -t ffmpeg4java-windows/src/main/resources/ffmpeg4java.dll\n\nInspect the libraries linked with the library:\n\n    objdump -p ffmpeg4java-windows/src/main/resources/ffmpeg4java.dll | grep .dll\n\n## Build Java code\n\nCompile and package the JARs:\n\n    make clean package\n\nThe artifacts will be created in the target directory of each module:\n\n    ffmpeg4java-macos/target/com.nextbreakpoint.ffmpeg4java.macos-7.0.1-1.2-x86_64.jar\n    ffmpeg4java-macos/target/com.nextbreakpoint.ffmpeg4java.macos-7.0.1-1.2-x86_64-x86_64.jar\n\n    ffmpeg4java-linux/target/com.nextbreakpoint.ffmpeg4java.linux-7.0.1-1.2-x86_64.jar\n    ffmpeg4java-linux/target/com.nextbreakpoint.ffmpeg4java.linux-7.0.1-1.2-x86_64-x86_64.jar\n\n    ffmpeg4java-windows/target/com.nextbreakpoint.ffmpeg4java.windows-7.0.1-1.2-x86_64.jar\n    ffmpeg4java-windows/target/com.nextbreakpoint.ffmpeg4java.windows-7.0.1-1.2-x86_64-x86_64.jar\n\nList the content of the JAR files:\n\n    unzip -t ffmpeg4java-macos/target/com.nextbreakpoint.ffmpeg4java.macos-7.0.1-1.2.jar\n    unzip -t ffmpeg4java-macos/target/com.nextbreakpoint.ffmpeg4java.macos-7.0.1-1.2-x86_64.jar\n\n    unzip -t ffmpeg4java-linux/target/com.nextbreakpoint.ffmpeg4java.linux-7.0.1-1.2.jar\n    unzip -t ffmpeg4java-linux/target/com.nextbreakpoint.ffmpeg4java.linux-7.0.1-1.2-x86_64.jar\n\n    unzip -t ffmpeg4java-windows/target/com.nextbreakpoint.ffmpeg4java.windows-7.0.1-1.2.jar\n    unzip -t ffmpeg4java-windows/target/com.nextbreakpoint.ffmpeg4java.windows-7.0.1-1.2-x86_64.jar\n\nInstall the artifacts in your local Maven repository:\n\n    make install\n\n## Test Java code\n\nTest the MacOS module (must be executed on MacOS):\n\n    make verify system=macos\n\nTest the Linux module (must be executed on Linux):\n\n    make verify system=linux\n\nTest the Windows module (must be executed on Windows):\n\n    make verify system=windows\n\n## Generate Java code (only if you know what you are doing)\n\nThe Java code of all modules is generated from the FFmpeg header files by jextract.  \n\nDownload and install jextract for Java 22 for all target systems (see links below). \n\nEdit the source file in the target module updating the path of jextract and java.   \n\nGenerate the code for MacOS (must be executed on MacOS):\n\n    eval $(cat ffmpeg4java-macos/source) \u0026\u0026 make extract system=macos\n\nGenerate the code for Linux (must be executed on Linux):\n\n    eval $(cat ffmpeg4java-linux/source) \u0026\u0026 make extract system=linux\n\nGenerate the code for Windows (must be executed on Windows):\n\n    eval $(cat ffmpeg4java-windows/source) \u0026\u0026 make extract system=windows\n\n\n## Code examples\n\nA simple example is provided for the module ffmpeg4Java-examples.\n\nSee the POM file for details about how to download the native library and execute the example:\n\n    ffmpeg4java-examples/pom.xml\n\n\n## References\n\nJava Foreign Function and Memory API:\nhttps://openjdk.org/jeps/454\n\njextract download:\nhttps://jdk.java.net/jextract/\n\njextract guide:\nhttps://github.com/openjdk/jextract/blob/master/doc/GUIDE.md\n\nFFmpeg documentation:\nhttps://ffmpeg.org/documentation.html\n\nFFmpeg source code:\nhttps://ffmpeg.org/download.html#get-sources\n\nFFmpeg build notes:\nhttps://ffmpeg.org/platform.html\n","funding_links":[],"categories":["HarmonyOS","Build Tools, Deployment \u0026 Utility Libraries"],"sub_categories":["Windows Manager","API Libraries \u0026 SDKs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextbreakpoint%2Fffmpeg4java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextbreakpoint%2Fffmpeg4java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextbreakpoint%2Fffmpeg4java/lists"}