homeaboutvideotry it nowpricingdocs
Guide

Add captions and subtitles to a video

Upload a caption file per language and the player shows a captions menu, with your choice of default.

What a caption file looks like

Captions are a text file with timings. The usual format is WebVTT, which any subtitle tool can export. It starts with WEBVTT and lists each caption with a start and end time.

launch.vtt
WEBVTT

00:00:01.000 --> 00:00:03.500
Welcome to the launch.

00:00:04.000 --> 00:00:07.000
Today we are shipping three things.

Fileboy does not write captions for you. You supply the file, from your own transcript or a captioning tool, and Fileboy stores it with the video and hands it to the player.

Upload a caption file

Each video can have one caption file per language. You choose the language string, such as English, and it is what the player shows in its menu. Use the same string every time you add that language to a video.

id = fileboy.upload_video_transcript(video.id, "./clips/launch.vtt", language: "English")
text = fileboy.fetch_video_transcript(video.id, id)

Uploading needs a video of your own. The shared demo key cannot upload video or captions. Create a free app and upload a video from its dashboard first.

How the player uses them

When a video has captions, the player shows a captions menu automatically and remembers each viewer's choice. To switch a language on by default, set default-caption to its language string. It has to match what you uploaded exactly, so English and en are different. Set it to off to keep captions off until the viewer turns them on, and add no-caption-control to hide the menu.

<fileboy-player video-id="YOUR_VIDEO_ID" default-caption="English"></fileboy-player>

The iframe embed uses the same player, so captions you upload show up there too.

Read a caption file back

A video's data lists its transcripts with their ids and languages. Fetch the text of one by id.

# the transcripts array lists each id and language
curl https://api.fileboy.io/videos/YOUR_VIDEO_ID/data

# the caption text itself
curl https://api.fileboy.io/videos/YOUR_VIDEO_ID/transcripts/YOUR_TRANSCRIPT_ID

Where this stops

Captions are files you provide. There is no automatic speech recognition, no translation and no caption editor. If you need those, generate the caption files elsewhere and upload them, or look at a platform built around video such as Mux.

Checked against the current libraries in November 2026. Found something that no longer works? Tell us.

Go deeper

Still choosing a tool?

Fileboy is small on purpose. This comparison says where it fits and where another option is the better call.

Fileboy vs Mux · All comparisons

Try it

The free plan needs no card and includes 1,000 files, so you can run every example above.

More guides: How to add image upload to a React app · Resize images on the fly with a URL · Stream video with HLS without running ffmpeg · Embed a video on any website · All guides

Add Fileboy to your next project

We built Fileboy to stop rebuilding file handling for every app. Create an app, paste your key and upload a file. The free plan needs no card.