Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Change this:

cap = cv2.VideoCapture(0)

to:

vidcap = cv2.VideoCapture(0)

Also this too:

if (cap.isOpened()== False):

to:

if (vidcap.isOpened()== False):

And this too: total = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) to: total = int(vidcap.get(cv2.CAP_PROP_FRAME_COUNT))

And for heaven sake in line 5 set indentaion

Change this:

cap = cv2.VideoCapture(0)

to:

vidcap = cv2.VideoCapture(0)

Also this too:

if (cap.isOpened()== False):

to:

if (vidcap.isOpened()== False):

And this too: total = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) to: total = int(vidcap.get(cv2.CAP_PROP_FRAME_COUNT))

And for heaven sake in line 5 set indentaionindentation

Change this:

cap = cv2.VideoCapture(0)

to:

vidcap = cv2.VideoCapture(0)

Also this too:

if (cap.isOpened()== False):

to:

if (vidcap.isOpened()== False):

And this too: too:

total = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
to:

to:

total = int(vidcap.get(cv2.CAP_PROP_FRAME_COUNT))

int(vidcap.get(cv2.CAP_PROP_FRAME_COUNT))

And for heaven sake in line 5 set indentation

Change this:

cap = cv2.VideoCapture(0)

to:

vidcap = cv2.VideoCapture(0)

Also this too:

if (cap.isOpened()== False):

to:

if (vidcap.isOpened()== False):

And this too:

total = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))

to:

total = int(vidcap.get(cv2.CAP_PROP_FRAME_COUNT))

And for heaven sake in line 5 set indentationindentation probably. Change this:

cv2.imwrite(video_id+'.jpg',image)

to:

cv2.imwrite('video_id.jpg',image)