.fw files.wiki
SRT

SRT Files

SubRip Subtitle

An .SRT file is a plain-text SubRip subtitle file containing numbered captions with start and end timecodes.

SubRip Subtitle

Developer
SubRip / open de facto format
Category
Video
MIME type
application/x-subrip
Format
Text
First released
1999
Open standard
No

Open a .SRT file online

Reading file…

What is a .SRT file?

An.SRT file most often stores SubRip Subtitles content , a de-facto plain-text subtitle format generated through the Windows-based SubRip OCR/ripping software for subtitles and closed captions. Each caption starts in.SRT with an index number followed by start and end timecodes, followed by one or several lines with subtitle text, followed by an empty line serving as the cue separator.The format consists solely of subtitles, having no multimedia data such as video, audio, archive or anything else; thus requiring a separate media file to play the content. Users may find such files while using subtitles on movies downloaded/ripped from elsewhere, while working on libraries in their media server, doing transcriptions and as sidecar subtitles to movie streams. Usually when both Movie.mkv or any other Movie.* file exists, most video players will automatically read Movie.srt file located nearby.

The contents of an ordinary .srt file include easily readable index numbers and easy-to-recongnize times (such as 00:01:23,456 --> 00:01:25,900); other files with the same file extensions lacking easily readable cues are normally misnamed file extensions or incorrect exports. No other popular (non-related to SRT subtitles) contemporary digital file formats exist which commonly have similar file extensions like .srt, and when mentioned in “SRT streaming”, they most likely mean Secure Reliable Transport protocol.

How to open a .SRT file

Open a .SRT file on Windows

  1. 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
  2. 2 Double-click your .SRT file if you have an app for .srt files on your computer. In case it does not open, move on to step three.
  3. 3 Right-click your .SRT file -> select Open with -> Choose another app.
  4. 4 Choose VLC media player in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .srt files" and click OK.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Windows

Open a .SRT file on macOS

  1. 1 In the Finder app, locate your .SRT file.
  2. 2 Just double-click your .SRT file in order to automatically launch the program which is connected with it.
  3. 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select Open With -> VLC media player.
  4. 4 If it isn't in the list, choose Other… and find the application manually.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for macOS

Open a .SRT file on Linux

  1. 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
  2. 2 Double-click the file.
  3. 3 Or choose another program by right-clicking the file -> Open With -> VLC media player.
  4. 4 Install VLC media player (if it is not installed on your computer) from the software centre, repository or Flathub.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Linux

Open a .SRT file on Android

  1. 1 Launch Files or another file management app.
  2. 2 In Downloads, find the .SRT file and open it by tapping.
  3. 3 A list of apps capable of opening the file will be shown. Tap VLC media player and press Always to permanently connect the file type with this app.
  4. 4 No apps able to open this file? Download VLC media player from the Google Play Store.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Android

Open a .SRT file on iPhone / iPad

  1. 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
  2. 2 Tap the .SRT file you want to open.
  3. 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
  4. 4 Touch and hold the file to get the context menu -> choose Share -> select VLC media player from the list of apps.
  5. 5 If there is no such option, download the app first from the App Store and then tap the document again.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for iPhone / iPad

Open a .SRT file online

  1. 1 Move to the online viewer at the top of this page.
  2. 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Online

More details about opening .SRT files

For the windows computer, software applications capable of reading an srt file include vlc, kodi, MPC-HC/mpv and Visual Studio Code. However, note that when the video opens in movies and tv application, put the srt file near your video and find a method which allows viewing an external subtitle; since the built-in app will not allow editing them.

On a MAC system: Software applications capable of using .srt files includes vlc, iina, kodi and the mpv media applications. The two methods, iina and vlc can be used quickly for viewing of the subtitle in video. The plain text within the file can be edited by textedit, Visual Studio Code while Aegisub and Jubler should help to ensure that the syntax is validated. Linux uses VLC, GNOME Subtitles, kodi, mpv, aegisub and jubler.

And subtitle files can be accessed in other text editors such as gedit, kate and visual studio code and the subtitle editor as well. The Android software which works for the android mobile devices include VLC for Android, the Kodi media center and MX Player, and various gallery or video apps. The software that uses .srt subtitle files include YouTube Studio, infuse app, and N-player style media apps and various file-based video players.

As far as renaming files is necessary for a certain player to be enabled to load the SRT file, use Open With or change the file association. Rename the SRT file to match the video filename and move it near your video file to make sure the player finds it. When you need to change cues, use a subtitle editor application instead of a document processing software to change timing syntaxes.

