How can I get my output address like rtsp or file address

my config file is below:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=1
columns=1
#width=704
#height=576

width=1920
height=1080
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=3
#uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
#uri=file:///home/dvadmin/wxp/safeHat/video/show-hat.avi
uri=rtsp://admin:be92319@192.168.0.641:554
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=1
type=3
codec=1
enc-type=0
bitrate=4000000
rtsp-port=8554
udp-port=5400
sync=0
#gpu-id=0
source-id=1
#nvbuf-memory-type=0
#profile=1
output-file=out_res.mp4
udp-buffer-size=100000

[osd]
enable=1
gpu-id=0
border-width=5
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5.txt

[tests]
file-loop=0

but I can not find out put file out_res.mp4
when I set sink0 type is 4, but I can not find out put rtsp url. I try to use rtsp://localhost:8554/ds_test but fail.
please help me think you very much

Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
• The pipeline being used

jetson_release -v

  • NVIDIA Jetson Xavier NX (Developer Kit Version)
    • Jetpack 4.6 [L4T 32.6.1]
    • NV Power Mode: MODE_20W_6CORE - Type: 8
    • jetson_stats.service: active
  • Board info:
    • Type: Xavier NX (Developer Kit Version)
    • SOC Family: tegra194 - ID:25
    • Module: P3668 - Board: P3509-000
    • Code Name: jakku
    • CUDA GPU architecture (ARCH_BIN): 7.2
    • Serial Number: 1424020013856
  • Libraries:
    • CUDA: 10.2.300
    • cuDNN: 8.2.1.32
    • TensorRT: 8.0.1.6
    • Visionworks: 1.6.0.501
    • OpenCV: 4.5.1 compiled CUDA: YES
    • VPI: ii libnvvpi1 1.1.15 arm64 NVIDIA Vision Programming Interface library
    • Vulkan: 1.2.70
  • jetson-stats:
    • Version 3.1.2
    • Works on Python 3.6.9

DeepStream Version 6.0.1
TensorRT Version 8.0.1.6
Issue Type questions
• How to reproduce the issue ?
When using the configuration file I wrote, the problems I described will occur
• The pipeline being used(config file)

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=1
columns=1
#width=704
#height=576

width=1920
height=1080
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=3
#uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
#uri=file:///home/dvadmin/wxp/safeHat/video/show-hat.avi
uri=rtsp://admin:be92319@192.168.0.641:554
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=1
type=3
codec=1
enc-type=0
bitrate=4000000
rtsp-port=8554
udp-port=5400
sync=0
#gpu-id=0
source-id=1
#nvbuf-memory-type=0
#profile=1
output-file=out_res.mp4
udp-buffer-size=100000

[osd]
enable=1
gpu-id=0
border-width=5
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5.txt

[tests]
file-loop=0

run log is below

WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
Deserialize yoloLayer plugin: yolo_93
Deserialize yoloLayer plugin: yolo_96
Deserialize yoloLayer plugin: yolo_99
0:00:05.616159735  5167      0x4219600 INFO                 nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1900> [UID = 1]: deserialized trt engine from :/home/dvadmin/wxp/tensorrtx/DeepStream-Yolo/model_b1_gpu0_fp32.engine
INFO: [Implicit Engine Info]: layers num: 4
0   INPUT  kFLOAT data            3x640x640
1   OUTPUT kFLOAT yolo_93         255x80x80
2   OUTPUT kFLOAT yolo_96         255x40x40
3   OUTPUT kFLOAT yolo_99         255x20x20

0:00:05.616422771  5167      0x4219600 INFO                 nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2004> [UID = 1]: Use deserialized engine model: /home/dvadmin/wxp/tensorrtx/DeepStream-Yolo/model_b1_gpu0_fp32.engine
0:00:05.627614037  5167      0x4219600 INFO                 nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/home/dvadmin/wxp/tensorrtx/DeepStream-Yolo/config_infer_primary_yoloV5.txt sucessfully

Runtime commands:
        h: Print this help
        q: Quit

        p: Pause
        r: Resume


**PERF:  FPS 0 (Avg)
**PERF:  0.00 (0.00)
** INFO: <bus_callback:194>: Pipeline ready

** INFO: <bus_callback:180>: Pipeline running

**PERF:  28.15 (27.98)
**PERF:  25.00 (26.41)
**PERF:  25.00 (25.92)
**PERF:  25.00 (25.68)
**PERF:  25.00 (25.54)
**PERF:  25.00 (25.45)
**PERF:  25.01 (25.38)
**PERF:  24.99 (25.34)
q
Quitting
App run successful

Hi, @857956556 .
You used rtsp source from the config file, the source type should be 4, not 3.
And if you want output rtsp source, you should setup the rtsp port and udp port correctly in your env.
You can refer below link to set config file correctly:
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_ref_app_deepstream.html?highlight=application

hi!
I still can’t get the RTSP URL, and the logs are normal.
how can I setup the rtsp port and udp port correctly in myenv. ?
in config file? or os environment?

