

Note however that the output quality may be reduced in doing so, and file sizes and bandwidth requirements may increase. If your application requires the use of lower profiles, such as BASELINE or MAIN, you will need to overwrite some of the codec configuration parameters after applying the preset. The H264 High profile is by far the most common and has been widely supported for many years. Im used to the ultrafast preset from ffmpeg, what I wonder is. The majority of the profiles listed above set the H264 profile to HIGH, and use codec capabilities that target decoders that support this profile. Often I use Premiere to transcode or export media where the final size isnt the main problem. Please see the API reference for the respective value. means that the default value of the codec configuration is used.


libx265 slow is even faster then libx264 veryslow for me.- means that the default value of the codec configuration is used. This will save you a lot of space without quality loss. If you don't need compatibility to very old devices rather encode with libx265 or 2-pass libvpx-vp9. If you want a faster encode but a larger file set it to slow. preset veryslow will use the best libx264 preset available to make the file as small as possible with H.264 (however needs more time to encode). Modern video encoders like AV1 will at most times set a keyframe every 10-20s based on scene detection. Be aware that this increases the file size a lot, you should not use a keyframe every second, except for livestreaming. x264-params keyint=30:scenecut=0 will tell the x264 encoder to set a keyframe every 30s frames (here 1s) and to disable scene detection. Need to find your right setting there through testing) crf 25 will let the encoder decide on the bitrate for a medium quality (lower it for better quality / higher file size, increase it for worse quality / lower file size. vcodec libx264 will let ffmpeg encode in plain old H.264 r 30 befor input pictures will say ffmpeg to use 30 pictures per second See here for more information on encoding with x264 in FFmpeg especially looks at the presets (I generally use the veryfast preset, in my tests the largest dropoff in filesize was between superfast and veryfast - after that the differences were much more incremental. Ffmpeg -r 30 -i %04d.jpg -vcodec libx264 -crf 25 -x264-params keyint=30:scenecut=0 -preset veryslow video.mp4
