[FFmpeg-user] Building FFMPEG and enabling x265

Clément Bœsch u at pkh.me
Thu Apr 16 08:42:54 CEST 2015


On Wed, Apr 15, 2015 at 03:49:28PM +0200, Werner Robitza wrote:
> On Wed, Apr 15, 2015 at 2:17 PM, Clément Bœsch <u at pkh.me> wrote:
> > On Tue, Apr 14, 2015 at 03:41:49PM +0200, Alexander Martin Dethof wrote:
> > Do that for x265 (or find the equivalent) and use make install (no root
> > needed, you have write perm in $HOME/ffmpeg_build). This will deploy a .pc
> > file with all the other pc files available in
> > $HOME/ffmpeg_build/lib/pkgconfig as well as deploying the libs in the
> > parent directory of it.
> >
> > Everything else should then work as expected.
> 
> I tried this:
> 
> cd ~/ffmpeg_sources
> hg clone https://bitbucket.org/multicoreware/x265
> cd x265
> cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/ffmpeg_build source
> make
> make install
> 
> This puts the libraries in ~/ffmpeg_build/lib/:
> 
> ├── libavcodec.a
> ├── libavdevice.a
> ├── libavfilter.a
> ├── libavformat.a
> ├── libavutil.a
> ├── libfdk-aac.a
> ├── libfdk-aac.la
> ├── libopus.a
> ├── libopus.la
> ├── libpostproc.a
> ├── libswresample.a
> ├── libswscale.a
> ├── libvpx.a
> ├── libx265.a
> ├── libx265.so -> libx265.so.56
> ├── libx265.so.56
> ├── libyasm.a
> └── pkgconfig
>     ├── fdk-aac.pc
>     ├── libavcodec.pc
>     ├── libavdevice.pc
>     ├── libavfilter.pc
>     ├── libavformat.pc
>     ├── libavutil.pc
>     ├── libpostproc.pc
>     ├── libswresample.pc
>     ├── libswscale.pc
>     ├── opus.pc
>     ├── vpx.pc
>     └── x265.pc
> 
> Then I tried re-configuring ffmpeg with:
> 
> PATH="$HOME/bin:$PATH"
> PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
>   --prefix="$HOME/ffmpeg_build" \
>   --extra-cflags="-I$HOME/ffmpeg_build/include" \
>   --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
>   --bindir="$HOME/bin" \
>   --enable-gpl \
>   --enable-libass \
>   --enable-libfdk-aac \
>   --enable-libfreetype \
>   --enable-libmp3lame \
>   --enable-libopus \
>   --enable-libtheora \
>   --enable-libvorbis \
>   --enable-libvpx \
>   --enable-libx264 \
>   --enable-libx265 \
>   --enable-nonfree
> 
> ... and compiling it, but no dice:
> 
> $ ffmpeg
> ffmpeg: error while loading shared libraries: libx265.so.56: cannot
> open shared object file: No such file or directory

You may have notice that all the other libs are built static (.a), do that
as well for x265 for consistency (and to make it works). And make sure the
.so is not available anymore.

The other solution is to play with LD_LIBRARY_PATH or similar at runtime
so ld can find the dynamic library you linked against.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20150416/ecb0f27f/attachment.asc>


More information about the ffmpeg-user mailing list