[FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

Moritz Barsnick barsnick at gmx.net
Tue Aug 5 16:15:18 CEST 2014


On Tue, Aug 05, 2014 at 13:07:36 +0000, Carl Eugen Hoyos wrote:
> Do I understand correctly that you built a binary of x264 
> that has an incorrect so name? Is it perhaps sufficient to 
> rename the library?

If the Android toolchain behaves like a normal Linux/Unix toolchain,
the (ffmpeg) linking process picks up the soname from the SONAME field
_within_ the dynamic library, not from the filename. (Perhaps from the
filename if said field does not exist.)

In the linking stage of the x264 _library_, you can give the linker a
flag to determine the soname:

http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html

So you may need to build your libx264.so.142, remove this file, run
"make -n" to identify the final linking command line, and modify this
command line with the corresponding ld flag.

Check with:
$ objdump -p libx264.so | grep SONAME

You may be able to do binary patching to change this name. The tool
patchelf is capable ob binary ELF patching, but unfortunately doesn't
handle this field.

Moritz


More information about the ffmpeg-user mailing list