Skip to content
streamneo.
Streaming Settings13 min read

How to Add Hindi Subtitles to a Continuous FFmpeg YouTube Stream

Add visible Hindi subtitles to an FFmpeg YouTube stream, with Devanagari font, shaping, timing and caption-track guidance.

sn.
StreamNeoPublished 4 October 2026
Worth sharing?

If Hindi text should remain visible to everyone, burn a timed Hindi subtitle file into the video with FFmpeg before sending the output to YouTube. This makes the Devanagari words part of the picture, so viewers do not need to enable anything.

If viewers must be able to turn captions on or off, use YouTube's separate live-caption delivery route instead. A burned-in overlay is not a selectable YouTube caption track, and a changing SRT file is not established by the official documentation as an automatic caption input for a running broadcast.

Choose between visible subtitles and selectable captions

The first decision is what you mean by subtitles. These two approaches may contain the same Hindi words, but they are delivered and rendered in different places.

Requirement FFmpeg burned-in subtitles YouTube live caption delivery
What viewers see Hindi text is permanently drawn into each video frame A caption track is delivered separately from, or through a supported caption path for, the video
Viewer control The text cannot be hidden independently of the picture Viewers can use the available caption controls and track behaviour
Main responsibility FFmpeg, libass, text shaping, fonts and subtitle timing The encoder or supported caption software sending data to YouTube
Devanagari check Inspect the actual rendered video for joined glyphs and marks Verify that the chosen caption source and delivery route preserve the Hindi text
Best fit Devotional lyrics, translated labels, fixed announcements and prerecorded programmes Speech captions or accessibility captions that viewers should be able to toggle

For a devotional loop, for example, a burned-in line such as “श्री राम जय राम” will appear in the output even when a viewer has disabled captions. It will also be visible in recordings and clips because it is part of the image. The trade-off is that it cannot be translated, resized or hidden as a separate caption track.

YouTube's live caption requirements describe captions that can be embedded in the video or sent through supported software using HTTP POSTs. The same documentation discusses embedded EIA 608/CEA 708 settings and says YouTube supports one caption track. That is a different workflow from asking FFmpeg to paint Hindi letters over the frames.

If your aim is simply to keep Hindi words on screen, continue with the FFmpeg method below. If your aim is selectable live captions, stop before building a subtitle overlay and follow the current YouTube-supported delivery requirements instead. Do not assume that an ordinary SRT file used by the video filter will become that track.

Prepare a timed Devanagari subtitle file

A subtitle filter needs both the words and the times at which they should appear. Prepare the file before starting the continuous stream, rather than correcting text after the encoder is already running.

For a simple workflow, use a subtitle format supported by the FFmpeg subtitles filter, such as SRT. A minimal entry looks like this:

1
00:00:04,000 --> 00:00:08,500
श्री राम जय राम

2
00:00:08,500 --> 00:00:13,000
भक्ति संगीत में आपका स्वागत है

Save the file with the intended Hindi characters intact. Check it in a text editor that can display Devanagari, and make sure the file is not replaced by question marks or empty boxes when reopened. The subtitle file and the video must also describe the same starting point. If the video begins with a long intro, the first subtitle time must account for that intro rather than being timed from the point at which you happened to create the file.

Use one short idea per subtitle event. Long Hindi lines can become difficult to read over a small phone screen, particularly when the video already contains a logo or a lower-third. Split a sentence at a natural pause instead of cutting in the middle of a phrase. Keep the placement and line breaks consistent across the programme unless the content requires otherwise.

For a regional-language programme, this is similar to preparing the episode order before building a continuous broadcast. The guide to streaming regional-language podcast episodes on YouTube 24/7 in India covers the broader content-planning problem; here, the important extra item is the subtitle timeline for every piece of video that will pass through the filter.

ASS is useful when you need more deliberate styling, positioning or line control. It lets you keep subtitle events and their presentation in one file, but it does not remove the need for a Devanagari-capable font or a shaping-capable rendering path. Choose SRT when straightforward timing is enough, and ASS when you have tested the style on the actual output size.

Do not treat subtitle timing as a transcription task only. Read the Hindi text aloud against the video, check names and matras, and look for words that are technically correct but visually difficult to distinguish. For a loop, review the point where the file returns to the beginning. The first subtitle should not remain on screen because the next cycle starts before the previous event has ended.

Check your FFmpeg build and shaping support

The subtitles and ass filters do not exist in every FFmpeg build. They depend on how that build was compiled, so a command copied from another machine may fail even when the syntax is correct.

Start by checking the available filters:

ffmpeg -filters

Look for the subtitle-related filters, then inspect their options:

