简体   繁体   English

如何使用 USB 网络摄像头在树莓派上拍摄视频

[英]How to take video on a raspberry pi with a usb webcam

你好,我有一个 USB 网络摄像头,对于 picamera 来说太坏了,无论如何我可以写一个可以录制视频的 python 程序吗?

A few ideas spring to mind...一些想法浮现在脑海中......

  1. Identify which webcam you have确定您拥有哪个网络摄像头

  2. Plug it in and see if you can see it with:插入它,看看你是否可以看到它:

    sudo lsusb

  3. Install v4l-utils and see if it is accessible:安装v4l-utils并查看它是否可以访问:

    sudo apt-get install v4l-utils

    v4l2-ctl --list-devices

  4. 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.

相关问题 Raspberry Pi CSI 摄像头到 USB 网络摄像头 Python - Raspberry Pi CSI camera to USB webcam in Python 树莓派 4 带 2 个凸轮 USB - Raspberry pi 4 with 2 cam USB 使用Raspberry Pi +网络摄像头以python录制视频总是会得到空视频或仅一帧视频 - Using Raspberry Pi + Webcam to record video in python always gets an empty video or only one frame video 如何在Raspberry Pi的启动时间启动网络摄像头并将其存储在闪存驱动器中 - How to start webcam and store in a flash drive on boot time in Raspberry Pi 如何通过 USB 电缆将消息从 Raspberry Pi 发送到 Arduino - How send messages from Raspberry Pi to Arduino via USB cable 如何使Raspberry Pi通过USB连接响应Arduino代码 - How to make Raspberry pi respond to Arduino code via USB connection 使用Raspberry Pi +网络摄像头以python录制视频,但有时相机无法像我预期的那样打开/关闭 - Using Raspberry Pi + Webcam to record video in python, but sometimes camera does not turn on/off as I expected 树莓派,Python:如何通过 usb 串口发送大数据? - Raspberry Pi, Python: How to send large data over usb serial? 如何检测USB设备生成的事件进入树莓派 - How to Detect event generated by USB device into raspberry pi 如何将 usb 条码扫描仪输入到 Raspberry pi 4 中的 python - How get the usb barcode scanner input into python in Raspberry pi 4
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM