MPEG2

MPEG2 video has been the de facto mezzanine and broadcast video standard for decades. It is still widely utilized in HD broadcast applications, as well as for predictable and reliable storage of mezzanine files at constant bitrates.

Encoding.com supports a wide variety of parameters for producing compatible MPEG2 video output for a variety of linear playout systems and MAM/DAM storage, including CableLabs compliance in MPEG transport streams. Please reach out to our support team if you have a specific scenario requiring frame cadence, GOP, or colorimetry, as we've likely designed a job template before to match your needs.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format>
        <output>[OutputFormat]</output> <!-- required-->
        <video_codec>mpeg2video</video_codec> <!-- required-->
        <video_codec_parameters>
            <refs>[RefsNumber]</refs>
            <sc_threshold>[Threshold]</sc_threshold>
            <b-pyramid>[0|1]</b-pyramid>
            <qmin>[QMin]</qmin>
            <qmax>[QMax]</qmax>
            <qdiff>[QDiff]</qdiff>
            <i_qfactor>[IQFactor]</i_qfactor>
            <qcomp>[QComp]</qcomp>
            <b_strategy>[0|1|2]</b_strategy>
            <seq_disp_ext>[-1|0|1]</seq_disp_ext>
            <me_range>[MERange]</me_range>
            <me_method>[MEMethod]</me_method>
            <keyint_min>[MinGOP]</keyint_min>
            <open-gop>[0-1]</open-gop>
            <force-open-gop>[0|1]</force-open-gop>
            <force-seq-header>[0|1]</force-seq-header>
            <force-seq-extension>[0|1]</force-seq-extension>
            <non_linear_quant>[0|1]</non_linear_quant>
            <intra_vlc>[0|1]</intra_vlc>
            <drop_frame_timecode>[0|1]</drop_frame_timecode>
            <video_format>[VideoFormat]</video_format>
            <cmp>[CMP]</cmp>
            <partitions>[Partitions]</partitions>
            <mpv_flags>[Flags]</mpv_flags>
            <afd>[ActiveFormatDescription]</afd>
            <colorprim>[ColorPrimaries]</colorprim>
            <transfer>[ColorTransfer]</transfer>
            <colorspace>[ColorSpace]</colorspace>
            <vprofile>[0]</vprofile>
            <level>[VideoLevel]</level>
        </video_codec_parameters>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "[OutputFormat]", // required
            "video_codec": "mpeg2video",
            "video_codec_parameters": {
                "refs": "[RefsNumber]",
                "sc_threshold": "[Threshold]",
                "b-pyramid": "[0|1]",
                "qmin": "[QMin]",
                "qmax": "[QMax]",
                "qdiff": "[QDiff]",
                "i_qfactor": "[IQFactor]",
                "qcomp": "[QComp]",
                "b_strategy": "[0|1|2]",
                "seq_disp_ext": "[-1|0|1]",
                "me_range": "[MERange]",
                "me_method": "[MEMethod]",
                "keyint_min": "[MinGOP]",
                "open-gop": "[0-1]",
                "force-open-gop": "[0|1]",
                "force-seq-header": "[0|1]",
                "force-seq-extension": "[0|1]",
                "non_linear_quant": "[0|1]",
                "intra_vlc": "[0|1]",
                "drop_frame_timecode": "[0|1]",
                "video_format": "[VideoFormat]",
                "cmp": "[CMP]",
                "partitions": "[Partitions]",
                "mpv_flags": "[Flags]",
                "afd" :"[ActiveFormatDescription]",
                "colorprim": "[ColorPrimaries]",
                "transfer": "[ColorTransfer]",
                "colorspace": "[ColorSpace]",
                "vprofile": "[0]",
                "level": "[VideoLevel]"
            }
        }
    }
}

Parameter

Description

Allowed Values

refs

Number of reference frames

Positive integer number

sc_threshold

Scene change threshold

Positive integer number

b-pyramid

Apply B-pyramid method

0 – Disabled
1 – Enabled

qmin

Minimum quantizer scale

Positive integer number

qmax

Maximum quantizer scale

Positive integer number

qdiff

Maximum difference between quantizer scales

Positive integer number

qcomp

Quantizer curve compression factor

Positive float number

i_qfactor

Specify the qscale difference between I-frames and P-frames.

Positive float number

b_strategy

B-Frames Strategy

0, 1, 2

seq_disp_ext

Write sequence display extension blocks

-1 – auto
0 – never
1 – always

me_method

Motion estimation method

Valid motion estimation method

me_range

Maximum range of the motion search in pixels

Positive integer number

keyint_min

Minimum GOP size

Positive integer number

open-gop

Produce Open GOP

0 – Disabled
1 – Enabled

force-open-gop

Don't add closed GOP flag

0 – Disabled
1 – Enabled

force-seq-header

Add Sequence Header to each frame

0 – Disabled
1 – Enabled

force-seq-extension

Add Sequence Extension to each frame

0 – Disabled
1 – Enabled

non_linear_quant

Use nonlinear quantizer

0 – Disabled
1 – Enabled

intra_vlc

Use MPEG-2 intra VLC table

0 – Disabled
1 – Enabled

drop_frame_timecode

Timecode is in drop frame format

0 – Disabled
1 – Enabled

video_format

Video Format

5 – unspecified
0 – component
1 – pal
2 – ntsc
3 – secam
4 – mac

cmp

Full pel me compare function

Valid compare function

partitions

Specify the combinations of inter and intra partitions.

Valid partitions description

mpv_flags

MPV flags

Valid flags string

afd

Active Format Description

16x9_top, 14x9_top, gt_16x9, coded_frame, 4x3_centre, 16x9_centre, 14x9_centre, 4x3_as_14x9, 16x9_as_14x9, 16x9_as_4x3

colorprim

Color Primaries

bt709, bt470m, bt470bg, smpte170m, smpte240m, film, bt2020, undef, unspecified

transfer

Color Transfer

bt709, bt470m, bt470bg, smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, bt2020-10, bt2020-12, undef

colorspace

Color Space

rgb, bt709, fcc, bt470bg, smpte170m, smpte240m, ycocg, bt2020_ncl, bt2020_cl, smpte2085, chroma-derived-nc, chroma-derived-c, ictcp, unspecified

vprofile

Video Profile

0 - 4:2:2

level

Video Level

Positive Integer Number