DeepStream 3.0 : Question about "deepstream-test3-app rtst://...." on Xavier

Hello! Could anyone help me for this question ?

I want to play rtsp format stream from video camera with Deepstream 3.0 on Xavier.
The rtsp address of the video camera is “rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp?”

When I run deepstream-test3-app on Xavier,I met the follow question :

the log is printed as follows:

"
nvidia@jetson-0423218011183:~/Deepstream/DeepStreamSDK-Jetson-3.0_EA_beta5.0/deepstream_sdk_on_jetson/sources/apps/sample_apps/deepstream-test3$ deepstream-test3-app rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp?
[4] 10351
[5] 10352
[6] 10353
[1] Done deepstream-test3-app rtsp://192.168.1.104:554/user=admin
[2] Done password=1
[3] Done channel=1
nvidia@jetson-0423218011183:~/Deepstream/DeepStreamSDK-Jetson-3.0_EA_beta5.0/deepstream_sdk_on_jetson/sources/apps/sample_apps/deepstream-test3$ WARNING: Overriding infer-config batch-size (2) with number of sources (1)
Now playing: rtsp://192.168.1.104:554/user=admin,

Warning. Could not open model engine file /home/nvidia/Deepstream/DeepStreamSDK-Jetson-3.0_EA_beta5.0/deepstream_sdk_on_jetson/sources/apps/sample_apps/deepstream-test3/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b2_int8.engine
Generating new TRT model engine
generateTRTModel network_mode 1 creating builder
generateTRTModel network_mode 1 creating network
generateTRTModel network_mode 1 created network
Using INT8 data type.

***** Storing serialized engine file as /home/nvidia/Deepstream/DeepStreamSDK-Jetson-3.0_EA_beta5.0/deepstream_sdk_on_jetson/sources/apps/sample_apps/deepstream-test3/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_int8. batchsize = 1 *****

Running…
ERROR from element source: Could not get/set settings from/on resource.
Error details: gstrtspsrc.c(7503): gst_rtspsrc_retrieve_sdp (): /GstPipeline:dstest3-pipeline/GstBin:source-bin-00/GstURIDecodeBin:uri-decode-bin/GstRTSPSrc:source:
Server can not provide an SDP.
Returned, stopping playback
Deleting pipeline

"

Any idea to solve this problem, I’ll be appreciated!

Hi,
Does it work if you set uri to a local file?

file:///home/nvidia/deepstream_sdk_on_jetson/samples/streams/sample_720p.mp4

Hi,DaneLLL

yes, the local files can be played well.

Any suggestion ?

I’ll be appreciated for your reply.

Hi,
You can modify the code to replace uridecodebin with ‘rtspsrc ! rtph264depay ! h264parse ! omxh264dec’.
Below is a sample pipeline:

$ gst-launch-1.0 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov ! rtph264depay ! h264parse ! omxh264dec ! nvoverlaysink

Hi,DaneLLL

Thanks for your reply.

I tried this pipeline before:

gst-launch-1.0 playbin uri=rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov

It’s played well.

and I follow your suggestion to enter:

gst-launch-1.0 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov ! rtph264depay ! h264parse ! omxh264dec ! nvoverlaysink

It also does work.

But, what we want to do is to make this rtsp address “rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp?” work well.

This rtsp stream we played with vlc, it’s ok.

We tried this pipeline cmd:
gst-launch-1.0 playbin uri=rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp?

The log is printed as follows:

