Video freezes on Xavier NX

• Hardware Platform (Jetson / GPU) - Jetson Xavier NX
• DeepStream Version - 6.0.1
• JetPack Version (valid for Jetson only) - 4.6.2
• TensorRT Version - 8.2.1.8
• Issue Type( questions, new requirements, bugs) - Question

We are using Jetson Xavier NX with ConnectTech Photon Board. Xavier NX is running on 15W 6Cores power mode and jetson clocks is also activated.

We were trying to record good quality video on SD card (SanDisk microSDHC Extreme Pro 64GB C10/U3/V30 which is optimized for video recording) with h265 encoding with mkv container format. We were using the following gst-pipeline:

gst-launch-1.0 nvarguscamerasrc timeout=600 bufapi-version=1  sensor-mode=0 aelock=false ispdigitalgainrange='1 1' tnr-mode=1 tnr-strength=0.5 ee-mode=0 gainrange='1 6' ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1' !  videorate drop-only=true average-period=133200000 max-rate=15 !   nvvideoconvert  !  nvdewarper config-file=/storage/config_files/nvdewarp_config.txt source-id=0 ! nvvideoconvert  !  nvv4l2h265enc bufapi-version=1  bitrate=10000000 peak-bitrate=12000000 ! h265parse ! matroskamux ! filesink location=/storage/results/test.mkv

While running this pipeline NVENC is at 115MHz. However, there were some freezes (5 - 10 freezes for 10 minutes) in the video. We have found there were missing frames.

Then we have tried to record video with h264 encoding with mp4 container format using the following gst-pipeline:

gst-launch-1.0 nvarguscamerasrc timeout=600 bufapi-version=1  sensor-mode=0 aelock=false ispdigitalgainrange='1 1' tnr-mode=1 tnr-strength=0.5 ee-mode=0 gainrange='1 6' ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1' !  videorate drop-only=true average-period=133200000 max-rate=15 !   nvvideoconvert  !  nvdewarper config-file=/storage/config_files/nvdewarp_config.txt source-id=0 ! nvvideoconvert  ! nvv4l2h264enc bitrate=10000000 peak-bitrate=12000000 ! h264parse ! qtmux ! filesink location=/storage/results/test.mp4

While running this pipeline NVENC is going up to 499MHz and if we change the board to 20W then it is going to 729MHz. In this video we had even more freezes.

We have decided to record video with vp9 using the following gst-pipeline:

gst-launch-1.0 nvarguscamerasrc timeout=600 bufapi-version=1 sensor-mode=0 aelock=false ispdigitalgainrange='1 1' tnr-mode=1 tnr-strength=0.5 ee-mode=0 gainrange='1 6' ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1' !  videorate drop-only=true average-period=133200000 max-rate=15 !   nvvideoconvert  !  nvdewarper config-file=/storage/config_files/nvdewarp_config.txt source-id=0 ! nvvideoconvert  ! nvv4l2vp9enc  enable-headers=1 bitrate=10000000 peak-bitrate=12000000 ! filesink location=/storage/results/test.vp9

While running this pipeline NVENC is at 115MHz. In this video we didn’t have any freezes so maybe we will use this pipeline to record the video.

Just for information, we are detecting freezes in the video with ffmpeg using the following command:

ffmpeg -i test.mkv -vf "freezedetect=n=-60dB:d=0.5,metadata=mode=print:file=test_mkv_recording_freeze_05s_15fps.txt" -map 0:v:0 -f null -

We thought the problem for the freezes might be writing to SD card and then we tried to record videos in the internal memory but we have the same problem.

Have you monitored the GPU and CPU usage while running the pipeline?

Yes, we have monitored the CPU and GPU usage while running the pipeline. The CPU is loaded at (20 - 25% for all cores) and GPU sometimes goes to 3%. It is the same for the three pipelines.

Can you provide the encoded video for us?

This is the video encoded with h265 and file which contains video freezes.

This is the video encoded with h264 and file which contains video freezes.

This is the video encoded with vp9 and file which contains video freezes.

There are no freezes in VP9 video, but in the other two videos (.mp4 and .mkv) there are several described in the attached txt files

I can see the “skip” in the video. But it is no use to compare the video with container(mp4, mkv) and the video without container(vp9). Have you tried to record the video into H264 and H265 raw data without containers(mp4, mkv)?

Thank you for your answer. We will test it in the next days and we will give you a feedback then

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Hello @dimitar.yankov , Do you still need support for this topic? Or should we close it? Thanks.

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