Skip to main content

in reply to Rusty Shackleford

So... having the same goal, I originally did something like what you did (multiple -crf passes) but eventually decided that a more accurate and much faster approach was two-pass encoding using -b:v and a -bufsize corresponding to about 30 sec. Is there some reason you rejected that?

(One tricky bit is that -b:v only applies to video, so you have to subtract the size of the audio channels from the overall target size.)

in reply to jwz

@jwz
Trade off: Gain visual consistency & fidelity for compute.

2-pass is great for a targeting size, but -b:v forces a specific bitrate, which can be overkill for a simple video or starve a complex scene.

Even using -maxrate & -bufsize, 2-pass doesn't have a "floor", still uses more bits on simple frames compared to a CRF.

My script ensures that if the video can look better while staying under the limit, it will.

I'm still learning, video is a beast, and I may have misconceptions.

@jwz
in reply to jwz

@jwz
Also, my script finalizes your video with a single pass, the previous CRF runs are tests against a segment of video, checks the size, does some math, and if the projected size is over 40mb it bumps CRF again.
@jwz