Aegisub字幕制作入门笔记

工作流程

Youtube-dl: youtube下载视频及下载自动生成字幕
Aegisub: 整理及制作中文字幕
小丸压制工具: 压制

第一步 下载视频(youtube-dl使用笔记)

youtube-dl是一款强大的开源软件,据说可以下载任意网站的视频
需要系统中安装python
如果安装了pip,可使用

1
sudo -H pip install --upgrade youtube-dl

或是Mac系统安装Homebrew之后:

1
brew install youtube-dl

下载命令

(windows系统中使用双引号,其他系统单引号)

1
2
3
4
# Download best mp4 format available or any other best if no mp4 available(需要安装ffmpeg)
$ youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"
# 下载Ytb自动生成字幕,设置格式为srt
--write-auto-sub --sub-format srt

所以合起来的命令是

1
youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --write-auto-sub --sub-format srt URL

youtube-dl

安装ffmpeg

Installing FFmpeg in Windows:
下载最新build,解压缩到你选择的位置。为windows的环境变量path增加一个 ffmpeg路径\bin的路径,如

1
C:\ffmpeg\bin

配置软件的configure file

On Linux and macOS, the system wide configuration file is located at /etc/youtube-dl.conf and the user wide configuration file at ~/.config/youtube-dl/config. On Windows, the user wide configuration file locations are %APPDATA%\youtube-dl\config.txt or C:\Users\\youtube-dl.conf. Note that by default configuration file may not exist so you may need to create it yourself.

1
2
3
4
5
6
7
8
9
10
11
12
13
# Lines starting with # are comments

# Always extract audio
-x

# Do not copy the mtime
--no-mtime

# Use this proxy
--proxy 127.0.0.1:3128

# Save all videos under Movies directory in your home directory
-o ~/Movies/%(title)s.%(ext)s

misc:下载Ytb视频的封面

查看网页源代码中,Ctrl+f搜索default.jpg或者thumbnail
或者使用网页:http://thumbnailsave.com/

第二步 Aegisub字幕制作

Aegisub的功能十分强大,依靠简单的代码可以实现淡入、淡出、旋转、变色、平移等特效,配合附带的ASSDraw3矢量图绘制软件,甚至可以在特效上一定程度上取代视频编辑软件。

1 听写

只要有视频播放器和笔记本就可以。每一段都另起一行

2 打轴

将听写内容直接粘贴到Aegisub中。打轴详见教程av6527949

附:另一篇机核网上的教程

如何用github搭建博客

为什么要搭建这个博客

感觉很久之前就在网上遇到过这个博主的博客【演员的自我修养】了。最近在搜Github Weekly Contest答案的时候竟然又遇上了,感觉非常的敬佩。正巧博主写了教程,于是照猫画虎很轻松就也搭了了一个这个。
搭建这个主要的目的是想找个方便的地方做一下过去欧美行程的游记,在学习搭建的过程中也体会到了自身很多不足。我想既然放在Github上,就应该没有什么隐私可言了吧,所以游记尽量在不泄露个人信息的情况下写完吧。

原文勘误

1.需要指出的是,搭建教程其中 【github和本地联动】 中的第4条指令应为

1
ssh-keygen -t rsa -C "your email"

2.所有配置的最后一步给出的文本指令是错的,但是截图中是对的,应该为

1
npm install hexo-deployer-git –-save

安装过程中遇到的问题

1.在 【github和本地联动】中第五步:添加SSH key到ssh-agent时,显示
Could not open a connection to your authentication agent
解决方法:搜到的链接
执行ssh-add之前需要开启ssh-agent:

1
eval `ssh-agent -s`

注意代码中的`符号为数字键1右边的按键,而不是单引号。

需要改进的方面

1.博客框架使用的是Markdown语法,需要学习各种基础的方法,包括文字字体,段落格式,图片添加,文章tag等等,
2.有余力可以去换一个博客主题,添加各种模块
3.尝试在linux操作系统中搭建环境,试试git功能

快速查询指令

1.新建一篇博文:命令行中输入

1
hexo new BlogName

2.开启本地服务器

1
hexo s

之后可以通过 http://localhost:4000/ 来预览页面
3.正式上传

1
hexo d -g

更多操作你都可以在其自带的hello-world.md文件中看到