• 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.