Some questions about nvcompositor, omxh264enc and nvv4l2h264enc

1、why the nvcompositor only surport the omxh264enc as encode element.
when we use the nvv4l2h264enc to encode the data from nvcompositor, it is coredump.

2、How to using nvv4l2h264enc to encode the data from nvcompositor
or there has another methord to workaround this issue?

3、omxh264enc and nvv4l2h264enc is processed by HW or SW ?

4、nvv4l2h264enc is open or not? how can we get the src code ?

Hi,
The nvcompositor plugin can work with nvv4l2h264enc. Please refer to the command:

gst-launch-1.0 videotestsrc num-buffers=100 is-live=1 ! video/x-raw,format=NV12,width=640,height=480 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! queue ! nvcompositor name=comp sink_0::xpos=0 sink_1::xpos=640 ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=test.mkv videotestsrc num-buffers=100 pattern=1 is-live=1 ! video/x-raw,format=NV12,width=640,height=480 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! queue ! comp.

You can try the command and then apply it to your use-case.

Both omxh264enc and nvv4l2h264enc are hardware encoders. We have deprecated omx plugins. Please use v4l2 plugins. The source code is in
https://developer.nvidia.com/embedded/linux-tegra
L4T Driver Package (BSP) Sources

Hi Danel,

1、I have executed the command by you shared,but it works only 3 seconds and stop.

2、I modify the command as follow and it can work but when playing the test.mkt file, the screen is black.

gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=RGBA’ ! queue !
nvcompositor name=comp sink_0::xpos=0 sink_1::xpos=640 ! ‘video/x-raw(memory:NVMM)’ ! nvvidconv ! nvv4l2h264enc ! h264parse ! matroskamux !
filesink location=test.mkv videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080 ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=RGBA’ ! queue ! comp.

can you help me to check the cmd? what's wrong ? why playing is black screen?

3、I download the src code from L4T Driver Package (BSP) Sources
but there has only gstv4l2videoenc.c, no nvv4l2h264enc code.
maybe I meet mistake and find the wrong code.

Thanks

Hi,
There is num-buffers=100 in the command, so it captures 100 frames(around 3 second) and then stops. We can see good video file by running the command. You may check if you can run the commands and see good frames:

$ export DISPLAY=:0
$ gst-launch-1.0 videotestsrc num-buffers=100 is-live=1 ! video/x-raw,format=NV12,width=640,height=480 ! videoconvert ! xvimagesink
$ export DISPLAY=:0
$ gst-launch-1.0 videotestsrc num-buffers=100 is-live=1 pattern=1 ! video/x-raw,format=NV12,width=640,height=480 ! videoconvert ! xvimagesink

Yes, gstv4l2videoenc.c is one of the files. Please follow README.txt to build and replace libgstnvvideo4linux2.so.

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