解决Python OpenCV 读取视频并抽帧出现error while decoding的问题

解决Python OpenCV 读取视频抽帧出现error while decoding的问题

1. 问题

读取H264视频,抽帧视频并保存,报错如下;

[aac @ 00000220b9a07fc0] Input buffer exhausted before END element found
[h264 @ 00000220b9cd0500] error while decoding MB 20 45, bytestream -14

2. 解决

溯本求源:https://stackoverflow.com/questions/49233433/opencv-read-errorh264-0x8f915e0-error-while-decoding-mb-53-20-bytestream

发现问题原因是:它与时间有关,当在连续的capture.read()之间执行比较耗时的操作时会出现该错误。

解决&#x

猜你喜欢

转载自blog.csdn.net/qq_40985985/article/details/111037077