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": "sd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "",
"svwidth": "",
"svheight": "",
"deinterlace": "0",
"bvvalue": "2000",
"fps": "24",
"preset": "faster",
"vprofile": "main",
"vlevel": "3.1",
"bframe": "0",
"gop": "10",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "1",
"bavalue": "80",
"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": "sd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "",
"svwidth": "",
"svheight": "",
"deinterlace": "0",
"bvvalue": "2000",
"fps": "24",
"preset": "faster",
"vprofile": "main",
"vlevel": "3.1",
"bframe": "0",
"gop": "10",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "1",
"bavalue": "80",
"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": "sd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "",
"svwidth": "",
"svheight": "",
"deinterlace": "0",
"bvvalue": "2000",
"fps": "24",
"preset": "faster",
"vprofile": "main",
"vlevel": "3.1",
"bframe": "0",
"gop": "10",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "1",
"bavalue": "80",
"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": "sd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "",
"svwidth": "",
"svheight": "",
"deinterlace": "0",
"bvvalue": "2000",
"fps": "24",
"preset": "faster",
"vprofile": "main",
"vlevel": "3.1",
"bframe": "0",
"gop": "10",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "1",
"bavalue": "80",
"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": "sd",
"f": "mp4",
"cv": "libx264",
"sv": "720p",
"svvalue": "",
"svwidth": "",
"svheight": "",
"deinterlace": "0",
"bvvalue": "2000",
"fps": "24",
"preset": "faster",
"vprofile": "main",
"vlevel": "3.1",
"bframe": "0",
"gop": "10",
"tune": "disabled",
"crf": "ll",
"ca": "aac",
"aca": "1",
"bavalue": "80",
"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. Always set to PUT to perform a create operation.
Name of the transcoding profile. Required; must not be empty.
Stream quality tier. Required. Defaults to sd.
Container format for the output stream. Currently only mp4 is supported. Required. Defaults to mp4.
Video codec. libx264 = H.264, libx265 = H.265. Only these two codecs are currently supported. Required. Defaults to libx264. Selecting libx265 restricts vprofile to main and tune to disabled/fastdecode (see those fields). Unlike the Update endpoint, this endpoint does not cross-validate resolution, bitrate, and FPS against the selected codec/profile/level.
Output resolution preset. Select as_defined to specify a custom resolution via svvalue/svwidth/svheight. Defaults to 720p.
Custom resolution in WIDTHxHEIGHT format (e.g. 1920x1080), used when sv is as_defined. Optional; unlike the Update endpoint, this endpoint does not enforce the numeric/divisible-by-2 or 256-7680 / 144-4320 range rules. Empty string when sv is a fixed preset.
Width component of the custom resolution, used only when sv is as_defined. Optional; not combined into or validated against svvalue on this endpoint.
Height component of the custom resolution, used only when sv is as_defined. Optional; not combined into or validated against svvalue on this endpoint.
Deinterlacing toggle. 1 = Yes (enabled), 0 = No (disabled). Defaults to 0.
Video bitrate in kbps. Required. Defaults to 2000. Unlike the Update endpoint, no minimum value is enforced here.
Frames per second. 0 means As Source. Required. Defaults to 24. Unlike the Update endpoint, the 48, 50, and 60 values are not restricted to higher encoding levels here.
Encoding speed preset. Required. Defaults to faster.
Video encoding profile. Required. Defaults to main. When cv is libx264, all three options are valid; when cv is libx265, only main is valid. Selecting a profile sets vlevel to a corresponding default value: baseline -> 3.0, high -> 4.0, main -> 3.1.
Encoding level. Optional; automatically set based on vprofile (see vprofile). Defaults to 3.1. Unlike the Update endpoint, this endpoint does not cross-check vlevel against cv/vprofile-specific resolution, bitrate, or FPS ceilings.
Number of consecutive B-frames used in encoding. This value is not currently configurable and is always submitted as 0.
Group of Pictures (keyframe) interval in seconds. Required. Defaults to 10.
Encoding tune. Optional. Defaults to disabled. Available options depend on cv: libx264 allows disabled, zerolatency, fastdecode; libx265 allows disabled, fastdecode only. Unlike the Update endpoint, this endpoint does not require the Advanced Features add-on to select zerolatency or fastdecode.
Internal CRF quality flag. Not currently configurable; always submitted with the default value ll.
Audio codec. Only aac is currently offered. Required. Defaults to aac.
Audio channel configuration. 0 = As Source, 1 = Stereo, 2 = Mono. Required. Defaults to 1 (Stereo).
Audio bitrate in kbps. Required. Defaults to 80. Unlike the Update endpoint, no minimum or maximum value is enforced here.
Audio sample rate in Hz. Required. Defaults to 44100.
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. Always set to PUT to perform a create operation.
PUTName of the transcoding profile. Required; must not be empty.
My 720p ProfileContainer format for the output stream. Currently only mp4 is supported. Required. Defaults to mp4.
mp4Video codec. libx264 = H.264, libx265 = H.265. Only these two codecs are currently supported. Required. Defaults to libx264. Selecting libx265 restricts vprofile to main and tune to disabled/fastdecode (see those fields). Unlike the Update endpoint, this endpoint does not cross-validate resolution, bitrate, and FPS against the selected codec/profile/level.
libx264libx265Output resolution preset. Select as_defined to specify a custom resolution via svvalue/svwidth/svheight. Defaults to 720p.
2160p1440p1080p720p576p480p360p240p144pas_definedCustom resolution in WIDTHxHEIGHT format (e.g. 1920x1080), used when sv is as_defined. Optional; unlike the Update endpoint, this endpoint does not enforce the numeric/divisible-by-2 or 256-7680 / 144-4320 range rules. Empty string when sv is a fixed preset.
Width component of the custom resolution, used only when sv is as_defined. Optional; not combined into or validated against svvalue on this endpoint.
Height component of the custom resolution, used only when sv is as_defined. Optional; not combined into or validated against svvalue on this endpoint.
Deinterlacing toggle. 1 = Yes (enabled), 0 = No (disabled). Defaults to 0.
01Video bitrate in kbps. Required. Defaults to 2000. Unlike the Update endpoint, no minimum value is enforced here.
2000Frames per second. 0 means As Source. Required. Defaults to 24. Unlike the Update endpoint, the 48, 50, and 60 values are not restricted to higher encoding levels here.
0242530485060Encoding speed preset. Required. Defaults to faster.
superfastveryfastfasterfastVideo encoding profile. Required. Defaults to main. When cv is libx264, all three options are valid; when cv is libx265, only main is valid. Selecting a profile sets vlevel to a corresponding default value: baseline -\> 3.0, high -\> 4.0, main -\> 3.1.
baselinemainhighEncoding level. Optional; automatically set based on vprofile (see vprofile). Defaults to 3.1. Unlike the Update endpoint, this endpoint does not cross-check vlevel against cv/vprofile-specific resolution, bitrate, or FPS ceilings.
3.03.13.24.04.14.25.05.15.2Number of consecutive B-frames used in encoding. This value is not currently configurable and is always submitted as 0.
0Group of Pictures (keyframe) interval in seconds. Required. Defaults to 10.
24681012Encoding tune. Optional. Defaults to disabled. Available options depend on cv: libx264 allows disabled, zerolatency, fastdecode; libx265 allows disabled, fastdecode only. Unlike the Update endpoint, this endpoint does not require the Advanced Features add-on to select zerolatency or fastdecode.
disabledzerolatencyfastdecodeInternal CRF quality flag. Not currently configurable; always submitted with the default value ll.
llAudio codec. Only aac is currently offered. Required. Defaults to aac.
aacAudio channel configuration. 0 = As Source, 1 = Stereo, 2 = Mono. Required. Defaults to 1 (Stereo).
012Audio bitrate in kbps. Required. Defaults to 80. Unlike the Update endpoint, no minimum or maximum value is enforced here.
80Audio sample rate in Hz. Required. Defaults to 44100.
4800044100320002205016000Responses
Status of the API response.
Human-readable message describing the result.
The ID of the newly created transcoding profile.