ffmpeg -h filter=subtitles
ffmpeg -h filter=ass

The FFmpeg filters documentation describes both filters, their font-directory option and their shaping options. It also identifies the complex shaping engine as required for correct rendering of complex scripts such as Devanagari, and explains that this requires libass to be built with HarfBuzz.

That dependency chain matters. FFmpeg may accept a subtitle command while the resulting Hindi text still looks wrong if the build lacks the required libass or HarfBuzz support. A missing filter can produce an immediate error; incomplete shaping support can be harder to notice because the stream may continue with incorrectly joined letters or misplaced vowel marks.

Do not infer support from the fact that FFmpeg can encode H.264 or send an RTMP stream. Video encoding and subtitle rendering are separate capabilities. Check the exact FFmpeg executable that will run the overnight job, not just the copy installed on your desktop. A cloud machine, container or hosting environment may have a different build from the one used during preparation.

If you are setting up a loop with FFmpeg for the first time, the guide to setting up FFmpeg with a YouTube stream key for a video loop in India is useful for the surrounding encoder workflow. It does not replace the subtitle checks here: a working stream destination says nothing about Devanagari shaping or font coverage.

If the required filters or shaping support are absent, use a build that provides them or choose a different rendering route. Do not silently proceed with a fallback that turns every Hindi character into a square. Keep a record of the executable version and build features used for the test, so the same setup can be reproduced after a restart.

Configure a Devanagari font and the subtitle filter

Shaping and glyph coverage solve different problems. HarfBuzz-enabled shaping helps arrange the characters correctly, while the selected font must actually contain the Devanagari glyphs used by your file. A font can be present but still lack a particular character, punctuation mark or numeral style.

Install or make available a font with the required Devanagari coverage on the machine that will render the stream. Then check that the runtime can find it through the system font configuration. If it cannot, use the font-directory option documented for the subtitle filter and point it at a directory containing the font files.

A basic SRT filter pattern is:

-vf "subtitles=hindi.srt"

For an ASS file, the corresponding pattern is:

-vf "ass=hindi.ass"

When a separate font directory is needed, use the option shown by the installed build's filter help and the official filter reference. The precise quoting can matter when a path contains spaces, and shell quoting differs between Linux, Windows and other environments. Test the command in the same shell and under the same account that will run the continuous process.

Do not add a font merely because its name is familiar. Render a sample containing the exact Hindi letters, conjuncts, punctuation and numerals used by your channel. Look for joined consonants, vowel marks attached to the correct base, and characters that have fallen back to a different-looking font. If a single line mixes Hindi and Latin text, check both scripts together.

For ASS subtitles, examine the style definition as well as the filter command. A small font size, excessive outline or a bottom margin designed for a different aspect ratio can make otherwise correct text unreadable. Keep the subtitle area clear of the channel watermark and any important on-screen information.

You can think of the filter as part of the video pipeline: it reads the timed text, asks the available text renderer to shape it, finds the font, and draws the result into the outgoing frames. If any part of that chain is missing, YouTube will receive the frames it is given. YouTube cannot reconstruct a selectable Hindi caption track from those pixels.

Apply the overlay before the YouTube output

The subtitle filter must be applied to the video before the encoded output is sent to YouTube. A typical continuous setup has an input, a video filter, video and audio encoding, and an output destination. The exact command depends on whether the source is a file, playlist or another stream, so treat the following as filter examples rather than a complete broadcast command.

ffmpeg -i input.mp4 -vf "subtitles=hindi.srt" -c:v libx264 -c:a aac output.mp4

For an ASS file:

ffmpeg -i input.mp4 -vf "ass=hindi.ass" -c:v libx264 -c:a aac output.mp4

These examples create an encoded file and demonstrate where the filter sits. They do not create a continuous YouTube broadcast, and they do not add a selectable caption track. For a real stream, apply the same video-filter idea in the command that reads your looping or continuous input and sends the encoded output to your own YouTube destination.

FFmpeg's general documentation covers its role in reading inputs, filtering media and writing outputs. Keep the subtitle file available for the entire process. If the process starts in a different working directory after a reboot, a relative path such as hindi.srt may no longer point to the intended file.

A subtitle file that changes on disk while FFmpeg is running should not be assumed to update the overlay. The reviewed official material does not establish a reliable hot-reload method for an SRT file being consumed by a running subtitle filter. If the text must change during a live programme, plan a supported workflow for generating and delivering captions, or restart the rendering process at a controlled boundary after testing the effect on the broadcast.

For a prerecorded loop, a safer arrangement is to finish the subtitle file first and render a complete test output before committing it to the overnight channel. You can also keep the original video and subtitle file as separate assets, which makes corrections easier than editing text that has already been permanently painted into a final file.

