Video Settings

Here are the basic video settings available for every output, their compatibility with other settings, a description of what they do, and the defaults used if they aren't explicitly set.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>addMedia</action>
    <source>[SourceFile]</source> <!-- required-->
    <format> <!-- required -->
        <output>[output]</output> <!-- required -->
        <video_codec>[VideoCodec]</video_codec>
        <ftyp>[mp42|3gp5]</ftyp>
        <size>[WxH]</size>
        <keep_aspect_ratio>[yes|no]</keep_aspect_ratio>
        <set_aspect_ratio>[AspectRatio]</set_aspect_ratio>
        <bitrate>[BitRate]</bitrate>
        <maxrate>[MaxBitRate]</maxrate>
        <minrate>[MinBitRate]</minrate>
        <muxrate>[MuxRate]</muxrate>
        <cbr>[yes|no]</cbr>
        <framerate>[FrameRate|copy]</framerate>
        <framerate_upper_threshold>[FrameRateThreshold]</framerate_upper_threshold>
        <keyframe>[KeyFramePeriod]</keyframe>
        <force_keyframes>[KeyFramePosition]</force_keyframes>
        <video_sync>[SyncParam]</video_sync>
        <remove_grain>[RemoveGrainFilter]</remove_grain>
        <video_only>[yes|no]</video_only>
        <dc>[DCPrecision]</dc>
        <lmin>[MinLF]</lmin>
        <lmax>[MaxLF]</lmax>
        <rc_min_vbv_use>[MinRC]</rc_min_vbv_use>
        <rc_max_vbv_use>[MaxRC]</rc_max_vbv_use>
        <color_range>[ColorRange]</color_range>
        <color_primaries>[ColorPrimaries]</color_primaries>
        <transfer_characteristics>[TransferCharacteristics]</transfer_characteristics>
        <matrix_coefficients>[MatrixCoefficients]</matrix_coefficients>
        <scaler>[default|fast_bilinear|bilinear|bicubic|neighbor|area|bicublin|gauss|sinc]</scaler>
        <scaler_flags>[ScalerFlags]</scaler_flags>
        <video_tag>[Tag]</video_tag>
        <mxf_profile>[MXFProfile]</mxf_profile>
        <mxf_multiplex_type>[MXFMultiplex]</mxf_multiplex_type>
        <scaler_lib>[default|zscale]</scaler_lib>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "addMedia", // required
        "source": "[SourceFile]", // required
        "format": { // required
            "output": "[output]", // required
            "video_codec": "[VideoCodec]",
            "ftyp": "[mp42|3gp5]",
            "size": "[WxH]",
            "keep_aspect_ratio": "[yes|no]",
            "set_aspect_ratio": "[AspectRatio]",
            "bitrate": "[BitRate]",
            "maxrate": "[MaxBitRate]",
            "minrate": "[MinBitRate]",
            "muxrate": "[MuxRate]",
            "cbr": "[yes|no]",
            "framerate": "[FrameRate|copy]",
            "framerate_upper_threshold": "[FrameRateThreshold]",
            "keyframe": "[KeyFramePeriod]",
            "force_keyframes": "[KeyFramePosition]",
            "video_sync": "[SyncParam]",
            "remove_grain": "[RemoveGrainFilter]",
            "video_only": "[yes|no]",
            "dc": "[DCPrecision]",
            "lmin": "[MinLF]",
            "lmax": "[MaxLF]",
            "rc_min_vbv_use": "[MinRC]",
            "rc_max_vbv_use": "[MaxRC]",
            "color_range": "[ColorRange]",
            "color_primaries": "[ColorPrimaries]",
            "transfer_characteristics": "[TransferCharacteristics]",
            "matrix_coefficients": "[MatrixCoefficients]",
            "scaler": "[default|fast_bilinear|bilinear|bicubic|neighbor|area|bicublin|gauss|sinc]",
            "scaler_flags": "[ScalerFlags]",
            "video_tag": "[Tag]",
            "mxf_profile": "[MXFProfile]",
            "mxf_multiplex_type": "[MXFMultiplex]",
            "scaler_lib": "[default|zscale]"
        }
    }
}

Parameter

Description

Allowed Values

Default Values

video_codec

Defines the codec used for your output.

