Update Transcoding Profile
update stream profiles setting
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 '{
"_METHOD": "PUT",
"name": "My 720p Profile",
"filemode": "single",
"outdir": "/output/videos",
"sourceaudio": "",
"sourcevideo": "",
"f": "mp4",
"hlsUnifiedSegments": false,
"hlsfMP4Segments": false,
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"crfv": "24",
"kar": "0",
"ol": "0",
"bv": "1",
"bvvalue": "2500",
"vpass": "1",
"vprofile": "main",
"vlevel": "4.0",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"tune": "disabled",
"bframe": "1",
"upscale": "Y",
"ca": "aac",
"aca": "2",
"ba": "1",
"bavalue": "128",
"ara": "44100",
"tm": "disabled",
"tv": "00:00:05",
"filters": [],
"profiles": []
}'
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 = {
"_METHOD": "PUT",
"name": "My 720p Profile",
"filemode": "single",
"outdir": "/output/videos",
"sourceaudio": "",
"sourcevideo": "",
"f": "mp4",
"hlsUnifiedSegments": false,
"hlsfMP4Segments": false,
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"crfv": "24",
"kar": "0",
"ol": "0",
"bv": "1",
"bvvalue": "2500",
"vpass": "1",
"vprofile": "main",
"vlevel": "4.0",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"tune": "disabled",
"bframe": "1",
"upscale": "Y",
"ca": "aac",
"aca": "2",
"ba": "1",
"bavalue": "128",
"ara": "44100",
"tm": "disabled",
"tv": "00:00:05",
"filters": [],
"profiles": []
}
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({
"_METHOD": "PUT",
"name": "My 720p Profile",
"filemode": "single",
"outdir": "/output/videos",
"sourceaudio": "",
"sourcevideo": "",
"f": "mp4",
"hlsUnifiedSegments": false,
"hlsfMP4Segments": false,
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"crfv": "24",
"kar": "0",
"ol": "0",
"bv": "1",
"bvvalue": "2500",
"vpass": "1",
"vprofile": "main",
"vlevel": "4.0",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"tune": "disabled",
"bframe": "1",
"upscale": "Y",
"ca": "aac",
"aca": "2",
"ba": "1",
"bavalue": "128",
"ara": "44100",
"tm": "disabled",
"tv": "00:00:05",
"filters": [],
"profiles": []
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"_METHOD": "PUT",
"name": "My 720p Profile",
"filemode": "single",
"outdir": "/output/videos",
"sourceaudio": "",
"sourcevideo": "",
"f": "mp4",
"hlsUnifiedSegments": false,
"hlsfMP4Segments": false,
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"crfv": "24",
"kar": "0",
"ol": "0",
"bv": "1",
"bvvalue": "2500",
"vpass": "1",
"vprofile": "main",
"vlevel": "4.0",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"tune": "disabled",
"bframe": "1",
"upscale": "Y",
"ca": "aac",
"aca": "2",
"ba": "1",
"bavalue": "128",
"ara": "44100",
"tm": "disabled",
"tv": "00:00:05",
"filters": [],
"profiles": []
}`)
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 = '{
"_METHOD": "PUT",
"name": "My 720p Profile",
"filemode": "single",
"outdir": "/output/videos",
"sourceaudio": "",
"sourcevideo": "",
"f": "mp4",
"hlsUnifiedSegments": false,
"hlsfMP4Segments": false,
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"crfv": "24",
"kar": "0",
"ol": "0",
"bv": "1",
"bvvalue": "2500",
"vpass": "1",
"vprofile": "main",
"vlevel": "4.0",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"tune": "disabled",
"bframe": "1",
"upscale": "Y",
"ca": "aac",
"aca": "2",
"ba": "1",
"bavalue": "128",
"ara": "44100",
"tm": "disabled",
"tv": "00:00:05",
"filters": [],
"profiles": []
}'
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
HTTP method override. Must be set to PUT to perform an update operation.
Name of the transcoding profile.
Profile mode. single encodes the file to one output; combined bundles multiple sub-profiles. Allowed values: single, combined.
Output directory path where encoded files are stored.
Source audio stream identifier used during encoding.
Source video stream identifier used during encoding.
Container format for the output file. Allowed values: mp4, webm, hls, hlsaes. webm requires VP9 or AV1 codec. hls and hlsaes convert to HLS segments and manifest.
Applicable only when f is hls or hlsaes. When true, audio and video are embedded in the same HLS segments. Enable if compatibility issues occur or when the source has multiple audio tracks (only the first audio track will be encoded).
Applicable only when f is hls or hlsaes. When true, fMP4 (fragmented MP4) segments are used instead of the default MPEG-TS segments.
Video codec. libx264 = H.264, libx265 = H.265, libvpx-vp9 = VP9 (webm only), libaom-av1 = AV1 (advanced feature). Allowed values: libx264, libx265, libvpx-vp9, libaom-av1.
Output resolution preset. Use as_defined to specify a custom resolution via svvalue. 0 means As Source. Allowed values: 2160p, 1440p, 1080p, 720p, 576p, 480p, 360p, 240p, 144p, 0, as_defined.
Custom resolution in WIDTHxHEIGHT format. Required when sv is as_defined. Width range 256–7680, height range 144–4320, both values must be divisible by 2.
Constrained Quality factor controlling quality vs file size. 18 = High quality, 24 = Medium quality, 28 = Low quality. Allowed values: 18, 24, 28.
Keep Aspect Ratio. When set to 1, only height is fixed and width adjusts automatically to preserve the source aspect ratio. Allowed values: 0, 1.
Orientation Lock. When set to 1, the landscape or portrait orientation of the source video is preserved. Allowed values: 0, 1.
Video bitrate mode. 0 = As Source (copy source bitrate), 1 = As Defined (use custom bvvalue). Allowed values: 0, 1.
Custom video bitrate in kbps. Required when bv is 1.
Number of encoding passes. 1 = One Pass, 2 = Two Pass. Disabled when bv is 0. Allowed values: 1, 2.
Video encoding profile. H.264 (libx264) supports baseline, main, high. H.265 (libx265) supports main, main10. VP9 (libvpx-vp9) supports profile0, profile2. AV1 (libaom-av1) supports main. Allowed values: baseline, main, high, main10, profile0, profile2.
Encoding level defining resolution and bitrate constraints. Available levels depend on codec and profile selection. Allowed values: 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1, 6.2.
Frames per second. 0 means As Source. Allowed values: 0, 24, 25, 30, 48, 50, 60.
Group of Pictures (keyframe) interval in seconds. Left empty when fps is 0. Allowed values: 2, 4, 6, 8, 10, 12.
Encoding speed preset controlling compression efficiency and CPU usage. Faster presets use less CPU but may reduce quality. Allowed values: superfast, veryfast, faster, fast, medium, slow.
Encoding tune to optimise for specific content or use case. H.264 supports disabled, film, animation, grain, stillimage, fastdecode. H.265 supports disabled, fastdecode. VP9 and AV1 support disabled only. Allowed values: disabled, film, animation, grain, stillimage, fastdecode.
Number of consecutive B-frames used in encoding. Higher values improve compression efficiency but increase encoding latency. Allowed values: 0, 1, 2, 3, 4.
Video upscaling. Y = Allow upscaling when source resolution is lower than the target. N = Disallow upscaling. Allowed values: Y, N.
Audio codec. copy = As Source (pass-through). aac and libmp3lame are for mp4, hls, hlsaes containers. libopus is for webm only. Allowed values: copy, aac, libmp3lame, libopus.
Audio channel configuration. 0 = As Source, 1 = Mono, 2 = Stereo. Allowed values: 0, 1, 2.
Audio bitrate mode. 0 = As Source, 1 = As Defined (use custom bavalue). As Source is not available for webm. Allowed values: 0, 1.
Audio bitrate in kbps. Required when ba is 1.
Audio sample rate. 0 = As Source. Allowed values: 0, 44100, 48000.
Thumbnail generation mode. disabled = no thumbnails, fixed = capture once at time tv, interval = capture repeatedly at tv interval, sprite = generate sprite sheet. Allowed values: disabled, fixed, interval, sprite.
Time value for thumbnail capture in HH:MM:SS format. Required when tm is fixed or interval.
Array of filter names to apply to the encoding output.
Array of sub-profile configurations. Applicable when filemode is combined.
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
HTTP method override. Must be set to PUT to perform an update operation.
PUTProfile mode. single encodes the file to one output; combined bundles multiple sub-profiles. Allowed values: single, combined.
singleContainer format for the output file. Allowed values: mp4, webm, hls, hlsaes. webm requires VP9 or AV1 codec. hls and hlsaes convert to HLS segments and manifest.
mp4Applicable only when f is hls or hlsaes. When true, audio and video are embedded in the same HLS segments. Enable if compatibility issues occur or when the source has multiple audio tracks (only the first audio track will be encoded).
falseApplicable only when f is hls or hlsaes. When true, fMP4 (fragmented MP4) segments are used instead of the default MPEG-TS segments.
falseVideo codec. libx264 = H.264, libx265 = H.265, libvpx-vp9 = VP9 (webm only), libaom-av1 = AV1 (advanced feature). Allowed values: libx264, libx265, libvpx-vp9, libaom-av1.
libx264Output resolution preset. Use as_defined to specify a custom resolution via svvalue. 0 means As Source. Allowed values: 2160p, 1440p, 1080p, 720p, 576p, 480p, 360p, 240p, 144p, 0, as_defined.
720pCustom resolution in WIDTHxHEIGHT format. Required when sv is as_defined. Width range 256–7680, height range 144–4320, both values must be divisible by 2.
1280x720Constrained Quality factor controlling quality vs file size. 18 = High quality, 24 = Medium quality, 28 = Low quality. Allowed values: 18, 24, 28.
24Keep Aspect Ratio. When set to 1, only height is fixed and width adjusts automatically to preserve the source aspect ratio. Allowed values: 0, 1.
0Orientation Lock. When set to 1, the landscape or portrait orientation of the source video is preserved. Allowed values: 0, 1.
0Video bitrate mode. 0 = As Source (copy source bitrate), 1 = As Defined (use custom bvvalue). Allowed values: 0, 1.
1Number of encoding passes. 1 = One Pass, 2 = Two Pass. Disabled when bv is 0. Allowed values: 1, 2.
1Video encoding profile. H.264 (libx264) supports baseline, main, high. H.265 (libx265) supports main, main10. VP9 (libvpx-vp9) supports profile0, profile2. AV1 (libaom-av1) supports main. Allowed values: baseline, main, high, main10, profile0, profile2.
mainEncoding level defining resolution and bitrate constraints. Available levels depend on codec and profile selection. Allowed values: 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1, 6.2.
4.0Group of Pictures (keyframe) interval in seconds. Left empty when fps is 0. Allowed values: 2, 4, 6, 8, 10, 12.
6Encoding speed preset controlling compression efficiency and CPU usage. Faster presets use less CPU but may reduce quality. Allowed values: superfast, veryfast, faster, fast, medium, slow.
veryfastEncoding tune to optimise for specific content or use case. H.264 supports disabled, film, animation, grain, stillimage, fastdecode. H.265 supports disabled, fastdecode. VP9 and AV1 support disabled only. Allowed values: disabled, film, animation, grain, stillimage, fastdecode.
disabledNumber of consecutive B-frames used in encoding. Higher values improve compression efficiency but increase encoding latency. Allowed values: 0, 1, 2, 3, 4.
1Video upscaling. Y = Allow upscaling when source resolution is lower than the target. N = Disallow upscaling. Allowed values: Y, N.
YAudio codec. copy = As Source (pass-through). aac and libmp3lame are for mp4, hls, hlsaes containers. libopus is for webm only. Allowed values: copy, aac, libmp3lame, libopus.
aacAudio channel configuration. 0 = As Source, 1 = Mono, 2 = Stereo. Allowed values: 0, 1, 2.
2Audio bitrate mode. 0 = As Source, 1 = As Defined (use custom bavalue). As Source is not available for webm. Allowed values: 0, 1.
1Thumbnail generation mode. disabled = no thumbnails, fixed = capture once at time tv, interval = capture repeatedly at tv interval, sprite = generate sprite sheet. Allowed values: disabled, fixed, interval, sprite.
disabledTime value for thumbnail capture in HH:MM:SS format. Required when tm is fixed or interval.
00:00:05Responses
Status of the API response.
Human-readable message describing the result.