My ffmpeg comes with some ffpreset files:
$ ls /usr/share/ffmpeg
libvpx-1080p.ffpreset libvpx-360p.ffpreset libvpx-720p50_60.ffpreset
libvpx-1080p50_60.ffpreset libvpx-720p.ffpreset
I'm wondering how can I use them, i.e., specifying different preset files from the command line, and if I can customize them at all?
In https://wiki.archlinux.org/index.php/FFmpeg, it says,
For "using preset files, enable the -vpre option after declaring the desired -vcodec". I don't quite understand what it is saying, and what exactly to do.
But somewhere above it, at https://wiki.archlinux.org/index.php/FFmpeg#x265, using the preset is like this instead:
ffmpeg -i input -c:v libx265 -aspect 1920:1080 -preset veryslow -x265-params crf 20 output
Where can I find the meaning of this veryslow, and other similar options as such?
Thanks
Answer
Instead of reading the Arch Wiki, rather check the ffmpeg documentation on the preset options. All should be explained there.
Note that there are three different kinds of presets:
.ffpresetfiles: You defineoption=valuepairs in those files and for video settings you generally use them with-vpre. Depending on the encoder you select, ffmpeg will then search for a matchingffpresetfile. For example, if you set-vcodec libvpx(or-c:v libvpx), and-vpre 1080p, then ffmpeg will load thelibvpx-1080p.ffpresetfile.You can also, more generally, use
-preand specifyvcodec=libvpxas an option/value pair in the.ffpresetfile. This allows you to set video and audio encoders at the same time. For example, you simply call-pre custom, and ffmpeg will load thecustom.ffpresetfile..avpresetfiles: work similar to-vpreor-aprepresets — those are mostly for compatibility with Libav.x264 presets: x264 is an H.264 encoder (used in ffmpeg with
-c:v libx264). It has several presets which basically control the speed of the encoder in inverse relation to the quality or efficiency of the encoding process. Those presets have nothing to do with ffmpeg's presets, and they're called with the-presetoption. They have names likeultrafast,superfast,veryfast,faster,fast,medium,slow,slowerorveryslow. Read the H.264 encoding guide for more about that, or callx264 --fullhelpfor the preset description.
Comments
Post a Comment