flv: flv, libx264, vp6, beamr4avc, copy
fl9: libx264, beamr4avc, copy
wmv, zune: wmv2, msmpeg4, copy
3gp, android: h263, mpeg4, libx264, beamr4avc, copy
m4v: mpeg4, beamr4avc, copy
ipod, iphone, ipad, psp: mpeg4, libx264, beamr4avc, copy
advanced_hls: libx264, beamr4avc
fmp4_hls: libx264, hevc, beamr4avc, beamr5hevc
advanced_mss: libx264, beamr4avc
advanced_dash: libx264, libvpx-vp9, hevc, beamr4avc, beamr5hevc
advanced_fmp4: libx264, hevc, beamr4avc, beamr5hevc
mpeg_dash: mpeg4, libx264, beamr4avc, beamr5hevc, hevc
mp4: mpeg4, libx264, hevc, beamr4avc, beamr5hevc, copy
ogg: libtheora, copy
webm: libvpx, libvpx-vp9, vp8, vp9, copy
mp3, wma: none
mpeg2: mpeg2video, copy
mpeg1: mpeg1video, copy
mov: mpeg4, libx264, xdcam, dvcpro, dvcpro50, dvcprohd, mjpeg, copy
mpegts: libx264, mpeg2video, beamr4avc, beamr5hevc
mxf: dvcpro, dvcpro50, dvcprohd, xdcamhd422, imx30, copy
kindle_fire: mpeg4, libx264, hevc, copy
dnxhd, dnxhd_mxf: dnxhd, copy
adaptive_intermediate: libx264, hevc, beamr4avc
mainconcept_mxf: mpeg2video, libx264, copy

flv: flv
fl9, ipod, iphone, ipad: libx264
wmv, zune: wmv2
3gp: h263
mp4, m4v, psp, android, mov: mpeg4
advanced_hls, advanced_dash, advanced_mss: libx264
mpeg_dash: libx264
ogg: libtheora
webm: libvpx
mpeg2: mpeg2video
mpeg1: mpeg1video
mpegts: libx264
mxf: xdcamhd422
kindle_fire: libx264
dnxhd, dnxhd_mxf: dnxhd
adaptive_intermediate: libx264
mainconcept_mxf: mpeg2video

ftyp

Specifies a pre-defined signature for mp4 outputs using the ftyp format.

mp42,3gp5

none

size

Specifies the video frame size.

All: WxH, where W and N are any even integers.
3gp (h263): 128×96, 176×144, 352×288, 704×576, 1408×1152
zune: 320×180, 320×240
vp6: WxH, where W and N are multiple of 16
mxf: 720×480, 960×720, 1280×720, 1280×1080, 1440×1080, 1920×1080
Custom: To match your source aspect ratio, set X value to zero and Y value to your desired height. For example, 0x360 or 0x480.

All: None (any size possible)
3gp: 176×144
iPhone: 480×368
iPad: 1280×720
Android: 800×400
zune: 320×180
psp: 368×192
mxf: None

keep_aspect_ratio

Specifies whether to maintain aspect ratio of source file.

yes, no

yes

set_aspect_ratio

Specify aspect ratio (DAR). When defined, the option keep_aspect_ratio will be ignored. The option only works with the following formats: fl9, 3gp, mp4, m4v, ipod, iphone, ipad, android, ogg, webm, psp, iphone_stream, ipad_stream.

The ratio of width to height specified as:

  • any positive integer in the w:h format.
  • positive float number
  • source string - aspect ratio will be taken from the source media

none

bitrate

Specifies the video bitrate.

Nk (where N is any non-zero integer)

All: 512k
3gp: 256k
iOS, Android, PSP: 1024k

maxrate

Specifies maximum allowed video bitrate.

N or Nk — where N is any non-zero integer

none

minrate

Specifies minimum allowed video bitrate.

N or Nk — where N is any non-zero integer

none

muxrate

Set a constant muxrate.

Nk (where N is any non-zero integer)

none

cbr

Specifies whether to use CBR (Constant bitrate).

yes, no

no

framerate

Specifies the frame rate.

Any non-zero float or N/M where N and M are non-zero integers
‘copy’ – take source’s framerate
mxf: 60, 59.94, 60000/1001, 50, 29.97, 30000/1001, 25, 23.98, 24000/1001

All: none
psp: 30000/1001

framerate_upper_threshold

If the source frame rate lower then framerate_upper_threshold, then the source frame rate will be used.

Any non-zero float or N/M where N and M are non-zero

none

keyframe

Defines the keyframe interval, in number of frames.

Positive integer

300

force_keyframes

Specify when to capture keyframes.

  • positive integer number: N - insert IDR frame every N frames
  • positive integer with "s" suffix. Ns - insert IDR frame every N second
  • comma separated list. N1,N2,...,Nk insert IDR frame on N1,N2,...,Nk seconds

none

video_sync

Specify the method for video synchronization.

old — Keep old behavior (for compatibility)
passthrough — Each frame is passed with its timestamp from the demuxer to the muxer
cfr — Frames will be duplicated and dropped to achieve exactly the requested constant framerate
vfr — Frames are passed through with their timestamp or dropped so as to prevent 2 frames from having the same timestamp
auto — Chooses between cfr and vfr depending on muxer capabilities

none

remove_grain

The removegrain filter is a spatial denoiser for progressive video.

