You're watching a coding tutorial on YouTube, and the instructor types out a block of code you need. You pause the video, reach for your mouse to highlight the text, and nothing happens. The cursor stays as a pointer. You try again, slower. Still nothing. You're in Chrome, and Live Text doesn't work here.

This is a common frustration for developers who learn from video tutorials. You can either retype the code by hand, or you can use one of three methods to extract it automatically. We'll cover the built-in macOS approach, the source app's own features, and a hotkey-driven OCR tool that works in any browser.

Use Live Text in Safari

If you're using Safari, Live Text can recognize text in paused video frames. Pause the video at the right moment, then click and drag to select the code. You can copy it with Command+C and paste it into your editor.

This method is fast and requires no extra software. It works with YouTube, Vimeo, and most other video sites. The text recognition is powered by Apple Vision, which handles monospace fonts well.

When Live Text fails

Live Text only works in Safari. If you use Chrome, Firefox, Edge, Brave, or Arc, you won't see the text selection cursor. It also doesn't work in third-party video players like IINA or VLC. And even in Safari, Live Text can confuse similar characters like 0 and O, or 1 and l, especially in code with small fonts.

Use the source app's built-in features

Many tutorial platforms offer text alternatives. YouTube has auto-generated captions and a transcript panel. Loom provides a transcript for every video. Some coding tutorial sites include a "copy code" button or a downloadable code file.

Open the transcript or captions panel, find the code snippet, and copy it directly. This avoids OCR entirely and gives you clean text.

When this method fails

Transcripts don't always include code blocks accurately. Auto-generated captions can mangle syntax, especially with special characters or non-English variable names. And not every platform provides a transcript — some smaller tutorial sites skip this feature entirely.

Use Cheese! OCR

Cheese! OCR reads text from any part of your screen, regardless of the app displaying it. Press Shift+Command+E, drag a selection rectangle around the code in the paused video, and the text appears in a popup window. Copy it with one click.

This works in Chrome, Firefox, Safari, IINA, VLC — any app that shows video. It uses Apple Vision on-device, so no data leaves your Mac. The default hotkey is configurable in Settings, and you can OCR multiple languages if the tutorial uses mixed text.

Cheese! OCR has the same accuracy as Live Text on the same content, because both use the same underlying framework. The key difference is that Cheese! OCR works everywhere, not just in Safari.

Quick comparison

Method Best for Limitation
Live Text in Safari Quick copy in Safari Only works in Safari
Transcript or captions Clean text, no OCR errors Not always available or accurate
Cheese! OCR Any browser or video player Requires Screen Recording permission

Common troubleshooting

If OCR isn't working, check that you've granted Screen Recording permission in System Settings > Privacy & Security. Without it, tools like Cheese! OCR can't read the screen. Also make sure the video is paused at a frame where the code is clear and in focus. Blurry or low-resolution video (below 720p) will reduce accuracy significantly.

After pasting code from any OCR method, always run it to catch character substitutions. Search for common swaps like 0↔O, 1↔l, 5↔S, and rn↔m. Most editors have a find-and-replace function that makes this quick.