Create Encoding Profile
Create a new transcoding profile.
curl -X POST "https://api.5centscdn.com/v2/transcoding/profiles/new" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"_METHOD": "PUT",
"name": "HD 720p H.264",
"cv": "libx264",
"ca": "aac",
"f": "mp4",
"filemode": "single",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"vlevel": "4.1",
"vprofile": "high",
"vpass": "1",
"bv": "1",
"bvvalue": "4000",
"ba": "1",
"bavalue": "128",
"sv": "720p",
"svvalue": "1920x800",
"crfv": "24",
"ara": "48000",
"aca": "2",
"bframe": "0",
"tm": "interval",
"tv": "0:01:30",
"upscale": "N",
"sourcevideo": "Y",
"sourceaudio": "Y",
"outdir": "output/hd",
"filters": [
"1",
"2"
],
"profiles": []
}'
import requests
import json
url = "https://api.5centscdn.com/v2/transcoding/profiles/new"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"_METHOD": "PUT",
"name": "HD 720p H.264",
"cv": "libx264",
"ca": "aac",
"f": "mp4",
"filemode": "single",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"vlevel": "4.1",
"vprofile": "high",
"vpass": "1",
"bv": "1",
"bvvalue": "4000",
"ba": "1",
"bavalue": "128",
"sv": "720p",
"svvalue": "1920x800",
"crfv": "24",
"ara": "48000",
"aca": "2",
"bframe": "0",
"tm": "interval",
"tv": "0:01:30",
"upscale": "N",
"sourcevideo": "Y",
"sourceaudio": "Y",
"outdir": "output/hd",
"filters": [
"1",
"2"
],
"profiles": []
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/transcoding/profiles/new", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"_METHOD": "PUT",
"name": "HD 720p H.264",
"cv": "libx264",
"ca": "aac",
"f": "mp4",
"filemode": "single",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"vlevel": "4.1",
"vprofile": "high",
"vpass": "1",
"bv": "1",
"bvvalue": "4000",
"ba": "1",
"bavalue": "128",
"sv": "720p",
"svvalue": "1920x800",
"crfv": "24",
"ara": "48000",
"aca": "2",
"bframe": "0",
"tm": "interval",
"tv": "0:01:30",
"upscale": "N",
"sourcevideo": "Y",
"sourceaudio": "Y",
"outdir": "output/hd",
"filters": [
"1",
"2"
],
"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": "HD 720p H.264",
"cv": "libx264",
"ca": "aac",
"f": "mp4",
"filemode": "single",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"vlevel": "4.1",
"vprofile": "high",
"vpass": "1",
"bv": "1",
"bvvalue": "4000",
"ba": "1",
"bavalue": "128",
"sv": "720p",
"svvalue": "1920x800",
"crfv": "24",
"ara": "48000",
"aca": "2",
"bframe": "0",
"tm": "interval",
"tv": "0:01:30",
"upscale": "N",
"sourcevideo": "Y",
"sourceaudio": "Y",
"outdir": "output/hd",
"filters": [
"1",
"2"
],
"profiles": []
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/transcoding/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/transcoding/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": "HD 720p H.264",
"cv": "libx264",
"ca": "aac",
"f": "mp4",
"filemode": "single",
"fps": "30",
"gop": "6",
"preset": "veryfast",
"vlevel": "4.1",
"vprofile": "high",
"vpass": "1",
"bv": "1",
"bvvalue": "4000",
"ba": "1",
"bavalue": "128",
"sv": "720p",
"svvalue": "1920x800",
"crfv": "24",
"ara": "48000",
"aca": "2",
"bframe": "0",
"tm": "interval",
"tv": "0:01:30",
"upscale": "N",
"sourcevideo": "Y",
"sourceaudio": "Y",
"outdir": "output/hd",
"filters": [
"1",
"2"
],
"profiles": []
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Transcoding Settings, New Profile Created",
"profileid": 129017
}
/transcoding/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 create a new profile.
Profile display name. Required; must not be empty.
Video codec used for encoding. libx264 = H.264/AVC. libx265 = H.265/HEVC. libvpx-vp9 = VP9. mp4, hls, and hlsaes containers support libx264 and libx265; the webm container supports libvpx-vp9 only. AV1 encoding can be added to the profile afterwards via the update endpoint. Defaults to libx264.
Audio codec used for encoding. aac and mp3 are available for mp4, hls, and hlsaes containers; opus is used with the webm container. Defaults to aac.
Output container format. Determines which video and audio codecs are available (see cv and ca). Defaults to mp4.
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. No default is set - one of the two must be selected.
Target output frame rate. 0 copies the source frame rate. Defaults to 0.
Group of Pictures size in seconds (interval between keyframes). Not applicable while fps is 0. No default is set.
Encoding speed preset. Slower presets produce smaller files at the cost of encoding time. Defaults to faster.
Codec encoding level, constraining the maximum resolution, video bitrate, and frame rate for the profile. Which levels are valid depends on vprofile: baseline allows 3.0 and 3.1; main allows 3.1, 4.1, and 4.2; high allows 4.0, 4.1, and 4.2. Selecting a vprofile automatically sets vlevel to a corresponding default: baseline -> 3.0, high -> 4.0, main -> 3.1. Defaults to 3.1.
Encoding profile. Defaults to main. This set of profile options applies to the libx264 codec; H.265 and VP9-specific profiles can be set afterwards via the update endpoint.
Number of encoding passes. 1 = single pass (faster). 2 = two-pass (more accurate bitrate targeting). Defaults to 1.
Video bitrate mode. 0 = As Source (copies source bitrate). 1 = As Defined (use bvvalue to set target kbps). Defaults to 1.
Target video bitrate in kilobits per second, sent as a string. Required when bv=1. Defaults to 800.
Audio bitrate mode. 0 = As Source (copies source bitrate). 1 = As Defined (use bavalue to set target kbps). Defaults to 1.
Target audio bitrate in kilobits per second, sent as a string. Required when ba=1. Defaults to 128.
Output resolution. Use as_defined to specify custom dimensions via svvalue. Defaults to 720p.
Custom output dimensions as a single WIDTHxHEIGHT string. Only used when sv=as_defined. Both dimensions must be divisible by 2.
Constant Rate Factor for quality-based encoding. 18 = High quality, 24 = Medium quality, 28 = Low quality. Defaults to 24.
Audio sample rate in Hz. Defaults to 44100.
Audio output channel count. 0 = As Source. 1 = Stereo. 2 = Mono. Defaults to 1 (Stereo).
Number of consecutive B-frames. Not currently configurable at creation time; always submitted as 0.
Thumbnail generation mode. disabled = no thumbnails. fixed = capture a single thumbnail at time tv. interval = capture thumbnails repeatedly at the tv interval. sprite = generate a sprite sheet of thumbnails. Defaults to disabled.
Time value for thumbnail capture, in HH:MM:SS format. Applicable when tm is fixed or interval. Defaults to 00:00:00.
Whether to allow upscaling when the target resolution exceeds the source resolution. Y = allow upscaling. N = skip if source is lower resolution. Defaults to Y.
Applicable when filemode is combined. Whether to copy the source video stream into the combined output. Defaults to Y.
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. Defaults to N.
Output directory path relative to the storage root, required. Empty string stores in root. The characters < > : " | ? * are not allowed. Defaults to mp4/.
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.
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 create a new profile.
PUTVideo codec used for encoding. libx264 = H.264/AVC. libx265 = H.265/HEVC. libvpx-vp9 = VP9. mp4, hls, and hlsaes containers support libx264 and libx265; the webm container supports libvpx-vp9 only. AV1 encoding can be added to the profile afterwards via the update endpoint. Defaults to libx264.
libx264libx265libvpx-vp9Audio codec used for encoding. aac and mp3 are available for mp4, hls, and hlsaes containers; opus is used with the webm container. Defaults to aac.
aacmp3opusOutput container format. Determines which video and audio codecs are available (see cv and ca). Defaults to mp4.
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. No default is set - one of the two must be selected.
singlecombinedTarget output frame rate. 0 copies the source frame rate. Defaults to 0.
02425304850Group of Pictures size in seconds (interval between keyframes). Not applicable while fps is 0. No default is set.
24681012Encoding speed preset. Slower presets produce smaller files at the cost of encoding time. Defaults to faster.
superfastveryfastfasterfastCodec encoding level, constraining the maximum resolution, video bitrate, and frame rate for the profile. Which levels are valid depends on vprofile: baseline allows 3.0 and 3.1; main allows 3.1, 4.1, and 4.2; high allows 4.0, 4.1, and 4.2. Selecting a vprofile automatically sets vlevel to a corresponding default: baseline -\> 3.0, high -\> 4.0, main -\> 3.1. Defaults to 3.1.
3.03.14.04.14.2Encoding profile. Defaults to main. This set of profile options applies to the libx264 codec; H.265 and VP9-specific profiles can be set afterwards via the update endpoint.
baselinemainhighNumber of encoding passes. 1 = single pass (faster). 2 = two-pass (more accurate bitrate targeting). Defaults to 1.
12Video bitrate mode. 0 = As Source (copies source bitrate). 1 = As Defined (use bvvalue to set target kbps). Defaults to 1.
01Target video bitrate in kilobits per second, sent as a string. Required when bv=1. Defaults to 800.
4000Audio bitrate mode. 0 = As Source (copies source bitrate). 1 = As Defined (use bavalue to set target kbps). Defaults to 1.
01Target audio bitrate in kilobits per second, sent as a string. Required when ba=1. Defaults to 128.
128Output resolution. Use as_defined to specify custom dimensions via svvalue. Defaults to 720p.
2160p1440p1080p720p576p480p360p240p144pas_definedCustom output dimensions as a single WIDTHxHEIGHT string. Only used when sv=as_defined. Both dimensions must be divisible by 2.
1920x800Constant Rate Factor for quality-based encoding. 18 = High quality, 24 = Medium quality, 28 = Low quality. Defaults to 24.
182428Audio output channel count. 0 = As Source. 1 = Stereo. 2 = Mono. Defaults to 1 (Stereo).
012Number of consecutive B-frames. Not currently configurable at creation time; always submitted as 0.
0Thumbnail generation mode. disabled = no thumbnails. fixed = capture a single thumbnail at time tv. interval = capture thumbnails repeatedly at the tv interval. sprite = generate a sprite sheet of thumbnails. Defaults to disabled.
disabledfixedintervalspriteTime value for thumbnail capture, in HH:MM:SS format. Applicable when tm is fixed or interval. Defaults to 00:00:00.
0:01:30Whether to allow upscaling when the target resolution exceeds the source resolution. Y = allow upscaling. N = skip if source is lower resolution. Defaults to Y.
YNApplicable when filemode is combined. Whether to copy the source video stream into the combined output. Defaults to Y.
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. Defaults to N.
YNOutput directory path relative to the storage root, required. Empty string stores in root. The characters \< \> : " | ? * are not allowed. Defaults to mp4/.
output/hdIDs of transcoding filters to apply, selected from the service's existing filters.
["1","2"]IDs of existing single-mode profiles to include as sub-profiles. Applicable when filemode is combined.
[]Responses
API response status.
Human-readable result or error message.
Transcoding profile identifier used for this job.