Skip to content

Chrome extension for reading text from within the youtube video!!

License

Notifications You must be signed in to change notification settings

mohit-s96/youtube_ocr_extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License

Logo

For Manifest V2 check out the manifest-v2 branch

Youtube OCR - Read text from within a youtube video

This is a 100% client-side chrome extension which allows you to read text from witihin a youtube video. This is achieved through the TesseractJS library which wraps the emscripten port of the original tesseract implementation.

Motivation

  • A lot of time when watching a YouTube video one come's across a text of some information or code which is of use but there is no way to get it except just typing it out. Eg shell commands in tutorial videos or some text in a news video. This extension solves this problem by allowing the user to copy plain text directly from the youtube video screen.

Run Locally

Clone the project

  git clone https://github.com/msx47/youtube_ocr_extension.git

Go to the project directory

  cd youtube_ocr_extension

Install dependencies

  npm install

Build

  npm run build

Load unpacked in chrome extensions menu and select the build folder generated in the previos step.

FAQ

How does this work ?

The extension programatically takes screensot of the area of the video you have selected and reads the text from it.

How is the text read ?

The text is read using the TesseractJS library. It makes use of service workers and web assembly to process the text through a pre-trained model.

Sometimes it doesn't read the text / reads wrong text. What's the issue?

As stated earlier this is based on a pre trained model which was trained for English text with around 2500 fonts. The font of your target text might be different or it might have text which isn't recognized by the engine. I am working on training new models but it will take some time.

Can it read code ?

If the code editor doesn't add indentation lines into the code then yes it can read code.

Authors

Roadmap

  • Firefox support

  • New models to support more fonts

  • Improved UI