Improve H265 compression artifacts in video recording

Hi all. I am a beginner that started using gstreamer recently and I’m looking for advice.
I am using Leopard Imaging IMX390 cameras on my Jetson to record from a vehicle and I noticed in my captures that the quality of the video drops significantly when the vehicle is going faster. I’m attaching a frame here to show what I mean. From the look I assume that the most likely cause is compression artifacts in my recording pipeline.

I would like to ask if anyone has any tips or suggestions to improve the quality of the video. I would like to reach a point where every frame looks good enough to be processed and doesn’t show this heavy compression.

This is my pipeline at the moment:

gst-launch-1.0 -v \
nvarguscamerasrc sensor-id=0 num-buffers=18000 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! \
nvv4l2h265enc control-rate=1 bitrate=8000000 ! 'video/x-h265, stream-format=(string)byte-stream' ! \
h265parse ! qtmux ! filesink location=video.mp4

What are the changes that would be worth trying or that would be the most effective? For example increase the bit-rate, use constant bit rate, use different encoders in the gstreamer pipeline?
If anyone has any tips from similar applications I’d be grateful to hear about it.

We suggest run in CBR mode and tune virtual buffer size. Please take a look at
Random blockiness in the picture RTSP server-client -Jetson TX2 - #5 by DaneLLL

Thank you very much! I’ll try this out!
As a general question, how much does the tuning of the H265 encoding affects the recordings performance?
I mean that I have been able to record 4 gmsl cameras without problem using the code above, would changing to CBR mode and virtual buffer size add a lot more load on the CPU or not change it significantly?

Setting CBR + virtual buffer size can balance the frame size and provide better PSNR. So suggest you give it a try.

Since there are individual hardware encoders in Xavier NX, you should not see CPU loading increase.

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