Reputation: 11
Hello I have a usb webcam and am too broke for the picamera, is there anyway I can write a python program that can record video??
Upvotes: 0
Views: 8636
Reputation: 207758
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:
sudo apt-get install v4l-utils
v4l2-ctl --list-devices
Install ffmpeg
and try using it:
sudo apt install ffmpeg
ffplay /dev/video0
If this works, you can record with ffmpeg
or use OpenCV videocapture()
to grab and record frames.
Upvotes: 1