Linux/CentOS安装ZLMediaKit流媒体服务
文章目录
一、centos linux下安装ffmpeg
1、下载解压
wget http://www.ffmpeg.org/releases/ffmpeg-3.1.tar.gz
tar -zxvf ffmpeg-3.1.tar.gz2、 进入解压后目录,输入如下命令/usr/local/ffmpeg为自己指定的安装目录
cd ffmpeg-3.1
./configure --prefix=/usr/local/ffmpeg
make && make install3、配置变量vi /etc/profile
在最后PATH添加环境变量:export PATH=$PATH:/usr/local/ffmpeg/bin
保存退出
查看是否生效source /ect/profile 或者 . /etc/profile 设置生效
4、查看版本ffmpeg -version 查看版本
注意:
若安装过程中出现以下错误:
yasm/nasm not found or too old. Use –disable-yasm for a crippled build.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file “config.log” produced by configure as this will help
solve the problem.需要安装 yasm
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar -zxvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make && make installsudo yum -y install gcc
sudo yum -y install gcc-c++
gcc -vsudo apt-get install cmake
cmake -version
或者
wget https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz
tar -zxvf cmake-3.7.2.tar.gz
cd cmake-3.7.2/
./bootstrap //此步可能遇到问题,见下文
gmake //此步需要很长时间
gmake installyum install openssl-devel
yum install SDL-devel#国内用户推荐从同步镜像网站gitee下载
git clone --depth 1 https://gitee.com/xia-chu/ZLMediaKit
cd ZLMediaKit
#千万不要忘记执行这句命令
git submodule update --initcd ZLMediaKit
mkdir build
cd build
#macOS下可能需要这样指定openss路径:cmake .. -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2j/
cmake ..
make -j4参考:
https://github.com/xia-chu/ZL...
https://www.cnblogs.com/zt199...
https://blog.csdn.net/jklinux...

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论