Critical error opening a video file with opencv on I.MX8M+

取消
显示结果 
搜索替代 
您的意思是: 

Critical error opening a video file with opencv on I.MX8M+

445 次查看
mbrundler
Contributor II

Hi,

I built an i.MX8M+ target image and the SDK with yocto on BSP 5.10.52-2.1.0  version with

DISTRO=fsl-imx-xwayland MACHINE=imx8mp-lpddr4-evk

On the target board, I can't open video files with opencv. In python :

import cv2

vcap = cv2.VideoCapture('./mp4.mp4')

It throws :

(python3:1340): GStreamer-CRITICAL **: 18:03:27.038: gst_query_set_position: assertion 'format == g_value_get_enum (gst_structure_id_get_value (s, GST_QUARK (FORMAT)))' failed
[ WARN:0] global /usr/src/debug/opencv/4.5.2.imx-r0/git/modules/videoio/src/cap_gstreamer.cpp (1081) open OpenCV | GStreamer warning: Cannot query video position: status=1, value=-1, duration=-1

Same issue with an avi video. Same issue when coded in C too.

I attach the stdout and stderr.

Any suggestion ? Thanks in advance

 

 

标签 (1)
标记 (1)
0 项奖励
2 回复数

425 次查看
Qmiller
NXP Employee
NXP Employee

Did you try like this?

cap = cv2.VideoCapture('/dev/videoX')

 

0 项奖励

420 次查看
mbrundler
Contributor II

Unfortunately, I have no camera available so far so :

[ WARN:0] global /usr/src/debug/opencv/4.5.2.imx-r0/git/modules/videoio/src/cap_gstreamer.cpp (2056) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module source reported: Could not read from resource.

I will try with a camera as soon as possible

Regards

0 项奖励