chrome realtime ocr like safari

As shown in the picture below, I want to achieve the live OCR feature that comes with the Safari browser. This shouldn’t be too hard. Just like before, when I cleverly combined taking a screenshot and opening it in Preview into one script, which indirectly used the Mac's built-in OCR. However, I’m not sure how to perfectly embed this into the original video. Does anyone have any suggestions?