TX1 H265 encode rate-control mode VBR/CBR

i encode stream on tx1 and want to use rate-control mode vbr(Variable Bit Rate), in order to reduce video data and not reduce image quality.
i use demo in /home/ubuntu/tegra_multimedia_api/samples/01_video_encode/
execute in shell like:
./video_encode 420.yuv 1280 720 H265 cbr.h265 -br 4000000 -rc cbr
i get the encoded h265 file, which is 16MB
and then execute like:
./video_encode 420.yuv 1280 720 H265 vbr.h265 -br 4000000 -rc vbr
i get the encoded h265 file, which is also 16MB!

my input file 420.yuv, is almost motionless.
why vbr file size is not less then cbr file? (both 16405711 bytes)
is pamerater -rc effective?

How many YUV frames are in your 420.yuv? How do you generate it?

glad to hear from u.

400~2000 frames.(i have tried mand times)
i got yuv frames from a camera via v4l2 interface and wrote into local file.

camera faces a black corner, so the video is almost black.
i try to encode yuv using different bitrate(like 6000000 4000000 2000000 500000), the encoded h265 file’s size really different. but cbr & vbr encoded file size is always the same.

really confused.

Please try with the YUVs generated with

gst-launch-1.0 videotestsrc num-buffers=300 pattern=1 ! 'video/x-raw,width=1280,height=720,format=I420' ! filesink location=a.yuv

i get a.yuv which has 300 frames.
then encode it as before, the encoded file size is the same too. both 7.2MB (7467157 Bytes)

such is the encode cmd:
./video_encode a.yuv 1280 720 H265 a_cbr.h265 -br 6000000 -rc cbr --report-metadata
./video_encode a.yuv 1280 720 H265 a_vbr.h265 -br 6000000 -rc vbr --report-metadata

(i add snapshot picture of the test video to the attachment)

Could you try ‘pattern=0’ also?

gst-launch-1.0 videotestsrc num-buffers=300 pattern=0 ! 'video/x-raw,width=1280,height=720,format=I420' ! filesink location=a.yuv

‘pattern=1’ may not be good for comparing cbr/vbr. This was my bad suggestion.

i have just tried pattern=0 and the result is the same.(8268029 bytes)

have you proved it over there?
what’s the result?

I have the same case。
through the same conditions,exp: ./video_encode xx

We are checking this.

hi, DaneLLL.
is there any progress?
We are expecting a reply…
thanks a lot!

We are still checking and it needs some time.

This is not fixed in r28.1 release. We are still checking.

3Q,waiting for good news.

Hi plain, we shall have this fixed in next release.