For Manifest V2 check out the manifest-v2 branch
This is a 100% client-side Chrome extension that allows you to read text from within a YouTube video. This is achieved through the TesseractJS library which wraps the emscripten port of the original Tesseract implementation.
- A lot of times when watching a YouTube video you come 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.
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 the Chrome extensions menu and select the build folder generated in the previous step.
The extension programmatically takes screenshots of the area of the video you have selected and reads the text from it.
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.
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.
If the code editor doesn't add indentation lines into the code then yes it can read code.
-
Firefox support
-
New models to support more fonts
-
Improved UI