如何通过rtsp协议获取ubnt摄像头视频?

Ubnt Unifi-Video

1 前言

一个问题,一篇文章,一出故事。
本章将记录如何通过rtsp协议将ubnt摄像头的视频复制到电脑。

2 最佳实践

2.1 创建国内源配置

sudo apt install -y ffmpeg

2.2 命令行复制视频

ffmpeg -i rtsp://192.168.0.24:554/s0 -c copy -f mp4 output.mp4

如果遇到如下错误,

#...
[rtsp @ 0x623d25390700] method DESCRIBE failed: 401 Unauthorized
[in#0 @ 0x623d25390600] Error opening input: Server returned 401 Unauthorized (authorization failed)
Error opening input file rtsp://192.168.0.24:554/s0.
Error opening input files: Server returned 401 Unauthorized (authorization failed)

你需要使用带用户名和密码的方式访问,

ffmpeg -i rtsp://ubnt:ubntpassword@192.168.0.24:554/s0 -c copy -f mp4 output.mp4
没有评论

发表回复

Ubnt Unifi-Video
如何定义一台数字监控主机(Debian+UBNT Unifi-Video)?

1 介绍部分 1.1 前言 弟弟店铺要安装监控,故向其推荐企业级别的监控UBNT的产品Unifi-V …