【流媒体服务器的搭建】1. 源码编译安装x264
生活随笔
收集整理的這篇文章主要介紹了
【流媒体服务器的搭建】1. 源码编译安装x264
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
前言
- centos 7
- ffmpeg 編譯時,打開H264功能時,必須已安裝H264。否則遇錯:ERROR: libx264 not found
源碼
官網(wǎng)GIT: https://code.videolan.org/videolan/x264
GITEE鏡像: https://gitee.com/mirrors/x264.git
源碼編譯安裝x264
shell> cd /opt # 下載源碼 shell> git clone https://gitee.com/mirrors/x264.git x264-source shell> cd x264-source # 配置 shell> ./configure --disable-asm --enable-shared --enable-static # 編譯 + 安裝 shell> make && make install驗證x264是否安裝成功
libx264.so默認安裝到/usr/local/lib目錄。
shell> ll /usr/local/lib | grep x264 -rw-r--r-- 1 root root 2246948 9月 17 17:47 libx264.a lrwxrwxrwx 1 root root 14 9月 17 17:47 libx264.so -> libx264.so.164 -rwxr-xr-x 1 root root 1829296 9月 17 17:47 libx264.so.164錯誤:error while loading shared libraries: libx264.so.2: cannot open shared object file: No such file or directory
將lib目錄加入到共享庫配置文件/etc/ld.so.conf中。
shell> echo "/usr/local/lib" >> /etc/ld.so.conf shell> ldconfig總結
以上是生活随笔為你收集整理的【流媒体服务器的搭建】1. 源码编译安装x264的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 人中白的功效与作用、禁忌和食用方法
- 下一篇: 亲和数(220/284)