Video Subtitles
Add WebVTT subtitle tracks to pinned videos, skin video elements, video hotspots, and video panoramas, with automatic file discovery and full translation support.
Pano2VR can attach a subtitle track to every video in your project:
pinned videos, video elements in the
skin,
video hotspots,
and
video panoramas.
Subtitles use the web-native WebVTT format in
the output; on the input side, both VTT (.vtt) and SubRip (.srt)
files are accepted. SRT files are converted to WebVTT automatically during
output.
Subtitle modes
Each video’s properties offer a Subtitles setting with three modes:
None – No subtitle track. This is the default for newly added videos, and it’s also what projects and skins created before Pano2VR 8.1 use, so existing tours don’t change behavior.
Automatic – Pano2VR looks for subtitle files next to the video file, based
on the video’s file name. For a video named tour.mp4:
| File | Used as |
|---|---|
tour.vtt |
Subtitle track |
tour.srt |
Subtitle track (if no tour.vtt exists) |
tour_de.vtt/.srt |
German translation of the subtitle track |
tour_fr.vtt/.srt |
French translation of the subtitle track |
A translated file is only picked up when its language code matches one of the
project’s translation languages; anything else is
ignored with a warning at export. When both .vtt and .srt exist, .vtt
wins. The properties panel shows which files were detected.
File – Choose a specific .vtt or .srt file yourself.
Presentation
Pinned videos and skin video elements can show subtitles in two ways (Show As):
Native captions – The browser renders the cues directly on the video, including its own styling and cue positioning. For skin video elements with controls enabled, viewers also get the browser’s built-in captions menu. This is the default for skin video elements.
Skin text element – The track stays hidden and Pano2VR writes the text of the currently active cue into a skin text variable (set its name in Text Variable, or click the button next to the field to pick one of the text variables in your skins). Add a text element to your skin that displays the variable and you have full control over the subtitle’s font, position, and styling. Cue markup is stripped to safe plain text; line breaks are preserved. This is the default for pinned videos.
Video hotspots (a point hotspot with a Video File source) always show their subtitles as native captions. Their video plays in the skin’s video element, so the project’s web output needs a skin with a video hotspot template.
Video panoramas always use the skin text element presentation: the panorama video is drawn by WebGL, where the browser cannot paint native captions. The same applies to pinned videos while the viewer is in VR. For video panoramas, set the text variable and the kind in the Input Video properties.
Kind lets you mark the track as Subtitles (translation of the dialogue) or Captions (includes descriptions of non-speech audio, for viewers who cannot hear the audio).
Translations
Subtitle files take part in the project’s translation system. When the tour’s language changes, only the subtitle track is swapped, and the video keeps playing without interruption.
There are two ways to provide translated subtitles:
- Sibling files (Automatic mode): place
tour_de.srt,tour_fr.srt, … next to the video, as shown above. - Translation files: the subtitle file appears as an entry in the project’s translation template, so a translated file can be assigned per language like any other media file. An entry in the translation file takes precedence over a sibling file for that language.
Playing subtitles from a web server
If you reference an externally hosted subtitle file by URL, the server must
deliver it as text/vtt and allow cross-origin requests (CORS). Only WebVTT
works for external files, because browsers do not play SRT tracks.
.vtt files with the correct MIME type.For skin and API developers
The player keeps the active cue text available beyond the text variable:
player.getSubtitleText(id)returns the currently shown text for a media element.player.setSubtitlePresentation(id, "off" | "native" | "skin")switches the presentation at runtime.- The
subtitlechangedevent fires with{ id, text, language }whenever the active cue text changes, andsubtitleerrorfires with{ id, url }when a track fails to load.
Limitations
- YouTube and Vimeo videos play in their own embedded players; use their caption systems instead.
- Subtitles are not visible in the Skin Editor’s live preview. Use the regular output preview to check them.