Subtitle Management in Fastevo Media Protection Platform (MP2)

Fastevo Media Protection Platform (MP2) supports the management of subtitles, enhancing both video and audio content. This guide will walk you through the process of uploading, listing, and deleting subtitle files. Please note that subtitles must be in VTT format and the upload process is multipart.

ℹ️

Subtitles are enabled for both video and audio content, providing a versatile and inclusive media experience.

Uploading Subtitles

To upload subtitles, you must send a multipart/form-data request with the subtitle file. Ensure the file is in VTT format.

Endpoint

POST https://api.fastevo.net/v1/projects/mediaProtection/contents/{contentId}/subtitles/{languageTag}

Request

  • contentId: The ID of the media content to which you want to add subtitles.
  • languageTag: A BCP 47 language tag. For more details on language tags, see RFC 5646 (opens in a new tab).

Example Request

curl -X POST https://api.fastevo.net/v1/projects/mediaProtection/contents/{contentId}/subtitles/{languageTag} \
  -H "Authorization: Bearer {projectApiKey}" \
  -H "Content-Type: multipart/form-data" \
  -F "file=@path_to_subtitle_file.vtt"
⚠️

Ensure the subtitle file is in VTT format and properly encoded in UTF-8. Note that this endpoint requires multipart/form-data instead of the usual application/json.

Language Tag Examples

  • en-US: English as used in the United States
  • fr-CA: French as used in Canada
  • es-419: Spanish as used in Latin America and the Caribbean
  • zh-Hant-HK: Traditional Chinese as used in Hong Kong SAR

Listing Subtitles

To list all subtitles associated with a specific media content, use the following endpoint.

Endpoint

GET https://api.fastevo.net/v1/projects/mediaProtection/contents/{contentId}/subtitles

Example Request

List all subtitles for a specific content by making a GET request to the endpoint.

Response

The response will include an array of language tags representing the available subtitles.

{
  "languageTags": ["en-US", "fr-CA", "es-419"]
}

Deleting Subtitles

You can delete specific subtitles by specifying the language tag.

Endpoint

DELETE https://api.fastevo.net/v1/projects/mediaProtection/contents/{contentId}/subtitles/{languageTag}

Example Request

Delete a specific subtitle by making a DELETE request to the endpoint.

ℹ️

After deleting subtitles, if your content delivery strategy involves caching, ensure to wait for cache propagation or invalidate the cache as needed.