Encoding ProfilesUpdate Encoding Profile

Update Encoding Profile

Edit an existing transcoding profile.

curl -X POST "https://api.5centscdn.com/v2/transcoding/profiles/7" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "name": "Updated Profile",
  "cv": "libx264",
  "ca": "aac",
  "f": "mp4",
  "filemode": "single",
  "fps": "30",
  "gop": "60",
  "preset": "veryfast",
  "vlevel": "4.1",
  "vprofile": "high",
  "vpass": "1",
  "tune": "film",
  "bv": "1",
  "bvvalue": "4000",
  "ba": "1",
  "bavalue": "128",
  "sv": "720p",
  "svvalue": "1920x800",
  "svwidth": "1920",
  "svheight": "800",
  "crfv": "24",
  "ara": "48000",
  "aca": "2",
  "bframe": "2",
  "tm": "interval",
  "tv": "0:01:30",
  "upscale": "N",
  "sourcevideo": "Y",
  "sourceaudio": "Y",
  "hlsUnifiedSegments": false,
  "hlsfMP4Segments": false,
  "outdir": "output/hd",
  "filters": [
    "1"
  ],
  "profiles": [],
  "kar": "0",
  "ol": "0"
}'
{
  "result": "success",
  "message": "Transcoding Settings Updated"
}
POST
/transcoding/profiles/{profileid}
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

path
profileidinteger
Required

ID of the Transcode Profile (fs_transcodeprofiles.id).

Content-Typestring
Required

The media type of the request body

Options: application/json
namestring

Profile display name. Must not be empty or consist only of whitespace.

cvstring

Video codec used for encoding. libx264 = H.264/AVC. libx265 = H.265/HEVC. libvpx-vp9 = VP9. libaom-av1 = AV1. mp4, hls, and hlsaes containers support libx264, libx265, and libaom-av1; the webm container supports libvpx-vp9 and libaom-av1 only. libaom-av1 requires the account's Advanced Features add-on. The selected codec also determines which vprofile values are valid (see vprofile).

Options: libx264, libx265, libvpx-vp9, libaom-av1
castring

Audio codec used for encoding. copy, aac, and libmp3lame are available for mp4, hls, and hlsaes containers; libopus is used with the webm container.

Options: copy, aac, libmp3lame, libopus
fstring

Output container format. Determines which video and audio codecs are available (see cv and ca).

Options: mp4, webm, hls, hlsaes
filemodestring

Output file organization. single produces one encoded output using the video and audio settings on this profile. combined bundles several existing single-mode profiles (see profiles) into a multi-bitrate output, and requires upscale, sourcevideo, and sourceaudio to be set.

Options: single, combined
fpsstring

Target output frame rate. 0 copies the source frame rate. Changing away from 0 sets gop to 6; changing back to 0 clears gop. Values above the maximum frame rate allowed for the selected cv/vprofile/vlevel combination are not accepted (see vlevel).

Options: 0, 24, 25, 30, 48, 50, 60
gopstring

Group of Pictures size in seconds (interval between keyframes). Not applicable while fps is 0, in which case the existing value is retained. Must be numeric; a gop x fps value below 30 frames or above 300 frames is not recommended.

Options: 2, 4, 6, 8, 10, 12
presetstring

Encoding speed preset. Slower presets produce smaller files at the cost of encoding time.

Options: superfast, veryfast, faster, fast, medium, slow
vlevelstring

Codec encoding level, constraining the maximum resolution, video bitrate, and frame rate for the profile. Which levels are valid depends on the chosen cv and vprofile: with libx264, baseline allows 3.0 and 3.1, main allows 3.0 through 4.2, and high allows 3.1 through 5.2; with libx265, main10 allows every level except 3.2, and main allows every level except 3.0 and 3.1; with libvpx-vp9, profile0 allows 3.2, 4.1, 5.2, and 6.2, and profile2 allows 3.0 through 4.2 and 5.2; with libaom-av1, main allows 3.0, 3.1, 4.1, 4.2, and 5.2. Each cv/vprofile/vlevel combination also caps the maximum resolution, video bitrate, and frame rate that can be submitted - for example libx264/main/4.0 allows up to 1920x1080 at up to 20000kbps and 30fps, libx264/high/5.1 allows up to 3840x2160 at up to 240000kbps and 30fps, libx265/main10/5.0 allows up to 3840x2160 at up to 100000kbps and 60fps, and libaom-av1/main/5.2 allows up to 7680x4320 at up to 24000kbps and 120fps; values above the selected level's ceiling are not accepted.

