VoIP应用在Ubuntu 14.04下编译FFmpeg libX264及PJSIP
时间: 2024-06-08 09:05:21 浏览: 164
Ubuntu14.04交叉编译编译 ffmpeg3.4.1 脚本
3星 · 编辑精心推荐
编译FFmpeg:
1.安装依赖库:
sudo apt-get update
sudo apt-get install build-essential git-core checkinstall yasm texi2html libvorbis-dev libx11-dev libxfixes-dev zlib1g-dev pkg-config netcat libncurses5-dev libncursesw5-dev libsdl-image1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvpx-dev libxext-dev libxfixes-dev libxl2tpd-dev libxrandr-dev libxrender-dev libxvidcore-dev libssl-dev libsoxr-dev libopus-dev
2.下载FFmpeg源代码:
git clone https://github.com/FFmpeg/FFmpeg.git
3.编译FFmpeg:
cd FFmpeg
./configure --prefix=/usr/local --enable-shared --enable-gpl --enable-libx264 --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-version3 --enable-nonfree --disable-stripping
make -j4
sudo checkinstall
编译libx264:
1.下载libx264源代码:
git clone https://code.videolan.org/videolan/x264.git
2.编译libx264:
cd x264
./configure --prefix=/usr/local --enable-shared
make -j4
sudo checkinstall
编译PJSIP:
1.下载PJSIP源代码:
svn checkout http://svn.pjsip.org/repos/pjproject/trunk pjproject
2.编译PJSIP:
cd pjproject
./configure --prefix=/usr/local --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr
make dep
make -j4
sudo checkinstall
注意:在编译PJSIP时,如果遇到错误提示找不到libssl-dev和libsoxr-dev库,可以使用以下命令安装:
sudo apt-get install libssl-dev libsoxr-dev
编译完成后,即可使用VoIP应用程序了。
阅读全文