View Full Version : CRF vs two pass
Blurayhd
6th June 2019, 23:35
Hi guys in others post I asked by the quality about CRF factor with Handbrake
And I need to reduce the size of a lot of MKV movies that I have but of course keeping the best quality/size that I can get
I tried with CRF but I so wish to try two pass but I donīt know what (CRF or Two pass) is the best method?
So far I know, with CRF is one pass no matter if there is static scenes, action scenes, fx etc and two pass method decides in the one pass what scenes to assign the best biltrate for those that need more than others?
Is that correct?
If do so, I posted here an image of my question how can I do for know the number to set the biltrate? I think is there some biltrate calculator? and how to get that value? is the turbo first pass check need?
You donīt have any idea how much youīre helping me with all this, I really need to know and Iīll appreciate any help and step
https://i.ibb.co/qgjcRq9/Captura.png
Thank you in advance!!
Cary Knoop
6th June 2019, 23:54
If you use CRF you do not set the bitrate.
If you want to save space by minimizing quality loss you should consider H.265 or VP9.
Tinkering with single/two pass and other options is really playing in the margins it won't magically allow you far less storage.
By the way, you would not want to select a 30p option for 24p footage.
Asmodian
7th June 2019, 01:59
So far I know, with CRF is one pass no matter if there is static scenes, action scenes, fx etc and two pass method decides in the one pass what scenes to assign the best biltrate for those that need more than others?
Is that correct?
No, this is not a good way to think about it. Both assign bitrate based on the complexity of the scene using basically the same rate control algorithm. CRF uses the same "best" bitrate per scene that two pass does, assuming you set the bitrate of the 2pass encode to the average bitrate of the CRF encode so the resulting files are the same size.
With 2-pass you target an average bitrate. Hard to compress movies will have worse quality and easy movies will have better quality.
With CRF you target a quality level. Hard to compress movies will have larger files and easy to compress movies will have smaller files.
CRF is better if you do not need to hit a specific file size. The exception is with VBV, VBV buffer allocation can be done a little smarter during two pass encodes. This is usually a very minor effect that is only important if you are really up against your VBV limits.
Blurayhd
7th June 2019, 03:17
No, this is not a good way to think about it. Both assign bitrate based on the complexity of the scene using basically the same rate control algorithm. CRF uses the same "best" bitrate per scene that two pass does, assuming you set the bitrate of the 2pass encode to the average bitrate of the CRF encode so the resulting files are the same size.
With 2-pass you target an average bitrate. Hard to compress movies will have worse quality and easy movies will have better quality.
With CRF you target a quality level. Hard to compress movies will have larger files and easy to compress movies will have smaller files.
CRF is better if you do not need to hit a specific file size. The exception is with VBV, VBV buffer allocation can be done a little smarter during two pass encodes. This is usually a very minor effect that is only important if you are really up against your VBV limits.
First I want to thank you and @Cary Knoop
And taking about it guys thereīs something that I just canīt understand, I tried with some movies and just fine with the related final size with CRF but like you can see on picture I īm trying with Hansel and Gretel Witch Hunters that thr original size MKV is 22.5gb I tried encode just for testing about quality with CRF 21 and 23 and when finish the encode the size of CRF 21 is 3.5gb and the other one that previously I encode with CRF 23 final size is 2.7gb
I just donīt understand first movie that give me those smaller sizes, like I said the others movies that I test last day was between 7 and 12gb I donīt know what is wrong? or that size could be just fine considering two audio tracks AC3 630kbps?
Sharc
7th June 2019, 08:24
First I want to thank you and @Cary Knoop
And taking about it guys thereīs something that I just canīt understand, I tried with some movies and just fine with the related final size with CRF but like you can see on picture I īm trying with Hansel and Gretel Witch Hunters that thr original size MKV is 22.5gb I tried encode just for testing about quality with CRF 21 and 23 and when finish the encode the size of CRF 21 is 3.5gb and the other one that previously I encode with CRF 23 final size is 2.7gb
I just donīt understand first movie that give me those smaller sizes, like I said the others movies that I test last day was between 7 and 12gb I donīt know what is wrong? or that size could be just fine considering two audio tracks AC3 630kbps?
Firstly:
Lower CRF value = bigger file size = better quality
Higher CRF value = smaller file size = lower quality
Secondly:
Different movies can have totally different files sizes for the same CRF. For example, a noisy movie can have a file size which is 4 times the file size of a "clean" movie, for the same CRF. The file size depends totally on the complexity of the pictures (noise, action, details
..).
Blurayhd
8th June 2019, 03:38
Firstly:
Lower CRF value = bigger file size = better quality
Higher CRF value = smaller file size = lower quality
Secondly:
Different movies can have totally different files sizes for the same CRF. For example, a noisy movie can have a file size which is 4 times the file size of a "clean" movie, for the same CRF. The file size depends totally on the complexity of the pictures (noise, action, details
..).
Hi Sharc and yes of course but I know but can be so slower than 2.4gb for really?
Anyway if you donīt mind could you recomend some other tool like Handbrake so Iīll can try?
Asmodian
8th June 2019, 05:28
Yes, the size can change a lot, your results seem normal.
Everything else will be similar to Handbrake. x265 is x265, none of the front ends change it.
Blurayhd
9th June 2019, 00:30
Yes, the size can change a lot, your results seem normal.
Everything else will be similar to Handbrake. x265 is x265, none of the front ends change it.
I do undestand thank you for your pacience buddy Iīm just trying with different CRF so then when Iīll try Watch on my TV Iīll can decide
Talking about it, I need to compare image frames from each MKV, you know, take a screenshot and compare but I so on web people posting images with different images in a single big image or something, if you donīt mind you know how to do that? I mean, take some a lot of escenes from each MKV and see at same time each image so I can decide?
For really buddy thank you in advance!!
Sharc
9th June 2019, 11:05
Don't decide on single screenshots. You have to inspect a sequence of pictures at least.
Simple method:
Watch your encodes on your target playback device (PC, TV, ......) and decide for yourself which quality is acceptable for you.
To save time you need not encode the full movie for testing. A snippet of a minute with typical scenes (neither the intro nor the credits) is usually enough.
A bit more laborious:
Learn to use Avisynth. Interleave the 2 videos and step through frame by frame.
When a small file size is most important you could also consider downscaling your video, e.g. from 1920x1080 to 1280x720.
In any case: Keep the originals in a safe place in case you come to different conclusions later.
hello_hello
9th June 2019, 11:25
I wrote a summary of x264's rate control methods a while back, mostly to get it straight in my head as I found the original article a bit hard to follow. The link to the original no longer seems to work, but my summary is there if you'd care to read it.
x264's rate control methods (https://forum.videohelp.com/threads/381668-would-it-make-more-sense-to-use-1-pass-encoding-instead-of-2-with-x265#post2470457)
2 pass and CRF effectively produce the same quality at the same bitrate using the same settings. If you run a CRF encode, make a note of the resulting bitrate and use it for a 2 pass encode, the quality of the two encodes should be the same.
So if it hasn't been said already, 2 pass lets you control the file size without knowing what the quality will be, while CRF lets you pick the quality without knowing what the file size will be.
There's small differences, but nothing you'd see using sane bitrates, and it doesn't necessarily mean any differences translate to one method being always better than the other.
Average bitrate encoding is a lower quality method, compared to CRF and 2 pass.
Blurayhd
10th June 2019, 00:07
Don't decide on single screenshots. You have to inspect a sequence of pictures at least.
Simple method:
Watch your encodes on your target playback device (PC, TV, ......) and decide for yourself which quality is acceptable for you.
To save time you need not encode the full movie for testing. A snippet of a minute with typical scenes (neither the intro nor the credits) is usually enough.
A bit more laborious:
Learn to use Avisynth. Interleave the 2 videos and step through frame by frame.
When a small file size is most important you could also consider downscaling your video, e.g. from 1920x1080 to 1280x720.
In any case: Keep the originals in a safe place in case you come to different conclusions later.
Thank you for helping me
Blurayhd
10th June 2019, 00:09
I wrote a summary of x264's rate control methods a while back, mostly to get it straight in my head as I found the original article a bit hard to follow. The link to the original no longer seems to work, but my summary is there if you'd care to read it.
x264's rate control methods (https://forum.videohelp.com/threads/381668-would-it-make-more-sense-to-use-1-pass-encoding-instead-of-2-with-x265#post2470457)
2 pass and CRF effectively produce the same quality at the same bitrate using the same settings. If you run a CRF encode, make a note of the resulting bitrate and use it for a 2 pass encode, the quality of the two encodes should be the same.
So if it hasn't been said already, 2 pass lets you control the file size without knowing what the quality will be, while CRF lets you pick the quality without knowing what the file size will be.
There's small differences, but nothing you'd see using sane bitrates, and it doesn't necessarily mean any differences translate to one method being always better than the other.
Average bitrate encoding is a lower quality method, compared to CRF and 2 pass.
Thank you for helping me, and this question is for you and all people here, I really appreciate your pacience and help with me
Talking about CRF what is the number that you eventually choice if you have to decrease the size MKV movie that you like so mucho you love this movie but you donīt have option you have to reduce, so thereīs a number that you recommend?
Cary Knoop
10th June 2019, 00:41
Thank you for helping me, and this question is for you and all people here, I really appreciate your pacience and help with me
Talking about CRF what is the number that you eventually choice if you have to decrease the size MKV movie that you like so mucho you love this movie but you donīt have option you have to reduce, so thereīs a number that you recommend?
Why be stingy with bits if you can buy an 8TB mechanical drive for about $140?
Blurayhd
10th June 2019, 04:23
Why be stingy with bits if you can buy an 8TB mechanical drive for about $140?
Hi @Cary Knoop I donīt know where you live (please donīt get my wrong buddy) but in my country Hard disc is too expensive (very much!!)
Sharc
10th June 2019, 08:30
Talking about CRF what is the number that you eventually choice if you have to decrease the size MKV movie that you like so mucho you love this movie but you donīt have option you have to reduce, so thereīs a number that you recommend?
The answer for the "right" CRF has been given already: Try what is good enough for your eyes when watching the encode with your favorite playback device.
Just some hints to start with, as you want to see numbers:
For watching on small displays (Mobile phone, tablet…): CRF 24
For watching on TV from a normal viewing distance: CRF 20 is normally a good compromise between visual quality and reducing file size
For almost perfect reproduction: use CRF 17
To understand a bit more (from my part), lets say that we have a VERY demanding clip with lots of noise, and we encode it at lets say CRF 20 and CAP it at 10mbps, it will surely peg 10mbps straight away..
Will the quality be equal to CBR fixed at 10mbps ?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.