Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

ffmpeg-cli-wrapper

> 编程语言
Open source

Java wrapper around the FFmpeg command line tool

1.9K stars0 likes2 views
WebsiteGitHub

About

Java wrapper around the FFmpeg command line tool

FFmpeg CLI Wrapper for Java

by Andrew Brampton (bramp.net) (c) 2013-2024 A fluent interface for running FFmpeg from Java.

GitHub | API docs | Examples

Install

We currently support Java 11 and above. Use Maven to install the dependency.

xml
<dependency>
  <groupId>net.bramp.ffmpeg</groupId>
  <artifactId>ffmpeg</artifactId>
  <version>0.9.1</version>
</dependency>

Compatibility

  • Java: 11 and above (tested on JDK 11, 17, and 21).
  • FFmpeg: Any reasonably modern version of FFmpeg should work (5.x, 6.x, 7.x, etc.). The library generates command-line arguments, so compatibility depends on which FFmpeg features you use.
  • OS: Pure Java — runs anywhere Java and FFmpeg are available (Linux, macOS, Windows).

Usage

Video Encoding

Code:

…

Get Media Information

Code:

java
FFprobe ffprobe = new FFprobe("/path/to/ffprobe");
FFmpegProbeResult probeResult = ffprobe.probe("input.mp4");

FFmpegFormat format = probeResult.getFormat();
System.out.format(
    "%nFile: '%s' ; Format: '%s' ; Duration: %.3fs",
    format.filename, format.format_long_name, format.duration);

FFmpegStream stream = probeResult.getStreams().get(0);
System.out.format(
    "%nCodec: '%s' ; Width: %dpx ; Height: %dpx",
    stream.codec_long_name, stream.width, stream.height);

Get progress while encoding

…

Building & Releasing

If you wish to make changes, then building and testing is simple:

bash
# To build
mvn compile

# To test
mvn test

# To test across all supported JDKs (11, 17, 21)
make test

Releasing

Releasing is automated via GitHub Actions. To trigger a release to Maven Central:

  1. Update the version in pom.xml (remove -SNAPSHOT).
  2. Commit and push the change.
  3. Create and push a tag:
bash
git tag ffmpeg-0.9.1
git push origin ffmpeg-0.9.1

The GitHub Action will:

  1. Run the full test matrix across all supported JDKs.
  2. If successful, sign and publish the artifacts to the Sonatype Central Portal.
  3. Create a GitHub Release with automatically generated release notes.

Bumpings Deps

bash
# Update Maven Plugins
mvn versions:display-plugin-updates

# Library Dependencies
mvn versions:display-dependency-updates

Install FFmpeg on Ubuntu

We only the support the original FFmpeg, not the libav version. Before Ubuntu 12.04, and in 15.04 and later the original FFmpeg is shipped. If you have to run on a version with libav, you can install FFmpeg from a PPA, or using the static build. More information here

Get involved

We welcome contributions. Please check the issue tracker. If you see something you wish to work on, please either comment on the issue, or just send a pull request. Want to work on something else, then just open a issue, and we can discuss! We appreciate documentation improvements, code cleanup, or new features. Please be mindful that all work is done on a volunteer basis, thus we can be slow to reply.

Licence (Simplified BSD License)

…

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javaffmpegjava

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言