分享

x265 not found using pkg-config

 馒头的人生 2018-03-21
转自:
https:///multicoreware/x265/issues/125/x265-not-found-using-pkg-config

getting "x265 not found using pkg-config" error when enable libx265 with ffmpeg.

i have successfully compile libx265 in ffmpeg , but getting this error .

kindly help me please

    Try this:

    cd ~/ffmpeg_sources
    hg clone https:///multicoreware/x265
    cd ~/ffmpeg_sources/x265/build/linux
    PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
    make
    make install
    

    Then, for ffmpeg itself (assuming you have all the other libs installed according to the guide):

    cd ~/ffmpeg_sources/ffmpeg
    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"   --pkg-config-flags="--static"   --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
    

    Then

    PATH="$HOME/bin:$PATH" make
    make install
    

    Worked for me on Linux Mint 17. Say thank you to Lou from FFmpeg for figuring this out.

    The -DENABLE_SHARED:bool=off part in particular is something that may be useful to mention on the x265 wiki.



 以下命令适用 打包 dockerfile
 同适用centos7 下编译, 只需要 去除 RUN 等相关命令
RUN tar -zxf /root/FFmpeg/x265_1.9.tar.gz -C /root/FFmpeg \
    && cd /root/FFmpeg/x265_1.9/build/linux/ \
    && PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="/usr/local" -DENABLE_SHARED:bool=off ../../source \
    && make \
    #&& ./make-Makefiles.bash \
    #&& make
    && make install && rm -rf /root/FFmpeg/x265_1.9


RUN tar -xjf /root/FFmpeg/ffmpeg-3.4.2.tar.bz2 -C /root/FFmpeg \
    && cd /root/FFmpeg/ffmpeg-3.4.2 \
    && PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" ./configure \
       --prefix="/usr/local" \
       --extra-cflags="-I/usr/local/include" \
       --extra-ldflags="-L/usr/local/lib" \
       --bindir="/usr/local/bin" \
       --pkg-config-flags="--static" \
       --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 \
       --disable-debug  \
    && PATH="$HOME/bin:$PATH" make && make install && rm -rf /root/FFmpeg/ffmpeg-3.4.2

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多