Skip to content

Commit 8821ffd

Browse files
convert video width and height to int
1 parent 4e13d42 commit 8821ffd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/video-decoding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def decode_video():
3939
# video_file = "Put your video file path here."
4040
# vc = cv2.VideoCapture(video_file)
4141

42-
video_width = vc.get(cv2.CAP_PROP_FRAME_WIDTH)
43-
video_height = vc.get(cv2.CAP_PROP_FRAME_HEIGHT)
42+
video_width = int(vc.get(cv2.CAP_PROP_FRAME_WIDTH))
43+
video_height = int(vc.get(cv2.CAP_PROP_FRAME_HEIGHT))
4444
vc.set(3, video_width) #set width
4545
vc.set(4, video_height) #set height
4646

0 commit comments

Comments
 (0)