| 121 | | in this example, `-bufsize` is the "rate control buffer" so it will enforce your requested "average" (4000k in this case) across each 1835k worth of video. So basically it is assumed that the receiver/end player will buffer that much data so it's ok to fluctuate within that much. |
| 122 | | |
| 123 | | Of course, if it's all just empty/black frames then it will still serve less than that many bits/s (but it will raise the quality level as much as it can, up to the crf level). |
| | 127 | In the above example, `-bufsize` is the "rate control buffer" so it will enforce your requested "average" (4000k in this case) across each 1835k worth of video. So basically it is assumed that the receiver/end player will buffer that much data so it's ok to fluctuate within that much. |
| | 128 | |
| | 129 | Of course, if it's all just empty/black frames then it will still serve less than that many bits/s but it will raise the quality level as much as it can, up to the crf level. |
| 140 | | If you want your videos to have highest compatibility with target players (for instance, with older iOS versions or all Android devices) then you'll want to specify: |
| 141 | | {{{ |
| 142 | | -profile:v baseline |
| 143 | | }}} |
| 144 | | This disables some advanced features but provides for better compatibility. Typically you may not need this setting, but if you do use this setting it may increase the bit rate quite a bit compared to what is needed to achieve the same quality in higher profiles. |
| | 146 | ==== All devices ==== |
| | 147 | |
| | 148 | If you want your videos to have highest compatibility with target devices (older iOS versions or all Android devices): |
| | 149 | |
| | 150 | {{{ |
| | 151 | -profile:v baseline -level 3.0 |
| | 152 | }}} |
| | 153 | |
| | 154 | This disables some advanced features but provides for better compatibility. Typically you may not need this setting (and therefore avoid using `-profile:v` and `-level`), but if you do use this setting it may increase the bit rate quite a bit compared to what is needed to achieve the same quality in higher profiles. |
| | 155 | |
| | 156 | ==== iOS ==== |
| 155 | | For a list of supported profiles and their descriptions see: |
| 156 | | {{{ |
| 157 | | x264 --fullhelp |
| 158 | | }}} |
| 159 | | |
| 160 | | Keep in mind that Apple !QuickTime only supports YUV 420 color space for x264 encoded movies, and does not support anything higher than the "main" profile. This leaves only 2 options for !QuickTime compatible clips: baseline and main. All of the other profiles are currently not supported with !QuickTime, although they will play back in pretty much any other player. |
| 161 | | |
| 162 | | {{{#!comment |
| 163 | | Has anyone tested this recently? It seems oddly stupid, even for QT not to support main. |
| 164 | | }}} |
| | 167 | This table does not include any additional restrictions which may be present. |
| | 168 | |
| | 169 | ==== Apple Quicktime ==== |
| | 170 | |
| | 171 | Apple !QuickTime only supports YUV planar color space with 4:2:0 chroma subsampling (use `-pix_fmt yuv420p`) for H.264 video. For information on additional restrictions see [http://mewiki.project357.com/wiki/X264_Encoding_Suggestions#QuickTime-compatible_Encoding QuickTime-compatible Encoding]. |
| | 172 | |
| | 173 | ==== Blu-ray ==== |
| | 174 | |
| | 175 | See [http://www.x264bluray.com/ Authoring a professional Blu-ray Disc with x264]. |
| 196 | | You may need to use `-pix_fmt yuv420p` for your output to work in !QuickTime and most other players. These players only supports YUV 420 color space for H.264 encoded clips. Otherwise, depending on your source, ffmpeg may output to a pixel format that may be incompatible with these players. |
| | 208 | You may need to use `-pix_fmt yuv420p` for your output to work in !QuickTime and most other players. These players only supports the YUV planar color space with 4:2:0 chroma subsampling for H.264 video. Otherwise, depending on your source, ffmpeg may output to a pixel format that may be incompatible with these players. |
| | 209 | |
| | 210 | ---- |
| | 211 | |
| | 212 | == Additional Resources == |
| | 213 | |
| | 214 | * [http://mewiki.project357.com/wiki/X264_Settings x264 Settings - MeWiki] |
| | 215 | * [http://mewiki.project357.com/wiki/X264_Encoding_Suggestions x264 Encoding Suggestions - MeWiki] |