4 integer numbers(from 0 to 23 including) separated with colon.
Each number specifies filter for each plane.
For example: 4:4:4:4
Available modes:
0 – Leave input plane unchanged. Default.
1 – Clips the pixel with the minimum and maximum
of the 8 neighbour pixels.
2 – Clips the pixel with the second minimum and maximum
of the 8 neighbour pixels.
3 – Clips the pixel with the third minimum and maximum
of the 8 neighbour pixels.
4 – Clips the pixel with the fourth minimum and maximum
of the 8 neighbour pixels. This is equivalent to a median filter.
5 – Line-sensitive clipping giving the minimal change.
6 – Line-sensitive clipping, intermediate.
7 – Line-sensitive clipping, intermediate.
8 – Line-sensitive clipping, intermediate.
9 – Line-sensitive clipping on a line where the neighbours pixels
are the closest.
10 – Replaces the target pixel with the closest neighbour.
11 – [1 2 1] horizontal and vertical kernel blur.
12 – Same as mode 11.
13 – Bob mode, interpolates top field from the line
where the neighbours pixels are the closest.
14 – Bob mode, interpolates bottom field from the line
where the neighbours pixels are the closest.
15 – Bob mode, interpolates top field. Same as 13 but with
a more complicated interpolation formula.
16 – Bob mode, interpolates bottom field. Same as 14 but with
a more complicated interpolation formula.
17 – Clips the pixel with the minimum and maximum of
respectively the maximum and minimum
of each pair of opposite neighbour pixels.
18 – Line-sensitive clipping using opposite neighbours
whose greatest distance from the current pixel is minimal.
19 – Replaces the pixel with the average of its 8 neighbours.
20 – Averages the 9 pixels ([1 1 1] horizontal and vertical blur).
21 – Clips pixels using the averages of opposite neighbour.
22 – Same as mode 21 but simpler and faster.
23 – Small edge and halo removal, but reputed useless.

none

video_only

Use only video streams in output

yes, no

no

dc

Intra DC precision

Positive integer number

none

lmin

Minimum lagrange factor (VBR)

Positive integer number

none

lmax

Maximum lagrange factor (VBR)

Positive integer number

none

rc_min_vbv_use

Minimum Rate Control VBV factor

Positive integer number

none

rc_max_vbv_use

Maximum Rate Control VBV factor

Positive integer number

none

color_range

Color range

0 – unknown
1 – tv
2 – pc
3 – unspecified
4 – mpeg
5 – jpeg

0

color_primaries

Color Primaries

2 – auto
1 – ITU-R BT.709
5 – ITU-R BT.601 625-line
6 – ITU-R BT.601 525-line
9 – ITU-R BT.2020
copy

2

transfer_characteristics

Transfer Characteristics

2 – auto
1 – ITU-R BT.709 / BT.601 / BT.2020
16 – SMPTE ST 2084 (PQ)
18 – BT.2100 Hybrid Log Gamma
copy

2

matrix_coefficients

Matrix Coefficients

2 – auto
1 – ITU-R BT.709, 6 – ITU-R BT.601
9 – ITU-R BT.2020
copy

2

scaler

Video scaling algorithm

default, fast_bilinear, bilinear, bicubic, neighbor, area, bicublin, gauss, sinc

default

scaler_flags

Video scaler flags

Scaling flags list. Each flag should start with + or - sign.
For now available flags are: accurate_rnd, full_chroma_int, full_chroma_inp, bitexact

none

video_tag

Video Tag

String

none

mxf_profile

MXF profile

sony_xdcam, panasonic_p2, dci_2k, dci_4k, as11_dpp

none

mxf_multiplex_type

MXF multiplex type

xdcam_hd, xdcam_imx, xdcam_dv, xdcam_sxs_hd, xdcam_sxs_imx, xdcam_sxs_dv, xavc_sxs, xavc_mel, p2_dvcpro, p2_avci, p2_avc_ultra

none

scaler_lib

Scaler library

default, zscale

default

📘

Remux / track passthrough / copy

Using the 'copy' parameter value will retain all original source settings in the output and ignore any additional parameters. For most codecs, this will result in a remux instead of a decode/encode cycle, passing through the original video stream.

🚧

Dolby Audio compatibility

'flv' output with ‘vp6‘ video codec is incompatible with the ‘dolby_audio‘ audio codec.

👍

For size parameter

You can specify only one dimension: either width or height. In this case, set other dimension to 0. (I.e. 640×0). The output will be set to match the same aspect as the source.

🚧

For framerate_upper_threshold parameter

If framerate_upper_threshold is specified then the framerate parameter will be ignored.

🚧

For muxrate parameter

  • <muxrate /> parameter works only for mpeg-ts output format.
  • It's not recommended to use along with <bitrate />, <maxrate />, <minrate />, and <bufsize /> parameters as the output may be invalid.

🚧

For video_only parameter

<video_only /> parameter works only for mp4 output.

🚧

For color_primaries, transfer_characteristics, and matrix_coefficients parameters

<color_primaries />, <transfer_characteristics />, and <matrix_coefficients /> parameters are supported only in mov, cablelabs_mpegts, mxf, and apple_prores output formats.

🚧

For video_tag parameter

<video_tag > parameter available only for mxf output format.

🚧

For mxf_profile and mxf_multiplex_type parameters

<mxf_profile > and <mxf_multiplex_type > parameters available only for mainconcept_mxf output format.