1.安装epel-release
(参考 https://www.jianshu.com/p/86d16189832e)
运行指令:yum -y install epel-release
2.安装nux存储库
运行指令:
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
3.安装ffmpeg和ffmpeg -devel软件包
运行指令:yum install ffmpeg ffmpeg-devel -y
(漫长等待)
如果出现下面这种异常
打开/etc/yum.repos.d/epel.repo,将
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
修改为(即第三行的注释去掉,把第四行加上注释)
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
再清理源,再重新安装
yum clean all
yum install ffmpeg ffmpeg-devel -y
4.安装结束后,需要查看一下ffmpeg的版本,确保安装正确。
运行指令:ffmpeg -version
如果出现上述截图表示ffmpeg的存储库安装成功
取海康摄像头rtsp流脚本
ffmpeg -i rtsp://admin:PFVIDE@192.168.0.119/Streaming/Channels/101 -c copy -map 0 -f segment -segment_atclocktime 1 -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 /usr/local/fczn/%Y%m%d%H%M%S.mp4
三离:fromwall /usr/local/video/fromwall
挡鼠板:ratplate /usr/local/video/ratplate
手部消毒:disinfectionhand /usr/local/video/disinfectionhand
人体消毒:disinfectionhuman /usr/local/video/disinfectionhuman
账号 密码 IP 录制10秒 配置摄像头的存储文件路径和命名方式
来源:51CTO
作者:江彩
链接:https://blog.51cto.com/14467455/2466650