1、安装ffmpeg工具
yum -y install ffmpeg
2、进入ffmpeg安装目录
3、执行ffmpeg推流命令
nohup ffmpeg -re -stream_loop -1 -i /root/test.mp4 -vcodec copy -acodec copy -f flv -y rtmp://IP地址/live/流名 >> test.log &
-re 指定以实时模式推流
-i 输入文件
-f flv 输出格式为flv
-stream_loop -1 指定循环读取视频源的次数,-1为无限循环
>> test.log 日志输出至test.log文件中