30 January 2019

Webm VP8 and VP9 codecs and new Presets

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>addMedia</action>
    <format> <!-- REQUIRED -->
        <output>webm</output> <!-- REQUIRED -->
        <preset>[WebMPreset]</preset>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "addMedia",
        "format": {
            "output": "webm",
            "preset": "[WebMPreset]"
        }
    }
}

Parameter

Description

Allowed Values

Default

preset

Specify format preset. Only works with WebM.

  • *1** — 2-Pass Best Quality VBR Encoding
  • *2** — 2-Pass Faster VBR Encoding
  • *3** — 2-Pass VBR Encoding for Smooth Playback on Low-end Hardware
  • *4** — 2-Pass CBR Encoding for Limited-bandwidth Streaming
  • *5** — 2-Pass VBR Encoding for Noisy / Low-quality Input Source
  • *6** — 1-Pass Good Quality VBR Encoding
  • *7** — 1-Pass Fast VBR Encoding
  • *8** — Real-time CBR Encoding and Streaming

6

Preset: 1

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <output>webm</output>
        <video_codec>[vp8|vp9]</video_codec>
      	<preset>1</preset>
        <video_codec_parameters>
            <two_pass>yes</two_pass>
            <quality>best</quality>
            <auto-alt-ref>1</auto-alt-ref>
            <lag-in-frames>16</lag-in-frames>
            <slices>2</slices>
            <static-thresh>0</static-thresh>
            <skip_threshold>0</skip_threshold>
            <qmin>0</qmin>
            <qmax>60</qmax>
            <minsection-pct>5</minsection-pct>
            <maxsection-pct>800</maxsection-pct>
            <keyint_max>360</keyint_max>
            <keyint_min>0</keyint_min>
            <target-bitrate>2000k</target-bitrate>
            <fps>30000/1001</fps>
        </video_codec_parameters>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "output": "webm",
            "video_codec": "[vp8|vp9]",
            "preset": "1",
            "video_codec_parameters": {
                "two_pass": "yes",
                "quality": "best",
                "auto-alt-ref": "1",
                "lag-in-frames": "16",
                "slices": "2",
                "static-thresh": "0",
                "skip_threshold": "0",
                "qmin": "0",
                "qmax": "60",
                "minsection-pct": "5",
                "maxsection-pct": "800",
                "keyint_max": "360",
                "keyint_min": "0",
                "target-bitrate": "2000k",
                "fps": "30000/1001"
            }
        }
    }
}

Preset: 2

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <output>webm</output>
        <video_codec>[vp8|vp9]</video_codec>
      	<preset>2</preset>
        <video_codec_parameters>
            <two_pass>yes</two_pass>
            <quality>good</quality>
            <auto-alt-ref>1</auto-alt-ref>
            <lag-in-frames>16</lag-in-frames>
            <slices>2</slices>
            <static-thresh>0</static-thresh>
            <qmin>0</qmin>
            <qmax>60</qmax>
            <minsection-pct>5</minsection-pct>
            <maxsection-pct>800</maxsection-pct>
            <keyint_max>360</keyint_max>
            <keyint_min>0</keyint_min>
            <target-bitrate>2000k</target-bitrate>
            <fps>30000/1001</fps>
            <cpu-used>1</cpu-used>
        </video_codec_parameters>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "output": "webm",
            "video_codec": "[vp8|vp9]",
            "preset": "2",
            "video_codec_parameters": {
                "two_pass": "yes",
                "quality": "good",
                "auto-alt-ref": "1",
                "lag-in-frames": "16",
                "slices": "2",
                "static-thresh": "0",
                "qmin": "0",
                "qmax": "60",
                "minsection-pct": "5",
                "maxsection-pct": "800",
                "keyint_max": "360",
                "keyint_min": "0",
                "target-bitrate": "2000k",
                "fps": "30000/1001",
                "cpu-used": "1"
            }
        }
    }
}

