It would be very neat if the (video:…)
-KirbyTag added support for subtitles in VTT format.
Suggestion:(video filename.mp4 subtitles: true)
searches for a filename.mp4.vtt file in the same directory and adds it to the video tag. Additionally, it shold also search for
^filename\.[A-z]{5}\.vtt
(filename dot five letter language code dot vtt) to find filename.de-DE.vtt
, filename.en-UK.vtt
, filename.en-US
, etc. and add all of them too.
I assume we’d then add a <track>
tag for each inside the <video>
tag. https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Audio_and_video_delivery/Adding_captions_and_subtitles_to_HTML5_video#html_markup https://www.w3schools.com/tags/tag_track.asp
What srclang
do we use if the filename is just filename.mp4.vtt
? And any idea how to infer the label? Or just omit it?
My best guess would be that a filename.mp4.vtt
should be considered a closed captions track in the site’s language, not a mere subtitle track.
Closed Captions usually describe what is happening in the audio-track beyond merely transcribing the dialog. They are for people who cannot hear and replace the subtitles, which are for people who do not speak the language but can hear.
An accurate label would be “Closed Captions” and the srclang
should be the same as the site’s.
A potential improvement of my original suggestion would be to scan for subtitles and closed captions and define a naming scheme.
Suggestion
^filename\.s\.[A-z]{5}\.vtt
= translated subtitles^filename.cc\.[A-z]{5}\.vtt
= translated closed captions^filename\.[A-z]{5}\.vtt
= closed captions in site’s languageThe accurate label for the subtitle files would be “Subtitles (American English)”, or “Untertitel (Deutsch)”. The accurate label for closed captions should be “Closed Captions American English” or “Untertitel für Hörgeschädigte”. Translating these correctly will require some native speakers.