Using Per-Title Encoding efficiently

Each video is unique, which makes selecting statis codec settings for all of your transcoding very inefficient. Using Per-Title Encoding, Qencode will analyze you file and choose the best codec settings for each scene of your video to get the best quality at the smallest file size. This is a great feature for highly varied or user genegrated content. This tutorial will teach you the best practices for getting the most out of Per-Title Encoding.

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

To start, use the /v2/start_encodeapi method to set up your transcoding task and general settings. You can follow our Getting Started tutorial for a full walkthrough on how to set a basic transcoding task up.

After that is ready, you can enable the Per-Title Transcoding by adding the optimize_bitrate the format object level:

{
	"query": {
    "source": "https://nyc3.s3.qencode.com/qencode/bbb_30s.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 and lowering CRF will increase quality.

With Per-Title Encoding CRF is chosen automatically, however if you prefer to nudge the baseline towards more compression or less compression, you can adjust CRF to be higher or lower respectively. To do this, add the adjust_CRF parameter to the format object.

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.

If you want the CRF values that can be selected to a specific range, you can set a Maximum CRF (max_crf) and Minimum CRF (min_crf).

min_crfInteger 0 - 51.
The lowest possible CRF that will be selected.
max_crfInteger 0 - 51.
The highest possible CRF that will be selected.

Now you're ready to get started. Here's an example of what your request would look like with all of the parameters outlined above:

{
	"query": {
    "source": "https://nyc3.s3.qencode.com/qencode/bbb_30s.mp4",
    "format": [
      {
        "output": "mp4",
        "optimize_bitrate": 1,
        "adjust_crf": "-1",
        "min_crf": "21",
        "max_crf": "51"
      }
    ]
  }
}