sum1re / caption_ocr_tool Goto Github PK
View Code? Open in Web Editor NEW视频硬字幕提取工具
License: Apache License 2.0
视频硬字幕提取工具
License: Apache License 2.0
操作系统:Win10 64位
程序版本:0.0.2-beta
错误信息如下:
06-06-2020 10:31:47.577 ERROR 1648 --- [pool-2-thread-3] c.n.c.ocr.aspect.AopExceptionAspect : Pointcut Class: com.neo.caption.ocr.service.impl.VideoServiceImpl
Pointcut Method: videoToCOCR
ExceptionName: org.opencv.core.CvException
ExceptionMsg: cv::Exception: OpenCV(4.2.0) C:\build\master_winpack-bindings-win64-vc14-static\opencv\modules\core\src\count_non_zero.dispatch.cpp:124: error: (-215:Assertion failed) cn == 1 in function 'cv::countNonZero'
ParamNames: [progressBar]
ParamClasses: [class javafx.scene.control.ProgressBar]
Values: [ProgressBar[id=progress_bar, styleClass=progress-bar]]
Full Stack: Declare: com.neo.caption.ocr.service.impl.OpenCVServiceImpl Method: countBlackPixel Line: 311
Declare: com.neo.caption.ocr.service.impl.OpenCVServiceImpl$$FastClassBySpringCGLIB$$c7a12de Method: invoke Line: -1
Declare: com.neo.caption.ocr.service.impl.OpenCVServiceImpl$$EnhancerBySpringCGLIB$$b4470b85 Method: countBlackPixel Line: -1
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl Method: videoToCOCR Line: 113
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$FastClassBySpringCGLIB$$87498154 Method: invoke Line: -1
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$EnhancerBySpringCGLIB$$bc7b10a7 Method: videoToCOCR Line: -1
Declare: com.neo.caption.ocr.controller.MainController$5 Method: call Line: 434
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 24
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 13
经过测试,这可能是属于我的系统的问题。
从笔记本上我了解到,程序本身毫无异常,因为没有乱码现象,一切显示正常。
可是,为什么偏偏在我的主用电脑上出现乱码问题(泪目 T T,急用手抄工具呢)?
因为我不久前处理了50多G的字体包,可能在处理时不小心重复安装了一些字体。因此导致某个字体异常损坏(或是装了低版本缺字字体),刚好异常的字体就是这个手抄工具的界面、选项所使用的字体。
为什么会这样想呢?
其实,是因为安装程序时的安装界面里出现的文字并未出现乱码,进入程序后界面才显示乱码的。
这就纳闷了。还有就是,我目前也装了100多款程序,并没有发现有程序出现语言乱码的问题。
系统语言也修改过,无用。强烈怀疑是字体,请作者提供一下程序界面所使用字体的字体名称,让我测试一下我怀疑的方向对不对。
实在解决不了才来求助作者的。
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Describe the bug
打开任意视频后开始都显示目标图像必须是单通道图像
To Reproduce
Steps to reproduce the behavior:
Expected behavior
不知道这是不是正常的
Logs
28-01-2021 16:59:38.237 ERROR 18160 --- [pool-2-thread-2] c.n.c.ocr.aspect.AopExceptionAspect : Pointcut Class: com.neo.caption.ocr.service.impl.VideoServiceImpl
Pointcut Method: videoToCOCR
ExceptionName: com.neo.caption.ocr.exception.InvalidMatException
ExceptionMsg: alert.content.module.invalid_mat
ParamNames: [progressBar]
ParamClasses: [class javafx.scene.control.ProgressBar]
Values: [ProgressBar[id=progress_bar, styleClass=progress-bar]]
Full Stack: Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl Method: videoToCOCR Line: 115
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$FastClassBySpringCGLIB$$87498154 Method: invoke Line: -1
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$EnhancerBySpringCGLIB$$1253b94f Method: videoToCOCR Line: -1
Declare: com.neo.caption.ocr.controller.BatController Method: doVideoTask Line: 227
Declare: com.neo.caption.ocr.controller.BatController$1 Method: call Line: 168
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 24
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 13
28-01-2021 17:25:14.745 INFO 12260 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Starting application on Lenovo with PID 12260 (D:\Program Files\Caption OCR Tool\app\cocr.jar started by GH in D:\Program Files\Caption OCR Tool\runtime\bin)
28-01-2021 17:25:14.781 INFO 12260 --- [JavaFX-Launcher] o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default
28-01-2021 17:25:24.793 INFO 12260 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Started application in 15.338 seconds (JVM running for 20.919)
28-01-2021 17:26:26.124 ERROR 12260 --- [pool-2-thread-3] c.n.c.ocr.aspect.AopExceptionAspect : Pointcut Class: com.neo.caption.ocr.service.impl.VideoServiceImpl
Pointcut Method: videoToCOCR
ExceptionName: com.neo.caption.ocr.exception.InvalidMatException
ExceptionMsg: alert.content.module.invalid_mat
ParamNames: [progressBar]
ParamClasses: [class javafx.scene.control.ProgressBar]
Values: [ProgressBar[id=progress_bar, styleClass=progress-bar]]
Full Stack: Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl Method: videoToCOCR Line: 115
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$FastClassBySpringCGLIB$$87498154 Method: invoke Line: -1
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$EnhancerBySpringCGLIB$$25e9066b Method: videoToCOCR Line: -1
Declare: com.neo.caption.ocr.controller.MainController$5 Method: call Line: 433
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 24
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 13
28-01-2021 17:26:26.143 INFO 12260 --- [pool-2-thread-3] c.n.c.ocr.aspect.AopExceptionAspect : com.neo.caption.ocr.service.impl.VideoServiceImpl - videoToCOCR in 450 ms
28-01-2021 17:26:33.826 INFO 12260 --- [pool-2-thread-4] c.n.c.ocr.aspect.AopExceptionAspect : com.neo.caption.ocr.service.impl.OCRServiceImpl - apiInit in 1426 ms
28-01-2021 18:02:27.808 ERROR 12260 --- [pool-2-thread-5] c.n.c.ocr.aspect.AopExceptionAspect : Pointcut Class: com.neo.caption.ocr.service.impl.FileServiceImpl
Pointcut Method: saveAss
ExceptionName: com.neo.caption.ocr.exception.InvalidMatNodesException
ExceptionMsg: MatNode list is null or empty.
ParamNames: [assFile]
ParamClasses: [class java.io.File]
Full Stack: Declare: com.neo.caption.ocr.service.impl.FileServiceImpl Method: verify Line: 396
Declare: com.neo.caption.ocr.service.impl.FileServiceImpl Method: saveAss Line: 107
Declare: com.neo.caption.ocr.service.impl.FileServiceImpl$$FastClassBySpringCGLIB$$f236f5bf Method: invoke Line: -1
Declare: com.neo.caption.ocr.service.impl.FileServiceImpl$$EnhancerBySpringCGLIB$$cebbfe8c Method: saveAss Line: -1
Declare: com.neo.caption.ocr.controller.MainController$2 Method: call Line: 274
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 24
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 13
28-01-2021 18:02:27.809 INFO 12260 --- [pool-2-thread-5] c.n.c.ocr.aspect.AopExceptionAspect : com.neo.caption.ocr.service.impl.FileServiceImpl - saveAss in 2 ms
28-01-2021 18:02:54.442 ERROR 12260 --- [pool-2-thread-3] c.n.c.ocr.aspect.AopExceptionAspect : Pointcut Class: com.neo.caption.ocr.service.impl.VideoServiceImpl
Pointcut Method: videoToCOCR
ExceptionName: com.neo.caption.ocr.exception.InvalidMatException
ExceptionMsg: alert.content.module.invalid_mat
ParamNames: [progressBar]
ParamClasses: [class javafx.scene.control.ProgressBar]
Values: [ProgressBar[id=progress_bar, styleClass=progress-bar]]
Full Stack: Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl Method: videoToCOCR Line: 115
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$FastClassBySpringCGLIB$$87498154 Method: invoke Line: -1
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$EnhancerBySpringCGLIB$$25e9066b Method: videoToCOCR Line: -1
Declare: com.neo.caption.ocr.controller.MainController$5 Method: call Line: 433
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 24
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 13
28-01-2021 18:02:54.442 INFO 12260 --- [pool-2-thread-3] c.n.c.ocr.aspect.AopExceptionAspect : com.neo.caption.ocr.service.impl.VideoServiceImpl - videoToCOCR in 315 ms
28-01-2021 18:35:06.262 INFO 6252 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Starting application on Lenovo with PID 6252 (D:\Program Files\Caption OCR Tool\app\cocr.jar started by GH in D:\Program Files\Caption OCR Tool\runtime\bin)
28-01-2021 18:35:06.267 INFO 6252 --- [JavaFX-Launcher] o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default
28-01-2021 18:35:09.059 INFO 6252 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Started application in 4.548 seconds (JVM running for 6.779)
28-01-2021 18:35:51.448 ERROR 6252 --- [pool-2-thread-3] c.n.c.ocr.aspect.AopExceptionAspect : Pointcut Class: com.neo.caption.ocr.service.impl.VideoServiceImpl
Pointcut Method: videoToCOCR
ExceptionName: com.neo.caption.ocr.exception.InvalidMatException
ExceptionMsg: alert.content.module.invalid_mat
ParamNames: [progressBar]
ParamClasses: [class javafx.scene.control.ProgressBar]
Values: [ProgressBar[id=progress_bar, styleClass=progress-bar]]
Full Stack: Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl Method: videoToCOCR Line: 115
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$FastClassBySpringCGLIB$$87498154 Method: invoke Line: -1
Declare: com.neo.caption.ocr.service.impl.VideoServiceImpl$$EnhancerBySpringCGLIB$$6941ff33 Method: videoToCOCR Line: -1
Declare: com.neo.caption.ocr.controller.MainController$5 Method: call Line: 433
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 24
Declare: com.neo.caption.ocr.util.AsyncTask Method: call Line: 13
28-01-2021 18:35:51.450 INFO 6252 --- [pool-2-thread-3] c.n.c.ocr.aspect.AopExceptionAspect : com.neo.caption.ocr.service.impl.VideoServiceImpl - videoToCOCR in 738 ms
Desktop (please complete the following information):
大佬还在维护吗
框架已经很好了
能否支持自行替换Tesseract模型
Win10 InteliJ 编译后报错运行。。。
Exception in Application init method
Exception in thread "main" java.lang.RuntimeException: Exception in Application init method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:895)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'build' defined in file [E:\Downloads\caption_ocr_tool-master\target\classes\com\neo\caption\ocr\pojo\Build.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.info.BuildProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:228)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1358)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1204)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
at com.neo.caption.ocr.stage.MainApplication.init(MainApplication.java:28)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:824)
... 2 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.info.BuildProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1700)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1256)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789)
... 20 more
这样就能免去手动合并之苦,还能自动对上时间抽,输出 srt 文件。
Describe the bug
批量处理时出错,但是重新打开后又可以
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Logs
cv::Exception: OpenCV(4.2.0) C:\build\master_winpack-bindings-win64-vc14-static\opencv\modules\core\src\arithm.cpp:669: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function 'cv::arithm_op'
Desktop (please complete the following information):
Additional context
cot相当好用,感谢作者的付出~(其实要是有个更帅气的名字就好了)
“删除&合并字幕”这部分文档是用一张图表述的,逻辑很清晰,但容易让新用户摸不着头脑……建议加上这样一段面向功能的说明:
DEL
标记表示将要被删除的字幕;B
、M
、E
分别表示一组重复字幕的开头、中间、结尾,S
标记表示最终保留的字幕图象。希望有所帮助~
win10 64bit
一小时的视频,差不多做到三分之一就冻住了,没有任何反应……
保存 25MB 大小的 OCR 文件从头再来,下拉图片到底,加载到一半也冻住了……
占用了6GB内存,CPU利用率0.
头痛。
29-12-2020 22:03:35.595 INFO 12644 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Starting application on DESKTOP-SZ with PID 12644 (C:\Users\ceq\AppData\Local\Programs\Caption OCR Tool\app\cocr.jar started by Zhuang in C:\Users\ceq\AppData\Local\Programs\Caption OCR Tool\runtime\bin) 29-12-2020 22:03:35.600 INFO 12644 --- [JavaFX-Launcher] o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default 29-12-2020 22:03:38.138 INFO 12644 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Started application in 3.621 seconds (JVM running for 5.48) 29-12-2020 22:05:35.407 INFO 12644 --- [pool-2-thread-2] c.n.c.ocr.aspect.AopExceptionAspect : com.neo.caption.ocr.service.impl.FileServiceImpl - readCOCR in 110201 ms
你好,萌新在启动的过程中出现了问题想请教下。
mvn compile 通过了。
我在 VM -options 里设置了参数
-server -Xmx4g -Dfile.encoding=utf-8 -Dcocr.dir=$ProjectFileDir$/cocr_setup_win/app -Djava.library.path=$ProjectFileDir$/lib -Dprism.targetvram=2G -Dprism.vsync=false -Dprism.scrollcacheopt=true -Djavafx.preloader=com.neo.caption.ocr.AppPreloader
但启动后报错了。
Exception in Application init method
Exception in thread "main" java.lang.RuntimeException: Exception in Application init method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:895)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
Java has been detached already, but someone is still trying to use it at -[GlassViewDelegate dealloc]:/Users/jenkins/workspace/OpenJFX11.0.2-mac/modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m:198
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.UnsatisfiedLinkError: no opencv_java420 in java.library.path: [/Users/freestar/GitHub/caption_ocr_tool/lib]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1873)
at com.neo.caption.ocr.stage.MainApplication.init(MainApplication.java:28)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:824)
... 2 more
0 libglass.dylib 0x000000013ae8c9e2 -[GlassViewDelegate dealloc] + 290
1 libglass.dylib 0x000000013ae9246c -[GlassView3D dealloc] + 252
2 libobjc.A.dylib 0x00007fff2036e20f _ZN19AutoreleasePoolPage12releaseUntilEPP11objc_object + 167
3 libobjc.A.dylib 0x00007fff20350e30 objc_autoreleasePoolPop + 161
4 CoreFoundation 0x00007fff205a7671 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
5 CoreFoundation 0x00007fff205a7505 __CFRunLoopDoObservers + 543
6 CoreFoundation 0x00007fff205a6998 __CFRunLoopRun + 841
7 CoreFoundation 0x00007fff205a5f8c CFRunLoopRunSpecific + 563
8 libjli.dylib 0x000000010fa8064e CreateExecutionEnvironment + 398
9 libjli.dylib 0x000000010fa7c85e JLI_Launch + 1322
10 java 0x000000010fa6e807 main + 375
11 libdyld.dylib 0x00007fff204cbf3d start + 1
12 ??? 0x0000000000000015 0x0 + 21
麻烦帮忙看看,是因为 mac 系统的原因吗?
报错代码: cv::Exception: OpenCV(4.2.0) C:\build\master_winpack-bindings-win64-vc14-static\opencv\modules\core\src\count_non_zero.dispatch.cpp:124: error: (-215:Assertion failed) cn == 1 in function 'cv::countNonZero'
安装 OpenCv.jar时找不到该jar包
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.