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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

1,875件の閲覧回数
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 返答(返信)

1,855件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Did you try like this?

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

 

0 件の賞賛

1,850件の閲覧回数
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 件の賞賛