Video Subtitles: Difference between revisions

From KDE Community Wiki
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==HOWTO add Multiple Subtitles to your Videos==
==HOWTO add Multiple Subtitles to your Videos==


This document explains how you can use the power of KDE community's i18n volunteers to translate subtitles or closed captions for your videos.
This document explains how you can use the power of KDE community's i18n volunteers to translate subtitles or closed captions for your videos. This guide is for video creators, i.e., it explains what video creators have to do ''before the translation process starts''. If you are looking for information about KDE's translation process, please see the [[Get_Involved/translation|translation wiki page]].


![](PeerTubeSubtitles.png)
[[File:PeerTubeSubtitles.png|center|alt=A screenshot of a video on PeerTube showing multiple different languages subtitles in a list.]]


With closed captions and translated subtitles, you will make your videos more accessible to more people. The default should be to always include them.
With closed captions and translated subtitles, you will make your videos more accessible to more people. The default should be to always include them.
Line 13: Line 13:
'''Note''' that it is best to start with a base subtitle file in English, as this is the language most translators will be able to translate from. We will assume from now on your original subtitle file is in English.
'''Note''' that it is best to start with a base subtitle file in English, as this is the language most translators will be able to translate from. We will assume from now on your original subtitle file is in English.
* Saving the Kdenlive project will create an SRT file you can then pass on to the translators later.
* Saving the Kdenlive project will create an SRT file you can then pass on to the translators later.
* When rendering, **turn off** the visibility of the subtitles track, otherwise Kdenlive will be hardcode the subtitles into your video and make subtitles in other languages, superimposed during playback, difficult to read.
* When rendering, '''turn off''' the visibility of the subtitles track, otherwise Kdenlive will be hardcode the subtitles into your video and make subtitles in other languages, superimposed during playback, difficult to read.


![](KdenliveSubs.png)
[[File:KdenliveSubs.png|center|alt=A screenshot of Kdenlive showing the subtitle track.]]


===Checking your Subtitles===
===Checking your Subtitles===
Line 21: Line 21:
* It is a good idea to revise your subtitles in [https://subtitlecomposer.kde.org/ Subtitle Composer], as it offers a very intuitive and easy-to-use interface that will help you do that.
* It is a good idea to revise your subtitles in [https://subtitlecomposer.kde.org/ Subtitle Composer], as it offers a very intuitive and easy-to-use interface that will help you do that.


![](SubtitleComposer.png)
[[File:SubtitleComposer.png|frame|center|alt=A screenshot of Subtitle Composer, a useful app for editing subtitles]]


* When you are done, save your subtitles. We recommend you use the same name as the video file it will be used for, but with the *.srt* extension. For example, if your video file is called ''gcompris_tutorial_04.mp4'', make your subtitle file ''gcompris_tutorial_04.srt''.
* When you are done, save your subtitles. We recommend you use the same name as the video file it will be used for, but with the ''.srt'' extension. For example, if your video file is called ''gcompris_tutorial_04.mp4'', make your subtitle file ''gcompris_tutorial_04.srt''.
* Although underscores (_) are fine, make sure your subtitle filename does not contains spaces, dashes (-), commas, colons,  or other characters that could make the scripts choke.
* Although underscores (_) are fine, make sure your subtitle filename does not contain spaces, dashes (-), commas, colons,  or other characters that could make the scripts choke.


===Uploading===
===Uploading===


* Make sure you have already uploaded your video to PeerTube and YouTube and you have the links to both.
* Make sure you have already uploaded your video to PeerTube and YouTube and you have the links to both.
* Upload your SRT file to the correct project folder at https://invent.kde.org/websites/video-subtitles. If you are starting a new project for a new channel, create a new folder, but first '''read ''How to create a new project directory'' carefully''' below.
* Upload your '''original''' SRT file to the correct project folder at https://invent.kde.org/websites/video-subtitles. If you are starting a new project for a new channel, create a new folder, but first '''read [[#How_to_create_a_new_project_directory|''How to create a new project directory'']] carefully''' below.
* For each new SRT file, you will have to create a JSON file. This file will have the same name as the SRT file, but with the *.json* extension. Hence, the JSON file for ''gcompris_tutorial_04.srt'' will be ''gcompris_tutorial_04.json''.
'''Important Note''': If you have translated the original SRT file, '''do not directly upload the translation to the Git repository'''. Only upload the original. The correct workflow for '''translated SRT files'''  is to send them to the maintainer of the language so they can update the corresponding .PO files.
* For each new SRT file, you will have to create a JSON file. This file will have the same name as the SRT file, but with the ''.json'' extension. Hence, the JSON file for ''gcompris_tutorial_04.srt'' will be ''gcompris_tutorial_04.json''.
* The JSON file will contain the unique identifier for the video on PeerTube and YouTube. You can find the identifier in the videos' URLs.
* The JSON file will contain the unique identifier for the video on PeerTube and YouTube. You can find the identifier in the videos' URLs.


Line 42: Line 43:
   }
   }


* You will also need to modify the license file *dep5* which you will find in the https://invent.kde.org/websites/video-subtitles/-/tree/master/.reuse folder and add the following for your new video:
* You will also need to modify the license file ''dep5'' which you will find in the https://invent.kde.org/websites/video-subtitles/-/tree/master/.reuse folder and add the following for your new video:




Line 53: Line 54:
# The last line is for the name of the author/copyright holder (you?) and their email.
# The last line is for the name of the author/copyright holder (you?) and their email.


'''Check out the [example](#example) below to see how all this would work in real life.'''
'''Check out the [[#Example|example]] below to see how all this would work in real life.'''


=== How to create a new project directory ===
=== How to create a new project directory ===
Line 61: Line 62:
** You can organise your videos uploaded to your account into ''channels''. Each channel can have distinctive look and has its own address. The KDE Community channel contains four channels, ''KDE'', ''Akademy'', ''LabPlot'' and ''GCompris''. For example, [https://tube.kockatoo.org/c/gcompris/videos this is the location for the GCompris channel].
** You can organise your videos uploaded to your account into ''channels''. Each channel can have distinctive look and has its own address. The KDE Community channel contains four channels, ''KDE'', ''Akademy'', ''LabPlot'' and ''GCompris''. For example, [https://tube.kockatoo.org/c/gcompris/videos this is the location for the GCompris channel].
** ''PlayLists'' further allow you to categorise your videos or add videos from other accounts, but you can ignore them for the purpose of subtitling.
** ''PlayLists'' further allow you to categorise your videos or add videos from other accounts, but you can ignore them for the purpose of subtitling.
* At the moment of writing, the subtitle project has two project directories, [https://invent.kde.org/websites/video-subtitles/-/tree/master/kde ''kde''], and [https://invent.kde.org/websites/video-subtitles/-/tree/master/gcompris ''gcompris'']. The names correspond to the *channels* (NOT accounts or a playlists) the video will be uploaded to.
* At the moment of writing, the subtitle project has two project directories, [https://invent.kde.org/websites/video-subtitles/-/tree/master/kde ''kde''], and [https://invent.kde.org/websites/video-subtitles/-/tree/master/gcompris ''gcompris'']. The names correspond to the ''channels'' (NOT accounts or a playlists) the video will be uploaded to.
* If you need to create a directory for your own project, make sure you name the directory exactly the same as the ''channel'' the videos will live in.
* If you need to create a directory for your own project, make sure you name the directory exactly the same as the ''channel'' the videos will live in.


Line 70: Line 71:
During the video-editing process, Jane writes and checks her subtitles and saves them in ''kinder: getting-started.srt''.
During the video-editing process, Jane writes and checks her subtitles and saves them in ''kinder: getting-started.srt''.


As she has read this document carefully, she changes all the problematic characters in the name of her file  to underscores. The final name of her subtitle file ends up being ''kinder_getting_started.srt''.
As she has read this document carefully, she changes all the problematic characters in the name of her file  to underscores. The final name of her subtitle file ends up being ''kinder_getting_started.srt''. Jane also speaks Spanish and she translates creates a second file of Spanish subtitles she names ''kinder_getting_started-es.srt''


With the help of the Promo team, she uploads her video to a new channel, ''kinder'', on [https://tube.kockatoo.org/a/kde_community/video-channels KDE's PeerTube account]. Once the video is uploaded, Jane makes a note of the link to the video: ''https://tube.kockatoo.org/w/sje7HHe3734ytfdedweuhr73''.
With the help of the Promo team, she uploads her video to a new channel, ''kinder'', on [https://tube.kockatoo.org/a/kde_community/video-channels KDE's PeerTube account]. Once the video is uploaded, Jane makes a note of the link to the video: ''https://tube.kockatoo.org/w/sje7HHe3734ytfdedweuhr73''.
Line 76: Line 77:
Again assisted by the Promo team, she puts the video on [https://www.youtube.com/channel/UCF3I1gf7GcbmAb0mR6vxkZQ YouTube], and again grabs the link from there: ''https://www.youtube.com/watch?v=Heury437SIJ237hdeu''.
Again assisted by the Promo team, she puts the video on [https://www.youtube.com/channel/UCF3I1gf7GcbmAb0mR6vxkZQ YouTube], and again grabs the link from there: ''https://www.youtube.com/watch?v=Heury437SIJ237hdeu''.


Jane creates a JSON file called ''kinder_getting_started.json''. She opens it in [her favorite text editor](https://kate-editor.org/) and adds the following content:
Jane creates a JSON file called ''kinder_getting_started.json''. She opens it in [https://kate-editor.org/ her favorite text editor] and adds the following content:


   {
   {
Line 87: Line 88:
Jane then visits https://invent.kde.org/websites/video-subtitles/-/tree/master. As this is a new project, she creates a new directory called ''kinder'' there.
Jane then visits https://invent.kde.org/websites/video-subtitles/-/tree/master. As this is a new project, she creates a new directory called ''kinder'' there.


She enters the ''kinder'' directory she just created and uploads the ''kinder_getting_started.srt'' and ''kinder_getting_started.json'' files she created earlier.
She enters the ''kinder'' directory she just created, and uploads the ''kinder_getting_started.srt'' and ''kinder_getting_started.json'' files she created earlier.
 
'''Note''' that she 'does not' upload her Spanish translation (''kinder_getting_started-es.srt'') to the new ''kinder'' directory.


Jane then moves back up to the main directory and visits the [https://invent.kde.org/websites/video-subtitles/-/tree/master/.reuse ''.reuse/''] folder.
Jane then moves back up to the main directory and visits the [https://invent.kde.org/websites/video-subtitles/-/tree/master/.reuse ''.reuse/''] folder.
Line 99: Line 102:




and closes and commits the changes
and closes and commits the changes.
 
She asks on the [mailto:[email protected] translators' mailing list] who the person in charge of Spanish translations is and sends the Spanish translation she made (''kinder_getting_started-es.srt'') to them.


Jane is more or less finished, but there is one final thing to do: She opens her email client and [mailto:[email protected] sends a thank you note to the incredible translators] expressing her heartfelt appreciation for their work.
Jane is more or less finished, but there is one final thing to do: She opens her email client and [mailto:[email protected] sends a thank you note to the incredible translators] expressing her heartfelt appreciation for their work.


The translators will pick up Jane's subtitle file and start creating versions in their own languages which will gradually be added to her videos online over the next days.
The translators will pick up Jane's subtitle file and start creating versions in their own languages which will gradually be added to her videos online over the next days.
== See also ==
[[Promo|KDE's Promo Team]]
[[Get_Involved/translation|Translation at KDE]]
== External links ==
[https://kdenlive.org Kdenlive]
[https://subtitlecomposer.kde.org/ Subtitle Composer]
[https://tube.kockatoo.org/ Kockatoo Tube (KDE's PeerTube instance)]

Latest revision as of 16:17, 11 November 2023

HOWTO add Multiple Subtitles to your Videos

This document explains how you can use the power of KDE community's i18n volunteers to translate subtitles or closed captions for your videos. This guide is for video creators, i.e., it explains what video creators have to do before the translation process starts. If you are looking for information about KDE's translation process, please see the translation wiki page.

A screenshot of a video on PeerTube showing multiple different languages subtitles in a list.

With closed captions and translated subtitles, you will make your videos more accessible to more people. The default should be to always include them.

Creating your Subtitles

  • You can create a subtitles file in Kdenlive, either by using the different voice recognition plugins Kdenlive supports, or be pasting and copying from your script.

Note that it is best to start with a base subtitle file in English, as this is the language most translators will be able to translate from. We will assume from now on your original subtitle file is in English.

  • Saving the Kdenlive project will create an SRT file you can then pass on to the translators later.
  • When rendering, turn off the visibility of the subtitles track, otherwise Kdenlive will be hardcode the subtitles into your video and make subtitles in other languages, superimposed during playback, difficult to read.
A screenshot of Kdenlive showing the subtitle track.

Checking your Subtitles

  • It is a good idea to revise your subtitles in Subtitle Composer, as it offers a very intuitive and easy-to-use interface that will help you do that.
A screenshot of Subtitle Composer, a useful app for editing subtitles
  • When you are done, save your subtitles. We recommend you use the same name as the video file it will be used for, but with the .srt extension. For example, if your video file is called gcompris_tutorial_04.mp4, make your subtitle file gcompris_tutorial_04.srt.
  • Although underscores (_) are fine, make sure your subtitle filename does not contain spaces, dashes (-), commas, colons, or other characters that could make the scripts choke.

Uploading

Important Note: If you have translated the original SRT file, do not directly upload the translation to the Git repository. Only upload the original. The correct workflow for translated SRT files is to send them to the maintainer of the language so they can update the corresponding .PO files.

  • For each new SRT file, you will have to create a JSON file. This file will have the same name as the SRT file, but with the .json extension. Hence, the JSON file for gcompris_tutorial_04.srt will be gcompris_tutorial_04.json.
  • The JSON file will contain the unique identifier for the video on PeerTube and YouTube. You can find the identifier in the videos' URLs.

For example, for a video hosted at https://tube.kockatoo.org/w/symxHCzUj9TA7LZoZagD9c on PeerTube, the identifier is symxHCzUj9TA7LZoZagD9c. For the same video on YouTube located at https://www.youtube.com/watch?v=W2iyYU1ZeKI, the identifier is W2iyYU1ZeKI.

Add these lines to gcompris_tutorial_04.json:

  {
      "pt_id": "symxHCzUj9TA7LZoZagD9c",
      "yt_id": "W2iyYU1ZeKI"
  }


  Files: gcompris/compris_tutorial_04.srt gcompris/compris_tutorial_04.json
  License: CC-BY-SA-4.0
  Copyright: 2024 John Doe <[email protected]>
  1. The first line indicates the two files you just uploaded/created.
  2. The second line indicates the license for the subtitles -- check the LICENSE folder to see what is available.
  3. The last line is for the name of the author/copyright holder (you?) and their email.

Check out the example below to see how all this would work in real life.

How to create a new project directory

  • PeerTube distinguishes between accounts, channels and playlists:
    • An account is what allows you access your PeerTube instance and upload, edit or remove videos, start live stream sessions, etc. This is KDE's account on the PeerTube network.
    • You can organise your videos uploaded to your account into channels. Each channel can have distinctive look and has its own address. The KDE Community channel contains four channels, KDE, Akademy, LabPlot and GCompris. For example, this is the location for the GCompris channel.
    • PlayLists further allow you to categorise your videos or add videos from other accounts, but you can ignore them for the purpose of subtitling.
  • At the moment of writing, the subtitle project has two project directories, kde, and gcompris. The names correspond to the channels (NOT accounts or a playlists) the video will be uploaded to.
  • If you need to create a directory for your own project, make sure you name the directory exactly the same as the channel the videos will live in.

Example

Jane Bloggs has created a starter video tutorial for her Kinder project, a KDE mobile app that helps parents arrange play-dates for their young children.

During the video-editing process, Jane writes and checks her subtitles and saves them in kinder: getting-started.srt.

As she has read this document carefully, she changes all the problematic characters in the name of her file to underscores. The final name of her subtitle file ends up being kinder_getting_started.srt. Jane also speaks Spanish and she translates creates a second file of Spanish subtitles she names kinder_getting_started-es.srt

With the help of the Promo team, she uploads her video to a new channel, kinder, on KDE's PeerTube account. Once the video is uploaded, Jane makes a note of the link to the video: https://tube.kockatoo.org/w/sje7HHe3734ytfdedweuhr73.

Again assisted by the Promo team, she puts the video on YouTube, and again grabs the link from there: https://www.youtube.com/watch?v=Heury437SIJ237hdeu.

Jane creates a JSON file called kinder_getting_started.json. She opens it in her favorite text editor and adds the following content:

  {
      "pt_id": "sje7HHe3734ytfdedweuhr73",
      "yt_id": "Heury437SIJ237hdeu"
  }

She closes and saves the file.

Jane then visits https://invent.kde.org/websites/video-subtitles/-/tree/master. As this is a new project, she creates a new directory called kinder there.

She enters the kinder directory she just created, and uploads the kinder_getting_started.srt and kinder_getting_started.json files she created earlier.

Note that she 'does not' upload her Spanish translation (kinder_getting_started-es.srt) to the new kinder directory.

Jane then moves back up to the main directory and visits the .reuse/ folder.

She locates and opens the dep5 file and adds the following lines at the end of the file:

  # Kinder files
  Files: kinder/kinder_getting_started.srt kinder/kinder_getting_started.json
  License: CC-BY-SA-4.0
  Copyright: 2024 Jane Blogss <[email protected]>


and closes and commits the changes.

She asks on the translators' mailing list who the person in charge of Spanish translations is and sends the Spanish translation she made (kinder_getting_started-es.srt) to them.

Jane is more or less finished, but there is one final thing to do: She opens her email client and sends a thank you note to the incredible translators expressing her heartfelt appreciation for their work.

The translators will pick up Jane's subtitle file and start creating versions in their own languages which will gradually be added to her videos online over the next days.

See also

KDE's Promo Team

Translation at KDE

External links

Kdenlive

Subtitle Composer

Kockatoo Tube (KDE's PeerTube instance)