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
Did you try like this?
cap = cv2.VideoCapture('/dev/videoX')
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