

When you’re working with 20 or 30 files that’s a lot of work and a significant risk for error. The problem with this approach is that you have to customize your encoding string for files with different frame rates, changing from 48 to 50 for 25 fps files, 60 for 29.97/30 fps files, and 120 for 60 fps files. This sets the I-frame interval at 48 and ensures that no I-frames will be inserted in scene changes. In all encoding strings I set the I-frame duration using the normal -g command, like so: I just finished a significant project analyzing AV1 codecs using files with varying frame rates. Author’s note: See a new section regarding a LinkedIn comment that this technique “interferes with the rate control mechanism of codecs.”

Overview: Setting your I-frame interval in seconds rather than frames allows you to use one encoding string for files with varying frame rates, saving time and minimizing the risk of error. Don’t just learn FFmpeg become an expert in video compression. This lesson is derived from my book, Learn to Produce Videos with FFmpeg In 30 Minutes or Less ($34.95), and my course, FFmpeg for Adaptive Bitrate Production ($29.95) (which includes a PDF copy of the book).
