NVENC video encoder output h264 ghosting issue

The question stems from this topic: How to initialize a video encoder on Jetson Thor? - #10 by deeptalkcamera

Using r38_2_add_nvvideoencoder.zip for H.264 encoding and saving the encoded result, some ghosting can be seen on the screen during playback.

My code modifications to r38_2_add_nvvideoencoder.zip are as follows:

patch_and_h264output.zip (12.9 MB)

Our camera data format is YUV422 UYVY

This issue can also be reproduced when using 01_video_encode.

You can also try using 01_video_encode to test it.

Hi,

Thank you for your feedback.
Could you please check if the same issue can be reproduced on your side with the r36.x version?
If you have r36.x devices available, please try the same steps and let us know the result.

Thanks

With the same yuv420m data, we can see that Orin performs better than Thor.

Orin

(Package: nvidia-jetpack
Source: nvidia-jetpack (6.0)
Version: 6.0+b106):

Thor:

See attached video:

for_nv_1103.zip (20.1 MB)

Hi,

Please try modify ctx->enc->setBitrate(4<<20) < 0 to ctx->enc->setBitrate(12<<20) < 0, and setRateControlMode(V4L2_MPEG_VIDEO_BITRATE_MODE_CBR).

Please rerun and let us know the result.

Thanks

Increasing the bitrate is helpful, but it shouldn’t be the solution, right?

You can see that the size of H.264 also increases after encoding.

setBitrate(12<<20):

setBitrate(16<<20):

setBitrate(20<<20):

setBitrate(24<<20):

Hi,

Increasing the bitrate is a solution to address the ghosting issue, as it enhances image clarity and reduces motion artifacts.

Thanks

The question is that compared to ORIN, the same bitrate (4 << 20) doesn’t show any particularly noticeable motion artifacts. Is this a rollback issue?

Increasing the bitrate has negative effects on performance and compression ratio; we still hope to find a better solution.

Hi,

Since we’ve moved to the Video CODEC SDK, there may be differences in results between Orin and Thor. We’ll set up an environment to reproduce the issue.

In current situation, please try increasing the bitrate, or refer to this NVIDIA forum post for instructions on configuring the virtual buffer size with a fixed bitrate.

Thanks

Okay, I’ll use increasing the bitrate and configuring the virtual buffer size as a temporary workaround.

If you reproduce this issue internally and have a formal solution, please let me know. Thank you.

Hi,

We have reproduced the issue and will begin investigating it.
We’ll notify you once a formal solution is available.

Thanks

1 Like