Technical details

A characteristic feature of the SubRip format is the lack of magic bytes, fixed or otherwise, mandatory header, and wrapping containers of any kind. Identification is achieved through detection of cue blocks and lines with timestamps; signatures and/or headers are unknown in use for the formats. Each cue block contains up to four parts: optionally, a numeric sequence number followed by a range denoted using format like this - HH:MM:SS,mmm --> HH:MM:SS,mmm and one or several text lines with subtitles.

Comma standing before millisecond part of the timespan is the usual SubRip format's decimal separator. A number of parsers do accept dot instead, though strict parsers might fail on such lines. Metadata section as well as a version field, compression, or encryption, embedded fonts, or styles are absent per format specification. Spec-controlled layout of a container is unknown as the file contains text on each line without further structure.

Encoding is officially unconstrained in principle; older files can have Windows-1252, ISO-8859-1, Shift_JIS, or some other encoding matching your locale. Newer files normally use UTF-8 encoding which might occasionally have BOM prepended. Line ending can be CRLF, just LF or CR. While parsers written for Windows environment expect CRLF for legacy's sake, many modern parsers accept all three versions. SRT doesn't have officially registered MIME type that would be in widespread use; suggested examples are application/x-subrip, text/x-srt, and just text/plain.

HTML-based inline styles like <i>, <b>, <u>, or <font color="..."> tags in use is somewhat inconsistent - some media players will display it while others won't; even parsers converting the SRT will treat it inconsistently. Different movies have variable lengths but generally they won't go above 150 kilobytes. File will be somewhere between few kbs in size and 150 KB, mostly depending on cue count used.

How to convert .SRT files

Use HTML5 <track> captioning, native browser video play support, and the web publish formats in case you need your .srt file converted to .vtt. This conversion could be done using FFmpeg with following command ffmpeg -i input.srt output.vtt. With FFmpeg you won't have any possibility to introduce cue styling options specific for the file created in the WebVTT format.

When you are looking to achieve greater flexibility, including advanced styling, more exact subtitle positioning, karaoke and other typographical features, go for either .ass or .ssa formats. With FFmpeg your conversion would look like ffmpeg -i input.srt output.ass. Or Aegisub would let opening .srt and save its content to either SSA or ASS container.

If you plan to preserve subtitle file together with the video stream, merge (.mux) them into mkv by running the command ffmpeg -i video.mp4 -i input.srt -c copy output.mkv on your input files. But for MP4 files we need to run ffmpeg -i video.mp4 -i input.srt -c:v copy -c:a copy -c:s mov_text output.mp4, and some line breaks, placements and other styling data may disappear in this process. But for burnt-in subtitle application we use: ffmpeg -i video.mp4 -vf subtitles=input.srt -c:a copy output.mp4 if the targeted media player doesn't accept separate subtitle file. Also, it means encoding of your video. In addition, your .txt transcript could be obtained with Subtitle Edit, though without any timing information. Don't forget about checking synchronization after the conversion, as well as after frame-rate changes or cuts.

Convert toToolCommand / note
WebVTT (.vtt) FFmpeg ffmpeg -i input.srt output.vtt Converts SubRip timing and text to WebVTT for HTML5 video; advanced styling is not present in SRT and cannot be created automatically.
Advanced SubStation Alpha (.ass) FFmpeg ffmpeg -i input.srt output.ass Useful before adding richer styling; original SRT only supplies plain caption text and timing.
MP4 timed text subtitle track (.mp4, mov_text) FFmpeg ffmpeg -i video.mp4 -i input.srt -c:v copy -c:a copy -c:s mov_text output.mp4 Muxes subtitles into MP4 as MPEG-4 Timed Text; not all SRT line breaks, positioning conventions, or formatting tags survive identically.
Matroska with embedded SRT (.mkv) FFmpeg ffmpeg -i video.mp4 -i input.srt -c copy output.mkv Stores the SRT as a soft subtitle stream in MKV without re-encoding video or audio.
Plain transcript (.txt) Subtitle Edit Use File > Export > Plain text or Text only; timecodes and sequence numbers are removed unless explicitly kept.
Burned-in subtitles in video (.mp4) FFmpeg ffmpeg -i video.mp4 -vf subtitles=input.srt -c:a copy output.mp4 Renders subtitles permanently into the video image; requires libass-enabled FFmpeg and the result cannot be turned off.
SubStation Alpha (.ssa) Aegisub Open the SRT and save as SSA/ASS when preparing karaoke, styles, or positioning; visual style must be added manually.