Preset: 3

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <output>webm</output>
        <video_codec>[vp8|vp9]</video_codec>
      	<preset>3</preset>
        <video_codec_parameters>
            <two_pass>yes</two_pass>
            <quality>good</quality>
            <auto-alt-ref>1</auto-alt-ref>
            <lag-in-frames>16</lag-in-frames>
            <static-thresh>0</static-thresh>
            <qmin>4</qmin>
            <qmax>63</qmax>
            <profile>1</profile>
            <minsection-pct>15</minsection-pct>
            <maxsection-pct>400</maxsection-pct>
            <keyint_max>360</keyint_max>
            <keyint_min>0</keyint_min>
            <target-bitrate>2000k</target-bitrate>
            <fps>30000/1001</fps>
            <cpu-used>0</cpu-used>
        </video_codec_parameters>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "output": "webm",
            "video_codec": "[vp8|vp9]",
            "preset": "3",
            "video_codec_parameters": {
                "two_pass": "yes",
                "quality": "good",
                "auto-alt-ref": "1",
                "lag-in-frames": "16",
                "static-thresh": "0",
                "qmin": "4",
                "qmax": "63",
                "profile": "1",
                "minsection-pct": "15",
                "maxsection-pct": "400",
                "keyint_max": "360",
                "keyint_min": "0",
                "target-bitrate": "2000k",
                "fps": "30000/1001",
                "cpu-used": "0"
            }
        }
    }
}

Preset: 4

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <output>webm</output>
        <video_codec>[vp8|vp9]</video_codec>
      	<preset>4</preset>
        <video_codec_parameters>
            <two_pass>yes</two_pass>
            <cbr>yes</cbr>
            <quality>good</quality>
            <static-thresh>0</static-thresh>
            <skip_threshold>70</skip_threshold>
            <qmin>4</qmin>
            <qmax>63</qmax>
            <undershoot-pct>95</undershoot-pct>
            <keyint_max>360</keyint_max>
            <keyint_min>0</keyint_min>
            <target-bitrate>400k</target-bitrate>
            <fps>30000/1001</fps>
            <buf-sz>6000</buf-sz>
            <buf-initial-sz>4000</buf-initial-sz>
            <cpu-used>0</cpu-used>
        </video_codec_parameters>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "output": "webm",
            "video_codec": "[vp8|vp9]",
            "preset": "4",
            "video_codec_parameters": {
                "two_pass": "yes",
                "cbr": "yes",
                "quality": "good",
                "static-thresh": "0",
                "skip_threshold": "70",
                "qmin": "4",
                "qmax": "63",
                "undershoot-pct": "95",
                "keyint_max": "360",
                "keyint_min": "0",
                "target-bitrate": "400k",
                "fps": "30000/1001",
                "buf-sz": "6000",
                "buf-initial-sz": "4000",
                "cpu-used": "0"
            }
        }
    }
}

Preset: 5

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <output>webm</output>
        <video_codec>[vp8|vp9]</video_codec>
      	<preset>5</preset>
        <video_codec_parameters>
            <two_pass>yes</two_pass>
            <quality>good</quality>
            <auto-alt-ref>1</auto-alt-ref>
            <lag-in-frames>16</lag-in-frames>
            <slices>2</slices>
            <qmin>4</qmin>
            <qmax>60</qmax>
            <arnr-max-frames>5</arnr-max-frames>
            <arnr-strength>3</arnr-strength>
            <minsection-pct>5</minsection-pct>
            <maxsection-pct>800</maxsection-pct>
            <keyint_max>360</keyint_max>
            <keyint_min>0</keyint_min>
            <target-bitrate>2000k</target-bitrate>
            <fps>30000/1001</fps>
            <cpu-used>0</cpu-used>
        </video_codec_parameters>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "output": "webm",
            "video_codec": "[vp8|vp9]",
            "preset": "5",
            "video_codec_parameters": {
                "two_pass": "yes",
                "quality": "good",
                "auto-alt-ref": "1",
                "lag-in-frames": "16",
                "slices": "2",
                "qmin": "4",
                "qmax": "60",
                "arnr-max-frames": "5",
                "arnr-strength": "3",
                "minsection-pct": "5",
                "maxsection-pct": "800",
                "keyint_max": "360",
                "keyint_min": "0",
                "target-bitrate": "2000k",
                "fps": "30000/1001",
                "cpu-used": "0"
            }
        }
    }
}

