Copy Text from a YouTube Video on Mac
By Eduard Bruch, developer of Optic · Updated
There are two kinds of text in a YouTube video: what people say, and what the video shows. For spoken words, use YouTube's own transcript; for a command, link or slide shown on screen, pause the video and copy that frame's text with a screen OCR tool.
Short answer: spoken words come from YouTube's transcript, under the description. For on-screen text in a paused frame, my pick is Optic, a menu bar app that copies the text in any area you drag across the screen ($4.99, a one-time purchase on the Mac App Store).
Disclosure: I build Optic.
For spoken words: use YouTube's transcript
If you want what the speaker said, OCR is the wrong tool. Many videos have a transcript, built from captions:
- Open the video on youtube.com.
- Expand the description below the video.
- Click Show transcript.
- Select the lines you need in the transcript panel and copy them.
Not every video has captions, and automatic captions can contain mistakes, so check names and numbers. Also look at the description and pinned comment: many creators paste commands and links there, which gives you the original text.
For text shown in the video
Commands typed in a terminal, code in an editor, a URL on a slide, settings in a walkthrough: this text is part of the video picture. You cannot select it in the player.
macOS Live Text works where Apple supports it: images in Preview, Photos, Quick Look and Safari, and paused video frames in some players. Pause the video and try selecting the text. If that does not work in your browser or player, use a screen OCR tool.
Copy it with Optic
Optic reads the screen inside the box you draw, so it works on the YouTube player in any browser.
- Pause the video on a sharp frame with the text you want.
- Click the Optic icon in the menu bar and choose Capture Text.
- Drag a box over the text in the video.
- Paste with Command-V.
Recognition runs on your Mac with Apple's Vision text recognition, and Optic has no network access.
Get a clean frame
Video frames can be blurry, especially in motion or at low quality. To help:
- Pause on a frame where the text is still, not mid-scroll.
- Set the video quality higher in the player settings.
- Use theater mode or full screen so the text is bigger.
- Check the result against the frame before using it.
Commands and code from tutorials
Turn on Code mode in Optic's Settings before capturing code. It keeps the indentation of each line and turns off language correction. Always read a terminal command once before you run it; quotes, dashes and look-alike characters like l and 1 are the usual trouble spots.
Links and QR codes
If the video shows a QR code, choose Capture QR Code and drag over it. Optic copies the content, and a link can be opened from its capture history with one click. More in how to scan a QR code on Mac.
Collect several captures
Each capture goes into Optic's history in the menu bar popover, with a small thumbnail and the time. It keeps your last 20 captures, so you can grab several steps from a tutorial and copy each one again when you get to it. The history stays on your Mac.
Also by me: if a tutorial is louder than the music you work to, SoundDial is a volume mixer for Mac that sets the volume of each app separately, so the browser and the music player can sit at different levels (SoundDial facts).
Where Optic does not fit
- It does not transcribe speech. For spoken words, use the transcript.
- It does not extract tables. A table shown in a video comes out as plain text lines.
- It does not translate on-screen text.
- It does not open video files or scan a whole video; it reads the one frame you are looking at.
See also copy text from video on Mac and copy text from anything on your screen.
FAQ
How do I copy the words spoken in a YouTube video?
Expand the description and click Show transcript, then select and copy the lines. Check the text, because automatic captions can contain errors.
How do I copy code from a YouTube tutorial on Mac?
Check the description first. If the code is only in the video, pause on a sharp frame and capture it with a screen OCR app like Optic, with Code mode on.
Can Live Text copy text from a YouTube video?
In some players, Live Text can select text in a paused video frame. If it does not work in yours, a screen OCR app reads the frame instead.
Does Optic work while the video is playing?
Pause first. A paused, sharp frame gives the cleanest result.