H265 Encoding works only with I-frames

Hello,
for our research paper we are comparing encoding from XAVIER NX hardware encoder with reference software implementation of h265 encoding. We are using the 01_video_encode sample with min QP set to 1 and max QP to 2 and also with constant QP values for encoding and a reference software for decoding.

Unfortunately the reference software decoder only decodes the bitstreams created by the NVIDIA-encoder when the --alliframes option is set while encoding. As soon as we try to use P-Frames the reference-decoder fails after the first I-frame Interval (Default = 30 Frames). Also the NVIDIA encoder does not use the given QP-values when using the --alliframes option.

I’m using the following commands for encoding:

I-frame Interval not set (Default =30):
./video_encode ~/EncodeHSIImages/project/HSI_test_images/2022_44x64yuv420_10bituint16_msb_aligned.yuv 512 512 H265 /home/jetson/EncodingResults/2022_10bituint16nv_1_2.h265 -p main10 --insert-vui -MinQpI 1 -MaxQpI 2 -MinQpP 1 -MaxQpP 2 -MinQpB 1 -MaxQpB 2 -hpt 4 -bd 10

I-frames only:
./video_encode ~/EncodeHSIImages/project/HSI_test_images/2022_44x64yuv420_10bituint16_msb_aligned.yuv 512 512 H265 /home/jetson/EncodingResults/Intra_only/2022_10bituint16nv_Intra_1_2.h265 -p main10 --insert-vui -MinQpI 1 -MaxQpI 2 -MinQpP 1 -MaxQpP 2 -MinQpB 1 -MaxQpB 2 -hpt 4 -bd 10 --alliframes

Do you have any idea why P-frames aren’t working and the encoder does not use the given QP-values for I-frames-only-encoding?

Best regards

And for your information, I’m using the following Jetson Linux:

R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t186ref, EABI: aarch64, DATE: Mon Jul 26 19:36:31 UTC 2021

Hi,
Please share more information. In your use-case, you would like to encoder a h265 stream which has only I frames and all frames have QP value=1. Is this correct?

Hi,
this is partly correct. Actually we just wanted to create a set of bitstreams from the same yuv-source-file with constant I-frame period of any number for every bitstream. The streams should only differ in their QP-values which should be constant over all frames of one stream.

We tried this with different I-frame period lengths and the QP-values stayed constant for all frames of one stream, but the reference decoder we used always failed after the first I-frame interval. For example with a period length set to 30 the decoder always crashed while decoding the 31st frame.
This is the first and more important issue we are facing.

Because using P-frames failed, we created streams with 01_video_encode sample with only I-frames from the same yuv-source-file. There we also wanted to have a different but constant QP-value for each stream. These only-I-frame bitstreams were decoded successfully by the reference decoder. The issue at this point was that the QP-values we set during encoding weren’t used but the encoder set a different QP-value for every frame, no matter which values we typed in.
This is the second issue.

Thanks in advance and best regards

Update:
We found out about the Ratecontrol mode of 01_video_encode sample which is set to constant bitrate (cbr) by default. This might be the reason the encoder always used the same QP-values with only-I-frames. But the 01_video_encode sample only offers “variable bitrate” (vbr) as other option for the Ratecontrol mode. NVENC Video Encoder API Programming Guide on the other hand says there is also the possibility to set rateControlMode to NV_ENC_PARAMS_RC_CONSTQP (Constant QP-values). The 01_video_encode sample offers the option to specify an external rate control param file (option -hf <hint_file_path>). Maybe this could be a way to set the Ratecontrol mode to Constant QP-values? My Question then would be, how the param file should look like or where I could find out about it, because until now I havent’t found something about it.

Hi,
Please share the GOP structure and QP value of each frame you would like to encode. So that we can check and suggest next. For example:

IDR(3) P(5) P(5) P(5) I(3) P(5) P(5) P(5) I(3) P(5) P(5) P(5) …

In CBR mode, obeying bit rate has higher priority so it is possible that configuring to fixed QP value may not work. Please set to VBR mode for a try.

Hi,
for example we would like to get something like the following:

