Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th September 2013, 03:54   #1  |  Link
xxxyyyzzzz
Registered User
 
Join Date: Mar 2011
Posts: 5
CRF mode of x264

Recently I am learning the Rate control of x264. And I am confused about the CRF mode. From the source code of x264, I find the --crf has the same effect with QP. Then I set the --crf as 26, but the encoding result is terriable.
Can anyone tell me how to set the parameter --crf to get a reasonable encoding result?
Thanks!
xxxyyyzzzz is offline   Reply With Quote
Old 5th September 2013, 08:28   #2  |  Link
karasu
Registered User
 
karasu's Avatar
 
Join Date: Jun 2006
Posts: 111
a sane crf value would be between 18 and 22. Smaller value = better quality.
karasu is offline   Reply With Quote
Old 5th September 2013, 08:36   #3  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,042
It depends a bit on the material you're encoding. I usually use 16, never go above 22 but sometimes as low as 14. There are a lot of other encoder settings that determine the result as well.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 5th September 2013, 12:20   #4  |  Link
CarlEdman
Registered User
 
Join Date: Jan 2008
Posts: 185
That's pretty sound advice. I use 16 for standard definition content and 18-20 for high definition content.
CarlEdman is offline   Reply With Quote
Old 5th September 2013, 13:03   #5  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,227
Quote:
Originally Posted by xxxyyyzzzz View Post
Recently I am learning the Rate control of x264. And I am confused about the CRF mode. From the source code of x264, I find the --crf has the same effect with QP. Then I set the --crf as 26, but the encoding result is terriable.
Can anyone tell me how to set the parameter --crf to get a reasonable encoding result?
Thanks!
The CRF value lives on the same scale as QP values, but that's only for convenience. It's purley an interface decision, so it could live (for example) on a 0.0 to 1.0 scale just as well.

In any case, you'll have to find the (maximum possible) value that satisfies your eyes.

And also note that the CRF value depends on your other settings too! The same CRF value with, for example, a different "--preset" does not necessarily give same quality.

See also:
http://git.videolan.org/?p=x264.git;...07dc395307d2ce
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 5th September 2013 at 13:25.
LoRd_MuldeR is offline   Reply With Quote
Old 7th September 2013, 06:19   #6  |  Link
Thalyn
Registered User
 
Join Date: Dec 2011
Posts: 129
Wasn't it a percentage at some point in time...?

You have to experiment. No two people are going to have identical preferences. For example, I would not go higher than 23 for FHD (1080p) content - this is the point just before I start to be able to see detail loss, such as skin textures. To wit, I do my "fast" encodes at 22 and my NAS is loaded with encodes at 20.

For SD media, I drop the CRF by 2 (22 becomes 20, 20 becomes 18). But not everything is going to require that, either - the Japanese series of G1 Transformers, for example, I happily record at 24 because they're terribly mastered and just don't have that much detail to retain (I could probably go higher, but I'm happy with their size at 24).

A little note, though: the higher your CRF (lower quality), the more important it becomes to use better settings elsewhere. At CRF20 the difference between SubME 10 and SubME 7 is practically invisible to the eye and less than 1% for filesize, but once you get to CRF22 or above you'll start to notice it.
Thalyn is offline   Reply With Quote
Reply

Tags
rate control, x264

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.