Could you test your config file with a fakesink first to make sure your stream in your env works well?
You cannot use the mix sink mode. In your config file, you set the rtsp-port and set the output-file at the same time.
If you want to set sink the rtsp mode:

[sink0]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
sync=0
bitrate=4000000
# set below properties in case of RTSPStreaming
rtsp-port=8554
udp-port=5400

If you want to set sink the file mode:

[sink0]
#source1 output as filesink
enable=1
type=3
#1=mp4 2=mkv
container=1
#1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
enc-type=0
sync=1
#iframeinterval=10
bitrate=2000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0
output-file=out_source1.mp4
source-id=1

I’m very sorry, but I still can’t use the method you provided,my config file is below:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=1
columns=1
#width=704
#height=576

width=1920
height=1080
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=4
#uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
#uri=file:///home/dvadmin/wxp/safeHat/video/show-safetyhelmet.avi
uri=rtsp://admin:beSdeV99@192.168.0.64:554
#uri=rtmp://192.168.0.186:1980/live
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
sync=0
bitrate=4000000
#set below properties in case of RTSPStreaming
rtsp-port=8554
udp-port=5400

[osd]
enable=1
gpu-id=0
border-width=5
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5.txt

[tests]
file-loop=0

Hi, @857956556 .
You should enable sink0, and check your server by the link below:

rtsp://localhost:8554/ds-test

Also, you should make sure that your rtmp src is ok.

rtsp://admin:beSdeV99@192.168.0.64:554

when I enable sink0 The following faults have occurred

dvadmin@dvadmin-desktop:~/wxp/tensorrtx/DeepStream-Yolo$ deepstream-app -c deepstream_app_config_copy4.txt

(gst-plugin-scanner:923): GStreamer-WARNING **: 17:53:29.226: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtritonserver.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:923): GStreamer-WARNING **: 17:53:29.229: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so': librivermax.so.0: cannot open shared object file: No such file or directory
** ERROR: <create_udpsink_bin:603>: Failed to create 'sink_sub_bin_encoder1'
** ERROR: <create_udpsink_bin:676>: create_udpsink_bin failed
** ERROR: <create_sink_bin:781>: create_sink_bin failed
** ERROR: <create_processing_instance:815>: create_processing_instance failed
** ERROR: <create_pipeline:1326>: create_pipeline failed
** ERROR: <main:688>: Failed to create pipeline
Quitting
App run failed

when I add udp-buffer-size=100000 in sink0,no error is reported in the log, I use cv2.VideoCapture(‘rtsp://localhost:8554/ds-test’)try to receive RTSP, but fail, error log is below:

import cv2
>>> cap = cv2.VideoCapture('rtsp://localhost:8554/ds-test')
[tcp @ 0x334c6200] Connection to tcp://localhost:8554?timeout=0 failed: Connection refused
[ WARN:0] global /home/dvadmin/wxp/opencv-4.5.1/modules/videoio/src/cap_gstreamer.cpp (1825) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module source reported: Could not open resource for reading and writing.
[ WARN:0] global /home/dvadmin/wxp/opencv-4.5.1/modules/videoio/src/cap_gstreamer.cpp (914) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/dvadmin/wxp/opencv-4.5.1/modules/videoio/src/cap_gstreamer.cpp (501) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
[ERROR:0] global /home/dvadmin/wxp/opencv-4.5.1/modules/videoio/src/cap.cpp (142) open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.1) /home/dvadmin/wxp/opencv-4.5.1/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): rtsp://localhost:8554/ds-test in function 'icvExtractPattern'

Hi @857956556 , I just test your config in my env, it works OK. The error maybe related to your internet env.
This is my config:

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=1
columns=1
#width=704
#height=576

width=1920
height=1080
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=2
uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
#uri=file:///home/dvadmin/wxp/safeHat/video/show-safetyhelmet.avi
#uri=rtsp://admin:beSdeV99@192.168.0.64:554
#uri=rtmp://192.168.0.186:1980/live
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming
type=4
#1=h264 2=h265
codec=1
sync=0
bitrate=4000000
#set below properties in case of RTSPStreaming
rtsp-port=8554
udp-port=5400

[osd]
enable=1
gpu-id=0
border-width=5
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
model-engine-file=../../models/Primary_Detector/resnet10.caffemodel_b1gpu0_int8.engine
batch-size=1
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
interval=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary.txt

[tests]
file-loop=0

Below is my cli:

gst-launch-1.0 rtspsrc location=rtsp://localhost:8554/ds-test ! rtph264depay ! h264parse ! 'video/x-h264,stream-format=byte-stream' ! filesink location=test.h264

It works well, so please check your own internet env(ip, etc…)

ok,I decided to reinstall the jetpack system.There may be some unknown problems in the system.
think you very much!

Ok. I will mark this issue resolved. And if you get other issues about Deepstream, please open a new topic. Thanks

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