How to find out the CRF used in 2nd pass of 2-pass encoding?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
hereforthepinapples
Posts: 2
Joined: Thu Jul 23, 2020 6:19 pm

How to find out the CRF used in 2nd pass of 2-pass encoding?

Post by hereforthepinapples »

Description of problem or question:

So my understanding is that 2-pass encoding works like this: Pass one, rough run through to get a sense of the look of the video. Determine the CRF that best hits the target bitrate. Rerun at that CRF.

Is there a way to find out what CRF Handbrake is running at, in the log or something?

HandBrake version (e.g., 1.0.0):

Version 1.3.3

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

macOS 10.14

User avatar
Rodeo
HandBrake Team
Posts: 12534
Joined: Tue Mar 03, 2009 8:55 pm

Re: How to find out the CRF used in 2nd pass of 2-pass encoding?

Post by Rodeo »

If you're using x264 and you're not using VBV (or if VBV had little impact on the output); x264 writes a "final ratefactor" to the encode log.

Other video encoders have no such facility.

hereforthepinapples
Posts: 2
Joined: Thu Jul 23, 2020 6:19 pm

Re: How to find out the CRF used in 2nd pass of 2-pass encoding?

Post by hereforthepinapples »

Thanks Rodeo!

I ran a few tests and definitely looks like that puts it in the ballpark! One quick follow-up though. Do you mean that if VBV impact is notable, the log simply won't include "final ratefactor", or that it would make the "final ratefactor" be more inaccurate.

In any case, thanks much!

User avatar
Rodeo
HandBrake Team
Posts: 12534
Joined: Tue Mar 03, 2009 8:55 pm

Re: How to find out the CRF used in 2nd pass of 2-pass encoding?

Post by Rodeo »

It won't include it. If you're trying to settle on an RF values by testing a target bitrate across a few test sources, I would recommend doing the 2-pass encode without VBV (note, when you select an H.264 level via HandBrake's corresponding drop-down, we set VBV for you to ensure bitstream compliance with said level, so you may want to leave it to Auto).

But for encodes you intend to actually play (especially over a network), using VBV settings appropriate for the target H.264 level and/or your network setup might be a good idea.

Post Reply