HOME | 1. Extracting | 2. DGIndex | 3. Avisynth script | 4. Encoding with MeGUI | 5. Muxing | Finding the best CRF value


Making a test sample to find out the best CRF value

To find out the best value to use in meGUI, you can encode a small part of the video at different CRF values and compare them.

Just follow the guide except when you are in DGIndex, select just a few seconds of the video (like 30 seconds).
The encoding will only take a minute each time.
Try a value of 18, 20, 22, 24, etc...
You can call the files CRF18.mkv, CRF20.mkv, etc...

Download AvsP: http://avisynth.org/qwerpoi/ and install it.

Open AvsP.
Copy/Paste this script:

a=ffvideosource("path to CRF18.mkv")
b=ffvideosource("path to CRF20.mkv")
interleave(a,b)
spline36resize(converttorgb,ffsar>1?round(width*ffsar):width,ffsar<1?round(height/ffsar):height)

Change the paths, depending on where your files are in your computer.
Hit F5. Wait for AvsP to load the videos.

Now you can go through the video and for each frame AvsP will show you the frame from the first video, then the exact same frame from the second video.
You can use the arrow keys to go back and forth between frames.
Try comparing a CRF 18 and a CRF 26, you will immediately see the difference.

Now you can choose the highest value at which the image quality seems OK to you.
Of course, it will probably depend on the sensibility of each person. What I consider OK may not be OK for someone else.

Thanks again to SDBits for writing the original x264 encoding guide.