GUI overlay on video in IMX8m mini

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

GUI overlay on video in IMX8m mini

2,573 Views
greeranjunk
Contributor III

I would like to overlay GUI on top the video stream. When i use the gstream gdkpixbufoverlay with a simple image the cpu usage is high (100% on one of the four CPUs). In the future i would like to overlay my QT qml.

From the specs and community is see that imx8m-mini does not have an IPU, does not support frame buffers and does not support the gstqtoverlay package while the imx6 does. i was told not to use the imx6 as its old and its support might be a problem in the future, so i need to find a solution with the imx8m. 

is there a method for overlaying GUI on top the video stream that does heavily use the CPU or do i need to use another board (i need a low power board so the imx8 is not an option) even if its the old imx6 ?

thanks

Ran

0 Kudos
6 Replies

2,063 Views
prasad_imx8
Contributor III

There are so many people facing the same issue. Yet there is no solution. Sad!

0 Kudos

2,333 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

I suggest you use overlaysink source in your gstreamer pipe-line. For more information about how to do this. Please see the section 7.3.1.6.3 of the Linux User's Guide.

Best regards,

Diego.

0 Kudos

2,333 Views
greeranjunk
Contributor III

hi

i tried the example and i get

gst-launch-1.0 playbin uri=file://$FILE1 video-sink="overlaysink overlay-width=512 overlay-height=384"

i googled the problem and i see i am not the only one with this problem and there is no solution. could you telll me if i am missing something

thanks

0 Kudos

2,333 Views
diegoadrian
NXP Employee
NXP Employee

Could you please share your error log?

Best regards,

Diego.

0 Kudos

2,333 Views
greeranjunk
Contributor III

this is the output i get

GST_DEBUG=4 gst-launch-1.0 -v playbin uri=file://$FILE1 video-sink="overlaysink overlay-width=512 overlay-height=384" playbin uri=file://$FILE1 flags=0x41 video-sink="overlaysink overlay-left=512 overlay-width=512 overlay-height=384" playbin uri=file://$FILE1 flags=0x41 video-sink="overlaysink overlay-top=384 overlay-width=512 overlay-height=384" playbin uri=file://$FILE1 flags=0x41 video-sink="overlaysink overlay-left=512 overlay-top=384 overlay-width=512 overlay-height=384" playbin uri=file://$FILE1 flags=0x41 video-sink="overlaysink overlay-left=352 overlay-top=264 overlay-width=320 overlay-height=240 zorder=1"