Options: 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1, 6.2
vprofilestring

Encoding profile. Which values are valid depends on the selected cv: libx264 allows baseline, main, and high; libx265 allows main and main10; libvpx-vp9 allows profile0 and profile2; libaom-av1 allows main only.

Options: baseline, main, high, main10, profile0, profile2
vpassstring

Number of encoding passes. 1 = single pass (faster). 2 = two-pass (more accurate bitrate targeting). Automatically set to 1 when bv is 1 (As Defined) and cleared when bv is 0.

Options: 1, 2
tunestring

Encoding tune. Available options depend on cv: libx264 allows disabled, film, animation, grain, stillimage, and fastdecode; libx265 allows disabled and fastdecode; libvpx-vp9 and libaom-av1 allow disabled only. Requires the account's Advanced Features add-on - only disabled is available otherwise.

Options: disabled, film, animation, grain, stillimage, fastdecode
bvstring

Video bitrate mode. 0 = As Source (copies source bitrate; not available for the webm container). 1 = As Defined (use bvvalue to set target kbps).

Options: 0, 1
bvvaluestring

Target video bitrate in kilobits per second, sent as a string. Must be numeric and greater than 512. Required when bv=1.

bastring

Audio bitrate mode. 0 = As Source (copies source bitrate). 1 = As Defined (use bavalue to set target kbps). Forced to 1 when f=webm.

Options: 0, 1
bavaluestring

Target audio bitrate in kilobits per second, sent as a string. Must be numeric and greater than 32. Required when ba=1.

svstring

Output resolution. Use as_defined to specify custom dimensions via svvalue (and the paired svwidth/svheight). Use 0 to preserve source resolution.

Options: 2160p, 1440p, 1080p, 720p, 576p, 480p, 360p, 240p, 144p, 0, as_defined
svvaluestring

Custom output dimensions as a single WIDTHxHEIGHT string. Only used when sv=as_defined. Both dimensions must be numeric and divisible by 2, width must be between 256 and 7680, height must be between 144 and 4320 (both inclusive), and the combined resolution must not exceed the maximum allowed for the selected cv/vprofile/vlevel combination (see vlevel).

svwidthstring

Width component of the custom resolution, used only when sv is as_defined. Combined with svheight to form svvalue, and subject to the same 256-7680 range, even-number, and codec/profile/level resolution-ceiling rules as svvalue.

svheightstring

Height component of the custom resolution, used only when sv is as_defined. Combined with svwidth to form svvalue, and subject to the same 144-4320 range, even-number, and codec/profile/level resolution-ceiling rules as svvalue.

crfvstring

Constant Rate Factor for quality-based encoding. 18 = High quality, 24 = Medium quality, 28 = Low quality.

Options: 18, 24, 28
arastring

Audio sample rate in Hz. 0 preserves the source sample rate.

Options: 0, 44100, 48000
acastring

Audio output channel count. 0 = As Source. 1 = Mono. 2 = Stereo.

Options: 0, 1, 2
bframestring

Number of consecutive B-frames. Higher values improve compression efficiency.

Options: 0, 1, 2, 3, 4
tmstring

Thumbnail generation mode. interval = generate thumbnails at periodic intervals. fixed = generate thumbnail at exact time tv. sprite = generate a sprite sheet of thumbnails. disabled = no thumbnails.

Options: interval, fixed, sprite, disabled
tvstring

Thumbnail time value in HH:MM:SS format. Required when tm=interval or tm=fixed.

upscalestring

Whether to allow upscaling when the target resolution exceeds the source resolution. Y = allow upscaling. N = skip if source is lower resolution.

Options: Y, N
sourcevideostring

Applicable when filemode is combined. Whether to copy the source video stream into the combined output.

Options: Y, N
sourceaudiostring

Applicable when filemode is combined. Y copies the original audio track as-is into the combined output. N includes only the single highest-bitrate transcoded audio track from the selected sub-profiles.

Options: Y, N
hlsUnifiedSegmentsboolean

Applicable when f is hls or hlsaes. When true, uses MPEG-TS segments for the HLS output. Requires the account's Advanced Features add-on. Defaults to false.

hlsfMP4Segmentsboolean

Applicable when f is hls or hlsaes. When true, uses fragmented MP4 segments instead of MPEG-TS, which improves seeking; not supported together with the hlsaes container. Required when cv=libaom-av1 and f=hls. Requires the account's Advanced Features add-on. Defaults to false.

outdirstring

Output directory path relative to the storage root. Empty string stores in root. Characters < > : " | ? * are not allowed.

