← Back to blog

How to add Sinhala captions to a video without broken letters

Sinhala captions fail in three separate places: hearing the words, timing them, and drawing the letters. Here is how to get each one right, with or without our app.

To add Sinhala captions properly, you need three things: an accurate Sinhala transcript, word timing taken from the corrected text, and a renderer that shapes Sinhala letters with a text-shaping engine such as HarfBuzz. If your letters look scattered or your words drift away from the voice, one of those three is failing. Each needs its own fix.

Why Sinhala letters break

Sinhala is not drawn one character at a time in the order it is typed. Some vowel signs are stored after a consonant but appear before it, as in කෙ. Some letters join into a single form, such as ශ්‍ර, which is stored as four separate characters: two consonants, a vowel-removing sign and an invisible joiner.

A program that paints characters in stored order puts the signs in the wrong place and shows the joined letters as pieces. Text then looks almost right to someone who cannot read it and plainly wrong to someone who can. A shaping engine fixes this by working out which glyphs to draw and where. You also need a font that actually contains Sinhala, such as Noto Sans Sinhala, because a font without it leaves you with empty boxes.

Why the words and timing go wrong

General speech models are trained mostly on languages with far more data. In our tests, Whisper picked up just 72 words of a 121-second Sinhala episode. On a 141-second episode, its largest model got 157 of 249 words and smeared the timing of the final stretch of speech across the rest of the audio. No amount of styling rescues captions like that.

So we separate the job. A recogniser that handles Sinhala better, Gemini in our case, produces a first draft of the words. You correct the draft. Only then does forced alignment match the corrected text against the audio. Forced alignment is an easier task than recognition, because the model already knows what was said and only has to find when. It also means the timing belongs to your approved words and not to a machine's guess.

Method 1: Caption Master in Vidlyn

Caption Master is the part of Vidlyn built for videos you already have.

  1. Open Vidlyn and choose Caption a video I already have, then choose Sinhala.
  2. Vidlyn listens to the audio and gives you the text.
  3. Correct spelling, names and wording. Nothing has been timed yet, so changes cost nothing.
  4. Vidlyn aligns your corrected text to the audio, so each caption lands on the word being spoken.
  5. The captions are burned in with shaped letters. The audio is copied across untouched, and .srt and .ass files are saved beside the video.

It can also translate Sinhala captions into English while keeping their timing, which helps if you want an English subtitle track. You need a Windows PC and a free Gemini key, and the first run downloads a speech model of about 3 GB and a Sinhala model of about 1.2 GB. There is a free 7-day trial.

Vidlyn's review screen for a Sinhala video, showing Sinhala narration text beside the footage for that shot
A Sinhala video in Vidlyn's review step, with the narration text beside the clip chosen for it.

Method 2: Burn them in yourself with FFmpeg

If you already have a correct Sinhala .srt file, FFmpeg can burn it in for free. Its subtitle filter uses libass, which shapes complex scripts when it is built with HarfBuzz, as standard builds generally are. Put NotoSansSinhala-Bold.ttf in a folder called fonts next to your video, save the subtitle file as UTF-8, and run:

ffmpeg -i input.mp4 -vf "subtitles=captions.srt:fontsdir=fonts:force_style='FontName=Noto Sans Sinhala,Bold=1,FontSize=22,Outline=2,Alignment=2,MarginV=60'" -c:a copy output.mp4

We tested this exact command with Sinhala text before publishing it. The catch is that you still have to produce the transcript and timing yourself, which is the hardest part. MarginV sets how far the captions sit above the bottom edge, so raise it for Shorts and Reels to clear the on-screen buttons.

Method 3: An online subtitle tool

VEED, HappyScribe, Fliki and others list Sinhala on their websites, and they suit a one-off job with no install. We have not run a side-by-side test of their accuracy, so try a short clip of your own before paying. Check the result for joined letters such as ශ්‍ර and ක්‍ය, and listen for where the timing starts to drift, which is usually late in the video.

Burned-in captions or a subtitle file?

A subtitle file uploaded to YouTube lets viewers switch captions on and off. Burned-in captions are part of the picture and can't be switched off, but they look the same everywhere, and they are the usual style for Shorts and Reels. For a Short, burn them in. For a long-form video, a subtitle file alone is often enough if you do not want text covering the footage.

A quick check before you publish