我正在使用OpenCV的VideoCapture(编译了ffmpeg支持)从IP摄像机中流式传输H264内容。
到目前为止,一切都运行良好,但偶尔会出现解码错误(我认为来自ffmpeg):
[h264 @ 0x103006400] mb_type 137 in I slice too large at 26 10
[h264 @ 0x103006400] error while decoding MB 26 10
[h264 @ 0x103006400] negative number of zero coeffs at 25 5
[h264 @ 0x103006400] error while decoding MB 25 5
[h264 @ 0x103006400] cbp too large (421) at 35 13
[h264 @ 0x103006400] error while decoding MB 35 13
[h264 @ 0x103006400] mb_type 121 in P slice too large at 20 3
[h264 @ 0x103006400] error decoding MB 20 3
这些消息会显示在控制台中。有没有一种清晰的方式可以监听到它们?我想跳过处理出现故障的帧。
有什么提示或建议吗?