Preset: 6

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <output>webm</output>
        <video_codec>[vp8|vp9]</video_codec>
      	<preset>6</preset>
        <video_codec_parameters>
            <quality>good</quality>
            <slices>2</slices>
            <static-thresh>0</static-thresh>
            <qmin>0</qmin>
            <qmax>63</qmax>
            <keyint_max>360</keyint_max>
            <keyint_min>0</keyint_min>
            <target-bitrate>2000k</target-bitrate>
            <fps>30000/1001</fps>
            <cpu-used>0</cpu-used>
        </video_codec_parameters>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "output": "webm",
            "video_codec": "[vp8|vp9]",
            "preset": "6",
            "video_codec_parameters": {
                "quality": "good",
                "slices": "2",
                "static-thresh": "0",
                "qmin": "0",
                "qmax": "63",
                "keyint_max": "360",
                "keyint_min": "0",
                "target-bitrate": "2000k",
                "fps": "30000/1001",
                "cpu-used": "0"
            }
        }
    }
}

Preset: 7

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <output>webm</output>
        <video_codec>[vp8|vp9]</video_codec>
      	<preset>7</preset>
        <video_codec_parameters>
            <quality>good</quality>
            <slices>2</slices>
            <static-thresh>0</static-thresh>
            <qmin>0</qmin>
            <qmax>63</qmax>
            <keyint_max>360</keyint_max>
            <keyint_min>0</keyint_min>
            <target-bitrate>2000k</target-bitrate>
            <fps>30000/1001</fps>
            <cpu-used>3</cpu-used>
        </video_codec_parameters>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "output": "webm",
            "video_codec": "[vp8|vp9]",
            "preset": "7",
            "video_codec_parameters": {
                "quality": "good",
                "slices": "2",
                "static-thresh": "0",
                "qmin": "0",
                "qmax": "63",
                "keyint_max": "360",
                "keyint_min": "0",
                "target-bitrate": "2000k",
                "fps": "30000/1001",
                "cpu-used": "3"
            }
        }
    }
}

Preset: 8

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <output>webm</output>
        <video_codec>[vp8|vp9]</video_codec>
      	<preset>8</preset>
        <video_codec_parameters>
            <quality>realtime</quality>
            <cbr>yes</cbr>
            <qmin>4</qmin>
            <qmax>56</qmax>
            <undershoot-pct>95</undershoot-pct>
            <keyint_max>999999</keyint_max>
            <target-bitrate>500k</target-bitrate>
            <fps>15000/1001</fps>
            <buf-sz>6000</buf-sz>
            <buf-initial-sz>4000</buf-initial-sz>
            <cpu-used>4</cpu-used>
        </video_codec_parameters>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "output": "webm",
            "video_codec": "[vp8|vp9]",
            "preset": "8",
            "video_codec_parameters": {
                "quality": "realtime",
                "cbr": "yes",
                "qmin": "4",
                "qmax": "56",
                "undershoot-pct": "95",
                "keyint_max": "999999",
                "target-bitrate": "500k",
                "fps": "15000/1001",
                "buf-sz": "6000",
                "buf-initial-sz": "4000",
                "cpu-used": "4"
            }
        }
    }
}

Parameter

Description

Allowed Values

Default Value

two_pass

Two pass transcoding

yes, no

  • preset 1-5:* yes&#xA;**preset 6-8:** *none*

quality

Video quality

best, good, realtime

  • *preset 1:** best
  • *preset 2-7:** good
  • *preset 8:** realtime

auto-alt-ref

Automatic alt reference frames

0,1

  • *preset 1-3:** 1
  • *preset 4:** 0
  • *preset 5:** 1
  • *preset 6-8:** 0

lag-in-frames

Max number of frames to lag

Positive integer from 0 to 25.

  • preset 1-3:* 16&#xA;**preset 4:** *none*
  • preset 5:* 16&#xA;**preset 6-8:** *none*

