Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you cannot resize the video using Videocapture.set() (this might only work for webcams).

please use cv2.resize():

>>> help(cv2.resize)
Help on built-in function resize:

resize(...)
    resize(src, dsize[, dst[, fx[, fy[, interpolation]]]]) -> dst

like:

ret, frame = cap.read()
if ret: # else it means the movie is over !
     res = cv2.resize(frame, (320,240))
     out.write(res)