<?xml version="1.0"?>
<query>
<userid>[UserID]</userid> <!-- required-->
<userkey>[UserKey]</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>
<bitrate_adjust>[yes|no]</bitrate_adjust>
<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>
<colorspace>[ColorSpace]</colorspace>
<color_primaries>[ColorPrimaries]</color_primaries>
<color_trc>[ColorTRC]</color_trc>
<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>
<alpha_mask>[yes|no]</alpha_mask>
<framerate_interpolation>[yes|no]</framerate_interpolation>
<framerate_method>[FrameRateConversionMethod]</framerate_method>
<gxf_sequential_field_num>[yes|no]</gxf_sequential_field_num>
</format>
</query>
{
"query": {
"userid": "[UserID]", // required
"userkey": "[UserKey]", // 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]",
"bitrate_adjust": "[yes|no]",
"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]",
"colorspace": "[ColorSpace]",
"color_primaries": "[ColorPrimaries]",
"color_trc": "[ColorTRC]",
"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]",
"alpha_mask": "[yes|no]",
"framerate_interpolation": "[yes|no]",
"framerate_method": "[FrameRateConversionMethod]",
"gxf_sequential_field_num": "[yes|no]"
}
}
}
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 android: h263, mpeg4, libx264, beamr4avc, copy m4v: mpeg4, beamr4avc, copy ipod, iphone, ipad: mpeg4, libx264, beamr4avc, copy advanced_hls: libx264, beamr4avc, mainconcept_avc fmp4_hls: libx264, hevc, beamr4avc, beamr5hevc, mainconcept_avc advanced_mss: libx264, beamr4avc advanced_dash: libx264, libvpx-vp9, hevc, beamr4avc, beamr5hevc, libaom-av1, libsvtav1, mainconcept_avc advanced_fmp4: libx264, hevc, beamr4avc, beamr5hevc, libaom-av1, libsvtav1, mainconcept_avc mpeg_dash: mpeg4, libx264, beamr4avc, beamr5hevc, hevc mp4: mpeg4, libx264, hevc, beamr4avc, beamr5hevc, libaom-av1, libsvtav1, copy ogg: libtheora, copy webm: libvpx, libvpx-vp9, vp8, vp9, libaom-av1, libsvtav1, copy mp3, wma: none mpeg2: mpeg2video, copy mpeg1: mpeg1video, copy mov: mpeg4, libx264, xdcam, dvcpro, dvcpro50, dvcprohd, mjpeg, mpeg2video, 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 cablelabs_mpegts: libx264, beamr4avc, mpeg2video, hevc, beamr5hevc, mainconcept_avc, copy mainconcept_mxf: mpeg2video, libx264, copy qtrle: qtrle mxf_op1a: mpeg2video, libx264, xdcamhd422, dvcpro, dvcpro50, dvcprohd, imx30, xdcam, dnxhd, copy mxf_as11: copy | flv: flv fl9, ipod, iphone, ipad: libx264 wmv, zune: wmv2 mp4, m4v, 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 cablelabs_mpegts: libx264 qtrle: qtrle mxf_op1a: mpeg2video mxf_as11: copy |
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. 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) iPhone: 480×368 iPad: 1280×720 Android: 800×400 zune: 320×180 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, mp4, m4v, ipod, iphone, ipad, android, ogg, webm, 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 iOS, Android: 1024k |
bitrate_adjust | Round the specified bitrate value to the nearest allowed bitrate from DNxHD profiles | yes, no | no |
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, qtrle: 60000/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 or float with "s" suffix. Ns - insert IDR frame every N second • comma separated list of integer or float numbers. 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 | For cablelabs_mpegts, apple_prores, mxf, and mov output formats: • 0 – unknown • 1 – tv • 2 – pc • 3 – unspecified • 4 – mpeg • 5 – jpeg Other output formats: • tv • mpeg • pc • jpeg • unknown • unspecified | cablelabs_mpegts, apple_prores, mxf, and mov: 0 other formats: none |
colorspace | Colorspace | • rgb • bt709 • fcc • bt470bg • smpte170m • smpte240m • ycocg • bt2020nc • bt2020c • smpte2085 • chroma-derived-nc • chroma-derived-c • ictcp • unknown • unspecified | none |
color_primaries | Color Primaries | For cablelabs_mpegts, apple_prores, mxf, and mov output formats: • 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 Other output formats: • bt709 • bt470m • bt470bg • smpte170m • smpte240m • film • bt2020 • smpte428 • smpte431 • smpte432 • jedec-p22 • unknown • unspecified | cablelabs_mpegts, apple_prores, mxf, and mov: 2 other formats: none |
color_trc | Color transformation characteristics | • bt709 • gamma22 • gamma28 • smpte170m • smpte240m • linear • log • log_sqrt • log316 • iec61966_2_4 • bt1361 • iec61966_2_1 • bt2020_10 • bt2020_12 • smpte2084 • arib-std-b67 • unknown • unspecified | none |
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 5 – ITU-R BT.470 / ITU-R BT.601 625-line 6 – ITU-R BT.601 copy | 2 |
matrix_coefficients | Matrix Coefficients | 2 – auto 1 – ITU-R BT.709, 6 – ITU-R BT.601 9 – ITU-R BT.2020 5 – ITU-R BT.470 / ITU-R BT.601 625-line 6 – ITU-R BT.601 525-line 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 |
alpha_mask | Apply alpha masking filter | yes, no | no |
framerate_interpolation | Change the output frame rate by interpolating new video output frames from the source frames | yes, no | no |
framerate_method | Frame rate conversion method | default, filter | default |
gxf_sequential_field_num | Set to "yes" if the GXF source file is out of the SMPTE 360-2009 standard, and use sequential field number increments for frame-encoded video. | yes, no | no |
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
- parameter works only for mpeg-ts output format.
- It's not recommended to use along with , , , and parameters as the output may be invalid.
For video_only parameter
<video_only /> parameter works only for mp4, mainconcept_mxf and advanced multibitrate output formats.
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 and mxf_op1a output format with xdcam video codec.
For mxf_profile and mxf_multiplex_type parameters
<mxf_profile > and <mxf_multiplex_type > parameters available only for mainconcept_mxf output format.