Subtitles
Outcome: subtitles appear with your film — because VLC found the file by itself, or because you brought it — and when they run early or late, you know the one knob that moves them.
The file beside the film
The commonest subtitle in the world is
a separate little text file sitting in
the same folder as the video, named
almost the same. The lab's fixture is
one: parade.srt, three numbered
entries of start time, end time and
text, in the SubRip (.srt) format
nearly everything understands:
1
00:00:01,000 --> 00:00:04,000
The parade begins. This is a fixture subtitle.
VLC looks for that file by itself. The
lab's verbose log, playing the video
with no subtitle instruction at all
(transcript t08):
main input debug: looking for a subtitle file in .../media/
main input debug: autodetected subtitle: .../media/parade.srt with priority 4
subtitle demux debug: detected SubRIP format
subtitle demux debug: loading all subtitles...
Autodetected, in the lab's words as
in yours: same folder, same name,
different suffix, and the film arrives
with its subtitles on. A name with a
language tucked in — parade.en.srt —
is found the same way and labels the
track with its language, which is how
a folder grows one film with subtitles
in several tongues and the Subtitle
menu lists each.
Bringing your own
When the subtitle lives elsewhere —
downloaded, renamed, in another folder —
point at it. On the command line, the
option the help calls "Use subtitle
file" (transcript t09):
cvlc --sub-file=parade.srt parade.mp4
The lab ran exactly this; the log's
first subtitle line becomes forced
subtitle: .../parade.srt, and the same
detection follows (t08). In the
window it is Subtitle → Add Subtitle
File, during playback — the track joins
the Subtitle menu from that moment, and
Subtitle → Sub Track chooses among all
the tracks the film and its files
offer, including Disable.
Subtitles can also live inside the file: MKV and MP4 containers commonly carry subtitle streams next to the video and audio, where the demuxer of chapter 2 finds them as a third kind of stream. There is nothing to load; they are simply on the Sub Track menu — which is also how you discover a film you thought had no subtitles has four.
When they run early or late
Subtitles made against a different cut
of a film drift: every line four
seconds early, say, from a missing
studio logo. The fix is a shift, not an
edit: Subtitle delay, --sub-delay
in the help (in tenths of a second —
--sub-delay=40 moves subtitles 4
seconds later), and in the window the
g and h keys nudge the delay down
and up while you watch, with Track
Synchronisation under Tools for a
measured correction. A drift that
grows over the film is a different
disease — the subtitle was timed for a
different frame rate — and is cured by
a correctly matched subtitle file, not
by any constant shift.
The traps
Three, all documented behaviour:
- Encoding. An
.srtis plain text in some encoding, and nothing in the file says which. VLC assumes UTF-8 and falls back by locale; accented letters turning into pairs of wrong characters means the file is in a legacy Windows encoding. Preferences → Input/Codecs → Subtitle encoding names the assumption; choosing the right one (often Windows-1252 for older Western European files) renders the accents again. - Two files, one name. Put two subtitle files with near-identical names beside a film and the autodetect takes the one with the higher priority — the log line above literally scores it — which may not be the one you meant. The Sub Track menu lists what was loaded.
- Downloading from inside VLC. The window offers subtitle downloads (View → VLSub is the well-known add-on route) — which means showing a third-party service what you are watching. That is the metadata question of chapter 1 again, in another doorway; the lab downloaded nothing, and this guide's subtitles are its own fixture, written by hand.