工具/软件:Linux
您好!
我们将在 OpenCV 项目中使用 OpenCV API capture()进行解码,例如.avi 或.mp4。
但是性能很差,例如1024x768 avi 解码1帧需要大约30ms。
是否有其他有效的方式来解码视频?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:Linux
您好!
我们将在 OpenCV 项目中使用 OpenCV API capture()进行解码,例如.avi 或.mp4。
但是性能很差,例如1024x768 avi 解码1帧需要大约30ms。
是否有其他有效的方式来解码视频?
您好!
感谢您的回复。
我知道 GStreamer。 但 我对如何在 OpenCV 项目中使用 gstreamer 感到困惑吗? 有没有关于 gstreamer --> OpenCV 的演示?
我尝试使用 dmauftest 从 V4L2捕获帧到 OpenCV 项目。
我尝试将缓冲区指针从 v4l2转移到 OpenCV Mat 类。并使用 imshow()来显示它。
但 性能不如使用 cv::videocapure。
您好!
感谢您的回复。
参考测试后。
我将 OpenCV 更改为:
VideoCapture 捕获("filesrc location=17.mp4! qtdemux! 太棒了! ducatimpeg4dec! VPE! 'video/x-raw、format=(string) NV12、width=(int) 1024、height=(int) 768'! appsink"、CAP_Gstreamer);
capture.read (frame);
imshow ("视频"、帧);
以下是日志:
(VideoCapture:1433):Gstreamer-critical **:GST_Element _make_fin_uri:断言"GST_UI_IS _VALID (Uri)"失败
(VideoCapture:1433):glib-GObject-warning **:从'GstAppSink'到'GstBin'的转换无效
(VideoCapture:1433):Gstreamer-critical **:GST_bin/iterate_Elements:断言"GST_is_bin (bin)"失败
(VideoCapture:1433):Gstreamer-critical **:GST_ITERATE_NEXT:断言"IT!= NULL"失败
(VideoCapture:1433):Gstreamer-critical **:GST_ITERATE_FREE:断言"IT!= NULL"失败
OpenCV 错误:未指定错误(GStreamer:无法在手动流水线中找到应用程序
)、文件/home/gtbldadm/processor-sdk-linux-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/opencv/3.1 +gitAUTOINC+4458601eb2-r3.tisdk0/git/modules/videio/src/cap_gstreamer.cpp、第757行
在抛出'CV::异常'实例后调用终止
what():/home/gtbldadm/processor-sdk-linux-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/opencv/3.1 +gitAUTOINC+4458601eb2-r3.tisdk0/git/modules/video/src/CAP_gstreamer.cpp:757:错误:(-2) GStreamer:无法在手动流水线中找到 appsink
在函数 cvCaptureFromCAM_GStreamer 中
"GStreamer:无法在手动流水线中找到应用程序"显示没有应用程序处理程序滑线。因此、我应该在捕获("xxx")中的最后一个滑线中添加什么内容。
我已检查命令"gst-launch-1.0 -v filesrc location=17.mp4! qtdemux! 太棒了! ducatimpeg4dec! VPE! 'video/x-raw、format=(string) NV12、width=(int) 1024、height=(int) 768'! VPE num-input-buffers=8! 排队! "陆上接收机"运行良好。