Ask Your Question
0

video is not opening in opencv 2.4.10 with python

asked 2015-07-18 00:59:22 -0600

import cv2 cap = cv2.VideoCapture('m.avi') print cap.grab()

this code always returns a False value but when opening the video file which was captured by the webcam using opencv code, it returns True

edit retag flag offensive close merge delete

Comments

it returns True for me

saideepthik gravatar imagesaideepthik ( 2018-03-05 04:19:32 -0600 )edit

check the path of the video "m.avi"

saideepthik gravatar imagesaideepthik ( 2018-03-05 04:20:43 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-03-05 04:17:38 -0600

saideepthik gravatar image

if you want the to watch the video. you should read each frame first. then using imshow() video will be opened. like below..... while True: ret, img = cap.read() cv2.imshow('some',img) if 0xFF & cv2.waitKey(5) == 27: break

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-07-18 00:59:22 -0600

Seen: 397 times

Last updated: Mar 05 '18