Does NVCompositor work with a live src (and omxenc sink)

Hello folks!

Running R32 on Jetpack 4.4.1 here.

I’ve read in prior posts that nvcompositor is ONLY supposed to work in a omxh264dec pipeline and that the only acceptable sink is nvoverlaysink. However those posts were old and im wondering if this is now supported. I’m able to successfully use the pipeline in this fashion:

gst-launch-1.0 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1280 sink_0::height=720 sink_1::xpos=0 sink_1::ypos=720 sink_1::width=640 sink_1::height=360 nvarguscamerasrc sensor-id=0 do-timestamp=true ! queue ! comp. nvarguscamerasrc sensor-id=1 ! queue ! comp. comp. ! video/x-raw\(memory:NVMM\) ! nvvidconv ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux ! filesink location='out.mp4' -e

However the above fails when I try to use a sink other than filesink or overlaysink (like webrtcbin) - and before I go off the deepend trying to debug why the camera stops I wanted to find out if this is supported.

My webrtc pipeline works WITHOUT the compositor.

Thanks!

Hi,
Now nvcompositor plugin works with more plugins. Please refer to the sample pipeline:


And we have deprecated omx plugins. Please use v4l2 plugins such as nvv4l2h264enc, nvv4l2decoder.

@DaneLLL thanks a ton for clarifying.Seems like the error is elsewhere in my pipeline. If I use webrtcbin as the sink (instead of filesink) my camera stops working after a little while. Doesn’t happen with non-argus cameras OR if I don’t use the compositor so extra puzzling.

I have to use omx encoders since I’m looking for variable bitrate encoder for my pipeline. nvv4l2 doesn’t allow bitrate to be set when PLAYING.

Hi,
Dynamic bitrate should work in nvv4l2h264enc. Please try the sample in:
Allocating a GstBuffer of type "memory:NVMM"

Thanks @DaneLLL - this definitely works! However seems like I get a I-frame (or otherwise huge drop in qp) whenever I set the bitrate. Is that to be expected when the bitrate is low?

Hi,
It should be qp value adjusted per new bitrate setting. For checking it it is IDR frame, you can enable the property:

  insert-sps-pps      : Insert H.264 SPS, PPS at every IDR frame
                        flags: readable, writable
                        Boolean. Default: false

and apply the logic in the post: