Centos7視頻轉碼服務器
轉碼軟件 http://www.ipvideotrans.com/ 下載的Linux版本
安裝系統
下載並解壓軟件 執行 ipvtl_16ch_trial 可運行轉碼進程,有提示ip:8888訪問 訪問見圖
[root@localhost ~]# ls /ipvtl
arial.ttf ipvtl_16ch_trial ipvtl.so ipvts.so libva-drm.so.1 libva.so.1
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
[root@localhost ~]# 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 在網卡配置文件內增加文件
[root@localhost ~]# cat /etc/sysconfig/network-scripts/route-eno4
234.1.1.0/24 dev eno4
添加完後執行重啟網卡 ,route -n 可看到路由
[root@localhost ~]# 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即可
Centos7視頻轉碼服務器