Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

unstable frame count

Hi, I am getting different frame count for the same video on different machines. Code used to find frame count:
import cv2 cap= cv2.VideoCapture("2653582916.mp4") i=0 while(cap.isOpened()): ret, frame = cap.read() if ret == False: break i+=1 print(i)

Output on machine 1 72

Output on machine 2 80

System Information Machine 1 OpenCV = 4.1.1.26 OS = Ubuntu 18.04.4 LTS 16 Core / 32GB RAM Machine 2 OpenCV = 4.1.1.26 OS = Ubuntu 18.04.3 LTS 8 Core /16GB RAM

frame count will vary depends on machines? please help me out.

unstable frame count

Hi, I am getting different frame count for the same video on different machines. machines.

Video used http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

Code used to find frame count:
import cv2 cap= cv2.VideoCapture("2653582916.mp4") cv2.VideoCapture("BigBuckBunny.mp4") i=0 while(cap.isOpened()): ret, frame = cap.read() if ret == False: break i+=1 print(i)

Output on machine 1 7214300

Output on machine 2 8014308

System Information Machine 1 OpenCV = 4.1.1.26 OS = Ubuntu 18.04.4 LTS 16 Core / 32GB RAM Machine 2 OpenCV = 4.1.1.26 OS = Ubuntu 18.04.3 LTS 8 Core /16GB RAM

frame count will vary depends on machines? please help me out.

unstable frame count

Hi, I am getting different frame count for the same video on different machines.

Video used http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

Code used to find frame count:
import cv2 cap= cv2.VideoCapture("BigBuckBunny.mp4") i=0 while(cap.isOpened()): ret, frame = cap.read() if ret == False: break i+=1 print(i)

Output on machine 1 14300

Output on machine 2 14308

System Information Machine 1 OpenCV = 4.1.1.26 OS = Ubuntu 18.04.4 LTS 16 Core / 32GB RAM [cv2.videoio_registry.getBackendName(b) for b in cv2.videoio_registry.getBackends()] ['FFMPEG', 'GSTREAMER', 'INTEL_MFX', 'V4L2', 'CV_IMAGES', 'CV_MJPEG'] cap.getBackendName() FFMPEG

Machine 2 OpenCV = 4.1.1.26 OS = Ubuntu 18.04.3 LTS 8 Core /16GB RAMRAM [cv2.videoio_registry.getBackendName(b) for b in cv2.videoio_registry.getBackends()] ['FFMPEG', 'GSTREAMER', 'INTEL_MFX', 'V4L2', 'CV_IMAGES', 'CV_MJPEG'] cap.getBackendName() FFMPEG

frame count will vary depends on machines? please help me out.

unstable frame count

Hi, I am getting different frame count for the same video on different machines.

Video used http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

Code used to find frame count:

import cv2
cap= cv2.VideoCapture("BigBuckBunny.mp4")
i=0
while(cap.isOpened()):
ret, frame = cap.read()
if ret == False:
break
i+=1
print(i)

print(i)

Output on machine 1 14300

Output on machine 2 14308

System Information Machine 1 OpenCV = 4.1.1.26 OS = Ubuntu 18.04.4 LTS 16 Core / 32GB RAM [cv2.videoio_registry.getBackendName(b) for b in cv2.videoio_registry.getBackends()] ['FFMPEG', 'GSTREAMER', 'INTEL_MFX', 'V4L2', 'CV_IMAGES', 'CV_MJPEG'] cap.getBackendName() FFMPEG

Machine 2 OpenCV = 4.1.1.26 OS = Ubuntu 18.04.3 LTS 8 Core /16GB RAM [cv2.videoio_registry.getBackendName(b) for b in cv2.videoio_registry.getBackends()] ['FFMPEG', 'GSTREAMER', 'INTEL_MFX', 'V4L2', 'CV_IMAGES', 'CV_MJPEG'] cap.getBackendName() FFMPEG

frame count will vary depends on machines? please help me out.