help with gstreamer issue below

Job ID: 34857169

Budget: $10 – $30 USD

The main goal is convert 4K MJPEG to RGB on Coral Dev Board without consuming much CPU (less than 20%).

The following command fails for unknown reasons:
mendel@tuned-finch:~$ gst-launch-1.0 --gst-debug=2 v4l2src device=/dev/video1 ! image/jpeg, width=3840, height=2160, framerate=30/1 ! vpudec ! glupload ! glcolorconvert ! gldownload ! video/x-raw, format=RGB ! fakesink
Setting pipeline to PAUSED ...
0:00:00.289622152 7133 0xaaaae01b5180 WARN v4l2 v4l2_calls.c:543:gst_v4l2_subscribe_event:<v4l2src0> Cannot subscribe V4L2_EVENT_SOURCE_CHANGE or V4L2_EVENT_EOS event for device '/dev/video1'.
Pipeline is live and does not need PREROLL ...
Got context from element 'gldownloadelement0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayWayland\)\ gldisplaywayland0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.691282179 7133 0xaaaae01be2d0 WARN GST_PADS gstpad.c:4226:gst_pad_peer_query:<vpudec0:src> could not send sticky events
0:00:00.692027619 7133 0xaaaae01be2d0 WARN videopool gstvideopool.c:198:video_buffer_pool_set_config:<videobufferpool0> allocation params alignment 0 is smaller than the max specified video stride alignment 15, fixing
0:00:00.770859937 7133 0xaaaae01be2d0 WARN vpu_dec_object gstvpudecobject.c:1442:gst_vpu_dec_object_decode:<vpudecobject0> gst_vpu_dec_object_send_output fail: not-negotiated

0:00:00.771077617 7133 0xaaaae01be2d0 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
0:00:00.771108697 7133 0xaaaae01be2d0 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.468344626
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
mendel@tuned-finch:~$

========================================================================


If I add videoconvert between vpudec and glupload it works but it consumes lots of CPU (around 60%).


mendel@tuned-finch:~$ gst-launch-1.0 --gst-debug=2 v4l2src device=/dev/video1 ! image/jpeg, width=3840, height=2160, framerate=30/1 ! vpudec ! videoconvert ! glupload ! glcolorconvert ! gldownload ! video/x-raw, format=RGB ! fakesink
Setting pipeline to PAUSED ...
0:00:00.320793265 7137 0xaaaaf8fcc0f0 WARN v4l2 v4l2_calls.c:543:gst_v4l2_subscribe_event:<v4l2src0> Cannot subscribe V4L2_EVENT_SOURCE_CHANGE or V4L2_EVENT_EOS event for device '/dev/video1'.
Pipeline is live and does not need PREROLL ...
Got context from element 'gldownloadelement0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayWayland\)\ gldisplaywayland0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.792089581 7137 0xaaaaf8fc6990 WARN videopool gstvideopool.c:198:video_buffer_pool_set_config:<videobufferpool3> allocation params alignment 0 is smaller than the max specified video stride alignment 15, fixing
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:01.473548393
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
0:00:01.991416594 7137 0xaaaaf8fc6990 WARN vpu_dec_object gstvpudecobject.c:1442:gst_vpu_dec_object_decode:<vpudecobject0> gst_vpu_dec_object_send_output fail: flushing
Related categories: Linux C++ Programming Computer Vision