Create Transcoding Profile
add stream profiles setting
curl -X POST "https://api.5centscdn.com/v2/streams/settings/profiles/new" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"_METHOD": "PUT",
"name": "My 720p Profile",
"filemode": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"deinterlace": "0",
"bvvalue": 2500,
"fps": 30,
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"bframe": "3",
"gop": 2,
"tune": "disabled",
"ca": "aac",
"aca": 2,
"bavalue": "128",
"ara": "44100"
}'
import requests
import json
url = "https://api.5centscdn.com/v2/streams/settings/profiles/new"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"_METHOD": "PUT",
"name": "My 720p Profile",
"filemode": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"deinterlace": "0",
"bvvalue": 2500,
"fps": 30,
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"bframe": "3",
"gop": 2,
"tune": "disabled",
"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/new", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"_METHOD": "PUT",
"name": "My 720p Profile",
"filemode": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"deinterlace": "0",
"bvvalue": 2500,
"fps": 30,
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"bframe": "3",
"gop": 2,
"tune": "disabled",
"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(`{
"_METHOD": "PUT",
"name": "My 720p Profile",
"filemode": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"deinterlace": "0",
"bvvalue": 2500,
"fps": 30,
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"bframe": "3",
"gop": 2,
"tune": "disabled",
"ca": "aac",
"aca": 2,
"bavalue": "128",
"ara": "44100"
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/streams/settings/profiles/new", 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/new')
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": "hd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "1280x720",
"deinterlace": "0",
"bvvalue": 2500,
"fps": 30,
"preset": "veryfast",
"vprofile": "main",
"vlevel": "4.0",
"bframe": "3",
"gop": 2,
"tune": "disabled",
"ca": "aac",
"aca": 2,
"bavalue": "128",
"ara": "44100"
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Transcoding Settings, New Profile Created",
"profileid": 129699
}
/streams/settings/profiles/new
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
HTTP method override for this request. This endpoint accepts POST, but set this to PUT to perform an update operation.
Name of the transcoding profile.
Stream quality tier. Allowed values: sd, hd, uhd.
Container format for the output stream. Allowed value: mp4.
Video codec for encoding. libx264 means H.264, libx265 means H.265. Allowed values: libx264, libx265.
Output resolution preset. Use as_defined to specify a custom resolution via svvalue. Allowed values: 2160p, 1440p, 1080p, 720p, 576p, 480p, 360p, 240p, 144p, as_defined.
Custom resolution in WIDTHxHEIGHT format. Required when sv is set to as_defined. Width range is 256–7680, height range is 144–4320, both values must be divisible by 2.
Enable or disable deinterlacing. 1 means enabled, 0 means disabled.
Video bitrate in kbps.
Frames per second for the output stream. 0 means As Source. Allowed values: 0, 24, 25, 30, 48, 50, 60.
Encoding speed preset. Faster presets reduce CPU usage but may lower quality. Allowed values: superfast, veryfast, faster, fast.
Video encoding profile. libx264 supports baseline, main, high. libx265 supports main only. Allowed values: baseline, main, high.
H.264/H.265 encoding level. Allowed values: 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2.
Number of consecutive B-frames used in encoding. Higher values improve compression but increase latency.
Group of Pictures (keyframe) interval in seconds. Allowed values: 2, 4, 6, 8, 10, 12.
Encoding tune to optimize for a specific use case. zerolatency reduces encoding delay, fastdecode optimizes for fast decoding, disabled applies no tuning. libx264 supports disabled, zerolatency, fastdecode. libx265 supports disabled, fastdecode. Allowed values: disabled, zerolatency, fastdecode.
Audio codec for encoding. Allowed value: aac.
Audio channel configuration. 0 means As Source, 1 means Mono, 2 means Stereo.
Audio bitrate in kbps. Min 32 max 320.
Audio sample rate in Hz. Allowed values: 16000, 22050, 32000, 44100, 48000.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Body
HTTP method override for this request. This endpoint accepts POST, but set this to PUT to perform an update operation.
PUTVideo codec for encoding. libx264 means H.264, libx265 means H.265. Allowed values: libx264, libx265.
libx264Output resolution preset. Use as_defined to specify a custom resolution via svvalue. Allowed values: 2160p, 1440p, 1080p, 720p, 576p, 480p, 360p, 240p, 144p, as_defined.
720pCustom resolution in WIDTHxHEIGHT format. Required when sv is set to as_defined. Width range is 256–7680, height range is 144–4320, both values must be divisible by 2.
1280x720Frames per second for the output stream. 0 means As Source. Allowed values: 0, 24, 25, 30, 48, 50, 60.
30Encoding speed preset. Faster presets reduce CPU usage but may lower quality. Allowed values: superfast, veryfast, faster, fast.
veryfastVideo encoding profile. libx264 supports baseline, main, high. libx265 supports main only. Allowed values: baseline, main, high.
mainH.264/H.265 encoding level. Allowed values: 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2.
4.0Number of consecutive B-frames used in encoding. Higher values improve compression but increase latency.
3Group of Pictures (keyframe) interval in seconds. Allowed values: 2, 4, 6, 8, 10, 12.
2Encoding tune to optimize for a specific use case. zerolatency reduces encoding delay, fastdecode optimizes for fast decoding, disabled applies no tuning. libx264 supports disabled, zerolatency, fastdecode. libx265 supports disabled, fastdecode. Allowed values: disabled, zerolatency, fastdecode.
disabledResponses
Status of the API response.
Human-readable message describing the result.
The ID of the newly created transcoding profile.