本文介绍了OpenCV IP摄像机应用程序崩溃[h264 @ 0xxxxx]缺少访问单元中的图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在cpp中有一个opencv应用程序。



它捕获视频流,并使用opencv的简单结构将其保存到视频文件。



与我的网络摄像头。



但是,它崩溃也许约十秒后,而我运行它捕获从IP Camara的流。



我的编译命令是:

  g ++ -O3 IP_Camera_linux.cpp -o IP_Camera`pkg-config --cflags --libs opencv` 

这样访问:

  const string Stream =rtsp:// admin:[email protected]/; 

它运行正常,显示视频并保存,直到显示的视频冻结,应用程序崩溃。虽然终端上的错误消息是:

  [h264 @ 0x15e6f60] 
[h264 @ 0x15e8200]错误解码MB 61 27,bytestream(-3)
[h264 @ 0x109c880]访问单元中缺少图片
[h264 @ 0x109c000]

根据我的理解,上述错误消息中的第一行可能有事情要做,实际上崩溃的应用程序。

解决方案

div>

在大量的命中和尝试后得到解决方案。只是改变了流地址有点,它的工作。



From:

  const string Stream =rtsp:// admin:[email protected]/; 

To:

 code> const string Stream =rtsp:// admin:[email protected]/ch1-s1?tcp; 

没有想法,它做了什么改变?



但它的工作效率非常高!



即使是形式的普遍警告:

$解码时MB 59 31,bytestream(-20)
[h264 @ 0x15e8200]错误解码时MB 61 27,bytestream(-3)

已过。


$ b b




I have an opencv application in cpp.

It captures video stream and saves it to video files with the simple constructs from opencv.

It works perfectly with my webcam.

But, it crashes maybe after about ten seconds, while I run it to capture the stream from IP Camara.

My compile command is:

g++ -O3 IP_Camera_linux.cpp -o IP_Camera `pkg-config --cflags --libs opencv`

My Stream from IP cam is accessed like this:

const string Stream = "rtsp://admin:[email protected]/";

It does run perfectly, shows video and saves it until the displayed video freezes and the application crashes. While the error message on the terminal is:

[h264 @ 0x15e6f60] error while decoding MB 59 31, bytestream (-20)
[h264 @ 0x15e8200] error while decoding MB 61 27, bytestream (-3)
[h264 @ 0x109c880] missing picture in access unit
[h264 @ 0x109c000] no frame!

To my understanding, the fist two lines in the above error message might have something to do but does not actually crash the application. The last two lines are probably the reasons or the cause?

Any help?

解决方案

Got the solution after lots of hit and trial. Just changed the stream address a bit and it worked.

From:

const string Stream = "rtsp://admin:[email protected]/";

To:

const string Stream = "rtsp://admin:[email protected]/ch1-s1?tcp";

NO idea, what change it did make?

BUT IT WORKS PERFECTLY!!!

Even the pervasive warnings of the form:

[h264 @ 0x15e6f60] error while decoding MB 59 31, bytestream (-20)
[h264 @ 0x15e8200] error while decoding MB 61 27, bytestream (-3)

are gone.

Anyways would appreciate if some one could explain it with the logical reason behind.

CREDIT

这篇关于OpenCV IP摄像机应用程序崩溃[h264 @ 0xxxxx]缺少访问单元中的图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 02:14