FFmpeg and x264 circular dependency

Tom Evans tevans.uk at googlemail.com
Wed Mar 5 12:24:07 UTC 2014

On Wed, Mar 5, 2014 at 10:42 AM, Andrew Berg
<aberg010 at my.hennepintech.edu> wrote:
> On 2014.03.05 04:24, Tom Evans wrote:
>> No, not really. If the user chooses options in libx264 that require
>> ffmpeg, then the port will download and build ffmpeg as part of the
>> libx264 port, providing the libraries that libx264 needs, but not
>> installing these as ffmpeg.
> I'm completely lost here; it's the x264 CLI utility that loads the libav libraries, not libx264.

When I say "libx264", I was meaning to refer the port/package
"libx264" which contains the library and the binary - and is actually
called "x264", so I see your confusion :)

>> The other option is just to disable the GPAC option of x264 - if you
>> need mp4 output, use ffmpeg. The whole thing is kind of hacky anyway,
>> the common way to use a library with ffmpeg is to build ffmpeg and
>> enable support for the library, not build the library and link ffmpeg
>> to it.
> This is not for GPAC support (which works just fine without ffmpeg anyway). This is for demuxing and decoding input video using lavf and
> lavc (instead of requiring raw video as input).

I thought that was what OPTION_GPAC did - its description is "Enable
MPEG-4 Output".

Now I'm totally confused - where and how does x264 currently pull in ffmpeg?

Oh I see - it is a heisen-feature, if you build x264 with ffmpeg
installed you get one behaviour, if you build without you get another

Looking at x264's configure script, it has options to either build
libx264 internally or use the system libx264, and an option to disable
lavf support, so I suggest:

1) add a libx264 port that just builds libx264
2) update x264 to have libx264 port as dependency, and use the system
libx264 to build against
3) add option to x264 port to enable lavf support, with the Makefile
explicitly disabling it otherwise. Enabling it would add ffmpeg as a



More information about the freebsd-multimedia mailing list