Raspivid 保存到磁盘并同时流式传输

Raspivid save to disk and stream concurrently

我正在尝试 运行 使用 Rasberry Pi Model B 的家庭安全摄像头

我想将流媒体保存到本地文件(如果可能的话,通过 USB 保存)和流媒体,以便我可以在我的网络上获取它

我的命令对两者都不起作用 - 有什么建议吗?

raspivid-o security.h264 -t 0 -n -w 600 -h 400 -fps 12 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

试试这个命令:

raspivid -o - -t 0 -n -w 600 -h 400 -fps 12 | tee security.h264 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

tee 命令将输出写入标准输出和指定文件。