Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
x264 [2017/02/05 09:15]
beandog
x264 [2017/04/02 22:03]
beandog
Line 6: Line 6:
   * [[http://​dev.beandog.org/​x264_preset_reference.html|x264 preset reference]]   * [[http://​dev.beandog.org/​x264_preset_reference.html|x264 preset reference]]
   * [[http://​www.x264bluray.com/​|Authoring a professional Blu-ray Disc with x264]]   * [[http://​www.x264bluray.com/​|Authoring a professional Blu-ray Disc with x264]]
-  * [[http://​mewiki.project357.com/​wiki/​X264_Settings|x264 Settings]] 
   * [[http://​en.wikipedia.org/​wiki/​H.264/​MPEG-4_AVC|Wikipedia:​ H264]]   * [[http://​en.wikipedia.org/​wiki/​H.264/​MPEG-4_AVC|Wikipedia:​ H264]]
-  * [[http://​www.streaminglearningcenter.com/​articles/​understanding-h264-encoding-parameters---profiles-and-levels.html|Understanding H.264 Encoding Parameters - Profiles and Levels]] 
   * [[http://​mmmash.blogspot.com/​2013/​03/​x264-motion-estimation-method-comparison.html|X264 - Motion Estimation Method- Comparison]] - I like this one. :)   * [[http://​mmmash.blogspot.com/​2013/​03/​x264-motion-estimation-method-comparison.html|X264 - Motion Estimation Method- Comparison]] - I like this one. :)
   * [[http://​birds-are-nice.me/​publications/​extremex264_5.shtml|Extreme x264 encoding]]   * [[http://​birds-are-nice.me/​publications/​extremex264_5.shtml|Extreme x264 encoding]]
  
-=== h264 levels ===+When encoding, if you want to cover all your bases, there are two H.264 settings to use, and two x264 encoding arguments to pass: 
 + 
 +  * H.264 profile: high 
 +  * H.264 level: 4.1 
 +  * x264 preset: medium 
 +  * x264 CRF: 23 
 + 
 +Optionally, you can set the x264 tuning as well. Best choices are film, animation, and grain. 
 + 
 +Don't change any other settings than those. If you do, you're going down the rabbit hole. 
 + 
 +=== H.264 levels ===
  
 DVDs max out at high 3.1.  You don't need 3.2 on DVDs because that is the first level that accepts 720p. DVDs max out at high 3.1.  You don't need 3.2 on DVDs because that is the first level that accepts 720p.
Line 46: Line 55:
 Short answer: just use medium, and tweak settings somewhere else. Short answer: just use medium, and tweak settings somewhere else.
  
-Choose ​the preset that you can stand waiting ​for Default ​is 23. :)+=== CRF === 
 + 
 +Changing ​the CRF level will determine the level of video quality ​for your encodes. The default ​is 23. If you think it's not good enough quality, bump it down by one or two, until you find what you like. 
 + 
 +"The range of the quantizer scale is 0-51where 0 is lossless, 23 is default, and 51 is worst possible. A lower value is a higher quality and a subjectively sane range is 18-28. Consider 18 to be visually lossless or nearly so: it should look the same or nearly the same as the input but it isn't technically lossless. The range is exponential,​ so increasing the CRF value +6 is roughly half the bitrate while -6 is roughly twice the bitrate. General usage is to choose the highest CRF value that still provides an acceptable quality. If the output looks good, then try a higher value and if it looks bad then choose a lower value"
  
 === Two-pass encoding === === Two-pass encoding ===
Line 87: Line 100:
   * uneven multi-hexagon (umh): slow, slower, veryslow   * uneven multi-hexagon (umh): slow, slower, veryslow
   * exhaustive (tesa): placebo   * exhaustive (tesa): placebo
 +
 +=== Steve'​s Defaults ===
 +
 +Here are examples of using H.264 high profile at level 4.1 (Blu-ray settings), with x264 CRF 23 on medium preset.
 +
 +Using MP4 as the container will encode the audio to AAC by default. If using MKV, it depends on the encoder, so I'm specifying it directly.
 +
 +libav also has an [[https://​wiki.libav.org/​Encoding/​h264|their x264 guide]]):
 +
 +<​code>​
 +avconv -i dvd.mpg -vcodec libx264 -profile:v high -level 41 -preset medium -crf 23 -tune film -acodec libfdk_aac video.mp4
 +avconv -i dvd.mpg -vcodec libx264 -profile:v high -level 41 -preset medium -crf 23 -tune film -acodec libfdk_aac video.mkv
 +</​code>​
 +
 +
 +

Navigation