slices

Slices number

Positive integer number greater than 0.

  • preset 1,2:* 2&#xA;**preset 3,4:** *none*
  • preset 5-7:* 2&#xA;**preset 8:** *none*

static-thresh

Motion detection threshold

Positive integer number.

  • preset 1-4:* 0&#xA;**preset 5:** *none*
  • preset 6,7:* 0&#xA;**preset 8:** *none*

skip_threshold

Temporal resampling threshold

Positive integer number from 0 to 100.

  • preset 1:* 0&#xA;**preset 2,3:** *none*
  • preset 4:* 70&#xA;**preset 5-8:** *none*

qmin

Minimum quantizer

Positive integer number from 0 to 63.

  • *preset 1,2:** 0
  • *preset 3-5:** 4
  • *preset 6,7:** 0
  • *preset 8:** 4

qmax

Maximum quantizer

Positive integer number from 0 to 63. Must be greater than qmin.

  • *preset 1,2:** 60
  • *preset 3,4:** 63
  • *preset 5:** 60
  • *preset 6,7:** 63
  • *preset 8:** 56

minsection-pct

GOP min bitrate

Positive integer number from 0 to 20.

  • *preset 1,2:** 5
  • preset 3:* 15&#xA;**preset 4:** *none*
  • preset 5:* 5&#xA;**preset 6-8:** *none*

maxsection-pct

GOP max bitrate

Positive integer number from 200 to 800.

  • *preset 1,2:** 800
  • preset 3:* 400&#xA;**preset 4:** *none*
  • preset 5:* 800&#xA;**preset 6-8:** *none*

keyint_max

Maximum keyframe interval

Positive integer number.

  • *preset 1-7:** 360
  • *preset 8:** 999999

keyint_min

Minimum keyframe interval

Positive integer number.

  • preset 1-7:* 0&#xA;**preset 8:** *none*

target-bitrate

Bitrate

Positive integer number.

  • *preset 1-3:** 2000k
  • *preset 4:** 400k
  • *preset 5-7:** 2000k
  • *preset 8:** 500k

fps

Stream frame rate

Rate/Scale

  • *preset 1-7:** 30000/1001
  • *preset 8:** 15000/1001

cpu-used

CPU Used

Integer number from -16 to 16

preset 1: none

  • *preset 2:** 1
  • *preset 3-6:** 0
  • *preset 7:** 3
  • *preset 8:** 4

profile

Bitstream profile number to use

Integer number from 0 to 3

preset 1,2: none

  • preset 3:* 1&#xA;**preset 4-8:** *none*

cbr

Constant Bitrate

yes, no

preset 1-3: none

  • preset 4:* yes&#xA;**preset 5-7:** *none*
  • *preset 8:** yes

undershoot-pct

Minimum datarate undershoot.

Integer number from 1 to 100

preset 1-3: none

  • preset 4:* 95&#xA;**preset 5-7:** *none*
  • *preset 8:** 95

buf-sz

Client buffer size

Positive integer number.

preset 1-3: none

  • preset 4:* 6000&#xA;**preset 5-7:** *none*
  • *preset 8:** 6000

buf-initial-sz

Client initial buffer size

Positive integer number.

preset 1-3: none

  • preset 4:* 4000&#xA;**preset 5-7:** *none*
  • *preset 8:** 4000

arnr-max-frames

AltRef Max Frames

Integer number from 0 to 25

preset 1-4: none

  • preset 5:* 5&#xA;**preset 6-8:** *none*

arnr-strength

AltRef Strength

Integer number from 0 to 6

preset 1-4: none

  • preset 5:* 3&#xA;**preset 6-8:** *none*

Font size for burnin_timecode

Added font_size parameter for burnin_timecode .

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <burnin_timecode>
            <font_size>[FontSize]</font_size>
        </burnin_timecode>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>",
        "userkey": "<<key>>",
        "action": "[Action]",
        "format": {
            "burnin_timecode": {
                "font_size": "[FontSize]"
            }
        }
    }
}

