Gstreamer's omxh265dec and composers fail

Hello, all!

I wanna use HW decoder (Jetson Nano) and resizer simultaneously in OpenCV via Nvidia’s Gstreamer. I didn’t find any opportunity to use in OpenCV a pipeline with two appsinks(though in cmdline everything works). Here’s the sample of pipeline I wanna use.

gst-launch-1.0 filesrc location=… ! qtdemux ! queue ! h265parse ! omxh265dec ! tee name=decoded ! queue ! appsink name=1 decoded. ! queue ! nvvidconv ! video/x-raw,width=640,height=480 ! appsink name=2

This works (if you replace appsinks with jpeg encoders + multifilesinks particularly)
As a workaround to have only one appsink to work with OpenCV I’m going to use compositor(stack two images, bigger above smaller, right to smaller there’s a trashy pic, but it’s ok).

gst-launch-1.0 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=0 sink_1::ypos=1952 sink1::width=640 sink1::height=480 ! appsink filesrc location=… ! qtdemux ! queue ! h265parse ! omxh265dec ! tee name=decoded ! queue ! comp.sink_0 decoded. ! queue ! nvvidconv ! video/x-raw,width=640,height=480 ! queue ! comp.sink_1

It works with common gstreamer plugins(nvvidconv → videoscale, omxh265dec → libde265dec). But doesn’t work with Nvidia decoding and resizing plugins, compositor or nvcompositor. Either hangs or SIGSEGV-s. Could someone fix my workaround or better help to avoid compositors at all?

Hi,
We have deprecated omx plugins. Please use nvv4l2decoder plugin instead of omxh265dec.

You may try something like:

gst-launch-1.0 \
filesrc location=test_h265.mp4 ! qtdemux ! h265parse ! nvv4l2decoder ! 'video/x-raw(memory:NVMM), format=NV12' ! tee name=t \
t. ! queue ! comp.sink_0  \
t. ! queue ! comp.sink_1  \
nvcompositor name=comp sink_1::ypos=1080 ! 'video/x-raw(memory:NVMM),width=1920,height=2160'! nvvidconv ! 'video/x-raw,format=BGRx,width=960,height=1080' ! videoconvert ! appsink drop=1
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.