Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) NVIDIA-Jetson-Orin-Nano-Developer-kit • DeepStream Version 6.3 • JetPack Version (valid for Jetson only) JetPack 5.1.2
Hello I’m trying to run the deepstream-test5 app i’ve noticed that the Jetson Orin doesnt support HW encoding, even if i switch to software encoding I get 0 FPS.
This is the output :
sudo ./deepstream-test5-app -c configs/custom.txt
*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***
Runtime commands:
h: Print this help
q: Quit
p: Pause
r: Resume
NOTE: To expand a source in the 2D tiled display and view object details, left-click on the source.
To go back to the tiled display, right-click anywhere on the window.
** INFO: <bus_callback:239>: Pipeline ready
** INFO: <bus_callback:225>: Pipeline running
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 59.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Active sources : 1
**PERF: FPS 0 (Avg)
Wed Oct 4 12:18:47 2023
**PERF: 30.14 (3.22)
Active sources : 0
Wed Oct 4 12:18:52 2023
**PERF: 0.00 (1.55)
Active sources : 0
Wed Oct 4 12:18:57 2023
**PERF: 0.00 (1.02)
My config is below.
[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP 5=CSI
type=5
camera-width=1280
camera-height=720
camera-fps-n=30
camera-fps-d=1
[sink0]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming 5=nvdrmvideosink
type=4
#1=h264 2=h265
codec=1
#encoder type 0=Hardware 1=Software
enc-type=1
sync=0
bitrate=4000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
# set profile only for hw encoder, sw encoder selects profile based on sw-preset
profile=2
# set below properties in case of RTSPStreaming
rtsp-port=8554
udp-port=5400
using your deepstream_app.txt, I can’t reproduce this issue. here is the output log argus.txt (2.2 KB)
please do some tests.
please check if the source’s fps is stable, please refer to test command: gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! nvvideoconvert ! fpsdisplaysink
noticing the fps dropped from 30 to 0, please refer to DeepStream SDK FAQ - #12 by bcao 4 to measure the latency of the pipeline components.
Thanks for your reply, i was able to run the app with the RTSP Sink but i’m still having low fps. Is it because of the software encoder or is there a way to solve it ?
Output with RTSP Sink diasabled :
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3280 H = 2464
seconds to Run = 0
Frame Rate = 21.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Active sources : 1
**PERF: FPS 0 (Avg)
Mon Oct 9 10:36:01 2023
**PERF: 21.41 (21.22)
Active sources : 1
Mon Oct 9 10:36:06 2023
**PERF: 21.01 (21.10)
Active sources : 1
Mon Oct 9 10:36:11 2023
**PERF: 21.00 (21.06)
Active sources : 1
Mon Oct 9 10:36:16 2023
**PERF: 21.00 (21.05)
Active sources : 1
Mon Oct 9 10:36:21 2023
**PERF: 21.00 (21.04)
Active sources : 1
Mon Oct 9 10:36:26 2023
**PERF: 21.00 (21.03)
Output with RTSP Sink enabled :
But i noticed when i enable RTSP sink the fps drops and it is unstable:
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3280 H = 2464
seconds to Run = 0
Frame Rate = 21.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Active sources : 1
**PERF: FPS 0 (Avg)
Mon Oct 9 10:37:19 2023
**PERF: 19.74 (19.39)
Active sources : 1
Mon Oct 9 10:37:24 2023
**PERF: 17.55 (18.44)
Active sources : 1
Mon Oct 9 10:37:29 2023
**PERF: 10.60 (15.65)
Active sources : 1
Mon Oct 9 10:37:34 2023
**PERF: 19.31 (16.62)
Active sources : 1
Mon Oct 9 10:37:39 2023
**PERF: 13.83 (16.08)
Active sources : 1
Mon Oct 9 10:37:44 2023
**PERF: 9.28 (14.95)
Active sources : 1
Mon Oct 9 10:37:49 2023
**PERF: 19.08 (15.53)
Active sources : 1
Mon Oct 9 10:37:54 2023
**PERF: 15.95 (15.44)
Active sources : 1
Mon Oct 9 10:37:59 2023
**PERF: 10.27 (14.94)```
from the log, 720p resolution was not chosen, please refer to gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=1280, height=720’ ! …
Even if i switch to the 720p resolution i still get the same fps drop :
*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***
Runtime commands:
h: Print this help
q: Quit
p: Pause
r: Resume
** INFO: <bus_callback:239>: Pipeline ready
** INFO: <bus_callback:225>: Pipeline running
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 59.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Active sources : 1
**PERF: FPS 0 (Avg)
Tue Oct 10 08:14:05 2023
**PERF: 18.26 (17.89)
Active sources : 1
Tue Oct 10 08:14:10 2023
**PERF: 6.29 (11.93)
Active sources : 1
Tue Oct 10 08:14:15 2023
**PERF: 9.18 (10.93)
Active sources : 1
Tue Oct 10 08:14:20 2023
**PERF: 9.18 (10.49)```
This is the output with fakesink enabled, the problem should be related to RTSP output sink
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 59.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Active sources : 1
**PERF: FPS 0 (Avg)
Tue Oct 10 08:39:49 2023
**PERF: 30.42 (30.28)
Active sources : 1
Tue Oct 10 08:39:54 2023
**PERF: 30.01 (30.13)
Active sources : 1
Tue Oct 10 08:39:59 2023
**PERF: 30.00 (30.09)
Active sources : 1
Tue Oct 10 08:40:04 2023
**PERF: 30.01 (30.06)
Active sources : 1
Tue Oct 10 08:40:09 2023
**PERF: 30.00 (30.05)
you can set x264enc’s speed-preset property after creating the element.
the code path is create_udpsink_bin of opt\nvidia\deepstream\deepstream\sources\apps\apps-common\src\deepstream_sink_bin.c
then rebuild the code.
I have made this adjustment, and i’m still getting the same number of fps, i tried for the 3280x2464 resolution with the RTSP sink enabled i got the same fps drop:
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3280 H = 2464
seconds to Run = 0
Frame Rate = 21.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Active sources : 1
**PERF: FPS 0 (Avg)
Thu Oct 12 08:22:55 2023
**PERF: 17.09 (15.63)
Active sources : 1
Thu Oct 12 08:23:00 2023
**PERF: 5.54 (10.34)
Active sources : 1
Thu Oct 12 08:23:05 2023
**PERF: 9.76 (10.22)
Active sources : 1
Thu Oct 12 08:23:10 2023
**PERF: 9.38 (9.95)
Active sources : 1
Thu Oct 12 08:23:15 2023
**PERF: 9.51 (9.88)
Active sources : 1
Thu Oct 12 08:23:20 2023
**PERF: 9.44 (9.80)
Active sources : 1
Thu Oct 12 08:23:25 2023
**PERF: 9.38 (9.74)
This the modification i made :
if (config->enc_type == NV_DS_ENCODER_TYPE_SW) {
//bitrate is in kbits/sec for software encoder x264enc and x265enc
g_object_set (G_OBJECT (bin->encoder), "bitrate", config->bitrate / 1000,
NULL);
// added line of code
g_object_set(G_OBJECT(bin->encoder), "preset", "ultrafast", NULL);
} else {
g_object_set (G_OBJECT (bin->encoder), "bitrate", config->bitrate, NULL);
g_object_set (G_OBJECT (bin->encoder), "profile", config->profile, NULL);
g_object_set (G_OBJECT (bin->encoder), "iframeinterval",
config->iframeinterval, NULL);
}
Could this be related to the jetson setup or one of the drivers ? should i reinstall or use another jetpack/deepstream version ?
from the result, low fps should be caused by rtsp sink. you can compare the create_encode_file_bin and create_udpsink_bin, the work flows are different.
Does this mean that i have to make changes to the rtsp_sink implementation under deepstream_sink_bin.c file ? Or should i make changes to the RTSP sink group ?
you can check which element in RTSP sink will cause low fps. AYK, rtph264pay, udpsink are Gstreamer opensource code, you can check if modifying some parameter can accelerate.
Is this a common problem with Jetson Orin, or is it related to the current JetPack and DeepStream version? Do you think that by reinstalling JetPack and DeepStream, I can solve this?
It doesn’t make sense that the Jetson Orin has better performance than the Jetson Nano, yet the software encoder performs worse than the hardware encoder in the Nano. Is there another way to have the video output without a drastic decrease in the FPS?
In my case, I need to run DeepStream on four video sources and have the output using RTSP. Do you think that the board isn’t suitable for this kind of task?
There is no update from you for a period, assuming this is not an issue any more. Hence we are closing this topic. If need further support, please open a new one. Thanks.
Using SW encoding and “nvpmodel -m 0”, I can’t reproduce this low fps issue on Jetson Xavier, please refer to the test results. I did not modify x264enc’s speed-preset. cfg.txt (3.9 KB) log.txt (3.1 KB)