Movie subtitles (*.SRT)
|Audacity does not yet directly support movie subtitle files (*.srt). This page explains the use case for *.srt support in Audacity and offers a tool to convert an .srt file to and from a .txt file which can display the subtitles as Audacity labels.
- 1 Use Case
- 2 Label2Srt: Label to SubRip / subtitles (.srt) converter
- 3 Spreadsheet tool to convert between .srt and .txt
You can already use Audacity's labels feature to read or write subtitles (such as translations, transcriptions or comments) for a movie audio track. Use the current Audacity and add the optional FFmpeg library to your computer. This will allow you to import the audio from a video file such as AVI or MPEG, or from a VOB file from an unencrypted DVD. Then convert your .srt file to .txt using the converter below and choose to import the .txt file.
You can also use movie subtitles in Audacity to record your own dubbing of the subtitles and then mix your voice into the movie audio track.
Unfortunately the layout of timings and text in .srt subtitle files is slightly different to that used in the .txt files for Audacity labels. It would be easier if you could directly import and export .srt files instead of having to convert them to .txt to import them into Audacity, then convert them back to .srt for use in a video player. Other features suggested in Proposal Transcription Editor would also improve the experience of working with subtitles in Audacity, such as:
- A movie window synchronised with the audio track
- A way of nudging labels along with a shortcut in order to position them accurately
- Text-to-Speech (TTS) support in Audacity would allow a synthesized voice to read or record the subtitles automatically.
Label2Srt: Label to SubRip / subtitles (.srt) converter
I have created a small Java application to convert label files into SubRip (.srt) files. This is similar to my application "Label2Cue" released about 6 years ago.
SRT files are subtitle files that can be read by many video players (including Youtube)
Step 1: Create the label files in Audacity
In order to do the conversion, first create labels in your audio file in Audacity one of two ways:
- (Method 1) Drop a label at specific location with CTRL-B and stretch it to create a "time span" for the subtitle. Name the label if you wish. This is the preferred method.
- (Method 2) Drop a label at with CTRL+B. Drop a second label at another position. Name the labels if you wish. Label2Srt treats the first label as the start of the subtitle and the second label as the end of the subtitle. Repeat as many times as you want.
Label2Srt deals with both cases. In Method 2, a time span is created in the SRT from Label 1 to Label 2, then from Label 2 to Label 3, then from Label 3 to Label 4, and so on.
Step 2: Export the labels
In Audacity, selectand name your exported label file. It will be saved as a plain text document that represents the label positions in seconds (and optionally, the label titles).
Step 3: Execute the Label2Srt program
In both operating systems (Windows and Linux) you can simply double click on the jar file.
In Windows, you might also try right clicking on the file and selecting "Open With -> Java(TM) Platform SE Binary".
java -jar Label2Srt.jar
via the Windows / Linux command line.
Step 4: Use the Label2Srt program
Select the label text file with "Select" button which opens a file browser. Then, press "Convert". The new SRT file is saved to the same directory as the label file.
Contact with Bug Reports
andrew1stein - AT - gmail - DOT - com
Spreadsheet tool to convert between .srt and .txt
>> Download: Audacity Labels (TXT) Subtitles (SRT, SBV) Convertor.xls (88.5 kB); Forum location: Spoken movie subtitles?
Supported formats: Audacity Labels (TXT), Movie SubRip Subtitles (SRT), YouTube Captions (SBV)
It is an .xls (Microsoft Excel) file with a single sheet and two macros. To open it you have to install a spreadsheet application such as Microsoft Excel or OpenOffice.org.
Opening the Convertor
After opening the .xls file you may have to give authorisation for the macros to run. To do this you can just enable macros at the security prompt (menu bar or popup window) or better could be to mark the signed publisher (mederi) as a trusted source. Marking as "trusted" will remove any further prompts when you re-open the file. You can also either reduce the default security level for all documents (not recommended) in the spreadsheet tool's options, or add the location (folder) you are opening the file from in a list of trusted locations.
Converting Subtitles.srt to Labels.txt and vice versa
Follow the simple instructions in the file. There is an example of .srt format subtitles in the first column on the left.
To convert the movie subtitle file (*.srt) content to Audacity label file (*.txt) format:
- Press the SRT to TXT >> button - the converted content will appear in the three columns on the right
- CTRL + C to copy
- Open a text editor that supports Unicode or UTF-8 like Notepad++
- CTRL + V to paste the content in
- Save the file in UTF-8 or Unicode encoding with .txt extension.
Converting from .txt to .srt after exporting the labels.txt file from Audacity is similar:
- Open labels.txt in the text editor
- CTRL + A followed by CTRL + C
- Open the .xls file
- Click in column G of row 4 and CTRL + V to paste into the three columns on the right
- Press TXT to << SRT to place the result in the single column on the left
- Now you can copy this content, paste it into your text editor and save it with .srt extension (ANSI encoding should be fine).