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

 找回密码
 新人加入
查看: 9425|回复: 0
打印 上一主题 下一主题

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.





您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-5-2 15:51

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH