YouTube makes a great language-learning tool until you have to choose between understanding the video and reading the language you are trying to learn.

English captions connect speech to spelling, but an unfamiliar phrase can make the whole point disappear. Translated captions keep the story moving, but make it harder to see which spoken words produced that meaning. Switching tracks and replaying the same section gets old quickly.

The MacSide AI snippet in this guide gives you both at once. It redraws YouTube’s selected caption track as a clean lower line and adds a second language above it. Copy the complete code into one MacSide AI HTML memo, register it, and that memo becomes your own dual-subtitle controller.

What dual subtitles look like

YouTube's selected captions are redrawn on the lower line, with Japanese added above. This short demo is muted and loops automatically.

The example keeps English below and adds Japanese above, but you can change the added language, move it directly above the lower caption, or resize both lines while the video plays.

The snippet also cleans up a common caption annoyance. YouTube can split punctuation into the next cue or divide one short thought into several rapid fragments. The code joins nearby fragments and repairs Japanese and English punctuation before drawing them.

It includes:

  • A cleaner rendering of the standard caption selected in YouTube
  • A second language at the top or immediately above the lower caption
  • YouTube automatic translation when a direct target-language track is unavailable
  • Punctuation repair and short-fragment merging for Japanese and English
  • Adjustable text from 16 to 48px
  • Keyboard jumps between subtitle cues and configurable short skips
  • Full-screen support

What you need

1MacSide AI

The Mac app that hosts the memo and browser connection. It requires Apple silicon and macOS 15.2 or later.

2Browser Connector

A Chrome extension that runs code from your MacSide memo on sites you explicitly allow.

3The snippet below

Copy the complete file with one button. You do not need to edit it before registering.

Step 1: install MacSide AI and Browser Connector

Download MacSide AI and open it. Then install MacSide – Browser Connector from the Chrome Web Store.

Open chrome://extensions, select Details for Browser Connector, and turn on Allow User Scripts.

Do not grant YouTube site access yet. Registering the memo first lets Browser Connector discover the script’s youtube.com match pattern and show the correct permission request.

Step 2: paste the code into an HTML memo

Create a memo in MacSide AI. Type /, choose the HTML block, use the Copy code button later in this article, and paste everything into that one block. Keep the HTML, CSS, and JavaScript together.

The block becomes a dark panel titled “YouTube 追加字幕.” It controls the added language, caption position, font size, shortcuts, and skip duration.

Step 3: register the scripts

Click 登録/更新 (Register/update). The first registration displays two confirmation dialogs: one for the caption script and another for the small settings relay. Review and allow both.

Once registration succeeds, Browser Connector knows that this memo needs access to YouTube. Register again after changing the code itself; ordinary setting changes sync live without another registration.

Step 4: allow the script on YouTube

Click the MacSide – Browser Connector icon in Chrome and open Setup. Under per-site permissions, https://www.youtube.com/* now appears as a pending site. Allow the selected site, then reload any YouTube tab that was already open.

The YouTube entry appears only after the previous registration step, so this order matters.

Step 5: turn on YouTube’s standard captions

Play a video and turn on YouTube’s CC button. Open the subtitle menu from the gear icon and select the language you want on the lower line. For English below and Japanese above, select English in YouTube and Japanese as the added language in the MacSide memo.

Keep YouTube’s standard captions enabled. Their caption request supplies the information the snippet needs to load and synchronize the second language. The original caption window is hidden only after the code redraws the lower captions, so you should not see duplicate lines.

A comfortable first setup is:

  • YouTube caption: English
  • Added language: Japanese
  • Added-caption position: Top
  • Font size: 36–40px
  • Keyboard controls: On

Language, position, size, and shortcut settings update live after registration.

Keyboard controls

KeyAction
nReturn to the start of the current cue; repeated presses move to earlier cues
hJump to the next subtitle cue
bSkip backward by your chosen number of seconds
gSkip forward by your chosen number of seconds

The cue-based n shortcut is especially useful because it returns to the beginning of the sentence instead of an arbitrary point in the video.

Copy the complete code

The button below copies the complete memoHTML snippet.

MacSide memoHTMLYouTube Extra Subtitles

Loading code…

Troubleshooting

The memo stays disconnected or unregistered

Make sure MacSide AI is running and Browser Connector is installed. Browser-side scripts automatically stop when MacSide AI quits.

The script does not run on YouTube

After registering the code, open Browser Connector’s Setup page and confirm that https://www.youtube.com/* is allowed under per-site permissions. Reload the YouTube tab afterward.

Only one caption line appears

Confirm that YouTube’s CC button is on. The standard caption request starts the second-language loading process. Toggling CC off and on, then playing the video for a moment, can restart it.

The video has no captions

This code does not transcribe audio or create captions from scratch. If the gear menu has no subtitle option, it cannot add a second line to that video.

Automatic translation is missing or slow

When a direct target-language track is unavailable, the snippet asks YouTube for an automatic translation. Availability and speed vary by video and language. Try switching the added language and switching back, or reload the tab.

Captions drift after moving to another video

YouTube often navigates without a full page reload. The code normally follows those changes, but a reload is the quickest fix if cues drift. If necessary, click Register/update in MacSide again.

A memo that behaves like your own extension

With Browser Connector, the code in a MacSide AI memo becomes the browser feature. You can ask an AI to make the top line yellow, lower its position, or change a shortcut, then register the edited memo again.

The tradeoff is that YouTube can change its interface or caption behavior, so the snippet may occasionally need an update. This is not an official YouTube feature, and MacSide AI is not affiliated with YouTube.

Dual subtitles work best when they remove friction. Listen first, check the English line, and glance at the translation only when the meaning breaks. The two lines are already there, so there is no settings detour between those steps.

Download MacSide AI, paste the snippet, and adjust the caption position and shortcuts until they fit the way you actually watch.