Update Transcoding Profile
Update stream profile settings. Every field is validated - required-field checks plus the encoding compatibility rules described on each property below - before the profile is updated. Unlike the Create endpoint, no _METHOD override is required for this request.
curl -X POST "https://api.5centscdn.com/v2/streams/settings/profiles/1" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"name": "My 720p Profile",
"filemode": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"svwidth": "1280",
"svheight": "720",
"deinterlace": "0",
"bvvalue": "2500",
"fps": "30",
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"gop": "2",
"bframe": "0",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "2",
"bavalue": "128",
"ara": "44100"
}'
import requests
import json
url = "https://api.5centscdn.com/v2/streams/settings/profiles/1"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"name": "My 720p Profile",
"filemode": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"svwidth": "1280",
"svheight": "720",
"deinterlace": "0",
"bvvalue": "2500",
"fps": "30",
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"gop": "2",
"bframe": "0",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "2",
"bavalue": "128",
"ara": "44100"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/streams/settings/profiles/1", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"name": "My 720p Profile",
"filemode": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"svwidth": "1280",
"svheight": "720",
"deinterlace": "0",
"bvvalue": "2500",
"fps": "30",
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"gop": "2",
"bframe": "0",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "2",
"bavalue": "128",
"ara": "44100"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "My 720p Profile",
"filemode": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"svwidth": "1280",
"svheight": "720",
"deinterlace": "0",
"bvvalue": "2500",
"fps": "30",
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"gop": "2",
"bframe": "0",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "2",
"bavalue": "128",
"ara": "44100"
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/streams/settings/profiles/1", 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/streams/settings/profiles/1')
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": "My 720p Profile",
"filemode": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"svwidth": "1280",
"svheight": "720",
"deinterlace": "0",
"bvvalue": "2500",
"fps": "30",
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"gop": "2",
"bframe": "0",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "2",
"bavalue": "128",
"ara": "44100"
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Transcoding Settings Updated"
}
/streams/settings/profiles/{profileid}Target server for requests. Edit to use your own host.
API key (sent in header)
Id of the Transcode Profile
The media type of the request body
Name of the transcoding profile. Required; must not be empty or consist only of whitespace.
Stream quality tier. Required.
Container format for the output stream. Currently only mp4 is supported. Required together with cv.
Video codec. libx264 = H.264, libx265 = H.265. Only these two codecs are currently supported for live transcoding profiles. Required together with f. The selected codec restricts which vprofile and tune values are valid (see those fields) and, for H.264, also restricts vprofile/vlevel combinations against the codec's macroblocks-per-frame and macroblocks-per-second ceilings for the selected level.
Output resolution preset. Select as_defined to specify a custom resolution via svvalue (and the paired svwidth/svheight inputs).
Custom resolution in WIDTHxHEIGHT format (e.g. 1920x1080). Required and validated only when sv is as_defined: width and height must each 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). Ignored when sv is a fixed preset.
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. Sent alongside svvalue and svheight.
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. Sent alongside svvalue and svwidth.
Deinterlacing toggle. 1 = Yes (enabled), 0 = No (disabled).
Video bitrate in kbps. Required; must be numeric and at least 512 - no upper bound applies beyond the per-level bitrate ceiling described under vlevel.
Frames per second. 0 means As Source. The 48, 50, and 60 values are only valid once vlevel is 4.2 or higher, and any value exceeding the maximum FPS allowed for the selected cv/vprofile/vlevel combination is rejected (see vlevel).
Encoding speed preset. Faster presets reduce CPU usage but may lower quality.
Video encoding profile. Required. When cv is libx264, all three options (baseline, main, high) are valid. When cv is libx265, only main is valid - baseline and high are not supported for this codec.
Encoding level. Required. Which levels are valid depends on the chosen cv + vprofile combination: libx264 + baseline allows 3.0, 3.1; libx264 + main allows 3.0, 3.1, 3.2, 4.0, 4.1, 4.2; libx264 + high allows 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2; libx265 + main allows 3.0, 3.1, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2. (libx265 + baseline/high are not valid combinations.) Each cv/vprofile/vlevel combination also caps the maximum resolution, video bitrate, and FPS 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, and libx265/main/5.0 allows up to 3840x2160 at up to 100000kbps and 60fps; resolution, bitrate, or fps values above the selected level's ceiling are rejected. For libx264 specifically, an additional macroblocks-per-frame and macroblocks-per-second ceiling for the selected level also applies.
Group of Pictures (keyframe) interval in seconds. Not applicable while fps is 0 (As Source), in which case the existing value is retained. If provided, must be numeric; a gop x fps value below 30 frames or above 300 frames is not recommended.
Number of consecutive B-frames used in encoding. This value is not currently configurable and is carried through unchanged from the existing profile.
Encoding tune. Available options depend on cv: libx264 allows disabled, zerolatency, fastdecode; libx265 allows disabled, fastdecode only (no zerolatency). Only disabled is available unless the account has the Advanced Features add-on enabled.
Internal CRF quality flag. Not currently configurable; always submitted with the default value ll.
Audio codec. Only aac is currently supported. Required.
Audio channel configuration. 0 = As Source, 1 = Stereo, 2 = Mono. Required.
Audio bitrate in kbps. Required; must be numeric, at least 32, and no more than 320.
Audio sample rate in Hz. Required.
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
Name of the transcoding profile. Required; must not be empty or consist only of whitespace.
My 720p ProfileContainer format for the output stream. Currently only mp4 is supported. Required together with cv.
mp4Video codec. libx264 = H.264, libx265 = H.265. Only these two codecs are currently supported for live transcoding profiles. Required together with f. The selected codec restricts which vprofile and tune values are valid (see those fields) and, for H.264, also restricts vprofile/vlevel combinations against the codec's macroblocks-per-frame and macroblocks-per-second ceilings for the selected level.
libx264libx265Output resolution preset. Select as_defined to specify a custom resolution via svvalue (and the paired svwidth/svheight inputs).
2160p1440p1080p720p576p480p360p240p144pas_definedCustom resolution in WIDTHxHEIGHT format (e.g. 1920x1080). Required and validated only when sv is as_defined: width and height must each 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). Ignored when sv is a fixed preset.
1280x720Width 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. Sent alongside svvalue and svheight.
1280Height 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. Sent alongside svvalue and svwidth.
720Video bitrate in kbps. Required; must be numeric and at least 512 - no upper bound applies beyond the per-level bitrate ceiling described under vlevel.
2500Frames per second. 0 means As Source. The 48, 50, and 60 values are only valid once vlevel is 4.2 or higher, and any value exceeding the maximum FPS allowed for the selected cv/vprofile/vlevel combination is rejected (see vlevel).
0242530485060Encoding speed preset. Faster presets reduce CPU usage but may lower quality.
superfastveryfastfasterfastVideo encoding profile. Required. When cv is libx264, all three options (baseline, main, high) are valid. When cv is libx265, only main is valid - baseline and high are not supported for this codec.
baselinemainhighEncoding level. Required. Which levels are valid depends on the chosen cv + vprofile combination: libx264 + baseline allows 3.0, 3.1; libx264 + main allows 3.0, 3.1, 3.2, 4.0, 4.1, 4.2; libx264 + high allows 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2; libx265 + main allows 3.0, 3.1, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2. (libx265 + baseline/high are not valid combinations.) Each cv/vprofile/vlevel combination also caps the maximum resolution, video bitrate, and FPS 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, and libx265/main/5.0 allows up to 3840x2160 at up to 100000kbps and 60fps; resolution, bitrate, or fps values above the selected level's ceiling are rejected. For libx264 specifically, an additional macroblocks-per-frame and macroblocks-per-second ceiling for the selected level also applies.
3.03.13.24.04.14.25.05.15.2Group of Pictures (keyframe) interval in seconds. Not applicable while fps is 0 (As Source), in which case the existing value is retained. If provided, must be numeric; a gop x fps value below 30 frames or above 300 frames is not recommended.
24681012Number of consecutive B-frames used in encoding. This value is not currently configurable and is carried through unchanged from the existing profile.
0Encoding tune. Available options depend on cv: libx264 allows disabled, zerolatency, fastdecode; libx265 allows disabled, fastdecode only (no zerolatency). Only disabled is available unless the account has the Advanced Features add-on enabled.
disabledzerolatencyfastdecodeInternal CRF quality flag. Not currently configurable; always submitted with the default value ll.
llAudio channel configuration. 0 = As Source, 1 = Stereo, 2 = Mono. Required.
012Audio bitrate in kbps. Required; must be numeric, at least 32, and no more than 320.
128Responses
Status of the API response.
Human-readable message describing the result.