Issue in running deepstream-dewarper-test sample

• Hardware Platform (Jetson / GPU) NVIDIA Jetson Nano (Developer Kit Version)
• DeepStream Version 5.0
• JetPack Version (valid for Jetson only) 4.4 [L4T 32.4.3]
• TensorRT Version 7.1.3.0

Q.1. I was trying to run deepstream-dewarper-test example. Currently nano is headless server, So, I am unable to display result on it. To run the dewarper sample, first I tried with fakesink and it run without any error and reached at the end of stream.
Then I used rtsp sink by taking reference from below link

But it didn’t play on my vlc media player.

Please help me in running dewarper sample using rtsp sink.

Q.2 when i tried same thing on NX Xavier using fakesink it gave me segmentation fault error.
NX has same configuration like nano except jetpack which is 4.4 DP [L4T 32.4.2]

In nano output I found below line:
in videoconvert caps = video/x-raw(memory:NVMM), format=(string)RGBA, framerate=(fraction)3000/77, width=(int)960, height=(int)752
But it was missing from NX output.
And related code block to above result is :

GstCaps *caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, "RGBA", NULL);
GstCapsFeatures *feature = gst_caps_features_new (MEMORY_FEATURES, NULL);
gst_caps_set_features (caps, 0, feature);
g_object_set (G_OBJECT (caps_filter), "caps", caps, NULL);

Is this something related to Jetpack version or with some missing libraries?

Q1: If your app can run, can you upload the source codes so that we can check if there is any problem?
Q2: Can the original deepstream-dewarper-test app work on your NX Xavier? If it can, then the problem is in the codes you added or modified. It is also important for you to upload your codes.

@Fiona.Chen,
As Nx and Nano are headless server. So, I can not display result at there.
So I tried to change the sink.

Experiment 1: using fake sink
In original code, I made two small changes:
sink = gst_element_factory_make ("fakesink", "nvvideo-renderer"); // changed nveglglessink to fakesink at line no. 344
and
if (!gst_element_link_many (streammux, tiler, sink, NULL)) // removed transform at line no. 376

below output is from Nano ===>
Now playing: file:///home/mohit/videos/3_d_2.mp4,
Decodebin child added: source
Decodebin child added: decodebin0
Running…
Decodebin child added: qtdemux0
Decodebin child added: multiqueue0
Decodebin child added: h264parse0
Decodebin child added: capsfilter1
Decodebin child added: nvv4l2decoder0
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
In cb_newpad
in videoconvert caps = video/x-raw(memory:NVMM), format=(string)RGBA, framerate=(fraction)3000/77, width=(int)960, height=(int)752
End of stream
Returned, stopping playback
Deleting pipeline

============
Below output belongs to NX ===>
Now playing: file:///home/mohit/videos/3_d_2.mp4,
Decodebin child added: source
Decodebin child added: decodebin0
Running…
Decodebin child added: qtdemux0
Decodebin child added: multiqueue0
Decodebin child added: h264parse0
Decodebin child added: capsfilter1
Decodebin child added: nvv4l2decoder0
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
In cb_newpad
Segmentation fault (core dumped)

So, from above output, I believe pipeline is not working well at nx.

Then second experiment, I tried with rtsp sink to see the output:
Experiment 2: using rtsp sink
For this I took reference from below link

so, I added few functions: start_rtsp_streaming, client_filter, destroy_sink_bin
added extra code for rtsp:
nvvidconv_rtsp = gst_element_factory_make (“nvvideoconvert”, “nvvidconv_rtsp”);

    encoder = gst_element_factory_make ("nvv4l2h265enc", "encoder");
    parse = gst_element_factory_make ("h265parse", "h265-parser");
    rtppay = gst_element_factory_make ("rtph265pay", "rtp-payer");
    sink_rtsp = gst_element_factory_make ("udpsink", "udp-sink");
    
    if (!nvvidconv_rtsp || !encoder || !parse || !rtppay || !sink_rtsp) {
    g_printerr ("One element could not be created at rtsp block. Exiting.\n");
    return -1;
  }

// also below code block.

if (!gst_element_link_many (streammux, tiler, nvvidconv_rtsp, encoder,  parse, rtppay, sink_rtsp,
                      NULL)) {
    g_printerr ("Elements could not be linked at end. Exiting.\n");
    return -1;
    }
    
    g_object_set (G_OBJECT (encoder), "preset-level", 1, NULL);
    g_object_set (G_OBJECT (encoder), "insert-sps-pps", 1, NULL);
    g_object_set (G_OBJECT (encoder), "bufapi-version", 1, NULL);
    g_object_set (G_OBJECT (sink_rtsp), "host", "224.224.255.255", "port",udp_port, "async", FALSE, "sync", 0, NULL);
    start_rtsp_streaming (8554, udp_port, 0);

But it didn’t played anything on my vlc using rtsp link.
Please find attached code file for both the experiments using fakesink and rtspsink.
deepstream_dewarper_test_rtsp_sink.c (17.2 KB)
deepstream_dewarper_test_fake_sink.c (13.6 KB)

It will be better to add “queue” before the nvv4l2h264enc.
Can you play the rtsp stream with our deepstream-app application? If it is so, just port “create_udpsink_bin()” to your application is enough.

Can the original deepstream-dewarper-test app work on your NX Xavier?

Hi Fiona,

NX xavier is headless server, so in original deepstream-dewarper-test, I made below changes just to check pipeline working or not:
sink = gst_element_factory_make ("nveglglessink", "nvvideo-renderer");
to
sink = gst_element_factory_make ("fakesink", "nvvideo-renderer");

And its giving me segmentation fault error on NX and no error in Nano.

I’ve tried on my NX board to use fakesink, no segment fault met.

Hi Fiona,

I have three devices:
Nano: 4.4 [L4T 32.4.3]
NX: 4.4 DP [L4T 32.4.2]
AGX: 4.4 DP [L4T 32.4.2]

Fakesink:
on nano its working fine.
On NX and AGX it is giving me error, which is also shown in previous replies.

And on Nano, I can see below line in output:
in videoconvert caps = video/x-raw(memory:NVMM), format=(string)RGBA, framerate=(fraction)3000/77, width=(int)960, height=(int)752

but above line is missing in nx and agx both.

The difference between nano and AGX/NX is of jetpack version.

Either it could be issue because of jetpack version or it could be issue of some library is not installed on nx/agx.

Do you suggest that we should try to change NX/AGX jetpack version or it could be something else.

I don’t get “in videoconvert caps = video/x-raw(memory:NVMM), format=(string)RGBA, framerate=(fraction)3000/77, width=(int)960, height=(int)752” output either. But there is no segment fault, and the modified app can run. So it is hard for us to know what is your problem.
Surely the latest Jetpack4.4 version and DeepStream 5.0 GA are recommended by us.