Nov-23-2020, 11:31 AM
need help
need help
|
I don't quite understand, both files are already in the same folder?
https://prnt.sc/vogwmk Do I have to convert the mp4 file to avi or something in order to work?
Nov-23-2020, 07:26 PM
Quick test as i have already installed this in a virtual environment.
File used Shiv ki mahima ki katha.mp4 as test. # example.py from videocr import get_subtitles if __name__ == '__main__': # This check is mandatory for Windows. print(get_subtitles('Shiv ki mahima ki katha.mp4', lang='eng', sim_threshold=70, conf_threshold=65))Python version and files (my_env) G:\code\my_env λ python -V Python 3.8.3 (my_env) G:\code\my_env λ ls Include/ Scripts/ example.py python_Levenshtein-0.12.0-cp38-cp38-win_amd64.whl Lib/ 'Shiv ki mahima ki katha.mp4' ffmpeg.exe* pyvenv.cfgRun take long time,but work. (my_env) G:\code\my_env λ python example.py
Nov-24-2020, 05:31 AM
I tried running the python script itself and I get
TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information. How to add Tesseract to PATH?
Nov-24-2020, 09:55 AM
videocr Wrote:InstallationInstall: Tesseract at UB Mannheim Add to Path: Environment Variables Path
opened python, typed & this is what I got, should I run the code in python or Pip(cmd) or should I run the script itself (which opens in python)?
>>> # example.py >>> >>> from videocr import get_subtitles >>> >>> if __name__ == '__main__': # This check is mandatory for Windows. ... print(get_subtitles('Shiv ki mahima ki katha.mp4', lang='eng', sim_threshold=70, conf_threshold=65)) ... Traceback (most recent call last): File "<stdin>", line 2, in <module> File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\videocr\api.py", line 10, in get_subtitles v = Video(video_path) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\videocr\video.py", line 26, in __init__ with Capture(path) as v: File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\videocr\opencv_adapter.py", line 11, in __enter__ raise IOError('Can not open video {}.'.format(self.path)) OSError: Can not open video Shiv ki mahima ki katha.mp4.
Now you run in interactive shell,you most run this a script from command line.
When run like this Path to .mp4 can be wrong if just start python or IDLE and do this. Look at this for make a .py file in IDLE. This is a struggle because all this basic stuff is new to you ![]() |
|
Users browsing this thread: 1 Guest(s)