挑战一个人搭建一套完整直播系统2:ffmpeg安装

1.修改安装源:

sudo vim /etc/apt/sources.list

改为

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

更新

apt upgrade 

2.安装必要库

apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libMP3lame-dev libsdl1.2-dev libtheora-dev libx11-dev zlib1g-dev

3.安装SDL

apt-get install libsdl1.2-dev
apt-get install libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev

4.安装YASM

git clone git://github.com/yasm/yasm.git
cd yasm-1.2.0
./configure
make
make install

5.安装x264

1)首先安装nasm

wget https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.gz
tar -zxvf nasm-2.13.03.tar.gz
cd nasm-2.13.03
./configure
make
make install

2)安装x264

git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --enable-static --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
make
make install

6.安装FFMpeg 

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-static --enable-gpl --enable-libx264 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
make 
make install

正常情况下,可以成功安装了。

  • 5
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值