Hi NXP team,
We are use gstreamer on IMX8QX for stream multi camera with command pipeline
gst-launch-1.0 -v imxcompositor_g2d name=comp \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=320 sink_0::height=240 \
sink_1::xpos=320 sink_1::ypos=0 sink_1::width=320 sink_1::height=240 \
! v4l2jpegenc ! rtpjpegpay ! udpsink host=192.168.60.255 port=5000 \
v4l2src device=/dev/video3 ! "image/jpeg, width=3264, height=2448" \
! v4l2jpegdec ! imxvideoconvert_g2d \
! capsfilter caps="video/x-raw, width=320, height=240, pixel-aspect-ratio=1/1" ! comp.sink_0 \
v4l2src device=/dev/video5 ! "image/jpeg, width=3264, height=2448" \
! v4l2jpegdec ! imxvideoconvert_g2d \
! capsfilter caps="video/x-raw, width=320, height=240, pixel-aspect-ratio=1/1" ! comp.sink_1
This's command hasn't problem when run on shell, But when we need to develop in python code
Normally have function
Gst.parse_launch() for convert command pipeline to variable e.g.
スポイラimport gi
gi.require_version('Gst', '1.0')
from gi.repository import GLib, Gst
Gst.init(None)
_pipeline = Gst.parse_launch("""v4l2src device=/dev/video3 !
image/jpeg, width=3264, height=2448 ! fakesink""")
The problem is we cann't convert top command to pipeline
スポイラ_pipeline = Gst.parse_launch("""imxcompositor_g2d name=comp
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=320 sink_0::height=240
sink_1::xpos=320 sink_1::ypos=0 sink_1::width=320 sink_1::height=240
! v4l2jpegenc ! rtpjpegpay ! udpsink host=192.168.60.255 port=5000
v4l2src device=/dev/video3 ! "image/jpeg, width=3264, height=2448"
! v4l2jpegdec ! imxvideoconvert_g2d
! capsfilter caps="video/x-raw, width=320, height=240, pixel-aspect-ratio=1/1" ! comp.sink_0
v4l2src device=/dev/video5 ! "image/jpeg, width=3264, height=2448"
! v4l2jpegdec ! imxvideoconvert_g2d
! capsfilter caps="video/x-raw, width=320, height=240, pixel-aspect-ratio=1/1" ! comp.sink_1""")
(python:27527): GStreamer-CRITICAL **: 17:32:04.929: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
(python:27527): GStreamer-CRITICAL **: 17:32:05.081: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
gi.repository.GLib.Error: gst_parse_error: syntax error (0)
Do you have suggestion or how to convert pipeline command to python variable or not?
Regards
Thepnimit