簡體   English   中英

OpenCV無法讀取MP4視頻

[英]OpenCV cannot read MP4 videos

我在Ubuntu 14.04上使用OpenCV 2.4.8讀取一些MP4視頻。 該程序可以在Mac和其他Linux機器上運行,但是由於某些原因,當我編譯並運行該程序時,在退出之前會給我這些錯誤:

[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
[h264 @ 0x1d0dcc0] missing picture in access unit
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d0dcc0] decode_slice_header error
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
Non-reference picture received and no reference available
[h264 @ 0x1d8a5c0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d8a5c0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d8a5c0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d8a5c0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d8a5c0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d8a5c0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d8a5c0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1d8a5c0] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1cf8f40] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1cf8f40] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1cf8f40] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1cf8f40] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1cf8f40] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1cf8f40] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1cf8f40] decode_slice_header error
Non-reference picture received and no reference available
[h264 @ 0x1cf8f40] decode_slice_header error
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit
[h264 @ 0x1d0dcc0] missing picture in access unit

正在文件中讀取的代碼的主要部分如下所示(它們在某些方法之間是分開的,因此我包括了以下行,這些行完成了打開和讀取框架的所有工作:

cv::VideoCapture cap;
cap.open (input_path);
success = cap.read (data.frames[i]);

有誰知道我如何才能讓我的程序正確閱讀這些視頻? 我試圖添加“ cap.set(CV_CAP_PROP_FOURCC,CV_FOURCC('H','2','6','4'));“ 在“ cap.open”之前,但似乎不起作用。

根據我的經驗,最簡單的解決方案是將其轉換為.avi似乎無法像.avi一樣簡單地處理mp4文件是opencv的錯

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM