网站设计步骤,淘宝购物平台,诸城高密网站建设,网站设计制作哪种快如何在Ubuntu 20.04|18.04上安装FreeSwitch 什么是 FreeSwitch PBX#xff1f;FreeSwitch PBX 系统有哪些功能#xff1f;开始部署部署前准备开始安装freeswitch 安装完成错误及问题FAQ常见配置文件及说明修改默认端口#xff1a;防火墙配置账号密码配置/添加新用户freeswit… 如何在Ubuntu 20.04|18.04上安装FreeSwitch 什么是 FreeSwitch PBXFreeSwitch PBX 系统有哪些功能开始部署部署前准备开始安装freeswitch 安装完成错误及问题FAQ常见配置文件及说明修改默认端口防火墙配置账号密码配置/添加新用户freeswitch后台基础操作指令VoIP客户端工具推荐 freeswitch官方文档https://freeswitch.org/confluence/http://ffmpeg.org/releases/ PBX 是 Private Branch Exchange 的缩写。它是在组织内部使用的专用电话系统并根据特定组织的需求进行定制。组织中的 PBX 用户可以在内部进行内部通信也可以与外界进行外部通信。VoIPIP 语音、ISDN综合业务数字网络或模拟等渠道促进了外部通信。
使用 PBX 电话系统的优点是您可以获得比物理线路更多的电话、用户之间的免费通话以及呼叫队列、数字接线员、呼叫转移、语音邮件和呼叫录音等大量功能。PBX 电话系统的一些示例包括 FreeSwitch、3cx、Elastix、FreePBX 和 Asterisk。
在本指南中我们将了解如何在 Ubuntu 20.04/18.04 上安装 FreeSwitch PBX
什么是 FreeSwitch PBX
FreeSwitch 是一个免费的开源通信平台。它支持实时通信、视频以及 IP 语音和WebRTC。它可以在 Windows、MacOS、Linux 和 FreeBSD 上运行。它用于构建具有聊天和屏幕共享的网络会议、IVR、会话边界控制器、批发最低成本路由等功能的 PBX 系统。
FreeSwitch PBX 系统有哪些功能
可在 Windows、Linux 和 FreeBSD 上运行语音应答接口WebRTC 支持通话录音立体声呼叫者/被呼叫者左/右高性能多线程核心引擎平行狩猎连环狩猎自动服务员基本 IP/PBX 功能自定义回铃音早期媒体
开始部署
freeswitch1.10.7/freeswitch1.10.8安装情况应该与freeswitch1.10.9相同
部署前准备
sudo apt-get install libavformat-dev
sudo apt-get install libswscale-dev
sudo apt-get install libpq-dev在 Ubuntu 20.04/18.04 上安装 FreeSwitch PBX 首先更新你的系统包
sudo apt -y update
sudo apt -y upgrade接下来安装在 Ubuntu 20.04/18.04 上运行 FreeSwitch PBX 所需的依赖项
sudo apt install -y git subversion build-essential autoconf automake libtool g pkg-configlibtiff-dev libncurses5 libncurses5-dev make libjpeg-dev libtool libtool-binlibsqlite3-dev libpcre3-dev libspeexdsp-dev libldns-dev libedit-devyasm uuid uuid-dev liblua5.2-dev libopus-dev cmake以下软件包是可选的但我们可以安装它们。
sudo apt install -y libcurl4-nss-dev libcurl4-openssl-dev libexpat1-dev
libgnutls28-dev libtiff5-dev libx11-dev unixodbc-dev libssl-dev python-dev
zlib1g-dev libasound2-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev uuid-dev libsndfile1-dev下载源代码 freeswitch1.10.4及之后的版本freeswitch官方将spandsp 和 sofia-sip单拎出来了需要单独拉代码编译如果是编译1.10.4之前的freeswitch如freeswitch1.10.2版本不必单独拉spandsp和sofia-sip的代码直接编译freeswitch即可
重大改动历史
https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Release-Notes/FreeSWITCH-1.10.x-Release-notes_25460878///可直接在上述链接中下载freeswitch的tar包
1.8 - 1.10.0: pgqsql moved out from FreeSWITCH core to its own module, mod_pgsql .
See 1.10.0 (Release date: 05 August 2019) at the bottom.
1.10.3 - 1.10.4: SpanDSP and sofia-sip have been removed.
See 1.10.4 (Release date: 05 Aug 2020) below.
1.10.6 - 1.10.7: Default behaviour change: to not skip announcement type apps on recovery,
not hangup call on SRTP errors, 1000 maximum receiving requests per second, auth-messagesand auth-subscriptions are enabled by default now, freeswitch.log log line prefix modified: will affect fail2ban log line matching until similarly modified in fail2ban (https://github.com/fail2ban/fail2ban/issues/3143).
See 1.10.7 (Release date: 24 Oct 2021) below.安装spandsp、sofia-sip、libks和signalwire
// 安装spandsp
# git clone https://github.com/freeswitch/spandsp.git
# cd spandsp
# ./bootstrap.sh -j
# ./configure
# make
# sudo make install
# ldconfig// 安装sofia-sip
no usable sofia-sip; please install sofia-sip-ua devel package or equivalent
# git clone https://github.com/freeswitch/sofia-sip.git
#cd sofia-sip
# ./bootstrap.sh -j
# ./configure
# make
# make install0
# ldconfigsudo apt install -y cmake
cd /usr/src
sudo git clone https://github.com/signalwire/libks.git
cd libks
sudo cmake .
sudo make
sudo make installcd /usr/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c
sudo cmake .
sudo make
sudo make install编译freeswitch前将不必要的模块编译禁用掉如果不禁用则需要安装对应的依赖否则会报错
cd /usr/local/src/freeswitch
vim module.conf//将mod_signalwire和mod_av内容注释掉#applications/mod_signalwire
#applications/mod_av//mod_verto不禁用可能会编译报错You need to either install libks or disable mod_verto in modules.conf
#endpoints/mod_verto 开始安装freeswitch
接下来使用 wget从 freeswitch发布页面 获取最新的 FreeSwitch 版本
cd /usr/src
sudo wget https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.3.-release.zip
sudo apt -y install unzip
sudo unzip freeswitch-1.10.3.-release.zip
cd freeswitch-1.10.3.-release/请注意 如果您尚未安装 unzip请通过运行 apt -y install unzip安装它
sudo apt -y install unzip现在运行标准安装过程
//编译freeswitch
cd /usr/local/src/freeswitch
./bootstrap.sh //如果是GitHub拉的代码有这一步如果是下载tar包解压的没有这一步
./configure --enable-portable-binary --prefix/usr/local/freeswitch--with-gnu-ld --with-python --with-openssl--enable-core-odbc-support --enable-zrtp
make如果在编译过程中遇到错误您可以注释掉任何引发错误的模块或安装缺少的依赖项。就我而言我最初注释掉了 languages/mod_lua 和 applications/mod_signalwire 但您可以根据收到的错误注释更多内容。之后重新启动编译如下所示
sudo ./configure sudo make clean sudo make如果编译成功 接下来安装 freeswitch
sudo make install现在编译声音
sudo make all cd-sounds-install cd-moh-install安装完成
创建 simlink 以轻松使用服务。
sudo ln -s /usr/local/freeswitch/bin/freeswitch /usr/bin/
sudo ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin添加具有较低权限的新组和用户来运行 FreeSWITCH 服务。
cd /usr/local
sudo groupadd freeswitch
sudo adduser --disabled-password --quiet --system--home /usr/local/freeswitch --gecos FreeSWITCH Voice Platform --ingroup freeswitch freeswitch
sudo chown -R freeswitch:freeswitch /usr/local/freeswitch/
sudo chmod -R ugrwX,o /usr/local/freeswitch/
sudo chmod -R urwx,grx /usr/local/freeswitch/bin/我们需要将 FreeSwitch 添加为 systemd 单元文件。使用您喜欢的编辑器打开新文件 /etc/systemd/system/freeswitch.service并 粘贴以下内容
sudo vim /etc/systemd/system/freeswitch.service粘贴以下内容
[Unit]
Descriptionfreeswitch
Wantsnetwork-online.target
Requiressyslog.socket network.target local-fs.target
Aftersyslog.socket network.target network-online.target local-fs.target[Service]
Typeforking
EnvironmentDAEMON_OPTS-nonat
EnvironmentFile-/etc/default/freeswitch
ExecStartPre/bin/chown -R freeswitch:freeswitch /usr/local/freeswitch
ExecStart/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait $DAEMON_OPTS
TimeoutSec45s
Restartalways
RestartSec90
StartLimitInterval0
StartLimitBurst6Userroot
Groupdaemon
LimitCOREinfinity
LimitNOFILE100000
LimitNPROC60000
LimitSTACK250000
LimitRTPRIOinfinity
LimitRTTIMEinfinity
IOSchedulingClassrealtime
IOSchedulingPriority2
CPUSchedulingPolicyrr
CPUSchedulingPriority89
UMask0007
NoNewPrivilegesfalse[Install]
WantedBymulti-user.target启动 FreeSwitch 服务并在启动时启用它
sudo chmod ugox freeswitch.service
sudo systemctl start freeswitch.service
sudo systemctl enable freeswitch.service现在检查 FreeSWITCH 服务的状态
sudo systemctl status freeswitch.service如果 freeswitch 已正确安装并运行输出应如下所示 现在您可以使用客户端连接到 FreeSWITCH如下所示
# fs_cli -r您将看到如下输出
错误及问题FAQ
一般是软件或库找不到有三种解决方法
使用apt install安装从github或gitee上下载源码进行编译安装freeswitch可以通过编辑module.conf文件禁用相关模块
安装过程中遇到的问题及解决方法
build-requirements: autoconf not found. 解决方法: sudo apt install autoconfbuild-requirements: libtool not found. 解决方法: sudo apt install libtool-bin缺少spandsp
# git clone https://github.com/freeswitch/spandsp.git
# cd spandsp
# ./bootstrap.sh -j
# ./configure
# make
# make install
# ldconfig缺少sofia-sip no usable sofia-sip; please install sofia-sip-ua devel package or equivalent
# git clone https://github.com/freeswitch/sofia-sip.git
#cd sofia-sip
# ./bootstrap.sh -j
# ./configure
# make
# make install
# ldconfigfatal error: openssl/ssl.h: No such file or directory 解决方法: sudo apt install libssl-dev Package sqlite3 was not found 解决方法: sudo apt install libsqlite3-dev sudo apt install sqlite3 libcurl was not found 解决方法: sudo apt install libcurl4-nss-dev Package libpcre was not found 解决方法: sudo apt install libpcre3-dev Package speex was not found sudo apt install libspeexdsp-dev You need to either install libldns-dev or disable mod_enum in modules.conf 解决方法: sudo apt install libldns-dev You need to either install libks or disable mod_verto in modules.conf 方法一下载安装 https://github.com/signalwire/libks.git 方法二1 禁用 mod_verto1 sudo vim modules.conf #endpoints/mod_vertoerror: You need to either install libedit-dev 解决方法: sudo apt install libedit-dev 缺少yasm 解决方法: sudo apt install yasm You need to either install signalwire-client-c 方法一下载编译安装 https://github.com/signalwire/signalwire-c.git 方法二 注释掉modules.conf中的signalwire模块 编译错误 ./include/apr_general.h:33:14: error: ‘__DARWIN_NSIG’ undeclared here (not in a function) 33 | #define NSIG __DARWIN_NSIG 注 没找到原因发现没有代码使用该定直接将该行定义注释掉 接口过期编译错误 错误1
In file included from src/switch_apr.c:79:
/usr/include/openssl/md5.h:49:27: note: declared here49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);| ^~~~~~~~
src/switch_apr.c:1177:9: warning: ‘MD5_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]1177 | MD5_Update(md5_context, input, inputLen);解决方法关闭接口过期警告sudo vim MakefileCFLAGS -g -O2 -Wno-errordeprecated-declarations错误2
skinny_protocol.c:685:65: error: array subscript ‘skinny_message_t {aka struct skinny_message}[0]’ is partly outside array bounds of ‘unsigned char[292]’ [-Werrorarray-bounds]
CFLAGS -g -O2 -Wno-errordeprecated-declarations -Wno-errorarray-bounds解决方法关闭相应告警
sudo vim MakefileCFLAGS -g -O2 -Wno-errorarray-bounds没有libavformat-dev and libswscale-dev Makefile:1481: *** You must install libavformat-dev and libswscale-dev to build mod_av. Stop. 解决方法:
sudo apt install libavformat-dev
sudo apt install libswscale-dev注 如果编译时还提示找不到需要重新执行sudo ./configure 缺少libtiff configure: error: Cannot build without libtiff (does your system require a libtiff-devel package?) 解决方法sudo apt install libtiff-dev 缺少uuid src/switch_apr.c:81:10: fatal error: uuid/uuid.h: No such file or directory 解决方法sudo apt install uuid 如果依旧找不到查看 一下uuid.h文件的位置 在笔者环境中如下
$ ls /usr/include/linux/uuid.h
/usr/include/linux/uuid.h可以看出uuid.h在linux目录下只要相应的创建/usr/lnclude/uuid目录并将linux/uuid.h拷贝过去可以了
找不到uuid_xx函数
/usr/bin/ld: ./.libs/libfreeswitch.so: undefined reference to uuid_parse
/usr/bin/ld: ./.libs/libfreeswitch.so: undefined reference to uuid_unparse_lower
/usr/bin/ld: ./.libs/libfreeswitch.so: undefined reference to uuid_generate解决方法sudo apt install uuid-dev
报了spandsp相关内容编译的错误error: ‘V18_MODE_5BIT_4545’ undeclared
making all mod_spandsp
make[4]: Entering directory /usr/local/src/freeswitch-1.10.9.-release/src/mod/applications/mod_spandspCC mod_spandsp_la-mod_spandsp.loCC mod_spandsp_la-udptl.loCC mod_spandsp_la-mod_spandsp_fax.loCC mod_spandsp_la-mod_spandsp_dsp.lo
mod_spandsp_dsp.c: In function ‘get_v18_mode’:
mod_spandsp_dsp.c:159:10: error: ‘V18_MODE_5BIT_4545’ undeclared (first use in this function)int r V18_MODE_5BIT_4545;^
mod_spandsp_dsp.c:159:10: note: each undeclared identifier is reported only once for each function it appears in
mod_spandsp_dsp.c:165:8: error: ‘V18_MODE_5BIT_50’ undeclared (first use in this function)r V18_MODE_5BIT_50;^
mod_spandsp_dsp.c: In function ‘spandsp_tdd_send_session’:
mod_spandsp_dsp.c:216:2: error: too few arguments to function ‘v18_init’tdd_state v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);^
In file included from /usr/local/include/spandsp.h:111:0,from mod_spandsp.h:50,from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared hereSPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,^
mod_spandsp_dsp.c: In function ‘spandsp_tdd_encode_session’:
mod_spandsp_dsp.c:263:2: error: too few arguments to function ‘v18_init’pvt-tdd_state v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);^
In file included from /usr/local/include/spandsp.h:111:0,from mod_spandsp.h:50,from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared hereSPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,^
mod_spandsp_dsp.c: In function ‘spandsp_tdd_decode_session’:
mod_spandsp_dsp.c:341:2: error: too few arguments to function ‘v18_init’pvt-tdd_state v18_init(NULL, FALSE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, pvt);^
In file included from /usr/local/include/spandsp.h:111:0,from mod_spandsp.h:50,from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared hereSPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,^
make[4]: *** [mod_spandsp_la-mod_spandsp_dsp.lo] Error 1
make[4]: Leaving directory /usr/local/src/freeswitch-1.10.9.-release/src/mod/applications/mod_spandsp
make[3]: *** [mod_spandsp-all] Error 1
make[3]: Leaving directory /usr/local/src/freeswitch-1.10.9.-release/src/mod
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /usr/local/src/freeswitch-1.10.9.-release/src
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory /usr/local/src/freeswitch-1.10.9.-release
make: *** [all] Error 2
[rootmaomaosPC freeswitch-1.10.9.-release]#
将源代码放到Source Insight工程中搜索相关关键词检查发现是spandsp中的内容导致的编译错误freeswitch相关部分的代码和spandsp模块代码不匹配去GitHub上查看提交记录刚好是23年6月底提交的离我编译就隔了几天的时间真是个倒霉蛋哦。言归正传这时候考虑回退spandsp的代码到之前代码匹配的版本然后重新编译就可以编译成功。 具体步骤
//先切到对应目录下删除相关内容
cd /usr/local/src/freeswitch
rm -rf spandsp
//重新拉取代码
git clone https://github.com/freeswitch/spandsp.git
//spandsp目录下执行git log或者gitlab上查看对应commit id并切换
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4
//按照之前的步骤重新编译安装//在Github上反馈了这个问题后 维护人员2023/07/19回复
mod_spandsp uses the defines you change, e.g. V18_MODE_5BIT_4545 from v18.h,
so it is broken now as it hasnt been updated. It needs to be updated with new defines.常见配置文件及说明
文件说明vars.xml一些常用变量dialplan/default.xml缺省的拨号计划directory/default/*.xmlSIP用户每用户一个文件sip_profiles/internal.xml一个SIPsip_profiles/externa.xml另一个SIP-UA用作外部连接端口5080autoload_configs/modules.conf.xml配置当FreeSWITCH启动时自动装载哪些模块
修改默认端口
cd /usr/local/freeswitch/conf
#freeswitch1.10.9在/usr/local/freeswitch/etc/freeswitch目录下
#找到vars.xml修改可以copy一份存为vars.xml.bak备份
#修改默认端口
#X-PRE-PROCESS cmdset datainternal_sip_port5060/
#5060默认为freswitch 的sip信令内部端口防火墙配置
1、在var.xml中修改
!--X-PRE-PROCESS cmdstun-set dataexternal_rtp_ipstun:stun.freeswitch.org/--
这里没有使用stun功能而是直接把公网ip填在这里X-PRE-PROCESS cmdstun-set dataexternal_rtp_ip阿里云分配的公网ip/
freeswitch1.10.9好像如果是默认的端口不用配置这个也能正常使用修改xml文件后无法访问需要设置stun再reloadxml在var.xml中修改了之后就无需在conf/sip_profiles/internal.xml 和 external.xml中修改了
网上有很多例子都是直接在这两个文件改其实不用var中改好了之后这两个文件直接引用external_rtp_ip这个变量即可。防火墙配置完成后应该就可以了使用设备注册上服务器拨打下回音电话9196试试能不能听到回音。
FreeSwitch常用默认号码:
号码说明9664保持音乐9191注册CluCon9192调用info在log中显示Channel信息9195echo, 回音测试延迟5秒9196echo回音测试9197milliwatte extention, 铃音生成9198TGML铃音生成示例9180铃音测试使用远端生成的回铃音9181铃音测试产生英式铃音9182铃音测试使用音乐当铃音彩铃9183先应答然后发送英式铃音9184先应答然后发送音乐铃音9178收传真9179发传真5000IVR实例4000听取主意信箱33xx电话会议48Hz其中xx为00~99下同32xx电话会议32Hz其中xx为00~99下同31xx电话会议16Hz其中xx为00~99下同30xx电话会议8Hz其中xx为00~99下同2000-2002呼叫组1000-1019默认分机号码(默认密码1234)
FreeSwitch默认号码大部分是拨号计划的名称具体定义在conf/diaplan/default.xml中
账号密码配置/添加新用户
修改默认密码vars.xml X-PRE-PROCESS cmdset datadefault_password1234/ freeswitch批量添加用户 参考https://blog.51cto.com/u_15049794/3833216 freeswitch1.10.9在/usr/local/freeswitch/etc/freeswitch目录下寻找 在/usr/local/freeswitch/conf/directory/default 下有1000.xml~1019.xml 这20个默认用户的配置文件 创建用户的xml后要加载这些新用户的xml需要修改/usr/local/freeswitch/conf/dialplan/default.xml这个文件里的拨号规则正则表达式
extension nameLocal_Extension
!-- 这里可以修改正则范围允许所有分机号--
!--默认为 condition fielddestination_number expression^(10[01][0-9])$ --
condition fielddestination_number expression^([0-9]\d)$
!-- ... --
action applicationset datacall_timeout120/
!-- ... --
/condition
/extension主要是改下正则表达式允许所有数字。另外默认还有一个N秒不接认为超时的配置默认是30秒如果有需要调整的也可以一并修改。 调整/usr/local/freeswitch/conf/dialplan/public.xml
extension namepublic_extensions!-- 允许所有分机号 --condition fielddestination_number expression^([0-9]\d)$action applicationtransfer data$1 XML default//condition
/extension批量生成用户xml文件
import org.apache.commons.lang3.StringUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;public class CreateFreeswitchUser {public static void main(String[] args) throws IOException {String template D:\\soft\\FreeSWITCH\\conf\\directory\\default\\;String templateContent read(template 1000.xml);//创建99个用户for (int i 1; i 100; i) {String newUser 1 StringUtils.leftPad(i , 3, 0);String newContent templateContent.replaceAll(1000, newUser);String newFileName template newUser .xml;write(newFileName, newContent);System.out.println(newFileName done!);}}static String read(String fileName) throws IOException {File f new File(fileName);if (!f.exists()) {return null;}FileInputStream fs new FileInputStream(f);String result null;byte[] b new byte[fs.available()];fs.read(b);fs.close();result new String(b);return result;}static void write(String fileName, String fileContent) throws IOException {File f new File(fileName);if (f.exists()) {f.delete();}FileOutputStream fs new FileOutputStream(f);fs.write(fileContent.getBytes());fs.flush();fs.close();}
}然后将生成的用户文件拷贝到/usr/local/freeswitch/conf/directory/default目录下
freeswitch后台基础操作指令
ps -ef | grep freeswithch 查看进程号
netstat -an | grep 5060 查询FreeSWITCH 监听在哪个IP地址上(默认5060端口的情况下)
whereis freeswitch 查看freeswitch安装路径freeswitch -help可查看帮助信息
freeswitch 启动并前台运行
freeswitch -nc 启动并后台运行
freeswitch -stop 停止fs_cli 进入freeswitch控制台后
show registrations 查看注册用户情况
sofia status profile internal reg 显示在线注册用户信息
status 查看freeswitch的运行状态
/exit 或 /quit 或 /bye 退出fs_cli
shutdown 关闭freeswitch
reloadxml 重新加载xml配置
console loglevel 7 开启控制台日志级别 0-7 数字越大日志越多
version 显示版本信息VoIP客户端工具推荐
推荐portsip-uc和linphoneAndroid和Windows均有安装包portsip在IOS上应该也是有客户端的可自行搜索下载使用
freeswitch官方文档https://freeswitch.org/confluence/
http://ffmpeg.org/releases/
1、官网下载ffmpeg4.1。
2、进入ffmpeg4.1根目录执行./configure --enable-shared --enable-gpl --enable-libx264 --enable-libspeex
3、执行make和make install。如果出现类似make: Warning: File ffbuild/config.mak has modification time 8011 s in the future的警告执行find . -type f | xargs -n 5 touch。
4、执行ldconfig加载。
5、执行ffmpeg -codecs如果能返回编码表示编译成功。备注先要安装libx264。
如果无法执行有可能是路径错误尝试设置环境变量LD_LIBRARY_PATH{安装路径},
查找安装路径的方法find / -name ffmpeg。