Debian/Ubuntu 系统使用以下命令安装 FFMpeg ,如下图所示:
apt-get install ffmpeg

使用 ifconfig 查看开发板 ip 为 192.168.1.245 如下图所示:

使用 FFMpeg 推流一个 mp4 视频进行测试,作者将测试视频 test.mp4 放在了根目录下,可根据实际目录修改以下命令,如下图所示:
ffmpeg -re -stream_loop -1 -i /test.mp4 -f flv "rtmp://192.168.1.245:1096/live/test"

使用 FFMpeg 采集摄像头(测试 USB 摄像头没问题,可以使用 v4l2-ctl --list-devices 命令查看摄像头节点)视频数据将其发送给 nginx 流媒体服务器,执行以下命令:
ffmpeg -f v4l2 -video_size 640x480 -framerate 30 -i /dev/video21 -q 10 -f flv
r t m p : / / 1 9 2 . 1 6 8 . 1 . 2 4 5 : 1 0 9 6 / l i v e / t e s t

更多内容可以B站搜迅为RK3588开发板
|