Ask Your Question

Revision history [back]

how to get duration/length video.webm video file ..

hey , this is murugan . i am not getting video duration/length for my .webm file. its gives negative number pls help me .

video = cv2.VideoCapture("TEST000008.webm") duration = video.get(cv2.CAP_PROP_POS_MSEC) frame_count = video.get(cv2.CAP_PROP_FRAME_COUNT) fps = video.get(cv2.CAP_PROP_FPS) durationn = frame_count / fps

print("duration:",duration) print("frame_count:",frame_count) print("fps:",fps) print("durationn:",durationn)

output is :

duration: 0.0 frame_count: -7.148113328562451e+16 fps: 7.75 durationn: -9223372036854776.0

how to get duration/length video.webm video file ..

hey , this is murugan . i am not getting video duration/length for my .webm file. its gives negative number pls help me .me:

video = cv2.VideoCapture("TEST000008.webm")
duration = video.get(cv2.CAP_PROP_POS_MSEC)
frame_count = video.get(cv2.CAP_PROP_FRAME_COUNT)
fps = video.get(cv2.CAP_PROP_FPS)
durationn = frame_count / fps

fps

print("duration:",duration) print("frame_count:",frame_count) print("fps:",fps) print("durationn:",durationn)

print("durationn:",durationn)

output is :

duration: 0.0
frame_count: -7.148113328562451e+16
fps: 7.75
durationn: -9223372036854776.0

-9223372036854776.0
click to hide/show revision 3
retagged

updated 2020-07-11 02:29:02 -0600

berak gravatar image

how to get duration/length video.webm video file ..

hey , this is murugan . i am not getting video duration/length for my .webm file. its gives negative number pls help me:

video = cv2.VideoCapture("TEST000008.webm")
duration = video.get(cv2.CAP_PROP_POS_MSEC)
frame_count = video.get(cv2.CAP_PROP_FRAME_COUNT)
fps = video.get(cv2.CAP_PROP_FPS)
durationn = frame_count / fps

print("duration:",duration)
print("frame_count:",frame_count)
print("fps:",fps)
print("durationn:",durationn)

output is :

duration: 0.0
frame_count: -7.148113328562451e+16
fps: 7.75
durationn: -9223372036854776.0