HM software: Decoder Version [16.6] (including RExt)[Linux][GCC 4.8.3][64 bit]
POC    0 TId: 0 ( I-SLICE, QP  1 ) [DT  0.046] [L0 ] [L1 ] [:,(unk)]
POC    1 TId: 0 ( P-SLICE, QP  1 ) [DT  0.023] [L0 0 ] [L1 ] [:,(unk)]
POC    2 TId: 0 ( P-SLICE, QP  1 ) [DT  0.019] [L0 1 ] [L1 ] [:,(unk)]
POC    3 TId: 0 ( P-SLICE, QP  1 ) [DT  0.007] [L0 2 ] [L1 ] [:,(unk)]
POC    4 TId: 0 ( P-SLICE, QP  1 ) [DT  0.014] [L0 3 ] [L1 ] [:,(unk)]
POC    5 TId: 0 ( P-SLICE, QP  1 ) [DT  0.008] [L0 4 ] [L1 ] [:,(unk)]
POC    6 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 5 ] [L1 ] [:,(unk)]
POC    7 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 6 ] [L1 ] [:,(unk)]
POC    8 TId: 0 ( P-SLICE, QP  1 ) [DT  0.007] [L0 7 ] [L1 ] [:,(unk)]
POC    9 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 8 ] [L1 ] [:,(unk)]
POC   10 TId: 0 ( P-SLICE, QP  1 ) [DT  0.006] [L0 9 ] [L1 ] [:,(unk)]
POC   11 TId: 0 ( P-SLICE, QP  1 ) [DT  0.005] [L0 10 ] [L1 ] [:,(unk)]
POC   12 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 11 ] [L1 ] [:,(unk)]
POC   13 TId: 0 ( P-SLICE, QP  1 ) [DT  0.003] [L0 12 ] [L1 ] [:,(unk)]
POC   14 TId: 0 ( P-SLICE, QP  1 ) [DT  0.003] [L0 13 ] [L1 ] [:,(unk)]
POC   15 TId: 0 ( P-SLICE, QP  1 ) [DT  0.016] [L0 14 ] [L1 ] [:,(unk)]
POC   16 TId: 0 ( P-SLICE, QP  1 ) [DT  0.019] [L0 15 ] [L1 ] [:,(unk)]
POC   17 TId: 0 ( P-SLICE, QP  1 ) [DT  0.014] [L0 16 ] [L1 ] [:,(unk)]
POC   18 TId: 0 ( P-SLICE, QP  1 ) [DT  0.006] [L0 17 ] [L1 ] [:,(unk)]
POC   19 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 18 ] [L1 ] [:,(unk)]
POC   20 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 19 ] [L1 ] [:,(unk)]
POC   21 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 20 ] [L1 ] [:,(unk)]
POC   22 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 21 ] [L1 ] [:,(unk)]
POC   23 TId: 0 ( P-SLICE, QP  1 ) [DT  0.008] [L0 22 ] [L1 ] [:,(unk)]
POC   24 TId: 0 ( P-SLICE, QP  1 ) [DT  0.007] [L0 23 ] [L1 ] [:,(unk)]
POC   25 TId: 0 ( P-SLICE, QP  1 ) [DT  0.006] [L0 24 ] [L1 ] [:,(unk)]
POC   26 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 25 ] [L1 ] [:,(unk)]
POC   27 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 26 ] [L1 ] [:,(unk)]
POC   28 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 27 ] [L1 ] [:,(unk)]
POC   29 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 28 ] [L1 ] [:,(unk)]
POC    0 TId: 0 ( I-SLICE, QP  1 ) [DT  0.031] [L0 ] [L1 ] [:,(unk)]
POC    1 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 0 ] [L1 ] [:,(unk)]
POC    2 TId: 0 ( P-SLICE, QP  1 ) [DT  0.005] [L0 1 ] [L1 ] [:,(unk)]
POC    3 TId: 0 ( P-SLICE, QP  1 ) [DT  0.010] [L0 2 ] [L1 ] [:,(unk)]
POC    4 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 3 ] [L1 ] [:,(unk)]
POC    5 TId: 0 ( P-SLICE, QP  1 ) [DT  0.010] [L0 4 ] [L1 ] [:,(unk)]
POC    6 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 5 ] [L1 ] [:,(unk)]
POC    7 TId: 0 ( P-SLICE, QP  1 ) [DT  0.005] [L0 6 ] [L1 ] [:,(unk)]
POC    8 TId: 0 ( P-SLICE, QP  1 ) [DT  0.010] [L0 7 ] [L1 ] [:,(unk)]
POC    9 TId: 0 ( P-SLICE, QP  1 ) [DT  0.018] [L0 8 ] [L1 ] [:,(unk)]
POC   10 TId: 0 ( P-SLICE, QP  1 ) [DT  0.016] [L0 9 ] [L1 ] [:,(unk)]
POC   11 TId: 0 ( P-SLICE, QP  1 ) [DT  0.021] [L0 10 ] [L1 ] [:,(unk)]
POC   12 TId: 0 ( P-SLICE, QP  1 ) [DT  0.013] [L0 11 ] [L1 ] [:,(unk)]
POC   13 TId: 0 ( P-SLICE, QP  1 ) [DT  0.007] [L0 12 ] [L1 ] [:,(unk)]
POC   14 TId: 0 ( P-SLICE, QP  1 ) [DT  0.019] [L0 13 ] [L1 ] [:,(unk)]
POC   15 TId: 0 ( P-SLICE, QP  1 ) [DT  0.007] [L0 14 ] [L1 ] [:,(unk)]
POC   16 TId: 0 ( P-SLICE, QP  1 ) [DT  0.013] [L0 15 ] [L1 ] [:,(unk)]
POC   17 TId: 0 ( P-SLICE, QP  1 ) [DT  0.019] [L0 16 ] [L1 ] [:,(unk)]
POC   18 TId: 0 ( P-SLICE, QP  1 ) [DT  0.016] [L0 17 ] [L1 ] [:,(unk)]
POC   19 TId: 0 ( P-SLICE, QP  1 ) [DT  0.016] [L0 18 ] [L1 ] [:,(unk)]
POC   20 TId: 0 ( P-SLICE, QP  1 ) [DT  0.005] [L0 19 ] [L1 ] [:,(unk)]
POC   21 TId: 0 ( P-SLICE, QP  1 ) [DT  0.025] [L0 20 ] [L1 ] [:,(unk)]
POC   22 TId: 0 ( P-SLICE, QP  1 ) [DT  0.028] [L0 21 ] [L1 ] [:,(unk)]
POC   23 TId: 0 ( P-SLICE, QP  1 ) [DT  0.026] [L0 22 ] [L1 ] [:,(unk)]
POC   24 TId: 0 ( P-SLICE, QP  1 ) [DT  0.028] [L0 23 ] [L1 ] [:,(unk)]
POC   25 TId: 0 ( P-SLICE, QP  1 ) [DT  0.015] [L0 24 ] [L1 ] [:,(unk)]
POC   26 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 25 ] [L1 ] [:,(unk)]
POC   27 TId: 0 ( P-SLICE, QP  1 ) [DT  0.010] [L0 26 ] [L1 ] [:,(unk)]
POC   28 TId: 0 ( P-SLICE, QP  1 ) [DT  0.011] [L0 27 ] [L1 ] [:,(unk)]
POC   29 TId: 0 ( P-SLICE, QP  1 ) [DT  0.015] [L0 28 ] [L1 ] [:,(unk)]
POC    0 TId: 0 ( I-SLICE, QP  1 ) [DT  0.033] [L0 ] [L1 ] [:,(unk)]
POC    1 TId: 0 ( P-SLICE, QP  1 ) [DT  0.005] [L0 0 ] [L1 ] [:,(unk)]
POC    2 TId: 0 ( P-SLICE, QP  1 ) [DT  0.017] [L0 1 ] [L1 ] [:,(unk)]
POC    3 TId: 0 ( P-SLICE, QP  1 ) [DT  0.025] [L0 2 ] [L1 ] [:,(unk)]
POC    4 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 3 ] [L1 ] [:,(unk)]
POC    5 TId: 0 ( P-SLICE, QP  1 ) [DT  0.010] [L0 4 ] [L1 ] [:,(unk)]
POC    6 TId: 0 ( P-SLICE, QP  1 ) [DT  0.016] [L0 5 ] [L1 ] [:,(unk)]
POC    7 TId: 0 ( P-SLICE, QP  1 ) [DT  0.015] [L0 6 ] [L1 ] [:,(unk)]
POC    8 TId: 0 ( P-SLICE, QP  1 ) [DT  0.011] [L0 7 ] [L1 ] [:,(unk)]
POC    9 TId: 0 ( P-SLICE, QP  1 ) [DT  0.006] [L0 8 ] [L1 ] [:,(unk)]
POC   10 TId: 0 ( P-SLICE, QP  1 ) [DT  0.014] [L0 9 ] [L1 ] [:,(unk)]
POC   11 TId: 0 ( P-SLICE, QP  1 ) [DT  0.012] [L0 10 ] [L1 ] [:,(unk)]
POC   12 TId: 0 ( P-SLICE, QP  1 ) [DT  0.013] [L0 11 ] [L1 ] [:,(unk)]
POC   13 TId: 0 ( P-SLICE, QP  1 ) [DT  0.018] [L0 12 ] [L1 ] [:,(unk)]
POC   14 TId: 0 ( P-SLICE, QP  1 ) [DT  0.014] [L0 13 ] [L1 ] [:,(unk)]
POC   15 TId: 0 ( P-SLICE, QP  1 ) [DT  0.017] [L0 14 ] [L1 ] [:,(unk)]
POC   16 TId: 0 ( P-SLICE, QP  1 ) [DT  0.018] [L0 15 ] [L1 ] [:,(unk)]
POC   17 TId: 0 ( P-SLICE, QP  1 ) [DT  0.016] [L0 16 ] [L1 ] [:,(unk)]
POC   18 TId: 0 ( P-SLICE, QP  1 ) [DT  0.020] [L0 17 ] [L1 ] [:,(unk)]
POC   19 TId: 0 ( P-SLICE, QP  1 ) [DT  0.021] [L0 18 ] [L1 ] [:,(unk)]
POC   20 TId: 0 ( P-SLICE, QP  1 ) [DT  0.017] [L0 19 ] [L1 ] [:,(unk)]
POC   21 TId: 0 ( P-SLICE, QP  1 ) [DT  0.012] [L0 20 ] [L1 ] [:,(unk)]
POC   22 TId: 0 ( P-SLICE, QP  1 ) [DT  0.012] [L0 21 ] [L1 ] [:,(unk)]
POC   23 TId: 0 ( P-SLICE, QP  1 ) [DT  0.012] [L0 22 ] [L1 ] [:,(unk)]
POC   24 TId: 0 ( P-SLICE, QP  1 ) [DT  0.007] [L0 23 ] [L1 ] [:,(unk)]
POC   25 TId: 0 ( P-SLICE, QP  1 ) [DT  0.013] [L0 24 ] [L1 ] [:,(unk)]
POC   26 TId: 0 ( P-SLICE, QP  1 ) [DT  0.016] [L0 25 ] [L1 ] [:,(unk)]
POC   27 TId: 0 ( P-SLICE, QP  1 ) [DT  0.016] [L0 26 ] [L1 ] [:,(unk)]
POC   28 TId: 0 ( P-SLICE, QP  1 ) [DT  0.015] [L0 27 ] [L1 ] [:,(unk)]
POC   29 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 28 ] [L1 ] [:,(unk)]
POC    0 TId: 0 ( I-SLICE, QP  1 ) [DT  0.020] [L0 ] [L1 ] [:,(unk)]
POC    1 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 0 ] [L1 ] [:,(unk)]
POC    2 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 1 ] [L1 ] [:,(unk)]
POC    3 TId: 0 ( P-SLICE, QP  1 ) [DT  0.007] [L0 2 ] [L1 ] [:,(unk)]
POC    4 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 3 ] [L1 ] [:,(unk)]
POC    5 TId: 0 ( P-SLICE, QP  1 ) [DT  0.006] [L0 4 ] [L1 ] [:,(unk)]
POC    6 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 5 ] [L1 ] [:,(unk)]
POC    7 TId: 0 ( P-SLICE, QP  1 ) [DT  0.003] [L0 6 ] [L1 ] [:,(unk)]
POC    8 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 7 ] [L1 ] [:,(unk)]
POC    9 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 8 ] [L1 ] [:,(unk)]

 Total Time:        6.130 sec.

