apm1467 / videocr

Extract hardcoded subtitles from videos using machine learning
MIT License
509 stars 119 forks source link

运行错误 #17

Open cjszhj opened 4 years ago

cjszhj commented 4 years ago

OS: fedora 31 Python: 3.7 代码: from videocr import get_subtitles if name == 'main': # This check is mandatory for Windows. print(get_subtitles('22.mp4', lang='chi_sim+eng', sim_threshold=70, conf_threshold=65,use_fullframe=False))

执行后cpu满载运行,提示: `Traceback (most recent call last): File "t.py", line 8, in print(get_subtitles('22.mp4', lang='chi_sim+eng', sim_threshold=70, conf_threshold=65)) File "/usr/local/lib/python3.7/site-packages/videocr/api.py", line 11, in get_subtitles v.run_ocr(lang, time_start, time_end, conf_threshold, use_fullframe) File "/usr/local/lib/python3.7/site-packages/videocr/video.py", line 52, in run_ocr for i, data in enumerate(it_ocr) File "/usr/local/lib/python3.7/site-packages/videocr/video.py", line 52, in for i, data in enumerate(it_ocr) File "/usr/local/lib/python3.7/site-packages/videocr/models.py", line 32, in init block_num, conf = int(block_num), int(conf) ValueError: invalid literal for int() with base 10: '-'

usernamecannotbeempty commented 2 years ago

This problem is resolved in this thread.