Skip to main content

Video Encode Optimized

FFmpeg Builder: Video Encode Optimized

Smartly finds the perfect balance between visual quality and file size—so you never waste space or sacrifice clarity.

Overview

This advanced flow element samples and analyzes the input video to determine the most efficient encoding settings that retain virtually identical visual quality to the source—without over-encoding or inflating file size.

It runs multiple encoding tests behind the scenes to remove the guesswork and deliver consistently excellent results. Whether you're archiving, streaming, or distributing, it ensures you get top-tier quality with optimal compression.

The process is fast on modern hardware and gives you a high-precision, highly efficient encode that just works.

This is the encoding mode everyone should be using.


Setup

Windows
The bundled version of FFmpeg on Windows includes everything required for both encoding and VMAF scoring—no additional setup needed.

Docker
If you're using Docker, be sure to install the FFmpeg FileFlows Edition via DockerMod. This version includes all necessary components for encoding and VMAF scoring.

macOS
The Homebrew version of FFmpeg includes both encoding support and VMAF scoring, so no further configuration is required.

Linux (Bare Metal)
On Linux, FFmpeg builds can vary significantly. Some may support VMAF scoring but lack hardware encoders (or vice versa).
To handle this, you can configure two separate FFmpeg paths:

  • FFmpeg: path to the FFmpeg binary used for encoding
  • FFmpegVMAF: path to the FFmpeg binary used for VMAF scoring

This allows you to work around limitations in specific builds by using the best tool for each task.

Example Configuration

VariablePurposeExample Path
FFmpegEncoding/usr/local/bin/ffmpeg
FFmpegVMAFVMAF Scoring/opt/ffmpeg-vmaf/bin/ffmpeg

General

Mode

Determines how VMAF is evaluated.

  • Balanced
    Moderate number of samples and segment lengths, providing a good compromise between accuracy and runtime. This mode is suitable for most typical use cases.

  • Fast Scan
    Uses fewer samples, shorter segments, and moderate FPS to reduce processing time. Suitable for quick approximations when encoding speed is a priority over precise quality tuning.

  • Thorough
    Performs extensive sampling with longer segments and uses the full native frame rate. This mode delivers the highest accuracy but requires significantly more processing time.

  • Custom
    Allows manual configuration of all sampling parameters, quality ranges, bitrate limits, and FPS settings for full control.

Quality

  • Acceptable
    Produces the smallest file size while remaining very watchable. Minor visual artifacts may be present, but it's a good choice when reducing size is the main priority.
  • Fair
    Slightly better quality than Acceptable, with minimal visual loss and greater space savings than higher settings.
  • Good
    The recommended default. Strikes a solid balance between visual quality and file size. Most content will look nearly identical to the original.
  • Excellent
    For more demanding videos that may benefit from higher quality. Typically results in noticeably larger files, though the difference in appearance may be subtle.
  • Lossless
    No quality loss at all. Rarely useful unless absolute fidelity is required, as it usually offers little to no file size reduction.

Codec

The codec to use for encoding, such as h264, hevc, or av1. Defaults to hevc.

Force Codec

Forces video to be transcoded using the selected codec. Ensures consistent output, though file size may increase.

Encoder

Select the encoder implementation to use for the chosen codec. Use Automatic to let the system choose the best available encoder, or select a specific one manually.

Speed

This does not affect the VMAF scoring directly. It controls how quickly the encoder runs. Faster encoding reduces compression efficiency, which can lead to lower quality or larger file sizes. Slower encoding improves compression efficiency, allowing better quality at smaller file sizes.

Max Size

The maximum file size allowed as a percentage of the original file to permit re-encoding. For example, 90 means only re-encode if the new file size is 90% or smaller.


Bitrates

SD

The maximum allowed video bitrate in kilobits per second (Kbps) for standard definition (SD) encoded output.

720p

The maximum allowed video bitrate in kilobits per second (Kbps) for 720p high definition (HD) encoded output.

1080p

The maximum allowed video bitrate in kilobits per second (Kbps) for 1080p full high definition (Full HD) encoded output.

4K

The maximum allowed video bitrate in kilobits per second (Kbps) for 4K ultra high definition (UHD) encoded output.


Quality

Minimum VMAF

The minimum acceptable VMAF score (0–100) to guarantee no visible quality loss.

VMAF FPS

The frame rate to use when calculating VMAF. Lower FPS (e.g., 15) can reduce computation time.

Max Iterations

The maximum number of search iterations to perform during quality optimization.


Limits

Compression Lower

The lowest compression value to test during optimization. Lower values result in better visual quality and larger files.

Default: 5 (Videotoolbox default: 15)

Compression Higher

The highest compression value to test during optimization. Higher values result in smaller file sizes and lower visual quality.

Default: 35 (Videotoolbox default: 65)


Sampling

Samples

The number of video segments (samples) to use for VMAF quality testing.

Sample Length

The duration, in seconds, of each video segment (sample) used for VMAF testing.

Samples Tested

The number of samples tested when calculating the VMAF score. More samples increase accuracy; the lowest scoring samples are used for optimization.


Outputs

  1. Encoded – Encoding quality settings were successfully optimized to preserve perceptual quality without discernible loss.
  2. Skipped – Video already meets quality and size criteria; no changes or further testing performed.

Custom FFmpeg

If on Windows the supplied FFmpeg includes everything needed to encode and perform the VMAF scoring.

On Docker, you need to use the FFmpeg FileFlows Edition DockerMod to include eveything for encoding and VMAF scoring

On Mac, the brew version of FFmpeg contains everyting needed.

On baremetal linux, you may need to use two versions, one for encoding, and one for VMAF scoring.

You can set the FFmpeg variable ot the path for the encoding version of FFMpeg

An dyou can set FFmpegVMAF variable to the path for the version needed for VMAF socring