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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

2,567 Views
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

 

 

Labels (1)
Tags (1)
0 Kudos
Reply
2 Replies

2,547 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Did you try like this?

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

 

0 Kudos
Reply

2,542 Views
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 Kudos
Reply