Cannot introduce a delay in a deepstream pipeline - pipeline stalls when adding "min-threshold-buffers=5" to a queue

1.This is the GPU usage of test2 on AGX orin. GR3D_FREQ is the GPU usage percentage. I set the profile to MAXN (frq 1.3G), and the GPU usage is about 30-40%.

Please try setting it to MAXN and observe the GPU usage during program running.

Your Xavier NX GPU runs at 200-400Mhz, but the usage is lower. This data may be problematic. You also can try using jtop GitHub - rbonghi/jetson_stats: 📊 Simple package for monitoring and control your NVIDIA Jetson [Orin, Xavier, Nano, TX] series

GR3D_FREQ 22%@[1300,1290] NVENC off NVDEC 7%@115 NVJPG off NVJPG1 off VIC 44%@115 OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@49.406C soc2@46.218C soc0@45.781C gpu@44.093C tj@49.5C soc1@44.5C VDD_GPU_SOC 7268mW/7125mW VDD_CPU_CV 1530mW/1530mW VIN_SYS_5V0 4543mW/4543mW
GR3D_FREQ 34%@[1300,1287] NVENC off NVDEC 46%@115 NVJPG off NVJPG1 off VIC 46%@128 OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@49.312C soc2@46.343C soc0@45.75C gpu@44.343C tj@49.312C soc1@44.656C VDD_GPU_SOC 7268mW/7141mW VDD_CPU_CV 1530mW/1530mW VIN_SYS_5V0 4543mW/4543mW
GR3D_FREQ 43%@[1300,1300] NVENC off NVDEC 16%@115 NVJPG off NVJPG1 off VIC 25%@115 OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@49.5C soc2@46.218C soc0@45.718C gpu@44.281C tj@49.437C soc1@44.593C VDD_GPU_SOC 7268mW/7153mW VDD_CPU_CV 1530mW/1530mW VIN_SYS_5V0 4543mW/4543mW
GR3D_FREQ 27%@[1300,1300] NVENC off NVDEC 51%@115 NVJPG off NVJPG1 off VIC 59%@140 OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@49.625C soc2@46.25C soc0@45.968C gpu@44.593C tj@49.625C soc1@44.531C VDD_GPU_SOC 7268mW/7164mW VDD_CPU_CV 1530mW/1530mW VIN_SYS_5V0 4543mW/4543mW

2.Your v4l2src is set to 60 fps, but nvstreammux batched-push-timeout is 40ms. Please refer to the following two FAQs to adjust the parameters

3.If you don’t use any deepstream elements and run a pipeline like the one below, are the audio and video outputted in sync? If it’s out of sync, it could be a driver issue.

gst-launch-1.0 -e v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! videoconvert ! x264enc bitrate=2000 speed-preset=superfast tune=zerolatency ! h264parse ! queue ! mux. alsasrc device=default ! audioconvert ! audioresample ! audio/x-raw,rate=44100,channels=2 ! avenc_aac bitrate=128000 ! aacparse ! queue ! mux. qtmux name=mux ! filesink location=output.mp4