Learn how to use Per-Title Encoding to reduce file size without sacrificing quality

Each video is unique and requires careful adjustments to codec settings to get the best quality at the smallest file size. Doing this manually can be difficult, so we've added a Per-Title Encoding, a transcoding feature that automatically analyzes each frame of your video and adjusts the settings to get you the best results. By setting codec parameters unique to each video, you can get files that are an average of 70% smaller, making them easy to manage, inexpensive to store, and quick to deliver to your target users.

Warning
This feature is currently only available for output videos using the H.264 codec.

The /v2/start_encodeapi method offers even more granular control over your Per-Title Encoding setup. To enable and customize Per-Title Transcoding, add the following on the format object level:

{
	"query": {
    "source": "https://yourserver.com/video.mp4",
    "format": [
      {
        "output": "mp4",
        "optimize_bitrate": 1,
      }
    ]
  }
}

One of the main settings you can adjust to manage the quality vs compression tradeoff is CRF (Constant Rate Factor). Raising the crf value for a rendition will increase compression, while lowering crf will reduce quality.

Although Per-Title Encoding chooses CRF automatically, you can adjust the CRF values selected to be lower or higher, depending on if you wanthigher compression for better quality. You can also set the maximum and minimum CRF values to limit the ranges the system can recommend. To do this, add the following values on the format object level.

adjust_crfInteger between -10 and 10. Default 0.
Changes the selected CRF to be higher or lower, depending if the user prefers smaller files or higher quality respectively.
min_crfInteger 0 - 51.
The lowest possible CRF that will be selected.
max_crfInteger 0 - 51.
The highest possible CRF that will be selected.
{
	"query": {
    "source": "https://yourserver.com/video.mp4",
    "format": [
      {
        "output": "mp4",
        "optimize_bitrate": 1,
        "adjust_crf": "-1",
        "min_crf": "21",
        "max_crf": "51"
      }
    ]
  }
}