Encoding.com's preferred H.264/AVC encoder is x264.
The x264 Project has led the way on H.264 development by introducing many key features. Variance Adaptive Quantization (VAQ) and Rate–Distortion Optimization (RDO) attempt to preserve video quality and motion estimation against the amount of data required to encode the video. Advanced controls include options for GOP structure, keyframing, scene detection, macroblocking, and interframe quantization. Many of these features are discussed in depth on this page. A basic job request and additional possible parameters are below and in the following sections.
use_defaults option controls the codec's default advanced parameters under the video_codec_parameters section when they are not specified in the request. With edc option, EDC defaults corresponding to selected profile are applied as described in the following sections. With codec option, parameters are left to the x264 encoder defaults for the selected profile, except the H.264 profile itself and preset, which follow the format-level settings regardless of use_defaults.
Note: when profile parameter is not present in the request, it uses EDC default value corresponding to the specified output (e.g. mp4 — main), which may differ from the codec default as well.
| Parameter | Description | Allowed Values | Default Value |
|---|---|---|---|
| use_defaults | Defaults for the video_codec_parameters parameters that are not set: edc — default values listed in the sections below, codec — use x264 encoder defaults (except profile and preset) | edc, codec | edc |
<?xml version="1.0"?>
<query>
<userid>[UserID]</userid> <!-- required-->
<userkey>[UserKey]</userkey> <!-- required-->
<action>[Action]</action> <!-- required-->
<source>[SourceFile]</source> <!-- required-->
<format>
<output>[OutputFormat]</output> <!-- required-->
<video_codec>libx264</video_codec>
<video_codec_parameters>
<use_defaults>[edc|codec]</use_defaults>
<keyint_min>[GOPSize]</keyint_min>
<level>[Level]</level>
<open-gop>[0|1]</open-gop>
<sc_threshold>[Threshold]</sc_threshold>
<bf>[BFramesNumber]</bf>
<b_strategy>[0|1|2]</b_strategy>
<flags>[Flags]</flags>
<coder>[0|1]</coder>
<refs>[RefsNumber]</refs>
<flags2>[Flags]</flags2>
<deblockalpha>[DeblockerAlpha]</deblockalpha>
<deblockbeta>[DeblockerBeta]</deblockbeta>
<directpred>[0|1|2|3]</directpred>
<aq-strength>[AQStrength]</aq-strength>
<force-cfr>[1|0]</force-cfr>
<cqp>[ConstantQuantizer]</cqp>
<crf>[ConstantRatefactor]</crf>
<qmin>[MinQuantizer]</qmin>
<qmax>[MaxQuantizer]</qmax>
<qdiff>[MaxQPStep]</qdiff>
<bt>[AvgBitrateVariance]</bt>
<i_qfactor>[IPFramesQscaleDiff]</i_qfactor>
<b_qfactor>[IBFramesQscaleDiff]</b_qfactor>
<chromaoffset>[ChromaLumaQPDiff]</chromaoffset>
<pass>[1|2|3]</pass>
<rc_eq>[RatecontrolEquation]</rc_eq>
<qcomp>[QPCurve]</qcomp>
<complexityblur>[ComplexityBlur]</complexityblur>
<qblur>[QBlur]</qblur>
<rc-lookahead>[RCLookahead]</rc-lookahead>
<partitions>[Partitions]</partitions>
<psy>[0|1]</psy>
<me_method>[MEMethod]</me_method>
<me_range>[MERange]</me_range>
<subq>[SubQAlgo]</subq>
<trellis>[0|1|2]</trellis>
<videoformat>[Format]</videoformat>
<colorprim>[ColorPrimaries]</colorprim>
<transfer>[TransferCharacteristics]</transfer>
<colormatrix>[MatrixCoefficients]</colormatrix>
<nal-hrd>[none|vbr|cbr]</nal-hrd>
<afd>[ActiveFormatDescription]</afd>
<hide_encoding_settings>[yes|no]</hide_encoding_settings>
<avcintra-class>[50|100|200|300|480]</avcintra-class>
<wpredp>[0|1|2]</wpredp>
</video_codec_parameters>
</format>
</query>{
"query": {
"userid": "[UserID]", // required
"userkey": "[UserKey]", // required
"action": "[Action]", // required
"source": "[SourceFile]", // required
"format": {
"output": "[OutputFormat]", // required
"video_codec": "libx264",
"video_codec_parameters": {
"use_defaults": "[edc|codec]",
"keyint_min": "[GOPSize]",
"level": "[Level]",
"open-gop": "[0|1]",
"sc_threshold": "[Threshold]",
"bf": "[BFramesNumber]",
"b_strategy": "[0|1|2]",
"flags": "[Flags]",
"coder": "[0|1]",
"refs": "[RefsNumber]",
"flags2": "[Flags]",
"deblockalpha": "[DeblockerAlpha]",
"deblockbeta": "[DeblockerBeta]",
"directpred": "[0|1|2|3]",
"aq-strength": "[AQStrength]",
"force-cfr": "[1|0]",
"cqp": "[ConstantQuantizer]",
"crf": "[ConstantRatefactor]",
"qmin": "[MinQuantizer]",
"qmax": "[MaxQuantizer]",
"qdiff": "[MaxQPStep]",
"bt": "[AvgBitrateVariance]",
"i_qfactor": "[IPFramesQscaleDiff]",
"b_qfactor": "[IBFramesQscaleDiff]",
"chromaoffset": "[ChromaLumaQPDiff]",
"pass": "[1|2|3]",
"rc_eq": "[RatecontrolEquation]",
"qcomp": "[QPCurve]",
"complexityblur": "[ComplexityBlur]",
"qblur": "[QBlur]",
"rc-lookahead": "[RCLookahead]",
"partitions": "[Partitions]",
"psy": "[0|1]",
"me_method": "[MEMethod]",
"me_range": "[MERange]",
"subq": "[SubQAlgo]",
"trellis": "[0|1|2]",
"videoformat": "[Format]",
"colorprim": "[ColorPrimaries]",
"transfer": "[TransferCharacteristics]",
"colormatrix": "[MatrixCoefficients]",
"nal-hrd": "[none|vbr|cbr]",
"afd": "[ActiveFormatDescription]",
"hide_encoding_settings": "[yes|no]",
"avcintra-class": "[50|100|200|300|480]",
"wpredp": "[0|1|2]"
}
}
}
}