In a previous
post, I wrote about developing my own matrix for XviD. That article would not exist if I immediately took up x264. And I took it up because I saw that XviD such problems as quadraticity, color gradient distortion, halo around objects, are eliminated in x264.
The goal of the task was to ascertain these capabilities of the codec, as well as the encoding speed and file size. x264 successfully coped with all the tasks and below you will learn how to do this easily and naturally.
brief information
The x264 codec is a very successful implementation of the H.264 standard, created under the wing of the VideoLAN community (the author of the VLC media player) with a free license. Usually, the console version, oriented primarily on Unixoids, is exported; there are also options with graphical interfaces for Windows. Actually, unfriendly open source developers with ordinary users (the eternal problems with documentation and graphical user interface have been successfully separating Microsoft from many good and free projects to this day) and has become a brake on the way the codec goes to the masses and video collection fans. But, thank God, not everything is so sad today and there are decent graphic options. Now be careful, because it’s about the release
2273 from Komisar (
link here ). The file itself that installs on the system is x264vfw.dll. You can install it on any disk, and the installer will take care that this path gets into the registry of Windows. You can also have this codec installed if you have the full K-Lite Codec Pack. If there is a different version, install 2273. I tried version 2274 with a different interface - I strongly advise you, unless you are going to delve into console commands. So that you are not confused, see screenshots.


')
Marker highlighted the keys that we will parse and change. Go.
Quantizer is a quantizer that coarsens the final signal, the more, the worse the quality. I encode only with a quantizer and only in one pass, why - see the previous post.
Here it is different from what in XviD, so I figured that we need to take multiples of 4. Here’s a summary:
4, 8 - recommended only to those who are engaged in video processing, as the quality is perfect, but the large file size;
12, 16 - for lovers of quality rollers of small size in the home collection;
20 - my choice, the most optimal quantizer, suitable for films;
24, 28 - a compromise version, normal quality, suitable for most movies and TV series, as well as for uploading videos on YouTube;
32 and above - there are such cases.
The second tab has a lot of interesting and useful settings.
The
Analysis block - breaking the blocks apart, the H.264 standard chip, is designed to provide better quality, but turned out to be practically useless - the file size increases, the quality improvement should be looked for with a microscope, so turn off all the “birds”.
Subpixel ME refinement - the complexity of motion estimation, values ​​from 1 to 11.
The larger, the smaller the size and speed. In fact, the size decreased to 5, the size began to grow from the figure 6, and the speed dropped, apparently, this is due to Psy RDO, which does not work to the number 6. So the conclusion is: if you want the maximum speed, then put 1 and donate several megabytes, but if you don’t want to sacrifice megabytes, and minutes, then put 5.
Max GOP size - the maximum interval between keyframes, more in the previous post. Put in the range of 200-300 and do not worry.
Max consecutive B-frames - the maximum sequence of B-frames, the more of them, the smaller the size, but you have to be careful with this, there may be problems with playback. I recommend 1 or 2.
We come to the
Encoding block and this is probably the most interesting part of the settings.
Deblocking filter (a bird and two numeric values) - solves the problem of squares, so hated by XviD. The default values ​​are 0, maximum 6. I thought 0 was not enough and I tried 6 - I liked it. Now I will always put 6. Compromise - 3.
Intra / Inter Deadzone - smoothing filter, works on the principle of Gauss. Interestingly, VirtualDub has a similar filter and I used it often, but now it doesn’t make much sense. The fact is that when using it only in VirtualDub, the codec in the end still leaves noise, and if you use it only in the codec, there are no problems with noise. I chose a maximum of 32, because some moments just delight - a passing car gives pearly luster, the sea and the sky just a sight for sore eyes. Some will notice that there is a lack of blurring small details, then I advise smaller values ​​that are multiples of 4. You can completely disable it when the quantizer is less than 16. It does not affect speed.
The remaining keys on this tab will not be explained - just put, as in the screenshot.
Now the third tab, no screenshots and no need. There only need to change two values ​​once and for all. QP factor - set both to 1 if you don’t want any surprises in the form of unexpected quality deterioration.
Now the important information for those who use an external player. If there are problems with playback, make the following settings:
Max frame refs = 1, Max consecutive B-frames = 0, CABAC = off.
Not all of these settings affect compatibility at the same time, so experiment.
Subpixel ME refinement, Max frame refs, Max consecutive B-frames can affect speed. Due to the use of multi-core x264 leaves behind XviD. With those settings that are in the screenshots, the file size is comparable to XviD with an average quantizer, but the quality is much better. So goodbye to the good old XviD, you took a lot of my time and nerves, as well as disk space, but you should go for a well-deserved rest.
Who likes to pack in mkv - use MeGUI, there is enough information in the internet. And if you like avi, please come in VirtualDub. By the way, how to quickly open a non-avishny file in VirtualDub? Easy. Put AviSynth, create a text file with the extension .avs and write the line
DirectShowSource(" ")
If the name is Cyrillic, do not forget about the encoding Win. Then open the file in VirtualDub. Recommendations for sound in a previous post. If you make rips in HD to fill in with resources, you can use 24 or 28 instead of quantizer 20, but always with the Deblocking filter and the Intra / Inter Deadzone - get a normal quality with a small size.
For those who are especially interested
here, you can read about x264 settings in Russian.
Encode on health!