Skip to content

Instantly share code, notes, and snippets.

@bmabir17
Created February 2, 2019 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmabir17/7c14d332b7a0fdc998a8f27a30809a89 to your computer and use it in GitHub Desktop.
Save bmabir17/7c14d332b7a0fdc998a8f27a30809a89 to your computer and use it in GitHub Desktop.
ffmpeg webcam campture
import subprocess as sp
import time
while(True):
sp.call('ffmpeg -f v4l2 -framerate 25 -t 4 -video_size 640x480 -i /dev/video0 ./webcam_output.mp4 -y',shell=True)
print('Video Captured')
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment