Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How To add Subtitle caption in video without changing its extension to .vtt

Avatar

Level 1

I want to add multiple Subtitles captions for different languages in a video in AEM without changing its extension to .vtt

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

AEM doesn't provide direct video editing capabilities. To add multiple subtitle captions for different languages to a video without changing its extension to .vtt (WebVTT format), you would typically need to edit the video and subtitles separately and then host them within AEM. You could try something like this:

  1. Video Editing:

    • Create or obtain the subtitle captions in the desired languages. These should be separate subtitle files in .srt or .sub format (common subtitle formats).
  2. Subtitle File Conversion (if necessary):

    • If your subtitles are not already in .vtt format, you may need to convert them. You can use online subtitle converters or subtitle editing software to do this.
  3. Host the Video and Subtitles:

    • Upload the edited video file and the subtitle files to your AEM instance. You can do this through AEM's asset management features.
  4. Embed Subtitles in Web Pages:

    • Create a web page or component in AEM where you want to display the video with subtitles.
    • Use HTML5 video tags to embed the video on the web page. You can add the track element for each subtitle file within the <video> tag.
    • <video controls> <source src="/path/to/your/video.mp4" type="video/mp4"> <track src="/path/to/subtitle-en.vtt" kind="subtitles" srclang="en" label="English"> <track src="/path/to/subtitle-es.vtt" kind="subtitles" srclang="es" label="Spanish"> <!-- Add more tracks for other languages as needed --> </video>
  5. Styling and Customization:

    • You can use CSS to style the appearance of the video player and subtitles to match your website's design

 

Hope this helps



Esteban Bustamante

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

AEM doesn't provide direct video editing capabilities. To add multiple subtitle captions for different languages to a video without changing its extension to .vtt (WebVTT format), you would typically need to edit the video and subtitles separately and then host them within AEM. You could try something like this:

  1. Video Editing:

    • Create or obtain the subtitle captions in the desired languages. These should be separate subtitle files in .srt or .sub format (common subtitle formats).
  2. Subtitle File Conversion (if necessary):

    • If your subtitles are not already in .vtt format, you may need to convert them. You can use online subtitle converters or subtitle editing software to do this.
  3. Host the Video and Subtitles:

    • Upload the edited video file and the subtitle files to your AEM instance. You can do this through AEM's asset management features.
  4. Embed Subtitles in Web Pages:

    • Create a web page or component in AEM where you want to display the video with subtitles.
    • Use HTML5 video tags to embed the video on the web page. You can add the track element for each subtitle file within the <video> tag.
    • <video controls> <source src="/path/to/your/video.mp4" type="video/mp4"> <track src="/path/to/subtitle-en.vtt" kind="subtitles" srclang="en" label="English"> <track src="/path/to/subtitle-es.vtt" kind="subtitles" srclang="es" label="Spanish"> <!-- Add more tracks for other languages as needed --> </video>
  5. Styling and Customization:

    • You can use CSS to style the appearance of the video player and subtitles to match your website's design

 

Hope this helps



Esteban Bustamante