filtersarray

IDs of transcoding filters to apply, selected from the service's existing filters.

profilesarray

IDs of existing single-mode profiles to include as sub-profiles. Applicable when filemode is combined.

karstring

Keep Aspect Ratio. 1 = only height is fixed and width adjusts automatically to preserve the source aspect ratio. 0 = disabled. Requires the account's Advanced Features add-on.

Options: 0, 1
olstring

Orientation Lock. 1 = the landscape or portrait orientation of the source video is preserved. 0 = disabled. Requires the account's Advanced Features add-on.

Options: 0, 1
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

profileidinteger
Required

ID of the Transcode Profile (fs_transcodeprofiles.id).

Example:
7

Body

application/json
namestring

Profile display name. Must not be empty or consist only of whitespace.

Example:
Updated Profile
cvstring

Video codec used for encoding. libx264 = H.264/AVC. libx265 = H.265/HEVC. libvpx-vp9 = VP9. libaom-av1 = AV1. mp4, hls, and hlsaes containers support libx264, libx265, and libaom-av1; the webm container supports libvpx-vp9 and libaom-av1 only. libaom-av1 requires the account's Advanced Features add-on. The selected codec also determines which vprofile values are valid (see vprofile).

Allowed values:libx264libx265libvpx-vp9libaom-av1
castring

Audio codec used for encoding. copy, aac, and libmp3lame are available for mp4, hls, and hlsaes containers; libopus is used with the webm container.

Allowed values:copyaaclibmp3lamelibopus
fstring

Output container format. Determines which video and audio codecs are available (see cv and ca).

Allowed values:mp4webmhlshlsaes
filemodestring

Output file organization. single produces one encoded output using the video and audio settings on this profile. combined bundles several existing single-mode profiles (see profiles) into a multi-bitrate output, and requires upscale, sourcevideo, and sourceaudio to be set.

Allowed values:singlecombined
fpsstring

Target output frame rate. 0 copies the source frame rate. Changing away from 0 sets gop to 6; changing back to 0 clears gop. Values above the maximum frame rate allowed for the selected cv/vprofile/vlevel combination are not accepted (see vlevel).

Allowed values:0242530485060
gopstring

Group of Pictures size in seconds (interval between keyframes). Not applicable while fps is 0, in which case the existing value is retained. Must be numeric; a gop x fps value below 30 frames or above 300 frames is not recommended.

Allowed values:24681012
Example:
60
presetstring

Encoding speed preset. Slower presets produce smaller files at the cost of encoding time.

Allowed values:superfastveryfastfasterfastmediumslow
vlevelstring

Codec encoding level, constraining the maximum resolution, video bitrate, and frame rate for the profile. Which levels are valid depends on the chosen cv and vprofile: with libx264, baseline allows 3.0 and 3.1, main allows 3.0 through 4.2, and high allows 3.1 through 5.2; with libx265, main10 allows every level except 3.2, and main allows every level except 3.0 and 3.1; with libvpx-vp9, profile0 allows 3.2, 4.1, 5.2, and 6.2, and profile2 allows 3.0 through 4.2 and 5.2; with libaom-av1, main allows 3.0, 3.1, 4.1, 4.2, and 5.2. Each cv/vprofile/vlevel combination also caps the maximum resolution, video bitrate, and frame rate that can be submitted - for example libx264/main/4.0 allows up to 1920x1080 at up to 20000kbps and 30fps, libx264/high/5.1 allows up to 3840x2160 at up to 240000kbps and 30fps, libx265/main10/5.0 allows up to 3840x2160 at up to 100000kbps and 60fps, and libaom-av1/main/5.2 allows up to 7680x4320 at up to 24000kbps and 120fps; values above the selected level's ceiling are not accepted.

Allowed values:3.03.13.24.04.14.25.05.15.26.06.16.2
vprofilestring

Encoding profile. Which values are valid depends on the selected cv: libx264 allows baseline, main, and high; libx265 allows main and main10; libvpx-vp9 allows profile0 and profile2; libaom-av1 allows main only.

Allowed values:baselinemainhighmain10profile0profile2
vpassstring

Number of encoding passes. 1 = single pass (faster). 2 = two-pass (more accurate bitrate targeting). Automatically set to 1 when bv is 1 (As Defined) and cleared when bv is 0.

Allowed values:12
tunestring

Encoding tune. Available options depend on cv: libx264 allows disabled, film, animation, grain, stillimage, and fastdecode; libx265 allows disabled and fastdecode; libvpx-vp9 and libaom-av1 allow disabled only. Requires the account's Advanced Features add-on - only disabled is available otherwise.

