Centos7视频转码服务器
环境 Centos7 双网卡(一网卡负责接收组播 一网卡负责其他服务器访问)转码软件http://www.ipvideotrans.com/ 下载的Linux版本
[*] 安装系统
[*] 下载并解压软件 执行 ipvtl_16ch_trial 可运行转码进程,有提示ip:8888访问 访问见图
# ls /ipvtl
arial.ttfipvtl_16ch_trialipvtl.soipvts.solibva-drm.so.1libva.so.1
http://s1.运维网.com/images/20180507/1525677197856321.png
3.调整系统
1.配置两块网卡网卡1配置互联网地址,网卡2配置一个组播vlan内一个管理IP
2.修改配置文件实现双网卡接收组播 (原因见我其他博客)
/etc/sysctl.conf
把 net.ipv4.conf.all.rp_filter和net.ipv4.conf.default.rp_filter设为2即可
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2 4.关闭防火墙
systemctl stop firewalld.service 关闭防火墙
systemctl disable firewall.service 禁用开机自启动 5.关闭selinux
# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted 6 添加组播路由 我网卡为eno4 在网卡配置文件内增加文件
#cat /etc/sysconfig/network-scripts/route-eno4
234.1.1.0/24 dev eno4
添加完后执行重启网卡 ,route -n 可看到路由
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.32.250.225 0.0.0.0 UG 100 0 0 eno1
10.32.250.224 0.0.0.0 255.255.255.240 U 100 0 0 eno1
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
192.168.218.0 0.0.0.0 255.255.255.0 U 100 0 0 eno4
234.1.1.0 0.0.0.0 255.255.255.0 U 100 0 0 eno4 7.将转码程序调为开机启动修改/etc/rc.d/rc.local 由于是测试版测试时间30天 ,所以设置为开机启动时删除文件,重新解压。注意rc.local 要添加x权限。
rm -rf /ipvtl
tar -xvf /ipvtl_trial-x64.tar
/ipvtl/ipvtl_16ch_trial 至此服务器应该就可以接受组播信息了。
可通过安装vlc视频播放器检测。安装方式见下
yum -y install epel-release
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
yum install vlc
注意 默认情况下vlc无法通过root运行 ,可以通过修改参数来实现root运行
vim /usr/bin/vlc
搜索geteuid,将其替换为getppid即可
页:
[1]