For plugin support join our Discord and post in #plugins
BUY NOW on
Epic Games Marketplace
Subtitles File Reader adds engine support for professional subtitle and captioning file formats. This plugin lets you read .vtt or .srt files and use timestamped captions in your UMG widgets or VR Views. The plugin comes with a simple-to-use object that provides time scrolling functionality with a simple BP exposed event containing the subtitles for the current time. Useful for video players, cinematic sequences, narrative events and virtual production.
Note: This plugin is not compatible with the in-built Subtitles and Dialogue system (see our Subtitles UMG plugin for that use case) but can be used concurrently. The Subtitle File Reader does not broadcast to the in-built Subtitles system.
Supported file formats: SRT, VTT (no metadata tag support)
To play the sample maps enable Show Plugin Content and Show Engine Content in the Content Browser and navigate to SubtitlesFileReaderContent/Maps.
Subtitle files used in the Sample maps Subtitles-File-Reader-sample-subtitles-v1.0 (as included in Content/Subtitles).
You can play subtitles in Editor Mode which can be useful for Virtual Production work (e.g. scrubbing. The Utility widget WUT_EditorSubtitlesExample will add the example subtitles widget when ticking Display Subtitles in viewport, you can change the class to use any UMG widget.
1) Open the desired Sequence in the Sequencer panel (e.g. SubtitlesFileReader Content > Maps > SQ_SubFileRead)
1) Run the provided editor utility WUT_Editor Subtitles Example in SubtitlesFileReader Content > UI - right click and choose Run Editor Utility Widget
2) Click "Load" button to load subtitles into widget
3) Toggle "Display Subtitles in active viewport" to show subtitles in viewport
4) Check "Link to Sequencer" to receive timings from active Sequence.
5) "Sequencer Frame Rate" must match your sequence FPS as well or timing will be out of sync.
The Editor Utility Widget panel must be open for this feature to work. Keep open on separate display if needing subtitles on fullscreen display.
Only the active viewport will display subtitles in Editor mode.
AddOverlayWidgetToViewport and RemoveOverlayWidgetFromViewport BP functions (Subtitles Editor Lib) will add or remove a widget from the currently selected viewport.
Using the "subtitles-file-reader-vo_master.vtt" setup a test project using your own Blueprint.
Create a new Blueprint Actor called BP_SubtitleActor and open it. So you can choose your subtitle data file outside of the Blueprint, create a new variable of type string called SubtitlePath. Make it public inside our new BP_SubtitleActor. Then drag this actor into the scene. Now you can add "subtitles-file-reader-vo_master.vtt" to the Subtitle Path in the Actor.
Now call the Initialize Subtitles function from BeginPlay. We need to pass our GameInstance into this via the GetGameInstance function alongside the SubtitlePath variable you just created which is passed through our Find File Path function to make sure we find the exact VTT we're targeting.
Lastly create a branch to make sure that we've successfully loaded the Subtitles. Then we can add the Subtitle Widget that Initialize Subtitles created to the Viewport. This will allow us to see our Subtitles in the project. Then you can add a Play Audio 2D function that will play the supplied audio asset subtitles-file-reader-vo_master.
BUG Engine will crash if SRT file contains any entries that are missing the subtitle text. This will be fixed in next release but the workaround is to remove any empty subtitle entries.
BUG SRT files containing only one line are ignored
Copy the subtitles files into a Content/Subtitles folder in your project. This step is also necessary to package the sample content levels included in the plugin..
The plugin will not be included when packaging a Blueprint-only project. Add a new (dummy) C++ class to your project to get around this.
Under Project Settings/Packaging, click the drop down arrow for Advanced Settings, add the folder path you created for placing the subtitles in the content folder to 'Additional Non-Asset Directories To Copy'.
For example, if you copy the .vtt files to Content/Subtitles, then the path to add will be Subtitles. You do not need the 'Content' in front of it.