But instead the reference decoder always crashes at the 31st frame:

HM software: Decoder Version [16.6] (including RExt)[Linux][GCC 4.8.3][64 bit]
POC    0 TId: 0 ( I-SLICE, QP  1 ) [DT  0.048] [L0 ] [L1 ] [:,(unk)]
POC    1 TId: 0 ( P-SLICE, QP  1 ) [DT  0.051] [L0 0 ] [L1 ] [:,(unk)]
POC    2 TId: 0 ( P-SLICE, QP  1 ) [DT  0.081] [L0 1 0 ] [L1 ] [:,(unk)]
POC    3 TId: 0 ( P-SLICE, QP  1 ) [DT  0.042] [L0 2 1 0 ] [L1 ] [:,(unk)]
POC    4 TId: 0 ( P-SLICE, QP  1 ) [DT  0.049] [L0 3 2 1 0 ] [L1 ] [:,(unk)]
POC    5 TId: 0 ( P-SLICE, QP  1 ) [DT  0.076] [L0 4 3 2 1 ] [L1 ] [:,(unk)]
POC    6 TId: 0 ( P-SLICE, QP  1 ) [DT  0.012] [L0 5 4 3 2 ] [L1 ] [:,(unk)]
POC    7 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 6 5 4 3 ] [L1 ] [:,(unk)]
POC    8 TId: 0 ( P-SLICE, QP  1 ) [DT  0.006] [L0 7 6 5 4 ] [L1 ] [:,(unk)]
POC    9 TId: 0 ( P-SLICE, QP  1 ) [DT  0.008] [L0 8 7 6 5 ] [L1 ] [:,(unk)]
POC   10 TId: 0 ( P-SLICE, QP  1 ) [DT  0.006] [L0 9 8 7 6 ] [L1 ] [:,(unk)]
POC   11 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 10 9 8 7 ] [L1 ] [:,(unk)]
POC   12 TId: 0 ( P-SLICE, QP  1 ) [DT  0.005] [L0 11 10 9 8 ] [L1 ] [:,(unk)]
POC   13 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 12 11 10 9 ] [L1 ] [:,(unk)]
POC   14 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 13 12 11 10 ] [L1 ] [:,(unk)]
POC   15 TId: 0 ( P-SLICE, QP  1 ) [DT  0.012] [L0 14 13 12 11 ] [L1 ] [:,(unk)]
POC   16 TId: 0 ( P-SLICE, QP  1 ) [DT  0.019] [L0 15 14 13 12 ] [L1 ] [:,(unk)]
POC   17 TId: 0 ( P-SLICE, QP  1 ) [DT  0.014] [L0 16 15 14 13 ] [L1 ] [:,(unk)]
POC   18 TId: 0 ( P-SLICE, QP  1 ) [DT  0.006] [L0 17 16 15 14 ] [L1 ] [:,(unk)]
POC   19 TId: 0 ( P-SLICE, QP  1 ) [DT  0.003] [L0 18 17 16 15 ] [L1 ] [:,(unk)]
POC   20 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 19 18 17 16 ] [L1 ] [:,(unk)]
POC   21 TId: 0 ( P-SLICE, QP  1 ) [DT  0.005] [L0 20 19 18 17 ] [L1 ] [:,(unk)]
POC   22 TId: 0 ( P-SLICE, QP  1 ) [DT  0.009] [L0 21 20 19 18 ] [L1 ] [:,(unk)]
POC   23 TId: 0 ( P-SLICE, QP  1 ) [DT  0.008] [L0 22 21 20 19 ] [L1 ] [:,(unk)]
POC   24 TId: 0 ( P-SLICE, QP  1 ) [DT  0.007] [L0 23 22 21 20 ] [L1 ] [:,(unk)]
POC   25 TId: 0 ( P-SLICE, QP  1 ) [DT  0.007] [L0 24 23 22 21 ] [L1 ] [:,(unk)]
POC   26 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 25 24 23 22 ] [L1 ] [:,(unk)]
POC   27 TId: 0 ( P-SLICE, QP  1 ) [DT  0.005] [L0 26 25 24 23 ] [L1 ] [:,(unk)]
POC   28 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 27 26 25 24 ] [L1 ] [:,(unk)]
POC   29 TId: 0 ( P-SLICE, QP  1 ) [DT  0.004] [L0 28 27 26 25 ] [L1 ] [:,(unk)]
POC   30 TId: 0 ( I-SLICE, QP  1 ) [DT  0.027] [L0 ] [L1 ] [:,(unk)]
TAppDecoderStatic.dat: /HEVC/HM-16.6/build/linux/lib/TLibCommon/../../../../source/Lib/TLibCommon/TComSlice.cpp:542: Void TComSlice::checkCRA(const TComReferencePictureSet*, Int&, NalUnitType&, TComList<TComPic*>&): Assertion `getPOC()+pReferencePictureSet->getDeltaPOC(i) >= pocCRA' failed.
Aborted

Are we doing something wrong when using the 01_video_encode sample?
Again the command I used for executing the encoder-sample is:

./video_encode ~/EncodeHSIImages/project/HSI_test_images/2022_44x64yuv420_10bituint16_msb_aligned.yuv 512 512 H265 /home/jetson/EncodingResults/2022_10bituint16nv_1_2.h265 -p main10 --insert-vui -MinQpI 1 -MaxQpI 2 -MinQpP 1 -MaxQpP 2 -MinQpB 1 -MaxQpB 2 -hpt 4 -bd 10

Hi,
Please try the commands:

8-bit YUV420

$ gst-launch-1.0 videotestsrc num-buffers=166 ! video/x-raw,width=512,height=512 ! filesink location=i420_512x512.yuv
$ ./video_encode i420_512x512.yuv 512 512 H265 a.h265 --report-metadata -MinQpI 0 -MaxQpI 1 -MinQpP 0 -MaxQpP 1 -rc vbr
$ DISPLAY=:0 gst-launch-1.0 filesrc location= a.h265 ! h265parse ! nvv4l2decoder ! nvvidconv ! nvegltransform ! nveglglessink
$ ./video_encode i420_512x512.yuv 512 512 H265 a.h265 --report-metadata -MinQpI 0 -MaxQpI 1 -rc vbr -idri 1

10-bit YUV420

$ gst-launch-1.0 videotestsrc num-buffers=166 ! video/x-raw,width=512,height=512,format=P010_10LE ! filesink location=p010_10le_512x512.yuv
$ ./video_encode p010_10le_512x512.yuv 512 512 H265 b.h265 --report-metadata -MinQpI 0 -MaxQpI 1 -MinQpP 0 -MaxQpP 1 -rc vbr -bd 10 -p main10 --sp
$ DISPLAY=:0 gst-launch-1.0 filesrc location= b.h265 ! h265parse ! nvv4l2decoder ! nvvidconv ! nvegltransform ! nveglglessink
$ ./video_encode p010_10le_512x512.yuv 512 512 H265 b.h265 --report-metadata -MinQpI 0 -MaxQpI 1 -rc vbr -bd 10 -p main10 --sp -idri 1

Hi,

thanks a lot! The reference decoder worked with the gst-yuv-file that was created in your first command and with our yuv-source-files. Both worked 8- and 10-bit and nothing crashed anymore.
But it is still only possible to use QP-values from 1 to 18. Is there a way to set the QP-values to negative for example -1? Or set them higher than 18?

Thanks in advance.

Just for your information:
I compared the command you suggested with the one we used before and tested every option that was set in the commands for its impact on the result. The critical option set for the encoder-sample that kept the reference decoder crashing was -hpt 4 which is described as the following:
HW preset type (1 = ultrafast, 2 = fast, 3 = medium, 4 = slow)
Without the option everything worked well.

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