Extract Text from Video - images | Tesseract

  Рет қаралды 21,605

Python 360

Python 360

Күн бұрын

Пікірлер: 65
@jmarcelosr92
@jmarcelosr92 Жыл бұрын
Excellent video! thank you for sharing. I'm starting a little project and this came out very useful. I had a problem when executing the line [ text = pytesseract.image_to_string(my_example, lang="spa")] on the get_text function, I installed and reinstalled many times the pytesseract function thinking it whas a PATH issue. (as returned in my console. Turns out that when saving the image in the process part [name = "./image_frames/frame" + str(index) + ".png"] my compiler detected the [/f] of [/frame] as a special character and messed all up. in the end i just changed it for [name = "./image_frames/image" + str(index) + ".png"] in case it helps anyone trying testing this algorimthm
@python360
@python360 Жыл бұрын
Ah thank you!, that could well help others - were you using Windows or *Nix by the way? 👍
@monkey_see_monkey_do
@monkey_see_monkey_do 3 жыл бұрын
Wow! This is awesome! Now not sharing the source code in the descriptions below the videos no longer makes sense because THIS TUTORIAL!)
@python360
@python360 3 жыл бұрын
*CMK discovers Dr Pi and his evil plan to scrape code from videos* :o)
@monkey_see_monkey_do
@monkey_see_monkey_do 3 жыл бұрын
@@python360 Well if it's about my videos then be sure you'll always get it for free)
@hammadh2162
@hammadh2162 4 ай бұрын
I have a question as I came across your video. First, thank you for your content as it is very helpful. Is there another method to extract the text from a video without taking the snapshot or picture every 4 second?
@python360
@python360 4 ай бұрын
Hello! Thank you for your kind comment. You could maybe adjust the timing to say 3 seconds, or 2 seconds or whatever works, but using this method there will need to be some sort of capturing of the picture in order to do the text recognition. Perhaps there will be an AI product that can do it as the video plays, but using Tesseract and Python, this is the only way I know of. If someone else reads this and can advise then that'd be neat!
@hammadh2162
@hammadh2162 4 ай бұрын
@@python360 awesome, thank you very much for your feedback. Greatly appreciate it.z have a good one!
@python360
@python360 4 ай бұрын
@@hammadh2162 No problem, cheers Hammad, good luck with your project!😄
@rahulnema9896
@rahulnema9896 Жыл бұрын
How to extract text, presentation, from Live online Videos, any extension, so that it's applicable for all online text extractor from video
@python360
@python360 Жыл бұрын
Hi Rahul, that's quite advanced, check out this repo, you'll need Open CV and Tensorflow github.com/renukatamboli/text-extraction-from-video-frames
@ffmax55
@ffmax55 2 жыл бұрын
Existe t'il un moyen simple d'extraire l'intégralité des textes inclus dans une vidéo ? (pas l'audio, ni les sous titres générés par KZbin) sur PC ou smartphone. Impossible de trouver cet info (pourtant ca se fait facilement avec une image et de l'OCR, et une vidéo ca n'est jamais qu'une succession d'images)
@python360
@python360 2 жыл бұрын
Oui. Avec KZbin API 👍
@ffmax55
@ffmax55 2 жыл бұрын
@@python360 Merci beaucoup pour cette réponse, je vais essayer de me renseigner un peu plus sur KZbin API :)
@python360
@python360 2 жыл бұрын
Gonna chance, merci monsieur! 👍
@python360
@python360 2 жыл бұрын
@@ffmax55 kzbin.info/www/bejne/qJbWmXR6maZ0nrM
@acb_gamez
@acb_gamez 2 жыл бұрын
Couldn't you just use FFMPEG to get the frames from the video?
@python360
@python360 2 жыл бұрын
I want the text from the frames, not just the frames(images)
@acb_gamez
@acb_gamez 2 жыл бұрын
@@python360 I just mean to replace the first two functions you made. Then you use the get_text function.
@python360
@python360 2 жыл бұрын
I get you. Yes, you could do it that way - good shout 👍
@learning_rust
@learning_rust 3 жыл бұрын
great intro!
@python360
@python360 3 жыл бұрын
Thanks for the visit
@girlgotTECH
@girlgotTECH Жыл бұрын
i am trying to execute this on vs code can you tell me any of the extenions that are needed to be installed?
@python360
@python360 Жыл бұрын
I use "coderunner" but it's not essential. VSCODE can get in a muddle with which version on Python to run, so always worth running your code from.the terminal first, 👍
@michaelmody
@michaelmody 3 жыл бұрын
This is great. What about grabbing transcripts from u-tubes.
@python360
@python360 3 жыл бұрын
Yes, sure, I was thinking that might be a good topic so stay tuned.
@zarg2289
@zarg2289 Жыл бұрын
Hi I cannot install any of the libraries needed in this I get errors at every step I'm on windows, I have tried vscode, pycharm but no luck and cannot see what I'm doing wrong
@ShreyaChavan-m9l
@ShreyaChavan-m9l 6 ай бұрын
change the path of your python download
@saiyamjain0007
@saiyamjain0007 3 жыл бұрын
Loved the tutorial
@python360
@python360 3 жыл бұрын
Thank you. Much appreciated 👍👍
@mplinterviewhighlights4103
@mplinterviewhighlights4103 2 жыл бұрын
Hi Bro, good video! i was wondering if we can just display the text where the frames between 1 and 2 (Both same) only display once instead of double? So the pattern of the frames output is (1,2,.......2,3.......2,1......) instead of (1,1,2)
@python360
@python360 2 жыл бұрын
Yes, so if the frames haven't changed, then it doesn't give a duplicate? You could parse the text and if it's identical to previous then you would not save it, or just measure the similarity between the images before parsing: eg. www.geeksforgeeks.org/measure-similarity-between-images-using-python-opencv/
@mplinterviewhighlights4103
@mplinterviewhighlights4103 2 жыл бұрын
@@python360 Thanks for the advice! Yes, i want the option to have the text to display between frames and not continuously, if i remove the duplicate image then that image result will not ever be printed out in the output. so if text A appear first, it wont appear next as text B will take place and after text B, text A have the option to be printed out or not
@kivachervi443
@kivachervi443 2 жыл бұрын
Hi there! I am brand new to python, so this may be a stupid question, but how do I install libtesseract-dev? I was able to install tesseract using pip, but cant figure out how to do libtesseract. I am on a Mac, by the way. Thank you!
@python360
@python360 2 жыл бұрын
Hello, try : $ brew install --with-libtiff --with-openjpeg --with-giflib leptonica $ brew install --devel --all-languages tesseract I don't know so much about Mac, but also maybe you can do : brew install --libtesseract ? (You're right though, It won't be pip, as it's an actual system library that you need)
@kivachervi443
@kivachervi443 2 жыл бұрын
@@python360 Thank you, I will try this out and see if it works. On a windows PC, would it be any different?
@python360
@python360 2 жыл бұрын
No. Just change the forward slashes in the filepaths to suit your particular Windows paths, you can use VS code (get relative path - right click over file ) if you have it/use it.
@kivachervi443
@kivachervi443 2 жыл бұрын
@@python360 Brilliant, I really appreciate the fast response. I'll let you know how it goes.
@harshavardhanranger
@harshavardhanranger 11 ай бұрын
Hey @@kivachervi443 , how did it go? were you able to make it work on mac ?
@naumanasif383
@naumanasif383 Жыл бұрын
Great. If I want to extract urdu text what should I do then?
@python360
@python360 Жыл бұрын
I believe you can specify different languages, might need to check through documentation and see if Urdu is listed.
@sandeshchand8729
@sandeshchand8729 3 жыл бұрын
Hello python 360, I am facing one problem when I am trying to divide video into frames the text in it is replicating in frames I am getting the same text extracting again and again ".Is there any best algorithm or method to divide video to frames effectively.
@python360
@python360 3 жыл бұрын
You'll need to know how many frames per second and then use the modulus operator, or...Try some sort of image detection with openCV to only extract text when the image (frame) is noticeably different to the previous. With my project I worked out the number of seconds between each different page in the video, so it was constant which admittedly was much easier.
@sandeshchand8729
@sandeshchand8729 3 жыл бұрын
Could you explain more about modular operation.Thanks
@python360
@python360 3 жыл бұрын
@@sandeshchand8729 Yes, so a = 13 b = 5 # To store the remainder obtained # when dividing a by b, in c c = a % b c = 3
@thenextbigthing1393
@thenextbigthing1393 2 жыл бұрын
is it possible to use this to extract text from a Movie?
@python360
@python360 2 жыл бұрын
It depends on how clear the text is. Subtitles of the film would be ok. You'd just need to get the timing right and check you haven't extracted the same text too many times 👍
@rezacute1
@rezacute1 6 ай бұрын
tanks for video . I want to write python app for read Instagram story insight reach from recorded video can u help me to write this app?
@zunairakhalid7358
@zunairakhalid7358 Жыл бұрын
Can anybody help me if i want to convert the text from video as an audio output?
@python360
@python360 Жыл бұрын
Most of the TTS stuff you have to pay for from what I can see. Have you tried pip install gTTS ?
@vishnuk5680
@vishnuk5680 Жыл бұрын
sir can you make a code that can extract text from video frame by frame and then convert that text to subtitles with time stamps can you do it, its a kind request 🙏 i am unable to this bcoz i am a beginner
@python360
@python360 Жыл бұрын
You can get the transcripts from the KZbin video itself, without any need for code. (Assuming you're on a computer rather than phone?).
@gamingsirver
@gamingsirver 2 жыл бұрын
Now if only I could extract the code text from this video so that I could use it to extract text from videos.
@python360
@python360 2 жыл бұрын
Email me I can send it to you 👍😉
@girlgotTECH
@girlgotTECH Жыл бұрын
@@python360 can you send me that as well?
@benyaminma8564
@benyaminma8564 2 жыл бұрын
I love this .🍻
@python360
@python360 2 жыл бұрын
Thanks man!
@interviewsyllabus1111
@interviewsyllabus1111 2 жыл бұрын
HEY ! Can i get the code
@python360
@python360 2 жыл бұрын
github.com/RGGH/OCR/blob/main/videx.py
@rushikeshsherekar9850
@rushikeshsherekar9850 Жыл бұрын
for a minute i thought why is jhon stamos teaching python .... ps: ik i spelled it wrong
@python360
@python360 Жыл бұрын
Lol! 🤣
@lordmelbury7174
@lordmelbury7174 3 жыл бұрын
Tremendous! I have some videos I need text extracting from, I'll send you an email!
How AI 'Understands' Images (CLIP) - Computerphile
18:05
Computerphile
Рет қаралды 201 М.
哈莉奎因怎么变骷髅了#小丑 #shorts
00:19
好人小丑
Рет қаралды 48 МЛН
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 125 МЛН
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 6 МЛН
How to Preprocess Images for Text OCR in Python (OCR in Python Tutorials 02.02)
53:24
Python Tutorials for Digital Humanities
Рет қаралды 159 М.
Extract text from images with Tesseract OCR on Windows
18:06
DFIRScience
Рет қаралды 105 М.
Live Discussion - How To Read Text From Images Using Pytesseract
47:31
The Art of Code - Dylan Beattie
1:00:49
NDC Conferences
Рет қаралды 4,7 МЛН
Has Generative AI Already Peaked? - Computerphile
12:48
Computerphile
Рет қаралды 988 М.
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
Video Data Processing with Python and OpenCV
32:05
Rob Mulla
Рет қаралды 76 М.
Extract Text From Images in Python (OCR)
29:24
NeuralNine
Рет қаралды 278 М.
哈莉奎因怎么变骷髅了#小丑 #shorts
00:19
好人小丑
Рет қаралды 48 МЛН