[Libav-user] statically linking x264 and x265 into ffmpeg

Carl Eugen Hoyos ceffmpeg at gmail.com
Tue Sep 6 14:08:26 EEST 2016


Hi!

2016-09-06 12:55 GMT+02:00 Peter Steinbach <steinbach at scionics.de>:
> On 09/06/2016 12:00 PM, Carl Eugen Hoyos wrote:

>> An alternative is using "/path/to/lib.a" on
>> the linking line instead of "-L/path/to -llib".
>
> Alright, I'll look into doing that. So you mean that I should add
> ```
> --extra-libs="-L/path/to/static/libx264a -lx264"
> ```
> right?

No.
Instead of using "-L/path/to -llib" use "/path/to/lib.a".

[...]

>> Just curious: Does --enable-pic really have an effect?
>
> AFAIK, yes. PIC is propagated to the compiler calls, PIC is
> then generated and I can bundle the library as I wish to.
>
>> Which platform is this?
>
> I am working on fc23 right now. the static libs coming with
> fedora all have -fPIE enabled (if I understood the docs
> correctly), which doesn't help me at all.

I suggest you test this independently, I would expect that
your binaries will not pass the "test" even with --enable-pic:
You may have to use --disable-asm (which of course makes
your resulting binaries nearly unusable), the same is likely
true for x264 (where the effect is probably even worse).

Carl Eugen


More information about the Libav-user mailing list