I have a small python program that works very well to capture short videos from webcams in linux (at least for laptops that have built-in webcams) using a sub-process with ffmpeg.
Now i'm trying to write the same program to capture webcams in windows, and i know i can't use the generic "/dev/video0" that works pretty well in linux, but i thought something like naming it "Integrated Camera" should be enough, but it fails.
Here's my linux code (that works):
import sys
from subprocess import call
from datetime import datetime
def record_webcam(seconds):
cam = '/dev/video0'
timestamp = datetime.now().strftime('%Y%m%d-%H%M%S')
filename = timestamp + 'something.mkv' #generated with more complexity in the actual code, but that isn't important
ffmpeg_cmd