TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua

 找回密码
 新人加入
查看: 9287|回复: 2

TCAX 的工作方式 (英文) [复制链接]

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2011-8-5 19:08:44 |显示全部楼层
The Work Unit

The basic work unit of TCAX is a TCAX FX project (or simply called a project). It usually contains one TCC file, one SYL file, one Font file and several tcaxPy scripts. Two most common TCAX FX project types are the TCAX karaoke FX project and the TCAX LOGO FX project. You can refer to this thread for more information about these terms.


The Process

1.

TCC file --> TCAX --> + name of the SYL file
                                  |
                                  + name of the Font file
                                  |
                                  + name(s) of the tcaxPy script(s)
                                  |
                                  + other information

2.

SYL file  +
             |
Font file +-> TCAX --> + timing information
                                    |
                                   + positioning information
                                    |
                                   + other information

3.

timing information        +
                                    |
positioning information +
                                    |
other information         +-> tcaxPy script(s) --> + ASS buffer
                                                                          |
                                                                          + TCAS buffer

4.

ASS buffer   +
                    |
TCAS buffer +-> TCAX --> + ASS file
                                          |
                                          + TCAS file

5.

ASS file --> VSFilter --> frames
TCAS file --> TcasFilter --> frames


Description

Firstly, TCAX parses the TCC file of the project to get the file names of the SYL file, the Font file and the tcaxPy script(s), and gathers some other information about the project. Then, TCAX reads the SYL file according to the file name retrieved from the TCC file, and retrieves the timing information of the syllables as well as the texts. TCAX calculates the positioning metrics according to the Font specified by the TCC file. After the information gathering process, TCAX then sends the information to the tcaxPy script(s), the task remained for the script(s) is to make full use of these information and the APIs provided by TCAX and its components to create awesome FXs. The FXs are stored in ASS buffer and TCAS buffer, which will then be returned to TCAX and written into files. The products of TCAX are the ASS file and the TCAS file. Lastly, we can preview the FXs using filters named VSFilter (for ASS files) and TcasFilter (for TCAS files).


About tcaxPy scripts

TCAX can handle multiple scripts, and you can also specify the lines which the scripts will be applied. e.g.,
  1. # in TCC file

  2. < py file = test1.py > < beg line = 1 > < end line = 0 >   # 1 means the first line
  3. < py file = test2.py > < beg line = 1 > < end line = 0 >   # 0 means the last line
  4. < py file = test3.py > < beg line = 1 > < end line = -1 >  # -1 means the second line from the bottom
  5. < py file = test4.py > < beg line = 1 > < end line = -2 >  # -2 means the third line from the bottom
  6. < py file = !\test.py > < beg line = 5 > < end line = 0 >  # ‘!\’ or ‘!/’ indicates that ‘test.py’ is in the TCAX’s root directory
  7. < py file = !\script\test.py > < beg line = 3 > < end line = 7 >   # ‘test.py’ is in the ‘script’ folder of the TCAX’s root directory
复制代码
The scripts will then be executed in the order of their appearance, on by one.

If the script cannot be found on the specified path, TCAX will check its program's root directory to see whether there is a script named just the same as you specified.





Rank: 4

发表于 2013-12-2 13:14:43 |显示全部楼层
这篇写的好清晰呀,之前虽然看了很多教程,但都感觉像看拼图的某部分一样,虽然懂了某部分但是还是不能大体掌握的感觉,但看了这个突然感觉看到了完整拼好的图,对各部分的理解都豁然开朗。不知道有没中文的,要是一开始看到这个我想应该能更容易理解其他教程。还有为啥这个帖子没人回呢,是不是规定不让回,如果是这样的话实在不好意思,把我回的直接删吧

Rank: 4

发表于 2015-5-12 17:45:56 |显示全部楼层
给力的英文介绍!

Rank: 4

发表于 2021-7-26 00:58:19 |显示全部楼层
本帖最后由 Seekladoom 于 2021-7-26 00:58 编辑

【请注意,以下为上述英文内容的谷歌机翻】
工作单位

TCAX的基本工作单元是TCAX FX项目(或简称为项目)。它通常包含一个TCC 文件、一个SYL 文件、一个Font 文件和几个tcaxPy 脚本。两种最常见的 TCAX FX 项目类型是 TCAX 卡拉 OK FX 项目和 TCAX LOGO FX 项目。您可以参考此线程以获取有关这些术语的更多信息。


过程

1.

TCC文件- > TCAX - > +的SYL文件的名称
                                  |
                                  + 字体文件的名称
                                  |
                                  + tcaxPy 脚本的名称
                                  |
                                  + 其他信息

2.

SYL 文件 +
             |
字体文件 +-> TCAX --> + 时序信息
                                    |
                                   + 定位信息
                                    |
                                   + 其他信息

3.

时间信息 +
                                    |
定位信息+
                                    |
其他信息 +-> tcaxPy 脚本 --> + ASS 缓冲区
                                                                          |
                                                                          + TCAS 缓冲区

4.

ASS 缓冲区 +
                    |
TCAS 缓冲区 +-> TCAX --> + ASS 文件
                                          |
                                          + TCAS 文件

5.

ASS 文件 --> VSFilter --> 框架
TCAS 文件 --> TcasFilter --> 框架


说明

首先,TCAX 解析项目的 TCC 文件以获取 SYL 文件、字体文件和 tcaxPy 脚本的文件名,并收集有关项目的其他一些信息。然后,TCAX 根据从 TCC 文件中检索到的文件名读取 SYL 文件,并检索出音节和文本的时序信息。TCAX 根据 TCC 文件指定的 Font 计算定位度量。在信息收集过程之后,TCAX 然后将信息发送到 tcaxPy 脚本,脚本剩下的任务是充分利用这些信息和 TCAX 及其组件提供的 API 来创建很棒的 FX。FX 存储在 ASS 缓冲区和 TCAS 缓冲区中,然后将返回到 TCAX 并写入文件。TCAX 的产品是 ASS 文件和 TCAS 文件。最后,


关于 tcaxPy 脚本

TCAX 可以处理多个脚本,您还可以指定将应用脚本的行。例如,
  1. # 在 TCC 文件中

  2. <py文件=test1.py><beg line=1><end line=0>#1表示第一行
  3. < py file = test2.py > < beg line = 1 > < end line = 0 > #0表示最后一行
  4. < py file = test3.py > < beg line = 1 > < end line = -1 > # -1 表示倒数第二行
  5. < py file = test4.py > < beg line = 1 > < end line = -2 > # -2 表示倒数第三行
  6. < py file = !\test.py > < beg line = 5 > < end line = 0 > # '!\' or '!/' 表示'test.py'在TCAX的根目录下
  7. < py file = !\script\test.py > < beg line = 3 > < end line = 7 > #'test.py'在TCAX根目录的'script'文件夹中
复制代码
然后脚本将按照它们出现的顺序一个一个地执行。

如果在指定路径上找不到脚本,TCAX 将检查其程序的根目录,查看是否存在与您指定的脚本名称相同的脚本。
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-3-29 18:12

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH