解决Python OpenCV 读取视频抽帧出现error while decoding的问题 问题 读取H264视频,抽帧视频并保存,报错如下; [aac @ 00000220b9a07fc0] Input buffer exhausted before END element found [h264 @ 00000220b9cd0500] error while decoding MB 20 45, bytestream -14 解决 溯本求源:https://stackoverflow.com/questions/49233433/opencv-read-errorh264-0x8f915e0-error-while-decoding-mb-53-20-bytestream 发现问题原因是:它与时间有关,当在连续的capture.read()之间执行比较耗时的操作时会出现该错误。 解决:增加一个线程处理捕获到的视频帧就好~~~ 源代码 import os import queue import threading import cv2 q = queue.Queue.... 有更新! 解决Python OpenCV 读取视频并抽帧出现error while decoding的问题 python