我在Ubuntu 14.04上使用来自ip camera的视频流.使用具有这些参数的相机(来自FFMPEG),一切都很顺利:
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 352x192, 29.97 tbr, 90k tbn, 180k tbc
Run Code Online (Sandbox Code Playgroud)
但后来我改为更新的相机,它有以下参数:
Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1280x720, 25 fps, 25 tbr, 90k tbn, 50 tbc
Run Code Online (Sandbox Code Playgroud)
我的C++程序使用OpenCV3来处理流.默认情况下,OpenCV使用ffmpeg解码并显示具有VideoCapture功能的流.
VideoCapture vc;
vc.open(input_stream);
while ((vc >> frame), !frame.empty()) {
*do work*
}
Run Code Online (Sandbox Code Playgroud)
使用新的相机流我会得到这样的错误(来自ffmpeg):
[h264 @ 0x7c6980] cabac decode of qscale diff failed at 41 38
[h264 @ 0x7c6980] error while decoding MB 41 38, bytestream (3572)
[h264 @ 0x7c6980] left block unavailable for requested intra …Run Code Online (Sandbox Code Playgroud)