Allowed values:disabledfilmanimationgrainstillimagefastdecode
bvstring

Video bitrate mode. 0 = As Source (copies source bitrate; not available for the webm container). 1 = As Defined (use bvvalue to set target kbps).

Allowed values:01
bvvaluestring

Target video bitrate in kilobits per second, sent as a string. Must be numeric and greater than 512. Required when bv=1.

Example:
4000
bastring

Audio bitrate mode. 0 = As Source (copies source bitrate). 1 = As Defined (use bavalue to set target kbps). Forced to 1 when f=webm.

Allowed values:01
bavaluestring

Target audio bitrate in kilobits per second, sent as a string. Must be numeric and greater than 32. Required when ba=1.

Example:
128
svstring

Output resolution. Use as_defined to specify custom dimensions via svvalue (and the paired svwidth/svheight). Use 0 to preserve source resolution.

Allowed values:2160p1440p1080p720p576p480p360p240p144p0as_defined
svvaluestring

Custom output dimensions as a single WIDTHxHEIGHT string. Only used when sv=as_defined. Both dimensions must be numeric and divisible by 2, width must be between 256 and 7680, height must be between 144 and 4320 (both inclusive), and the combined resolution must not exceed the maximum allowed for the selected cv/vprofile/vlevel combination (see vlevel).

Example:
1920x800
svwidthstring

Width component of the custom resolution, used only when sv is as_defined. Combined with svheight to form svvalue, and subject to the same 256-7680 range, even-number, and codec/profile/level resolution-ceiling rules as svvalue.

Example:
1920
svheightstring

Height component of the custom resolution, used only when sv is as_defined. Combined with svwidth to form svvalue, and subject to the same 144-4320 range, even-number, and codec/profile/level resolution-ceiling rules as svvalue.

Example:
800
crfvstring

Constant Rate Factor for quality-based encoding. 18 = High quality, 24 = Medium quality, 28 = Low quality.

Allowed values:182428
arastring

Audio sample rate in Hz. 0 preserves the source sample rate.

Allowed values:04410048000
acastring

Audio output channel count. 0 = As Source. 1 = Mono. 2 = Stereo.

Allowed values:012
bframestring

Number of consecutive B-frames. Higher values improve compression efficiency.

Allowed values:01234
tmstring

Thumbnail generation mode. interval = generate thumbnails at periodic intervals. fixed = generate thumbnail at exact time tv. sprite = generate a sprite sheet of thumbnails. disabled = no thumbnails.

Allowed values:intervalfixedspritedisabled
tvstring

Thumbnail time value in HH:MM:SS format. Required when tm=interval or tm=fixed.

Example:
0:01:30
upscalestring

Whether to allow upscaling when the target resolution exceeds the source resolution. Y = allow upscaling. N = skip if source is lower resolution.

Allowed values:YN
sourcevideostring

Applicable when filemode is combined. Whether to copy the source video stream into the combined output.

Allowed values:YN
sourceaudiostring

Applicable when filemode is combined. Y copies the original audio track as-is into the combined output. N includes only the single highest-bitrate transcoded audio track from the selected sub-profiles.

Allowed values:YN
hlsUnifiedSegmentsboolean

Applicable when f is hls or hlsaes. When true, uses MPEG-TS segments for the HLS output. Requires the account's Advanced Features add-on. Defaults to false.

Example:
false
hlsfMP4Segmentsboolean

Applicable when f is hls or hlsaes. When true, uses fragmented MP4 segments instead of MPEG-TS, which improves seeking; not supported together with the hlsaes container. Required when cv=libaom-av1 and f=hls. Requires the account's Advanced Features add-on. Defaults to false.

Example:
false
outdirstring

Output directory path relative to the storage root. Empty string stores in root. Characters \< \> : " | ? * are not allowed.

Example:
output/hd
filtersarray

IDs of transcoding filters to apply, selected from the service's existing filters.

Example:
["1"]
profilesarray

IDs of existing single-mode profiles to include as sub-profiles. Applicable when filemode is combined.

Example:
[]
karstring

Keep Aspect Ratio. 1 = only height is fixed and width adjusts automatically to preserve the source aspect ratio. 0 = disabled. Requires the account's Advanced Features add-on.

Allowed values:01
olstring

Orientation Lock. 1 = the landscape or portrait orientation of the source video is preserved. 0 = disabled. Requires the account's Advanced Features add-on.

Allowed values:01

Responses

resultstring

API response status.

messagestring

Human-readable result or error message.