0:00:00.000214379 528 0x30653a00 INFO GST_INIT gst.c:586:init_pre: Initializing GStreamer Core Library version 1.14.4
0:00:00.000333507 528 0x30653a00 INFO GST_INIT gst.c:587:init_pre: Using library installed in /usr/lib
0:00:00.000373632 528 0x30653a00 INFO GST_INIT gst.c:607:init_pre: Linux imx8mm-var-dart 4.14.98-g7514842c0bdb-dirty #9 SMP PREEMPT Wed Jan 22 09:11:29 IST 2020 aarch64
0:00:00.001101647 528 0x30653a00 INFO GST_INIT gstmessage.c:127:_priv_gst_message_initialize: init messages
0:00:00.002436799 528 0x30653a00 INFO GST_INIT gstcontext.c:84:_priv_gst_context_initialize: init contexts
0:00:00.002974560 528 0x30653a00 INFO GST_PLUGIN_LOADING gstplugin.c:317:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.003270191 528 0x30653a00 INFO GST_PLUGIN_LOADING gstplugin.c:225:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.003311817 528 0x30653a00 INFO GST_PLUGIN_LOADING gstplugin.c:227:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.003383568 528 0x30653a00 INFO GST_REGISTRY gstregistry.c:1727:ensure_current_registry: reading registry cache: /home/root/.cache/gstreamer-1.0/registry.aarch64.bin
0:00:00.043335250 528 0x30653a00 INFO GST_REGISTRY gstregistrybinary.c:621:priv_gst_registry_binary_read_cache: loaded /home/root/.cache/gstreamer-1.0/registry.aarch64.bin in 0.039858 seconds
0:00:00.043531129 528 0x30653a00 INFO GST_REGISTRY gstregistry.c:1583:scan_and_update_registry: Validating plugins from registry cache: /home/root/.cache/gstreamer-1.0/registry.aarch64.bin
0:00:00.050145263 528 0x30653a00 INFO GST_REGISTRY gstregistry.c:1685:scan_and_update_registry: Registry cache has not changed
0:00:00.050218014 528 0x30653a00 INFO GST_REGISTRY gstregistry.c:1762:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.050237265 528 0x30653a00 INFO GST_INIT gst.c:807:init_post: GLib runtime version: 2.54.3
0:00:00.050255640 528 0x30653a00 INFO GST_INIT gst.c:809:init_post: GLib headers version: 2.54.3
0:00:00.050269015 528 0x30653a00 INFO GST_INIT gst.c:810:init_post: initialized GStreamer successfully
0:00:00.050351267 528 0x30653a00 INFO GST_PIPELINE gstparse.c:337:gst_parse_launch_full: parsing pipeline description 'playbin uri=file:///home/root/2019-11-18-141513.webm video-sink=overlaysink\ overlay-width=512\ overlay-height=384 playbin uri=file:///home/root/2019-11-18-141513.webm flags=0x41 video-sink=overlaysink\ overlay-left=512\ overlay-width=512\ overlay-height=384 playbin uri=file:///home/root/2019-11-18-141513.webm flags=0x41 video-sink=overlaysink\ overlay-top=384\ overlay-width=512\ overlay-height=384 playbin uri=file:///home/root/2019-11-18-141513.webm flags=0x41 video-sink=overlaysink\ overlay-left=512\ overlay-top=384\ overlay-width=512\ overlay-height=384 playbin uri=file:///home/root/2019-11-18-141513.webm flags=0x41 video-sink=overlaysink\ overlay-left=352\ overlay-top=264\ overlay-width=320\ overlay-height=240\ zorder=1 '
0:00:00.054260471 528 0x30653a00 INFO GST_PLUGIN_LOADING gstplugin.c:901:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/gstreamer-1.0/libgstplayback.so" loaded
0:00:00.054332347 528 0x30653a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "playbin"
0:00:00.055425619 528 0x30653a00 INFO GST_PIPELINE gstparse.c:337:gst_parse_launch_full: parsing pipeline description 'overlaysink overlay-width=512 overlay-height=384'
0:00:00.055483621 528 0x30653a00 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "overlaysink"!
0:00:00.055517621 528 0x30653a00 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "overlaysink"
0:00:00.055569372 528 0x30653a00 ERROR GST_PIPELINE grammar.y:455:gst_parse_element_set: could not set property "video-sink" in element "playbin0" to "overlaysink overlay-width=512 overlay-height=384"
0:00:00.055603873 528 0x30653a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "playbin"
0:00:00.055843128 528 0x30653a00 INFO GST_PIPELINE gstparse.c:337:gst_parse_launch_full: parsing pipeline description 'overlaysink overlay-left=512 overlay-width=512 overlay-height=384'
0:00:00.055876628 528 0x30653a00 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "overlaysink"!
0:00:00.055900754 528 0x30653a00 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "overlaysink"
0:00:00.055939380 528 0x30653a00 ERROR GST_PIPELINE grammar.y:455:gst_parse_element_set: could not set property "video-sink" in element "playbin1" to "overlaysink overlay-left=512 overlay-width=512 overlay-height=384"
0:00:00.055969505 528 0x30653a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "playbin"
0:00:00.056207385 528 0x30653a00 INFO GST_PIPELINE gstparse.c:337:gst_parse_launch_full: parsing pipeline description 'overlaysink overlay-top=384 overlay-width=512 overlay-height=384'
0:00:00.056237261 528 0x30653a00 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "overlaysink"!
0:00:00.056261886 528 0x30653a00 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "overlaysink"
0:00:00.056308262 528 0x30653a00 ERROR GST_PIPELINE grammar.y:455:gst_parse_element_set: could not set property "video-sink" in element "playbin2" to "overlaysink overlay-top=384 overlay-width=512 overlay-height=384"
0:00:00.056339138 528 0x30653a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "playbin"
0:00:00.056537642 528 0x30653a00 INFO GST_PIPELINE gstparse.c:337:gst_parse_launch_full: parsing pipeline description 'overlaysink overlay-left=512 overlay-top=384 overlay-width=512 overlay-height=384'
0:00:00.056568142 528 0x30653a00 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "overlaysink"!
0:00:00.056591018 528 0x30653a00 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "overlaysink"
0:00:00.056628019 528 0x30653a00 ERROR GST_PIPELINE grammar.y:455:gst_parse_element_set: could not set property "video-sink" in element "playbin3" to "overlaysink overlay-left=512 overlay-top=384 overlay-width=512 overlay-height=384"
0:00:00.056698645 528 0x30653a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "playbin"
0:00:00.056940275 528 0x30653a00 INFO GST_PIPELINE gstparse.c:337:gst_parse_launch_full: parsing pipeline description 'overlaysink overlay-left=352 overlay-top=264 overlay-width=320 overlay-height=240 zorder=1'
0:00:00.056971151 528 0x30653a00 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "overlaysink"!
0:00:00.056995401 528 0x30653a00 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "overlaysink"
0:00:00.057033652 528 0x30653a00 ERROR GST_PIPELINE grammar.y:455:gst_parse_element_set: could not set property "video-sink" in element "playbin4" to "overlaysink overlay-left=352 overlay-top=264 overlay-width=320 overlay-height=240 zorder=1"
0:00:00.057067028 528 0x30653a00 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "pipeline"
WARNING: erroneous pipeline: could not set property "video-sink" in element "playbin0" to "overlaysink overlay-width=512 overlay-height=384"

0 Kudos

2,333 Views
greeranjunk
Contributor III

hi

does someone know why the overlay doesnt work in the imx8m-mini from the manual example?

thanks