nvv4l2h264enc not working with gst-rtsp-server

We are using a VLC viewer on a Windows machine to connect to the rtsp server on a xavier.

We are using test-launch.c with the following pipeline which fails without errors:

const char * pipeline_description_v4l2 =
"( "
"videotestsrc is-live=1 ! "
"video/x-raw, width=1280, height=720, format=(string)I420, framerate=(fraction)30/1 ! "
"nvvidconv ! "
"video/x-raw(memory:NVMM) ! "
"nvv4l2h264enc config-interval=1 ! "
“rtph264pay name=pay0 "
" )”
;

The following omx pipeline works fine:

const char * pipeline_description_omx =
"( "
"videotestsrc is-live=1 ! "
"video/x-raw, width=1920, height=1080, framerate=(fraction)30/1 ! "
"omxh264enc ! "
“rtph264pay name=pay0 "
" )”
;

I have searched the forums but have not seen any related problem not solution.

Thanks for your help.

You probably are missing the h264parse element in front of the h264enc element. The OMX one has a parser built in (pretty sure) whereas the nvv4l2h264enc does not.

Thanks for the suggestion, but that did not work at all. However, we did put the h264parse after the encoder. Now we are seeing a single displayed frame, not in VLC, but in a gst-launched rtspsrc pipeline. Our pipeline looks like this now:

const char * pipeline_description_v4l2 =
"( "
"videotestsrc is-live=1 ! "
"video/x-raw, width=1280, height=720, format=(string)I420, framerate=(fraction)30/1 ! "
"nvvidconv ! "
"video/x-raw(memory:NVMM), format=(string)I420 ! "
"nvv4l2h264enc insert-sps-pps=1 ! "
"h264pars4e config-interval=1 ! ",
“rtph264pay name=pay0 config-interval=1 "
" )”
;

It seems as the the data is not flowing for some reason…

You may add payload type into rtph264pay options:

rtph264pay name=pay0 <b>pt=96</b> config-interval=1

[EDIT: This won’t improve…default is 96 anyway. Sorry.
But I also notice a typo h264pars4e]

Hi,
We can observe the issue in using nvvl42h264enc and nvv4l2h265enc. Will check an update.
Please use omxh264enc and omxh265enc in test-launch as a quick solution on r32.2.

I am glad that you also see the behavior – I really did try every possible thing I could think of – even though the omx encoder worked fine. Looking forward for that update. Thank you all.

Hi,
A user has shared a solution. please give it a try.

Hi,
The patch is an official fix https://bugzilla.gnome.org/show_bug.cgi?id=796525
FYI.

Ok. What do we need to do in order to get the fix? (I am new to this environment.) Thx

Hi,
Please get the source package and check gst-nvvideo4linux2_src.tbz2
https://developer.nvidia.com/embedded/dlc/r32-2-1_Release_v1.0/TX2-AGX/sources/public_sources.tbz2

You have to apply the patch and re-build/replace libgstnvvideo4linux2.so

Couldn’t this be done by nvidia as a patch? Otherwise everyone will have to do this…

Hi,

We will have it included in next r32.3. Sicne it is full open source code, if you need to have the fix on r32.2.1, please fetch the code to apply the patch.