Test timing, glyphs and output quality

Do not test only the first few seconds. Choose samples that include the start of a subtitle, a line change, a Hindi conjunct, a punctuation mark, a mixed Hindi and English line, and the transition back to the beginning of the loop.

Watch the filtered output rather than the source preview. The source may display Hindi correctly in your editor while the FFmpeg process uses a different font path or a different build. Open the output on the device types your viewers commonly use, including a phone if your channel serves mobile viewers in India.

Check these points:

  • Are the letters joined naturally, with vowel marks attached to the intended characters?
  • Does every subtitle appear and disappear at the intended video time?
  • Is the line high enough to avoid being covered by YouTube controls or existing graphics?
  • Does the text remain readable against bright, detailed or moving backgrounds?
  • Are the first and last subtitle events correct when the video loops?
  • Does the audio remain aligned after the filter and encode step?

A visible Hindi overlay can also affect the overall video bitrate because the text creates sharp edges and changes from frame to frame. The effect depends on the source and encoder settings, so observe the actual output rather than relying on a generic target. The guide to choosing a YouTube live bitrate for 1080p 60fps can help with the wider encoding decision, but it cannot tell you whether your font is shaped correctly.

Use YouTube's preview before starting the public broadcast. The YouTube encoder guide recommends testing the encoder setup and checking the preview, while YouTube's encoder-settings guidance covers stream health and media settings. Confirm the Hindi text in that preview, not just in a local player.

Send the stream and verify the live result

Create or open the live event in YouTube Live Control Room, then use the stream URL and stream key belonging to that event in your encoder configuration. Do not copy a key from an example or place your own key in a public command, screenshot or shared script.

Start with an unlisted or otherwise controlled test when that suits your channel workflow. Wait for the Live Control Room preview to show the filtered picture, then inspect the text at several points. If the preview is already wrong, starting the public event will not correct the font or timing.

Once the stream is running, compare three views when possible: the local output from FFmpeg, the Live Control Room preview and the viewer-facing YouTube page. A subtitle can look correct locally but be affected by an output-size change, a failed filter process or a different playback path. YouTube's stream-health indicators can also reveal delivery problems that are unrelated to Hindi rendering.

If the Hindi text disappears, first determine whether the video filter stopped, the source changed, or only the YouTube connection failed. Check the FFmpeg log for filter, input and output errors. If the process itself has crashed, an automatic restart may restore the broadcast, but it will not fix a missing font or an invalid subtitle file. The article on automatically restarting OBS after a 24/7 YouTube music stream crashes explains the broader restart concern; apply the same discipline of checking the cause rather than treating every interruption as a connection issue.

For a cloud-run channel, this is where removing the need to keep your own computer awake can help. StreamNeo turns an uploaded video into a YouTube-only 24/7 stream after you provide the file and your YouTube stream key, so the specific burden it removes is leaving a local machine running all night; it does not turn burned-in text into selectable captions, and you should still verify the rendered Hindi output before relying on it.

Keep the subtitle source, font choice, FFmpeg build details and test output together. If you later replace the video, change its resolution or move the process to another machine, repeat the glyph and timing checks. A stream that survived one night is not evidence that a new font path or subtitle file will behave the same way.

Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.

FAQ

Will burned-in Hindi subtitles appear as YouTube captions?

No. Burned-in subtitles are pixels in the video frames, so they are always visible and are not selectable or switchable as a YouTube caption track. Use a YouTube-supported live-caption delivery method when viewers need caption controls.

Why do my Hindi letters look disconnected or show boxes?

The FFmpeg build may lack the required subtitle components, the shaping path may not provide HarfBuzz-enabled libass, or the selected font may not contain the needed Devanagari glyphs. Check the exact build, inspect the filter help, provide a suitable font directory and test the real output with representative Hindi text.

Can I edit the SRT file while the stream is running?

Do not assume that saving a new SRT file will update a subtitle filter that is already running. The reviewed documentation does not establish that behaviour as a reliable live-caption workflow; prepare the timed file first, or use a separately tested caption-delivery method for changing live text.

Do I need ASS instead of SRT?

No. SRT is suitable when you need timed text with straightforward presentation, while ASS is useful when you need explicit styling and positioning. Neither format removes the need to verify Devanagari shaping, font coverage, timing and the distinction between a burned-in overlay and a selectable YouTube caption track.

YOU’VE REACHED THE END

Keep the ideas coming.

More guides, useful tools and a little help for your next broadcast.

Back to the journal ↗
YOUR NEXT READ

A little more to explore.

More Streaming Settings guides ↗ · All topics ↗