Bitrate Comes Out Variable Inspite Of Selecting CBR

I am currently using the latest version of shotcut 24.11.17
I have a 1080p 60fps with 60000Kbps video recorded from obs(codec - HEVC_NVENC) which when i export after editing from shotcut with settings:- resolution 2k(2560x1440) ,60fps, codec hevc_nvenc, cbr at 60M, GOP of 15.
The exported video comes out with variable Bitrate. I had one timed used all the same setting mentioned above and exported video got constant bitrate and that also recently.

I have even used the other tab and pasted these but still same variable bitrate:-
mlt_service=avformat
vcodec=hevc_nvenc
width=2560
height=1440
aspect=1.777778
progressive=1
deinterlace_method=bwdif
rescale=hyper
frame_rate_num=60
frame_rate_den=1
color_range=mpeg
preset=default
bitrate=60000000
bufsize=1500
g=15
bf=0
threads=0
acodec=aac
channels=2
audio_bitrate=384k
sample_rate=48000
ar=48000

I would really appreciate any information regarding why its happening or if its working for you guys.

How do you know? Show us what you see to check this.

There is really no such thing as true constant bitrate for HEVC. Rather, CBR in this context within Shotcut means it much less variable than average bitrate because a decoder buffer size is included. (BTW, your buffer size for 60M is very low.)

This is the mediainfo output of the exported file :-

Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/mp41)
File size : 393 MiB
Duration : 1 min 15 s
Overall bit rate mode : Variable
Overall bit rate : 43.9 Mb/s
Frame rate : 60.000 FPS
Writing application : Lavf61.1.100

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L5@High
Codec ID : hev1
Codec ID/Info : High Efficiency Video Coding
Duration : 1 min 15 s
Bit rate : 43.6 Mb/s
Maximum bit rate : 60.0 Mb/s
Width : 2 560 pixels
Height : 1 440 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 60.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.197
Stream size : 390 MiB (99%)
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : hvcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 min 15 s
Source duration : 1 min 15 s
Bit rate mode : Variable
Bit rate : 335 kb/s
Maximum bit rate : 384 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 3.00 MiB (1%)
Source stream size : 3.00 MiB (1%)
Default : Yes
Alternate group : 1

Also as you mention my buffer size is very low , so how much should i increase it for 60M bitrate.

Basically, if you need to ask me then you should not be using CBR. :wink: This value is determined by things like transmission standard or device class/maker, things such as DVB, ATSC, and DVD. When it comes to a quality-size tradeoff, ABR is preferred because CBR gives tighter constraints: bits are spent in less complex areas that could have been better spent elsewhere.

I made some tests (4K60 hevc_nvenc GOP 15) and viewed the results with Shotcut’s Properties > menu > View Bitrate. MediaInfo is not detailed enough, and when I use it with these test outputs, it only shows me a single target bitrate value for both CBR and ABR. This does not surprise me; its output seems to vary a lot in certain areas by version. Basically, at 60M the difference between CBR and ABR is very small since there is so much bandwidth to work with:

Then, I made a comparison at 14M:

I hope this helped.

2 Likes

Thanks for the detailed information.