Creating an SRT file on Ubuntu is a straightforward process that allows you to add subtitles to your videos. SRT file creation on Ubuntu involves using text editors or specialized software to generate and format subtitle files in the SRT format. This guide will walk you through how to create an SRT file on Ubuntu, including tips for using SRT file editors on Ubuntu and ensuring your subtitles are properly formatted.
Table of Content
Understanding SRT Format
SRT i.e. Subtitle, has a plain text file that includes a specific structure:
- The text of the subtitles is in sequence.
- The start and end timecodes are in " hh: mm: ss" format.
- SRT files don't contain video or audio.
Creating an SRT file
There are many ways to create a SRT file on Ubuntu. Like using a text editor, subtitle editing software, command line tools, python script, etc. But in this article, we're going to see how to create a ' srt ' file using command line tools or terminal edit with gedit, Nano, and Vim.
Creating an SRT file using Gedit
Gedit is a text editor designed for the GNU Network Object Model Environment (GNOME) desktop environment. For creating an SRT file using gedit, Follow the steps provided below.
- Open Gedit
- Open the terminal (" Ctrl + Alt + T ")
- Type ' gedit ' and press ' Enter ' to open the Gedit text editor on your PC.
- Enter Subtitle Blocks
- Initiate the creation of the subtitles in Gedit by following the SRT format.
- And remember to separate each block with a blank line.
- Save the SRT File
- Click on ' File ' and select ' Save As '.
- Enter a filename that you want to give with a .srt extension (e.g., subtitles.srt).
- Choose the location and click Save.
Creating an SRT File Using Terminal Editors
Terminal editor, also known as the console text editor, is a type of text editor that operates within a command-line interface (CLI). These editors are used for managing and editing files on systems. Terminal editors are widely used for tasks like editing configuration files, writing scripts, or even programming, and many more.
- Using Nano
- Open the terminal.
- Type ' nano subtitles.srt '.
- Enter your subtitle in the SRT format.
- Save the file with ' Ctrl + O ', then ' Enter ', and exit with ' Ctrl + X '.
- Using Vim
- Open the terminal.
- Type ' vim subtitles.srt '.
- To begin typing your subtitles, press 'I' to enter insert mode.
- Press ' Esc ', then type ' :wq ' to save and exit.
Verifying Your SRT File
To make sure that our SRT file is properly formatted, the User can use subtitle editors like ' Aegisub ' or check it by loading it into a media player like VLC, Windows media played, Itones, etc.

Conclusion
By following the steps to create an SRT file on Ubuntu, you can effectively add and manage subtitles for your video projects. Utilizing the right tools and understanding SRT file format ensures that your subtitles are accurate and well-timed. Whether you're using a text editor or a dedicated SRT file editor on Ubuntu, this process will help you enhance your video content with clear and accessible subtitles.