Page 1 of 1

output h.265 CBR

PostPosted: Mon Jan 17, 2022 11:47 am
by Lauri Astala
Hi,

I'm trying to find a way to deliver a 4K video file in h.265 CBR, but cannot find anywhere how to make the setting to CBR. Is that not possible? And if it is possible, how to do that?

(I can easily deliver 4K h.265, but there is no setting for CBR.)

Thanks in advance!

DR 16.2.8, OSX 10.14.6

Re: output h.265 CBR

PostPosted: Mon Jan 17, 2022 11:49 am
by Uli Plank
Export in good intermediate codec and then use HandBrake.

Re: output h.265 CBR

PostPosted: Mon Jan 17, 2022 1:06 pm
by ChipKng
Have you tried with DR 17.4.3 ?

Re: output h.265 CBR

PostPosted: Mon Jan 17, 2022 8:01 pm
by Lauri Astala
Thank you for your replies!

@Uli, I tried HandBreak, but it seems that "constant quality" does not mean CBR. So, I still wonder if it can do CBR?

@Csaba, no I haven't tried DR17 for other reasons (middle of a project). However, it would be very useful and nice if you (or someone else) could confirm that outputting h.265 with CBR was possible with DR17.4.3

Thanks again in advance!

Re: output h.265 CBR

PostPosted: Mon Jan 17, 2022 10:51 pm
by Mads Johansen
You can set Resolve to use a constant bitrate with the nvidia encoder. You can not set what the bitrate is.

The more interesting question is, why? What do you need a constant bitrate for?

Re: output h.265 CBR

PostPosted: Mon Jan 17, 2022 11:38 pm
by Uli Plank
Constant quality is the logical opposite of CBR for GOP codecs

Re: output h.265 CBR

PostPosted: Tue Jan 18, 2022 9:12 am
by Lauri Astala
Thanks again for your replies!

@Mads, well, I need the file for an exhibition projection, and (in this case) I need to play the file from a player. Players have bitrate limits, and I need to maximise the quality. Therefore, to maximise the quality, I need to have constant bitrate that is set close to the max bit rate of the player.

@Uli, ok, yes, very logical. But then HandBrake cannot deliver CBR – the other option (instead of Constant Quality) is Average Bitrate, which is not constant bitrate either.

Re: output h.265 CBR

PostPosted: Tue Jan 18, 2022 9:35 am
by Mario Kalogjera
Lauri Astala wrote:Thanks again for your replies!

@Mads, well, I need the file for an exhibition projection, and (in this case) I need to play the file from a player. Players have bitrate limits, and I need to maximise the quality. Therefore, to maximise the quality, I need to have constant bitrate that is set close to the max bit rate of the player.

@Uli, ok, yes, very logical. But then HandBrake cannot deliver CBR – the other option (instead of Constant Quality) is Average Bitrate, which is not constant bitrate either.


You don't need CBR with h.265 to get best quality at a player's max bitrate, unless someone insists that VBR file is "too small" as it happened to me so I HAD to produce CBR to meet their weird conception of acceptable file size.

If you're on OSX with AMD GPU, AMD GPU's VCEENC encoder should allow for h.265 CBR.

Re: output h.265 CBR

PostPosted: Tue Jan 18, 2022 11:41 am
by Andrew Kolakowski
Lauri Astala wrote:@Uli, ok, yes, very logical. But then HandBrake cannot deliver CBR – the other option (instead of Constant Quality) is Average Bitrate, which is not constant bitrate either.


It does, you just need to set it properly with custom command option.
eg.
vbv-maxrate=15000:vbv-bufsize=15000:bitrate=15000:strict-cbr=1

Re: output h.265 CBR

PostPosted: Tue Jan 18, 2022 12:32 pm
by stesin
Lauri Astala wrote:@Mads, well, I need the file for an exhibition projection, and (in this case) I need to play the file from a player. Players have bitrate limits, and I need to maximise the quality.
Dear Lauri, are you completely sure about the player having some "limits" and what exactly the limit is? From my experience, in the last 10+ years, you can play virtually anything in FHD resolution on any FHD-capable device, no matter what the codec and bandwidth are. Though I am not familiar with UHD-capable players, do you really have one there? But Okay, let's suppose there really is a limit. Then,
Lauri Astala wrote:Therefore, to maximise the quality, I need to have constant bitrate that is set close to the max bit rate of the player.
Nope. Actually, to maximize the quality you need just... to maximize the quality! (within the given bitrate limit).

So my bet is you don't need CBR but the CQ mode is your way to go instead. I'd suggest starting with the delivery of the master original of your video into one of the "good" codecs (ProRes or DNxHR) in "good" quality, think DNxHR HQ or maybe even HQX profile.

The next step is to use the transcoding software (ffmpeg or Handbrake or whatever) and transcode your master into H.265 VBR with the CQ level fixed to i.e. 18. Look at what was produced, check the size and bitrate.

If the bitrate has some window to increase inside your limit, try a smaller CQ level value, say 10 and see if the bitrate still fits. If the resulting bitrate exceeds the limit, then try a larger CQ level value, say 23. Note: CQ is a floating-point number so you can try values with a decimal point for it.

After a few try-and-fail attempts, you will get the best quality possible which still fits your bitrate limit.

Re: output h.265 CBR

PostPosted: Tue Jan 18, 2022 1:01 pm
by Andrew Kolakowski
CBR is still needed but only for specific cases ( VOD, streaming, etc.). For any local playback or passing file to YT, client etc. CBR is rather useless as already said.

Re: output h.265 CBR

PostPosted: Tue Jan 18, 2022 2:31 pm
by Lauri Astala
Well, I already have my 4K master file (ProRes4444), and I have played the work from a computer before (4K ProResLite) and it looked good! So the question is not about delivering a good quality file, it is the question of delivering a good quality 4K HEVC file to be played from a player that has 80Mbps limit.

I've seen the ProResLite projected and shown in my exhibition and it looked very good. I've seen the ProResLite file and the HEVC file on a timeline and can compare that the HEVC (limited to 80000kbps) is not as good quality already. So I don't want to go lower quality, I want to maximise the quality in the given premises.

The technician told me to make it CBR, because he has had problems with VBR. He says this is crucial when having multi-cannel videos synced between players, and I know he knows what he is talking about.

Now, my project is only single channels, so in this case we will try to have VBR straight from DR (limit max bitrate say 75Mbps). Hopefully that works.

If the video file goes temporarily over the 80000kbps, the player cannot keep on the frame rate and starts to jitter, loose frames, pause,... Then, if I export from HandBrake, I will not have control of the peak bitrate, and finding out whether the file goes over the limit in any point is impossible – or possible by an endless try&error with the player. But I don't want to waste my time on making endless experiments. There should be a setting for this that I can control. (DR seems to have it.)

I'm not saying whether CBR is good or bad or what ever, but there are still instances that you need to have it.

Re: output h.265 CBR

PostPosted: Tue Jan 18, 2022 6:10 pm
by Lauri Astala
...and thanks to @Andrew and @Uli, you were the only ones who said something productive!

Re: output h.265 CBR

PostPosted: Tue Jan 25, 2022 6:36 pm
by stesin
Lauri Astala wrote:...and thanks to @Andrew and @Uli, you were the only ones who said something productive!
I apologize for taking your time with my useless speech. Regards, Andreas