Fork me on GitHub

Introduction

The tagtraum FFmpeg package is a binary release of some of the libraries released by the FFmpeg™ project. Its purpose is to provide easy access to Windows and OS X binaries and sources for decoding audio via a Maven repository. Thus it serves as an upstream project for Java JNI projects wishing to interface with the native libraries (e.g. FFSampledSP). Codecs with known patent problems are disabled (but can be enabled). However, this obviously is no guarantee. Also, as the focus lies on decoding audio, most encoders are disabled.

How to use

To access the native libraries and sources, add something like this to the dependencies section of your pom:

<dependency>
    <groupId>com.tagtraum.ffmpeg</groupId>
    <artifactId>libavformat</artifactId>
    <version>55.33.100</version>
    <type>a</type>
    <classifier>i386-darwin</classifier>
    <!-- <classifier>x86_64-mingw</classifier> -->
</dependency>

<dependency>
    <groupId>com.tagtraum.ffmpeg</groupId>
    <artifactId>libavcodec</artifactId>
    <version>55.52.102</version>
    <type>a</type>
    <classifier>i386-darwin</classifier>
    <!-- <classifier>x86_64-mingw</classifier> -->
</dependency>

<dependency>
    <groupId>com.tagtraum.ffmpeg</groupId>
    <artifactId>libavutil</artifactId>
    <version>52.66.100</version>
    <type>a</type>
    <classifier>i386-darwin</classifier>
    <!-- <classifier>x86_64-mingw</classifier> -->
</dependency>

<dependency>
    <groupId>com.tagtraum.ffmpeg</groupId>
    <artifactId>libswresample</artifactId>
    <version>0.18.100</version>
    <type>a</type>
    <classifier>i386-darwin</classifier>
    <!-- <classifier>x86_64-mingw</classifier> -->
</dependency>

<dependency>
    <groupId>com.tagtraum.ffmpeg</groupId>
    <artifactId>libz</artifactId>
    <version>1.2.11</version>
    <type>a</type>
    <classifier>i386-darwin</classifier>
    <!-- <classifier>x86_64-mingw</classifier> -->
</dependency>

<dependency>
    <groupId>com.tagtraum.ffmpeg</groupId>
    <artifactId>libbz2</artifactId>
    <version>1.0.6</version>
    <type>a</type>
    <classifier>i386-darwin</classifier>
    <!-- <classifier>x86_64-mingw</classifier> -->
</dependency>

<!-- To access the FFmpeg sources/headers the binaries were built from... -->
<dependency>
    <groupId>com.tagtraum.ffmpeg</groupId>
    <artifactId>ffmpeg</artifactId>
    <version>3.3.1</version>
    <classifier>sources-i386-darwin</classifier>
    <!-- <classifier>x86_64-mingw</classifier> -->
    <type>jar</type>
</dependency>

Note that the classifier always consists of the architecture (i386/x86_64) and the host platform (mingw/darwin). MinGW stands for Windows, because it is built using the crosscompiler MinWG-w64.

As type you may choose a for static libraries, and dylib or dll for dynamic libraries. For bzip2 dynamic libraries are not built.

If Maven can't resolve this dependency, you might also want to add the following repository to the repositories section of your pom:

<repository>
    <id>beatunes</id>
    <name>beaTunes Repository</name>
    <url>https://www.beatunes.com/repo/maven2</url>
</repository>

Requirements

Both 32 bit and 64 bit are supported on Windows and OS X.

License

LGPL 2.1

FFmpeg Sources

You can find the FFmpeg sources used for this package here.

Configuration

FFmpeg was built with the following configuration:

./configure --enable-small --enable-shared --enable-static --disable-programs --disable-doc --disable-avfilter --disable-postproc --disable-swscale --disable-avdevice --disable-filters --disable-decoder=h26*,msmpeg*,mpeg2*,mpeg4*,mpeg_vdpau,mpeg_xvmc,mpegvideo,mp1,mp1*,mp2,mp2*,mp3,mp3* --disable-demuxer=h26*,mp3 --disable-encoders --enable-encoder=pcm* --disable-muxers --disable-indevs --disable-outdevs --disable-iconv

To build with a different configuration, please take a look at the developer page.