Remember that every encoder is different, and what works for x264 will not apply to other encoders.Īdd -pix_fmt yuv420p if the output does not play in dumb players like QuickTime. In this example the audio is stream copied instead of re-encoded. You can use the -ss and -t options to select a random section to encode, such as -ss 30 -t 60 which will skip the first 30 seconds and create a 60 second output. You do not have to encode the whole video to test quality. Use these settings for the rest of your videos.Use the slowest preset you have patience for (see x264 -help for a preset list and ignore the placebo preset as it is a joke).Use the highest crf value that still gives you the quality you want.This tells FFmpeg to encode at a quality level of 23, but to cap the data rate at 6750 kbps with a VBV buffer of 4500 kbps. A slower preset will encode slower, but will achieve higher compression (compression is quality per filesize). What is FFmpeg CRF Constant rate factor (CRF) is an encoding mode that adjusts the file data rate up or down to achieve a selected quality level rather than a specific data rate. The preset is a collection of options that will give a particular encoding speed vs compression tradeoff. CRF (constant rate factor) is your quality level. The two option for you to adjust are -crf and -preset. Example: ffmpeg -i input -codec:v libx264 -preset medium -crf 24 -codec:a copy output.mkv Also, attempting to use the same bitrate and other parameters as the input will most likely not achieve what you want. Splitting and jointing CRF files should result in the exact same video if the key frames are the same. It picks certain values for quantizing matrixes, and uses them no matter what the resulting bitrate it. However, you can achieve visually lossless (or nearly so) outputs when using a lossy encoder meaning that it may look as if the output is the same quality to your eyes, but technically it is not. Constant means it does actually make any decisions on rate control. Unfortunately, this is not possible when using a lossy encoder, and even lossless encoders may not provide the same quality due to colorspace conversion, chroma subsampling, and other issues. Usually wanting the output to be the "same quality" as the input is an assumed thing that people will always want.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |