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"
}'
import requests
import json
url = "https://api.5centscdn.com/v2/transcoding/profiles/7"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"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"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/transcoding/profiles/7", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"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"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"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"
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/transcoding/profiles/7", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/transcoding/profiles/7')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"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"
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Transcoding Settings Updated"
}
/transcoding/profiles/{profileid}Target server for requests. Edit to use your own host.
API key (sent in header)
ID of the Transcode Profile (fs_transcodeprofiles.id).
The media type of the request body
Profile display name. Must not be empty or consist only of whitespace.
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).
Audio codec used for encoding. copy, aac, and libmp3lame are available for mp4, hls, and hlsaes containers; libopus is used with the webm container.
Output container format. Determines which video and audio codecs are available (see cv and ca).
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.
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).
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.
Encoding speed preset. Slower presets produce smaller files at the cost of encoding time.
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.
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.
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.
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.
Video bitrate mode. 0 = As Source (copies source bitrate; not available for the webm container). 1 = As Defined (use bvvalue to set target kbps).
Target video bitrate in kilobits per second, sent as a string. Must be numeric and greater than 512. Required when bv=1.
Audio bitrate mode. 0 = As Source (copies source bitrate). 1 = As Defined (use bavalue to set target kbps). Forced to 1 when f=webm.
Target audio bitrate in kilobits per second, sent as a string. Must be numeric and greater than 32. Required when ba=1.
Output resolution. Use as_defined to specify custom dimensions via svvalue (and the paired svwidth/svheight). Use 0 to preserve source resolution.
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).
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.
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.
Constant Rate Factor for quality-based encoding. 18 = High quality, 24 = Medium quality, 28 = Low quality.
Audio sample rate in Hz. 0 preserves the source sample rate.
Audio output channel count. 0 = As Source. 1 = Mono. 2 = Stereo.
Number of consecutive B-frames. Higher values improve compression efficiency.
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.
Thumbnail time value in HH:MM:SS format. Required when tm=interval or tm=fixed.
Whether to allow upscaling when the target resolution exceeds the source resolution. Y = allow upscaling. N = skip if source is lower resolution.
Applicable when filemode is combined. Whether to copy the source video stream into the combined output.
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.
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.
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.
Output directory path relative to the storage root. Empty string stores in root. Characters < > : " | ? * are not allowed.
IDs of transcoding filters to apply, selected from the service's existing filters.
IDs of existing single-mode profiles to include as sub-profiles. Applicable when filemode is combined.
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.
Orientation Lock. 1 = the landscape or portrait orientation of the source video is preserved. 0 = disabled. Requires the account's Advanced Features add-on.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Path Parameters
Body
Profile display name. Must not be empty or consist only of whitespace.
Updated ProfileVideo 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).
libx264libx265libvpx-vp9libaom-av1Audio codec used for encoding. copy, aac, and libmp3lame are available for mp4, hls, and hlsaes containers; libopus is used with the webm container.
copyaaclibmp3lamelibopusOutput container format. Determines which video and audio codecs are available (see cv and ca).
mp4webmhlshlsaesOutput 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.
singlecombinedTarget 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).
0242530485060Group 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.
2468101260Encoding speed preset. Slower presets produce smaller files at the cost of encoding time.
superfastveryfastfasterfastmediumslowCodec 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.
3.03.13.24.04.14.25.05.15.26.06.16.2Encoding 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.
baselinemainhighmain10profile0profile2Number 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.
12Encoding 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.
disabledfilmanimationgrainstillimagefastdecodeVideo bitrate mode. 0 = As Source (copies source bitrate; not available for the webm container). 1 = As Defined (use bvvalue to set target kbps).
01Target video bitrate in kilobits per second, sent as a string. Must be numeric and greater than 512. Required when bv=1.
4000Audio bitrate mode. 0 = As Source (copies source bitrate). 1 = As Defined (use bavalue to set target kbps). Forced to 1 when f=webm.
01Target audio bitrate in kilobits per second, sent as a string. Must be numeric and greater than 32. Required when ba=1.
128Output resolution. Use as_defined to specify custom dimensions via svvalue (and the paired svwidth/svheight). Use 0 to preserve source resolution.
2160p1440p1080p720p576p480p360p240p144p0as_definedCustom 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).
1920x800Width 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.
1920Height 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.
800Constant Rate Factor for quality-based encoding. 18 = High quality, 24 = Medium quality, 28 = Low quality.
182428Number of consecutive B-frames. Higher values improve compression efficiency.
01234Thumbnail 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.
intervalfixedspritedisabledThumbnail time value in HH:MM:SS format. Required when tm=interval or tm=fixed.
0:01:30Whether to allow upscaling when the target resolution exceeds the source resolution. Y = allow upscaling. N = skip if source is lower resolution.
YNApplicable when filemode is combined. Whether to copy the source video stream into the combined output.
YNApplicable 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.
YNApplicable 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.
falseApplicable 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.
falseOutput directory path relative to the storage root. Empty string stores in root. Characters \< \> : " | ? * are not allowed.
output/hdIDs of transcoding filters to apply, selected from the service's existing filters.
["1"]IDs of existing single-mode profiles to include as sub-profiles. Applicable when filemode is combined.
[]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.
01Orientation Lock. 1 = the landscape or portrait orientation of the source video is preserved. 0 = disabled. Requires the account's Advanced Features add-on.
01Responses
API response status.
Human-readable result or error message.