@ravenclaw, @berni, @stanglow, @nwgat, @jonray, @sauron, @qdsov,
I have modified my WebVfx framework to enable subtitles (in Subrip .srt file format) to be hardcoded onto videos using the Overlay HTML feature (see: WebVfx HTML Overlay Filters Update - Slideshows, Exploding Text). This is version 1.5 of the framework.
I tried several ways of reading an .srt file in javascript, but although some of them worked in the browser, none of them worked in Shotcut itself. So the contents of the .srt file have to be copied into a <pre></pre> tag in the HTML itself. See below and the example on the website: http://www.elusien.co.uk/shotcut/.
If you apply the subtitle to a video and then edit that video (e.g. by deleting a clip) then of course the subtitle cues will no longer match up to the speech on the video. You will either have to recreate the .srt file anew, or use a Subrip editor to edit the cues (see the documentation on my website). Another possibility would be to create a video with just the subtitles on it, then use this as a second track in Shotcut and whenever you cut the main track you would do an identical cut to the subtitle track.
You can use CSS to position and style the subtitle in whatever way you want. The example on the website shows two copies of the subtitles, the one at the top of the screen in white on a semitransparent dark background, while the one at the bottom of the screen is in white with a dark outline on a totally transparent background.
The basic HTML to create the example is:
<body data-control='40:30'>
The subtitles appear at the top (#srt1) of the screen and also at the bottom (#srt2).
<div id='st1' class='webvfx' data-subtitles='subtitles'></div>
<div id='st2' class='webvfx' data-subtitles='subtitles'></div>
<pre id='subtitles'>
1
00:00:04,000 --> 00:00:15,400
This is the 1st subtitle 04sec to 15.4sec
Mary had a little lamb,
its <i>fleece</i> was white as snow
and everywhere that Mary went
that <b>lamb</b> was sure to go!
2
00:00:16,600 --> 00:00:25,800
This is the 2nd subtitle 16.6sec to 25.8sec
3
00:00:20,600 --> 00:00:23,800
This is the 3rd subtitle 20.6sec to 23.8sec
4
00:00:24,600 --> 00:00:30,800
This is the 4th subtitle 24.6sec to 30.8sec
</pre>
</body>
Have a play with the source code on the website (including the CSS) and let me know what you think.