Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
WangxuP opened this issue Jun 8, 2022 · 5 comments
Closed

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

WangxuP opened this issue Jun 8, 2022 · 5 comments

Comments

@WangxuP
Copy link

WangxuP commented Jun 8, 2022

ENV:
NVIDIA Jetson Xavier NX (Developer Kit Version)
Jetpack 4.6 [L4T 32.6.1]
Board info:
Type: Xavier NX (Developer Kit Version)
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

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:[email protected]: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

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

@marcoslucianops
Copy link
Owner

Sink for save file:

[sink0]
enable=0
type=3
# 1 = mp4, 2 = mkv
container=1
# 1 = h264, 2 = h265
codec=1
# Encoder type: 0 = Hardware 1 = Software
enc-type=0
sync=0
bitrate=4000000
output-file=out.mp4
source-id=0

Sink for rtsp output:

[sink0]
enable=0
type=4
# 1 = h264, 2 = h265
codec=1
# Encoder type: 0 = Hardware 1 = Software
enc-type=0
sync=0
bitrate=400000
rtsp-port=8554
udp-port=5400

The output link for RTSP streaming is rtsp://localhost:8554/ds-test

You can use multiple sinks by change their numbers (example: [sink0], [sink1], etc)

@WangxuP
Copy link
Author

WangxuP commented Jun 11, 2022

I'm sorry, but I still can't output MP4 files or RTSP using the method you recommended.

@marcoslucianops
Copy link
Owner

Send me how is the deepstream_app_config.txt file after the changes.

@WangxuP
Copy link
Author

WangxuP commented Jun 14, 2022

In fact, I have consulted NVIDIA's official blog, but it still hasn't been resolved。see in: https://forums.developer.nvidia.com/t/how-can-i-get-my-output-address-like-rtsp-or-file-address/216888
my deepstream_app_config.txt 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:[email protected]: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

@marcoslucianops
Copy link
Owner

Sorry, but I don't know what's going on in your case. Here it works normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants