Auto-generating dual subtitles for video | 自动生成视频双语字幕

Item page: https://github.com/bobleer/autosub-dual

Preview:

Requirement:

FFmpeg

# macOS
brew install ffmpeg

autosub (More Information)

pip install autosub

Generating single subtitle according to video language

autosub [VIDEOPATH]

Generating dual subtitles

If require dual subtitles, Google Translate API key is necessary.
Apply API key here (NOTICE: Free usage is limited).
Meanwhile, need to modify the code from autosub
(Original version can only translate subtitle not dual subtitles).

mv /usr/local/bin/autosub /usr/local/bin/autosub.bak

curl https://raw.githubusercontent.com/bobleer/autosub-dual/master/autosub/modified.py -o /usr/local/bin/autosub && chmod +x /usr/local/bin/autosub

After these staffs, you can generate dual subtitles via following code.

# need Google Translate API key
autosub -D zh-CN -K [APIKEY] [VIDEOPATH]
0 0 vote
Article Rating

Published By
Bob

Subscribe
提醒
guest
5 评论
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
bingling
bingling
11 月 之前

我这个也实现了双语字幕输出,且可选外部样式输入https://github.com/BingLingGroup/autosub 。翻译API使用py-googletrans,也就是网页版的translate.google.com 。看network才看到你还在更新,于是过来安利一下。

ken
ken
1 年 之前

请问博主对autosub做了哪些修改呢?谢谢

ken
ken
1 年 之前
Reply to  Bob

good!谢谢博主