Encoding FiltersCreate Encoding Filter

Create Encoding Filter

Create a new file transcoding filter.

curl -X POST "https://api.5centscdn.com/v2/transcoding/filters/new" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "name": "flutter",
  "filter": "overlay",
  "args[overlay][url]": "https://cdn.example.com/logo.png",
  "args[overlay][scale]": "10",
  "args[overlay][position]": "top_right",
  "args[drawtext][text]": "© 2024 My Brand",
  "args[drawtext][fontsize]": 24,
  "args[drawtext][fontcolor]": "#FFFFFF",
  "args[drawtext][position]": "top_left",
  "_METHOD": "PUT"
}'
{
  "result": "success",
  "message": "Transcoding Settings, New Filter Created",
  "filterid": 429
}
POST
/transcoding/filters/new
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Required

Filter name.

filterstring
Required

Filter category. overlay = apply image/logo watermark. drawtext = render text overlay on video.

Options: overlay, drawtext
args[overlay][url]string

Public HTTP/HTTPS URL of the watermark image. PNG recommended for transparency. Required when filter=overlay.

args[overlay][scale]string

Watermark image size as a percentage of the output video frame width. Required when filter=overlay.

args[overlay][position]string

Position of the watermark on the video frame. Required when filter=overlay.

Options: top_left, top_right, bottom_left, bottom_right, center
args[drawtext][text]string

Text string to render as overlay on video. Required when filter=drawtext.

args[drawtext][fontsize]integer

Font size of text overlay in pixels. Required when filter=drawtext.

args[drawtext][fontcolor]string

Color of text overlay. Accepts CSS hex (#RRGGBB) or FFmpeg named colors (white, black, etc.). Required when filter=drawtext.

args[drawtext][position]string

Position of the text overlay on the video frame. Required when filter=drawtext.

Options: top_left, top_right, bottom_left, bottom_right, center
_METHODstring
Required

To cast request method POST to PUT.

Options: PUT
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Body

application/json
namestring
Required

Filter name.

Example:
flutter
filterstring
Required

Filter category. overlay = apply image/logo watermark. drawtext = render text overlay on video.

Allowed values:overlaydrawtext
args[overlay][url]string

Public HTTP/HTTPS URL of the watermark image. PNG recommended for transparency. Required when filter=overlay.

Example:
https://cdn.example.com/logo.png
args[overlay][scale]string

Watermark image size as a percentage of the output video frame width. Required when filter=overlay.

Example:
10
args[overlay][position]string

Position of the watermark on the video frame. Required when filter=overlay.

Allowed values:top_lefttop_rightbottom_leftbottom_rightcenter
args[drawtext][text]string

Text string to render as overlay on video. Required when filter=drawtext.

Example:
© 2024 My Brand
args[drawtext][fontsize]integer

Font size of text overlay in pixels. Required when filter=drawtext.

Example:
24
args[drawtext][fontcolor]string

Color of text overlay. Accepts CSS hex (#RRGGBB) or FFmpeg named colors (white, black, etc.). Required when filter=drawtext.

Example:
#FFFFFF
args[drawtext][position]string

Position of the text overlay on the video frame. Required when filter=drawtext.

Allowed values:top_lefttop_rightbottom_leftbottom_rightcenter
_METHODstring
Required

To cast request method POST to PUT.

Allowed values:PUT

Responses

resultstring

API response status.

messagestring

Human-readable result or error message.

filteridinteger

Unique identifier of the newly created filter.