Here is what we are using in the GStreamer pipeline. This is a Jetson nano devkit with 4gb
gst-launch-1.0 nvarguscamerasrc gainrange="1 16" ispdigitalgainrange="1 1" ! "video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1" ! nvvidconv ! video/x-raw,width=3840,height=2160 ! gdkpixbufoverlay location=snaps5.png offset-x=100 offset-y=100 ! videoconvert ! nvoverlaysink sync=false
We can get the overlay working but it causes major lag in the video display.
i’ve read about other overlay solutions such as gst-inspect-1.0 | grep emboverlay
but this is not in our version of Gstreamer in Jetson Nano.
One last thing. Can’t the overlay be on another part of Tee pipeline? As if to say, 1 thread is the standing image and the other is the streaming video? Perhaps I am thinking of this incorrectly.
You may try using nvvidconv instead of videoconvert.
If not enough, you may try using nvcompositor, such as:
gst-launch-1.0 \
videotestsrc ! video/x-raw,width=640,height=480,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! queue ! comp.sink_0 \
filesrc location=snaps5.png ! pngdec ! videoconvert ! imagefreeze ! video/x-raw,framerate=30/1 ! nvvidconv compute-hw=GPU ! 'video/x-raw(memory:NVMM),format=NV12,width=100,height=100' ! queue ! comp.sink_1 \
nvcompositor name=comp sink_1::xpos=100 sink_1::ypos=100 sink_1::width=100 sink1::height=100 ! nvvidconv ! queue ! autovideosink
Here using nvvidconv property compute-hw to GPU because I’m rescaling a large PNG image into a smaller one by factor greater than 16 that is not supported by VIC in my current release…However if your image already has the good scale, you would omit this.
Here is what we tried and the resulting errors.
WARNING: erroneous pipeline: no property "compute-hw" in element "nvvconv1"
i checked this element with gst-inspect-1.0 and there is no such parameter as "compute-hw" in it
When taking out the compute-hw
gst-launch-1.0 \
> videotestsrc ! video/x-raw,width=640,height=480,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! queue ! comp.sink_0 \
> filesrc location=snaps5.png ! pngdec ! videoconvert ! imagefreeze ! video/x-raw,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12,width=100,height=100' ! queue ! comp.sink_1 \
> nvcompositor name=comp sink_1::xpos=100 sink_1::ypos=100 sink_1::width=100 sink1::height=100 ! nvvidconv ! queue ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
NvDdkVicConfigure Failed
nvbuffer_transform Failed
gst_nvvconv_transform: NvBufferTransform Failed
ERROR: from element /GstPipeline:pipeline0/GstImageFreeze:imagefreeze0: Internal data stream error.
Additional debug info:
gstimagefreeze.c(851): gst_image_freeze_src_loop (): /GstPipeline:pipeline0/GstImageFreeze:imagefreeze0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
First try:
gst-launch-1.0 nvarguscamerasrc gainrange="1 16" ispdigitalgainrange="1 1" ! "video/x-raw(memory:NVMM),width=3840,height=2160,framerate=30/1" ! nvvidconv ! video/x-raw,width=3840,height=2160 ! gdkpixbufoverlay location=snaps5.png offset-x=100 offset-y=100 ! nvvidconv ! nvoverlaysink sync=false
This property may only be supported with JP5 that is not available for Nano.
What is size of your PNG image ? You may resize it to a resolution closed to what you want for display:
gst-launch-1.0 filesrc location=snaps5.png ! pngdec ! videoscale ! video/x-raw,width=200,height=200 ! pngenc ! filesink location=snaps5_200x200.png
gst-launch-1.0 \
videotestsrc ! video/x-raw,width=640,height=480,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! queue ! comp.sink_0 \
filesrc location=snaps5_200x200.png ! pngdec ! videoconvert ! imagefreeze ! video/x-raw,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12,width=100,height=100' ! queue ! comp.sink_1 \
nvcompositor name=comp sink_1::xpos=100 sink_1::ypos=100 sink_1::width=100 sink1::height=100 ! nvvidconv ! queue ! autovideosink
system
Closed
May 2, 2023, 3:46pm
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.