Login

Add auto-generated subtitles

Subtitles play an essential role in making your video content accessible to a broader audience, especially those who may not understand the spoken language or prefer reading along. FastPix makes it easy to add subtitles through its auto-generation feature, allowing you to enhance your videos with minimal effort.


How auto-generated subtitles work

FastPix leverages the OpenAI Whisper model to automatically generate captions for your on-demand media files. This process is designed to be efficient and accurate, converting spoken words into synchronized subtitles.


Key considerations

Audio quality: Auto-generated captions perform best with clear audio. Performance may vary with media that includes excessive non-speech audio, such as music, background noise, or long silences.

Language compatibility: The feature generates subtitles in the same language as the audio. It is not intended for generating translated captions in other languages.

We recommend testing this feature with your typical content to evaluate its effectiveness.


Steps to add auto-generated subtitles

Here’s a step-by-step guide to enable auto-generated subtitles for your FastPix videos:


Step 1: Prepare your video

Ensure clear audio: Remove any unwanted sounds, reduce background noise, and avoid overlapping audio to achieve a cleaner subtitle generation.

Adjust volume levels: Ensure that voices are clear and loud enough for precise transcription.


Step 2: Upload your video to FastPix

FastPix accepts either direct video uploads from your local storage or public URLs from cloud storage services for subtitle generation.


Step 3: Enable auto-generation in request

To activate auto-generated subtitles, you need to include the createSubtitles JSON object in your video settings.

This object consists of three key-value pairs:

  • name: Specify the language of the audio (e.g., "english").

  • metadata: Optionally, you can add a metadata object if you want to tag specific information with the subtitles.

  • languageCode: Enter the language code that corresponds to the spoken language in the video (e.g., en for English).


Example JSON object for enabling subtitles


   { 
     "inputs": [ 
       { 
         "type": "video", 
         "url": "https://static.fastpix.io/sample.mp4", 
         "startTime": 0, 
         "endTime": 60 
       } 
     ], 
     "metadata": { 
       "key1": "value1" 
     }, 
     "subtitles": { 
       "name": "english", 
       "metadata": { 
         "key1": "value1" 
       }, 
       "languageCode": "en" 
     }, 
     "accessPolicy": "public", 
     "maxResolution": "1080p" 
   } 

IMPORTANT
Double check the languageCode to match the spoken language in your video, as the subtitle model will follow this setting for transcription.


Step 4: Process the video

Once uploaded, FastPix will process your video using the Whisper model to automatically generate subtitles. The model transcribes spoken content into text and synchronizes it with the video for optimal viewing.


Supported languages for auto-generated subtitles

FastPix supports the following languages and language codes for auto-generated subtitles in Video on Demand (VOD) content:

LanguageLanguage CodeStatus
EnglishenSupported
SpanishesSupported
ItalianitSupported
PortugueseptSupported
GermandeSupported
FrenchfrSupported

PLEASE NOTE
Subtitles are only available in the same language as the audio input. Additional language support may be added in the future, but currently, each subtitle matches the spoken language directly.


Best practices for accurate subtitles

  • Audio quality: Ensure clear, high-quality audio. Minimize background sounds, echo, and interruptions to get the best results from auto-generation.

  • Consistent speech: Maintain a steady speaking pace and clear pronunciation. Avoid using multiple languages in one segment, as the subtitle feature may not accurately differentiate between them.

  • Language consistency: Keep the entire video in a single language where possible. If there are multiple languages, consider post-editing or manual subtitle creation for multilingual parts.