YaoFANGUK / video-subtitle-extractor

视频硬字幕提取,生成srt文件。无需申请第三方API,本地实现文本识别。基于深度学习的视频字幕提取框架,包含字幕区域检测、字幕内容提取。A GUI tool for extracting hard-coded subtitle (hardsub) from videos and generating srt files.
Apache License 2.0
6.19k stars 675 forks source link

Google colab not working for chinese-japanese subbed video #174

Open languagemaniac opened 1 year ago

languagemaniac commented 1 year ago

Hi, I'm trying to use the google colab client for this video I'm trying to extract subtitles from. It has chinese and japanese subtitles.

This is the log:

请输入视频完整路径:/content/video.mp4
请指定字幕区域 (ymin ymax xmin xmax):
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x244d7200] moov atom not found
识别字幕语言:ch
识别模式:fast
使用GPU进行加速
帧数:0.0,帧率:0.0
【处理中】开启提取视频关键帧...
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x6fc6000] moov atom not found
【处理中】开始提取字幕信息,此步骤可能花费较长时间,请耐心等待...

0it [00:00, ?it/s]
【结束】提取视频关键帧完毕...
【结束】完成字幕提取,生成原始字幕文件...
【处理中】开始检测并过滤水印区域内容
视频是否存在水印区域,存在的话输入y,不存在的话输入n:n
-----------------------------
【处理中】开始检测非字幕区域,并将非字幕区域的内容删除
Traceback (most recent call last):
  File "./backend/main.py", line 996, in <module>
    se.run()
  File "./backend/main.py", line 176, in run
    self.filter_scene_text()
  File "./backend/main.py", line 437, in filter_scene_text
    subtitle_area = self._detect_subtitle_area()[0][0]
IndexError: list index out of range

Not sure how to configure it so that it detects both japanese and chinese subtitles. I didn't input anything on (ymin ymax xmin xmax) and I think this could be the problem, but isn't it supposed to autodetect the subtitles?

I'm running linux mint and have a not so good computer, but I obtained the subtitles location numbers by using wine (I cannot run the program, but I can obtain the numbers). Inputing this numbers in google colab results in an empty srt file

YaoFANGUK commented 1 year ago

I'm sorry that biligual subs are not supported except Chinese-English