Common problems and fixes

A file not having any subtitles should first be reviewed with consideration of three most common reasons: the .srt file name differs from the movie one, the subtitle file location is incorrect and it should go in a directory along the media file or the subtitle track is available yet needs to be enabled via the player submenu. Subtitles are enabled via player menu in cases of VLC, mpv, IINA, Kodi and MPC-HC.

A Mojibake error such as â, ç, è, � appears due to incorrect decoding of characters. Open the file once again and try using another character encoding - UTF-8.

An “Invalid SRT file”, “Unable to parse subtitle”, as well as other related notifications, usually mean problems with structure. Such errors can happen in case of lack of empty lines between cues, numbers missing from the index of a cue, broken timestamp signifiers which fail to have -->, as well as cues with wrong overlapping or corruption inside.

When saving subtitles in .html, .rtf or MS Word, there should be used a plain text file and it can easily be resaved retaining an original name as an .srt file.

All timing problems are either consistent or growing progressive with time. While constant offsets should easily be shifted using appropriate function, growing shifts mean a difference of FPS or cuts in the movie and need more complex solution based upon changing times.

Players ignore bold/underline/color or italics formatting in SubRip styles due to being informally used, as SubRip doesn’t support any form of rich texts. Very long lines may be cropped out by a television player or hard drive-based player, therefore, one needs splitting them using Subtitle Edit or manually.

FFmpeg may report about fontconfig errors in case there is missing library. Therefore there needs to be used an FFmpeg release with library included along with required fonts installation while SRT itself doesn’t embed such fonts.

Security considerations

The structure of ordinary .srt files does not involve any macros, executable parts, embedded objects, and scripting, hence, poses less risk compared to document or archive formats. The biggest concern relates to the subtitle parsers of video players, which have suffered memory-safe issues related to subtitle processing according to reports of leading companies. In this case, one needs to make sure that their VLC, mpv, MPC-HC, Kodi or other platform media applications are up-to-date. Do not launch unrecognizable subtitle files with outdated software or outdated codec packages downloaded via dubious websites.

As the .srt format consists of plain texts, potentially suspicious subtitle files need to be scanned with Notepad, TextEdit or VS Code for playing. An .srt format file generally has a cue number followed by the timestamp format HH:MM:SS,mmm and caption information. Moreover, subtitles can show phrases, speaker identification, transcription notes, released name of content or comments. A user can face dangerous material with phish or social engineering messages while watching. Before distributing the content, translator's names need to be eliminated.

History and versions

First developed as a Windows program to pull subtitles from DVDs by using optical character recognition technology, SubRip's text-based output then evolved into the SRT format. The format was introduced in 1999, and spread widely in 1999-2000 years due to file transfers using DivX and Xvid, and smallness in size, ability to be edited in Notepad and being independent of video container at all. The fact that, unlike DVD VobSub or Blu-ray PGS, SRT doesn't store any images but rather text means, that it can more easily be translated, searched and corrected.

There is no SRT format official standardization carried out by one of the relevant governing bodies. Moreover, this file format does not use versioning number to ensure compatibility. Compatibility depends on long-time practices of SRT file playback by relevant software player. In 2000s, VLC, MPlayer, directShow filters and hardwre devices for playing of the video started to recognize SRT format as a side-car subtitles file format for personal video collections of users. Web Video services turned to using W3C's standardized WebVTT file type, however, many platforms support SRT subtitles uploads internally converting it.

As the nearest descendant in the world of internet is WebVTT (.vtt), it should have WEBVTT header, cues settings and native browser integration and thus is more preferable than any other file extension when talking about HTML5 video captions. There are also more advanced subtitle file types such as .ass (Advanced SubStation Alpha) or .ssa (SubStation Alpha); both provide more functions than usual file extensions, but they require special processing and are more complicated and not always compatible with hardware devices used to play files. Image formats, including such extensions as VobSub .sub/.idx or BluRay PGS (.sup) allow storing the original look of captions, however, those are images and are not easy to be parsed, because OCR technique is required for that to be done. Some more specific formats like .sbv, .dfxp, .ttml and .sami or .smi are usually provided together with metadata information. Also, some subtitles are stored in movie files like .mkv and .mp4 rather than in separate srt files.

Comments (0)

Replying to

No comments yet. Be the first to share your experience with this file type.