[英]How to take video on a raspberry pi with a usb webcam
你好,我有一个 USB 网络摄像头,对于 picamera 来说太坏了,无论如何我可以写一个可以录制视频的 python 程序吗?
A few ideas spring to mind...一些想法浮现在脑海中......
Identify which webcam you have确定您拥有哪个网络摄像头
Plug it in and see if you can see it with:插入它,看看你是否可以看到它:
sudo lsusb
Install v4l-utils
and see if it is accessible:安装
v4l-utils
并查看它是否可以访问:
sudo apt-get install v4l-utils
v4l2-ctl --list-devices
Install ffmpeg
and try using it:安装
ffmpeg
并尝试使用它:
sudo apt install ffmpeg
ffplay /dev/video0
If this works, you can record with ffmpeg
or use OpenCV videocapture()
to grab and record frames.如果
ffmpeg
,您可以使用ffmpeg
进行录制或使用OpenCV videocapture()
来抓取和录制帧。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.