Parameter

Description

Allowed Values

Default Value

font_size

Timecode Font Size

Positive integer

16

New regions

Added new processing regions for media source and output destination.
Also deprecated oak-private-clive region.

Region

Name

ca-central-1

Canada (Central)

eu-west-2

EU (London)

eu-west-3

EU (Paris)

ap-northeast-1

Asia Pacific (Tokyo)

ap-northeast-2

Asia Pacific (Seoul)

ap-south-1

Asia Pacific (Mumbai)

oak-private-clive

Private Cloud (Northern California)

<?xml version="1.0"?>
<query>
  <userid><<id>></userid>
  <userkey><<key>></userkey>
  <action>AddMedia</action>
  <source>[SourceURL]</source>
    <format> 
        <output>[OutputFormat]</output> 
        <destination>[DestinationURL]</destination> 
    </format>
</query>
{
  "query": {
    "userid": "<<id>>",
    "userkey": "<<key>>",
    "action": "AddMedia",
    "source": "[SOURCE URL]",
    "format": {
      "output": "mp4",
      "size": "320x240",
      "bitrate": "256k",
      "audio_bitrate": "64k",
      "audio_channels_number": "2",
      "keep_aspect_ratio": "yes",
      "video_codec": "mpeg4",
      "profile": "main",
      "VCodecParameters": "no",
      "audio_codec": "libfaac",
      "two_pass": "no",
      "cbr": "no",
      "deinterlacing": "no",
      "keyframe": "300",
      "audio_volume": "100",
      "file_extension": "mp4",
      "hint": "no"
    }
  }
}
👍

For source and destination

  • Using specific S3 endpoints:
    To use specific endpoint replace ‘s3.amazonaws.com‘ in your S3 URL with one of the following:
  • us-east-1s3-external-1.amazonaws.com
  • us-east-2s3-us-east-2.amazonaws.com
  • us-west-2s3-us-west-2.amazonaws.com
  • us-west-1s3-us-west-1.amazonaws.com
  • ca-central-1s3-ca-central-1.amazonaws.com
  • eu-west-1s3-eu-west-1.amazonaws.com
  • eu-west-2s3-eu-west-2.amazonaws.com
  • eu-west-3s3-eu-west-3.amazonaws.com
  • eu-central-1s3-eu-central-1.amazonaws.com
  • ap-southeast-1s3-ap-southeast-1.amazonaws.com
  • ap-southeast-2s3-ap-southeast-2.amazonaws.com
  • ap-northeast-1s3-ap-northeast-1.amazonaws.com
  • ap-northeast-2s3-ap-northeast-2.amazonaws.com
  • ap-south-1s3-ap-south-1.amazonaws.com
  • sa-east-1s3-sa-east-1.amazonaws.com

Colorspace h.264 options

Added new colorspace h.264 options.

ParameterDescriptionAllowed ValuesDefault Value
videoformatIndicates what the video was before encoding/digitizing.component, pal, ntsc, secam, mac, undefundef
colorprimSet what color primaries for converting to RGB.bt709, bt470m, bt470bg, smpte170m, smpte240m, film, bt2020, undefundef
transferSet the opto-electronic transfer characteristics to use. (Sets the gamma curve to use for correction.)bt709, bt470m, bt470bg, smpte170m, smpte240m, linea, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, bt2020-10, bt2020-12, undefundef
colormatrixSet the matrix coefficients used in deriving the luma and chroma from the RGB primaries.bt709, fcc, bt470bg, smpte170m, smpte240m, GBR, YCgCo, bt2020nc, bt2020c, undefundef

Changelog

  • added: webm presets 7 (1-Pass Fast VBR Encoding) and 8 (Real-time CBR Encoding and Streaming)
  • added: VP8 and VP9 webm codecs
  • added: font_size for burnin_timecode
  • added: new regions ca-central-1, eu-west-2, eu-west-3, ap-northeast-1, ap-northeast-2, ap-south-1
  • broken: oak-private-clive no longer supported. Now it's forwarding to us-east-1.
  • added: colorspace h.264 options