Ask Your Question

Revision history [back]

VideoCapture from file

Hi, I'm kinda new to opencv, and cant figure out what i'm doing wrong while opening a video file with VideoCapture. I only use this simple code:

#

import cv2

cap = cv2.VideoCapture()

cap.open("Field.avi")

print cap.isOpened()

#

I tried installing k-lite's most updated codec pack, and several more. Still, I get 'False'.

Needless to say, the video is in the same folder as the py file.

The video works on the media player.

Thanks!

VideoCapture from file

Hi, Hi,

I'm kinda new to opencv, and cant figure out what i'm doing wrong while while opening a video file with VideoCapture. VideoCapture functionality.

I only use this simple code:

#

import cv2

cv2 cap = cv2.VideoCapture()

cap.open("Field.avi")

cv2.VideoCapture() cap.open("Field.avi") print cap.isOpened()

#

cap.isOpened()

I tried installing k-lite's most updated codec pack, and several more. more. Still, I get 'False'.

'False'. Needless to say, the video is in the same folder as the py file.

The video works on the media player.

Thanks!