编译企业视频通话EasyRTC报You must install libavformat错误解决方案

很多集团化的公司由于在不同城市甚至不同国家有很多分站点,因此远程会议和办公对这些企业来说是十分必要的,EasyRTC恰好适应了这些需求,成为远程会议和通话的不二之选。

RTC.png

我们的研发人员会编译不同版本的EasyRTC,以求该产品能够适应不同的场景需求。近期,我们在编译EasyRTC-Freeswitch时,出现You must install libavformat-dev to build mod_av. Stop.错误,关于这个错误一开始我也不知道原因,后来经过查询(真是给百度跪了),才发现是freeswitch的原因。

编译freeswitch mod_av 模块的时候,需要libavformat库支持。默认freeswitch是不支持libavformat的,需要下载第三方库libav进行编译,下面就是编译的过程,大家可以参考一下:

libav 编译

1)下载libav

http://libav.org/download/

2)编译libav,需要支持H264先编译H264

3)下载及编译安装x264,安装到/usr下

./configure--enable-static --disable-shared --prefix=/usr

4)将x264.pc 拷贝到/usr/lib64/pkgconfig目录下,将libx264.so拷贝到/usr/lib64下

5)编译libav

./configure --prefix=/usr/local --enable-shared --enable-libx264 --enable-gpl
 --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib64

6)ldconfig 刷新系统库信息

7)配置PKG_CONFIG_PATH变量。配置libav生成的pc文件路径。是/usr/local/lib/pkgconfig下

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

EasyRTC会议直播观看.png

猜你喜欢

转载自blog.csdn.net/TsingSee/article/details/106467970