nvidia@jetson-0423218011183:~$ gst-launch-1.0 playbin uri=rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp?
[1] 10796
[2] 10797
[3] 10798
nvidia@jetson-0423218011183:~$ Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.104:554/user=admin
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not get/set settings from/on resource.
Additional debug info:
gstrtspsrc.c(7503): gst_rtspsrc_retrieve_sdp (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Server can not provide an SDP.
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

And then , I tried another way with a code file:

int main(int argc, char **argv)
{

GstElement *pipeline;
GstMessage *msg;
GstBus *bus;

gst_init(&argc,&argv);

pipeline = gst_parse_launch("playbin uri=rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp?",NULL);

gst_element_set_state(pipeline,GST_STATE_PLAYING);
bus = gst_element_get_bus(pipeline);
msg = gst_bus_timed_pop_filtered(bus,GST_CLOCK_TIME_NONE,GST_MESSAGE_ERROR|GST_MESSAGE_EOS);

if(msg!=NULL)
{
	gst_message_unref(msg);
}

gst_object_unref(bus);
gst_element_set_state(pipeline, GST_STATE_NULL);
gst_object_unref(pipeline);

return 0;

}

In the code file way , we can play this rtsp stream .

There is the answer I want to get :
<No . 1> why the same rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp? can be played well with file code ,but cannot be played with pipeline command
<No . 2> The BigBuckBunny video file can be played well, why another rstp stream cannot be played?(rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp? This stream already tested with vlc is ok.)

Thanks for your reading and any reply.
I’ll be appreciated.

And by the way ,I tried deepstream-test3 with BigBuckBunny, it also does not work well. The display stopped at the first black frame.

And the log is printed as follows :

nvidia@jetson-0423218011183:~/Deepstream/DeepStreamSDK-Jetson-3.0_EA_beta5.0/deepstream_sdk_on_jetson/sources/apps/sample_apps/deepstream-test3$ deepstream-test3-app rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov
WARNING: Overriding infer-config batch-size (2) with number of sources (1)
Now playing: rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov,

Warning. Could not open model engine file /home/nvidia/Deepstream/DeepStreamSDK-Jetson-3.0_EA_beta5.0/deepstream_sdk_on_jetson/sources/apps/sample_apps/deepstream-test3/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b2_int8.engine
Generating new TRT model engine
generateTRTModel network_mode 1 creating builder
generateTRTModel network_mode 1 creating network
generateTRTModel network_mode 1 created network
Using INT8 data type.

***** Storing serialized engine file as /home/nvidia/Deepstream/DeepStreamSDK-Jetson-3.0_EA_beta5.0/deepstream_sdk_on_jetson/sources/apps/sample_apps/deepstream-test3/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_int8. batchsize = 1 *****

Running…
WARNING from element source: Could not read from resource.
Warning: Could not read from resource.
NvMMLiteOpen : Block : BlockType = 261
NvMMLiteBlockCreate : Block : BlockType = 261
Allocating new output: 240x160 (x 11), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3528: Send OMX_EventPortSettingsChanged: nFrameWidth = 240, nFrameHeight = 160
nvstreamtiler: batchSize set as 1
—> NVMEDIA: Video-conferencing detected !!!

Hi,
You may enable debug prints to now what plugins are picked by playbin:

$ export GST_DEBUG=*FACTORY*:4

and then manually add the plugins to replace uridecodebin in deepstream-test3

Hi , DaneLLL

First, we tried this pipeline is ok!:

pipeline = gst_parse_launch(“rtspsrc location=rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp? ! rtph264depay ! h264parse ! omxh264dec ! nvoverlaysink”,NULL); //ok

But when we want to add nvstreammux to this pipeline , it doesn’t work!
pipeline = gst_parse_launch(“rtspsrc location=rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp? ! rtph264depay ! h264parse ! omxh264dec ! nvstreammux
! nvoverlaysink”,NULL); //not ok

and "–gst-debug-level=4 " ERROR is printed as follows:

0:00:00.090042249 10524 0x55b1bb7ec0 INFO GST_ELEMENT_PADS gstutils.c:1774:gst_element_link_pads_full: trying to link element omxh264dec-omxh264dec0:(any) to element nvstreammux0:(any)
0:00:00.090092042 10524 0x55b1bb7ec0 ERROR nvstreammux gstnvstreammux.c:959:gst_nvstreammux_request_new_pad: Pad should be named ‘sink_%u’ when requesting a pad
0:00:00.090120842 10524 0x55b1bb7ec0 INFO GST_ELEMENT_PADS gstutils.c:1227:gst_element_get_compatible_pad: Could not find a compatible pad to link to omxh264dec-omxh264dec0:src
0:00:00.090143690 10524 0x55b1bb7ec0 INFO default gstutils.c:2162:gst_element_link_pads_filtered: Could not link pads: omxh264dec-omxh264dec0:(null) - nvstreammux0:(null)
0:00:00.090163274 10524 0x55b1bb7ec0 ERROR GST_PIPELINE grammar.y:740:gst_parse_perform_link: could not link omxh264dec-omxh264dec0 to nvstreammux0

we tried to get request pad from nvstreammux, but failed .

Do you have any idea to show us how to use nvstreammux correctly?

I’ll be appreciated for your reply!

Hi,
nvstreammux is designed to work with nvinfer. May not work to link with nvoverlaysink
You may make [rtspsrc location=rtsp://192.168.1.104:554/user=admin&password=1&channel=1&stream=0.sdp? ! rtph264depay ! h264parse ! omxh264dec] into source_bin in deepstream-test3.

Hi , DaneLLL

If we want to replace the “uridecodebin” in create_source_bin function in deepstream-test3, how to change the “pad-added” signal to “uridecodebin”?

/* Connect to the “pad-added” signal of the decodebin which generates a

  • callback once a new pad for raw data has beed created by the decodebin */
    g_signal_connect (G_OBJECT (uri_decode_bin), “pad-added”,
    G_CALLBACK (cb_newpad), bin);

I’ll be appreciated for your reply!

Hi , DaneLLL

This error is about omxh264dec cannot be linked to nvstreammux, not link nvstreammux to nvnvoverlaysink. Could you offer me any idea about this question ? Thanks a lot!

Hi,
Please refer to attachment. It shows how to link omxh264dec and nvstreammux.
deepstream_test1_app.zip (3.7 KB)

Hi , DaneLLL

If I want to get the YUV data from omxh264dec after decoding, could you show me the method ? Adding probe to omxh264dec element?
We won’t use nvosd and nvoverlaysink to display the video.What we want is to get the YUV data for further processing.

I’ll be appreciated for your reply!

Hi,
Please try nvivafilter plugin. Below post for your reference.
[url]https://devtalk.nvidia.com/default/topic/963123/jetson-tx1/video-mapping-on-jetson-tx1/post/4979740/#4979740[/url]