• 欢迎访问db1024网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏db1024吧

使用GetSub一键下载指定视频的ass/srt等字幕文件

主机教程 Liam 1年前 (2019-08-25) 1629次浏览 13个评论 扫描二维码
文章目录[隐藏]

说明:很多时候我们下载视频的时候,都是么得字幕的,对于强迫症或者有其他需求的人来说,都需要加进去,一般都是首先去其它字幕网站下载后,使用ffmpeg或者一些转码程序将字幕烧录进去,通常来说,手动获取字幕还是比较麻烦的,这里就分享一个工具GetSub,可以自动给我们根据某个视频或者视频文件夹,匹配出相应的ass/srt字幕文件,字幕来源于subhdzimuzuzimuku,获取速度也是很快的,有需求的可以用下。

截图

使用GetSub一键下载指定视频的ass/srt等字幕文件

安装

Github地址:https://github.com/gyh1621/GetSubtitles

环境要求:Python 23,建议使用Python 3

1、安装pip或pip3

提示:pippip3自己选一种进行安装。 

安装pip

#CentOS 6.x 32位 rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm yum install -y python-pip  #CentOS 6.x 64位 rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum install -y python-pip  #CentOS 7.x yum install -y epel-release yum install -y python-pip #如果CentOS 7安装出现No package python-pip available,可以用以下命令进行安装 wget https://bootstrap.pypa.io/get-pip.py python get-pip.py  #Debian/Ubuntu系统 apt -y update apt -y install python-pip 

安装pip3

#CenOS 6系统 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm yum install python34 -y wget https://bootstrap.pypa.io/get-pip.py python3 get-pip.py  #CenOS 7系统 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install python36 -y wget https://bootstrap.pypa.io/get-pip.py python3 get-pip.py  #Debian/Ubuntu系统 apt update apt install python3-pip -y 

2、安装GetSub

#pip安装 pip install getsub  #pip3安装 pip3 install getsub 

3、使用方法

#使用命令 getsub [-h] [-q] [-s] [-o] [-m] [-n NUMBER] [-b] [-d DOWNLOADER] [--debug] [--plex] name  #参数详解 -h          帮助 -q          查询模式,手动选择下载的压缩包,多选使用','或','分隔 -s          手动选择下载压缩包中要解压的字幕 -o          若视频存在同名字幕,替换已经存在的字幕 -m          保存原始下载字幕压缩包(通常一个字幕压缩包含有多个字幕) -b          若一个字母压缩包内同时有.ass、.srt类型字幕,保存两种字幕 -n          查询模式下显示最大候选字幕数 -d          选择下载器,subhd、zimuku、zimuzu --plex      在下载完成的字幕名中插入.zh标识供plex识别为中文字幕 --debug     显示报错详细信息 

下载指定视频的字幕,使用命令:

#自动给你匹配它认为最合适的字幕,一般是ass格式、双语字幕 getsub Aladdin.2019.720p.WEBRip.x264  #自动查询字幕文件,并让你选择合适的下载 getsub -q -s Aladdin.2019.720p.WEBRip.x264 

以上命令默认将字幕文件下载到当前执行目录,如果想下载到指定目录,比如/moerats,那后面就使用/moerats/电影名称

批量下载视频文件夹所有视频的字幕,使用命令:

#自动匹配/moerats文件夹里的所有视频最合适的字幕,并直接给你下载到/moerats目录 getsub /moerats  #批量查询/moerats文件夹里的所有视频的字幕文件,并让你选择合适的下载 getsub -q -s /moerats

最后就可以自行将字幕烧录进视频了。

使用ffmpeg烧录字幕的方法大致为:

#安装ffmpeg wget https://www.moerats.com/usr/down/ffmpeg/ffmpeg-git-$(getconf LONG_BIT)bit-static.tar.xz tar xvf ffmpeg-git-*-static.tar.xz mv ffmpeg-git-*/ffmpeg  ffmpeg-git-*/ffprobe /usr/bin/ rm -rf ffmpeg-git-*  #简单的烧录命令 ffmpeg -i input.mp4 -vf subtitles=input.ass output.mp4 

input.mp4为视频文件,subtitles后面为字幕文件,可以是srt/assoutput.mp4为输出文件,更多命令可以自行百度/谷歌。


db1024 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:使用GetSub一键下载指定视频的ass/srt等字幕文件
喜欢 (1)
关于作者:
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(13)个小伙伴在吐槽
  1. Wow that was odd. I just wrote an very long comment but after I clicked submit my comment didn't show up. Grrrr... well I'm not writing all that over again. Anyway, just wanted to say fantastic blog!
    web hosting company2020-09-01 02:40 回复 Windows 8.1 | Firefox浏览器 60.0
  2. Incredible points. Great arguments. Keep up the good effort.
    black mass2020-08-31 05:59 回复 Linux | Chrome 65.0.3325.181
  3. I do not even know how I ended up here, but I thought this post was great. I don't know who you are but certainly you're going to a famous blogger if you are not already ;) Cheers!
    black mass2020-08-28 18:08 回复 Mac OS X | Chrome 52.0.2777.85
  4. Every weekend i used to visit this site, as i want enjoyment, for the reason that this this website conations in fact fastidious funny information too.
    cheap flights2020-08-28 07:19 回复 Mac OS X | Firefox浏览器 56.0.4
  5. You made some good points there. I looked on the net to learn more about the issue and found most people will go along with your views on this web site.
    cheap flights2020-08-28 04:42 回复 Mac OS X | Chrome 66.0.3359.139
  6. Nice post. I learn something totally new and challenging on sites I stumbleupon everyday. It will always be interesting to read articles from other writers and practice something from their sites.
    cheap flights2020-08-27 16:01 回复 Mac OS X | Chrome 51.0.2704.84
  7. I love it when individuals come together and share views. Great site, continue the good work! 31muvXS cheap flights
    cheap flights2020-08-26 08:36 回复 Linux | Chrome 65.0.3325.181
  8. What's up, its fastidious article on the topic of media print, we all be familiar with media is a impressive source of information. cheap flights 32hvAj4
    cheap flights2020-08-26 00:13 回复 Mac OS X | Chrome 67.0.3396.79
  9. I've learn several excellent stuff here. Definitely value bookmarking for revisiting. I surprise how much effort you set to create one of these fantastic informative website. cheap flights yynxznuh
    cheap flights2020-08-24 19:29 回复 Mac OS X | Chrome 65.0.3325.181
  10. obviously like your web-site however you have to test the spelling on several of your posts. A number of them are rife with spelling issues and I in finding it very bothersome to tell the reality on the other hand I'll definitely come back again.
    website hosting companies2020-08-14 07:43 回复 Windows 8.1 | Firefox浏览器 60.0
  11. Everyone loves what you guys tend to be up too. This type of clever work and exposure! Keep up the excellent works guys I've added you guys to my personal blogroll. adreamoftrains web hosting sites
    adreamoftrains website hosting services2020-08-12 12:45 回复 Windows 7 | Opera 9.80
  12. This text is priceless. How can I find out more?
    best web hosting 20202020-08-10 20:32 回复 Mac OS X | Chrome 56.0.2986.42
  13. Thanks a lot for the post.Really thank you! Much obliged.
    Generic viagra without a doctor prescription2020-06-12 17:06 回复 Windows XP | Internet Explorer 6.0