I’m using VideoCapture
to load a video’s frames in batches. Eventually, my terminal starts spamming me with the following error, despite the program will running:
[h264 @ 0x559351d7b040] mmco: unref short failure
[h264 @ 0x559351d7b040] mmco: unref short failure
[h264 @ 0x559351d7b040] mmco: unref short failure
[h264 @ 0x559351d7b040] mmco: unref short failure
...
What’s causing this?
Is there any way to stop all warnings messages?
Sample Code:
vid = cv2.VideoCapture(vid_path)
# Prepare `num_processors` batches of images
for frame_num in range(start_frame, start_frame + batch_size):
vid.set(cv2.CAP_PROP_POS_FRAMES, frame_num)
ret, frame = vid.read()
if ret:
frame = Image.fromarray(frame)
frame = frame_transforms(frame)
self.batch.append(frame)