Transcoding Configurations
Fastevo MP2 allows you to configure various transcoding settings for your media protection project. These settings determine which video quality levels are enabled during transcoding, as well as other related options like storing original copies and image processing. This page describes how to retrieve and update these settings using the Fastevo MP2 API.
All transcoding configuration endpoints require authorization via the project API key. Ensure that the API key is sent as a Bearer token in the Authorization
header.
Transcoding Configuration Fields
The transcoding configuration consists of the following fields:
-
Quality Settings:
For each supported quality level, you can enable or disable transcoding. The supported qualities are:"240p"
"360p"
"480p"
"720p"
"1080p"
For each quality, the configuration is an object with the following property:
isEnabled
(boolean): Indicates if transcoding for that quality is enabled.
Important: When updating transcoding qualities, you must provide configuration for all supported qualities. Sending only part of the quality fields will result in a 400 error.
-
isStoringOriginalCopiesEnabled:
A boolean value that indicates whether the system should keep the original media copies after transcoding.- Default value: Depends on the initial project configuration.
-
isImageProcessingEnabled:
A boolean flag to enable or disable image processing.
Note: Only users with the admin role are allowed to update this setting.
Additionally, when updating quality settings, at least one quality must remain enabled; otherwise the API will reject the configuration with an error.
Retrieving Transcoding Configurations
Endpoint
GET https://api.fastevo.com/api/v1/projects/mediaProtection/configurations/transcoding
Description
Retrieve the current transcoding settings for your project. The returned object will include each of the quality settings as well as flags for storing original copies and image processing.
Example Request
GET https://api.fastevo.com/api/v1/projects/mediaProtection/configurations/transcoding
Authorization: Bearer <your_project_api_key>
Example Response
{
"240p": { "isEnabled": true },
"360p": { "isEnabled": true },
"480p": { "isEnabled": true },
"720p": { "isEnabled": true },
"1080p": { "isEnabled": true },
"isStoringOriginalCopiesEnabled": false,
"isImageProcessingEnabled": false
}
If the request is made without valid authorization, the API will return a 401 Unauthorized error.
Updating Transcoding Configurations
Endpoint
PATCH https://api.fastevo.com/api/v1/projects/mediaProtection/configurations/transcoding
Description
Update the transcoding settings for your project. This endpoint supports modifying the following fields:
isStoringOriginalCopiesEnabled
: Enable or disable storing original copies.isImageProcessingEnabled
: Enable or disable image processing (admin only).- Quality configurations for all supported resolutions (
"240p"
,"360p"
,"480p"
,"720p"
,"1080p"
): Each quality must be provided, as partial updates of quality settings are not allowed.
If a patch request includes quality settings, the payload must include all supported qualities. Additionally, at least one quality must be enabled; otherwise, the endpoint will reject the request with a 400 error.
Example Request
PATCH https://api.fastevo.com/api/v1/projects/mediaProtection/configurations/transcoding
Authorization: Bearer <your_project_api_key>
{
"isStoringOriginalCopiesEnabled": true,
"240p": { "isEnabled": false },
"360p": { "isEnabled": true },
"480p": { "isEnabled": false },
"720p": { "isEnabled": true },
"1080p": { "isEnabled": true }
}
Expected Behavior
-
Authorization Required:
The request must include a valid API key. If omitted, the endpoint returns a 401 error. -
Admin Restriction for Image Processing:
Regular users are not allowed to update theisImageProcessingEnabled
field. Attempting to change this value without admin privileges will result in an error. -
Quality Settings Check:
If the request does not include all of the quality settings, or if all quality fields are disabled, the server will respond with a 400 error and an error message indicating the issue.
Example Error Response for Incomplete Qualities
{
"error": "Incomplete transcoding qualities. Please provide all of: 240p, 360p, 480p, 720p, 1080p"
}
Only users with administrative privileges may update the image processing setting. Also, avoid sending partial quality configurations as these will result in an error.
Behind the Scenes
The API internally calls the media protection service functions to update the settings:
setIsStoringOriginalCopiesEnabledForProject(projectId, isEnabled)
setImageProcessingEnabledForProject(projectId, isEnabled)
setTranscodingQualitiesForProject(projectId, qualitiesConfig)
Each service function performs additional validation and updates the transcoding configuration on the corresponding project extension.