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

 找回密码
 新人加入
查看: 3290|回复: 17

[已解决] 新人不知哪里错 [复制链接]

Rank: 4

发表于 2014-4-19 21:26:40 |显示全部楼层
跟着那个例子,自己另外弄个视频,然后就出错了,有些直接复制,不知哪里错
QQ图片20140419212513.jpg

Rank: 4

发表于 2014-4-19 21:27:36 |显示全部楼层
センチメンタルラブ_k.ass



[Script Info]
; Script generated by Aegisub 2.1.9
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 1280
PlayResY: 720
ScaledBorderAndShadow: yes
Last Style Storage: Default
Video Aspect Ratio: 0
Video Zoom: 8
Video Position: 418
Audio File: ?video
Video File: ..\视频\「有你的小镇」OP主题曲MV+NCOP\「センチメンタルラブ」ミュージックビデオ.flv
Video Aspect Ratio: 0
Video Zoom: 8
Video Position: 320

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,DFPCraftYu-W7,30,&H00FF8A15,&HFF44D922,&H05FFFFFF,&HBEFFFFFF,-1,0,0,0,100,100,0,0,1,2,1,3,15,15,10,1
Style: Default2,DFPCraftYu-W7,30,&H00FF8A15,&HFF0000FF,&H05FFFFFF,&HBEFFFFFF,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:02.66,0:00:06.53,Default,,0000,0000,0000,,{\K42}ね{\K0} {\K0}{\K55}好{\K32}き{\K35}な{\K30}の{\K20} {\K0}{\K1}{\K20}気{\K58}付{\K27}い{\K48}て{\K19}た{\K0}
Dialogue: 0,0:00:06.53,0:00:09.77,Default,,0000,0000,0000,,{\K21}た{\K43}ぶん{\K46}キ{\K42}ミ{\K22}に{\K76}恋{\K14}し{\K28}て{\K32}る
Dialogue: 0,0:00:09.77,0:00:13.45,Default,,0000,0000,0000,,{\K40}ちっ{\K69}ぽ{\K24}け{\K66}で{\K46} {\K78}弱虫{\K45}な
Dialogue: 0,0:00:13.45,0:00:17.52,Default,,0000,0000,0000,,{\K91}セン{\K136}チメン{\K45}タ{\K45}ル{\K45}ラ{\K45}ブ
Dialogue: 0,0:00:31.96,0:00:36.32,Default,,0000,0000,0000,,{\K42}会い{\K47}たい {\K61}{\K4} {\K23}って{\K87}思う{\K110}瞬間{\K62}が
Dialogue: 0,0:00:36.32,0:00:38.32,Default,,0000,0000,0000,,

Rank: 4

发表于 2014-4-19 21:28:11 |显示全部楼层
linhao1105 发表于 2014-4-19 21:27
センチメンタルラブ_k.ass

センチメンタルラブ.tcc

# tcc file version

< tcc file version = 1.000 >


# mode configuration

< inherit ass header = false >
< k mode = syl >
< text layout = vertical >
< tcaxpy init = true >
< tcaxpy user = false >
< tcaxpy fin = false >


# py settings

< py file = センチメンタルラブ.py >    < beg line = 1 >    < end line = 0 >


# main settings

< k-timed ass file = センチメンタルラブ_k.ass >
< font file = cry7.TTC >    < font face id = 1 >    < font size = 30 >
< fx width = 1280 >    < fx height = 720 >    < fx fps = 23.976 >
< alignment = 3 >
< x offset = 30 >    < y offset = 15 >
< spacing = 0 >    < space scale = 1.000 >


# style settings

< font face name = "" >
< bord = 1 >    < shad = 0 >
< primary color = 158AFF >    < secondary color = 22D944 >    < outline color = 000000 >    < back color = 000000 >
< primary alpha = 0 >    < secondary alpha = 255 >    < outline alpha = 5 >    < back alpha = 190 >


# additional settings

< blur = 0.000 >


Rank: 4

发表于 2014-4-19 21:29:43 |显示全部楼层
linhao1105 发表于 2014-4-19 21:28
センチメンタルラブ.tcc

# tcc file version

センチメンタルラブ.py中的主要特效编写操作是复制的

def tcaxPy_Init():
    print('Tips: you can initialize your global variables here.')
    print('This function will be executed once if you set `< tcaxpy init = true >\'')
    print(GetHelp())


def tcaxPy_User():
    print('User defined function.')
    print('This function will be executed once if you set `< tcaxpy user = true >\'')
    print('Otherwise, tcaxPy_Main will be executed (many times)')


def tcaxPy_Fin():
    print('Tips: you can finalize your global variables here.')
    print('This function will be executed once if you set `< tcaxpy fin = true >\'')
    print('Note: you do not need to finalize the global variables got from function GetVal()')


def tcaxPy_Main(_i, _j, _n, _start, _end, _elapk, _k, _x, _y, _a, _txt):

    ASS_BUF  = []        # used for saving ASS FX lines
    TCAS_BUF = []        # used for saving TCAS FX raw data

    #############################
    # TODO: write your codes here #

if _i % 2 == 1:
        _x = _x - _Fs
        _y = _ResolutionY - _TextLength[_i] - _OffsetY + _TextAdvDiff[_i][_j]

    # 出现和消失效果
    if _i % 2 == 0:
        t0 = _start + 10 * _j - 90
        t1 = t0 + 50
        t2 = _end + 10 * (_n - _j - 1) + 40
        t3 = t2 + 50

        MOVE = move(_x - _Fs, _y + _TextLength[_i] / 2, _x, _y, 0, 500)
        EFT = fs(_Fs * 1.5) + alpha(200) + animation2(0, 500, 1.2, fs(_Fs) + alpha(0))
        ass_main(ASS_BUF, SubL(t0, t1), MOVE + EFT, _txt)

        MOVE = move(_x, _y, _x - _Fs, _y + _TextLength[_i] / 2, 0, 500)
        EFT = alpha(0) + animation2(0, 500, 0.8, fs(_Fs / 3) + alpha(200))
        ass_main(ASS_BUF, SubL(t2, t3), MOVE + EFT, _txt)
    else:
        t0 = _start - 10 * _j - 90
        t1 = t0 + 50
        t2 = _end - 10 * (_n - _j - 1) + 40
        t3 = t2 + 50

        MOVE = move(_x + _Fs, _y - _TextLength[_i] / 2, _x, _y, 0, 500)
        EFT = fs(_Fs / 3) + alpha(200) + animation2(0, 500, 1.2, fs(_Fs) + alpha(0))
        ass_main(ASS_BUF, SubL(t0, t1), MOVE + EFT, _txt)

        MOVE = move(_x, _y, _x + _Fs, _y - _TextLength[_i] / 2, 0, 500)
        EFT = alpha(0) + animation2(0, 500, 0.8, fs(_Fs * 1.5) + alpha(200))
        ass_main(ASS_BUF, SubL(t2, t3), MOVE + EFT, _txt)

    # 存在效果
    ass_main(ASS_BUF, SubL(t1, t2), pos(_x, _y) + blur(3), _txt)

    # 卡拉OK表现效果
    ts = _start + _elapk
    te = ts + _k
    EFT = alpha1(0) + color3('FFFFFF') + alpha3(50) + animation1(0, 3 * _k, bord(10) + blur(5) + alpha3(150))
    ass_main(ASS_BUF, SubL(Start = ts, End = te, Layer = 2), pos(_x, _y) + EFT, _txt)
    EFT = alpha1(0) + color3('FFFFFF') + alpha3(50) + animation1(3 * _k, 6 * _k, bord(10) + blur(5) + alpha3(150))
    ass_main(ASS_BUF, SubL(Start = ts, End = te, Layer = 2), pos(_x, _y) + EFT, _txt)
    EFT = alpha1(0) + color3('FFFFFF') + alpha3(50) + animation1(6 * _k, 9 * _k, bord(10) + blur(5) + alpha3(150))
    ass_main(ASS_BUF, SubL(Start = ts, End = te, Layer = 2), pos(_x, _y) + EFT, _txt)

    EFT = bord(0) + color1('FFFFFF') + animation1(0, 3 * _k, color1('6C4C9B')) + animation1(3 * _k, 6 * _k, color1('AAAAAA')) + animation1(6 * _k, 9 * _k, color1('6C4C9B'))
    ass_main(ASS_BUF, SubL(Start = ts, End = te, Layer = 2), pos(_x, _y) + EFT, _txt)


    #############################

    return (ASS_BUF, TCAS_BUF)




Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2014-4-19 21:58:35 |显示全部楼层
linhao1105 发表于 2014-4-19 21:29
センチメンタルラブ.py中的主要特效编写操作是复制的

def tcaxPy_Init():

py脚本的名字不能是非英文字符.
改成 sentimental_love.py即可

Rank: 4

发表于 2014-4-19 22:23:37 |显示全部楼层
milkyjing 发表于 2014-4-19 21:58
py脚本的名字不能是非英文字符.
改成 sentimental_love.py即可

噢~~

Rank: 4

发表于 2014-4-19 22:26:08 |显示全部楼层
milkyjing 发表于 2014-4-19 21:58
py脚本的名字不能是非英文字符.
改成 sentimental_love.py即可

弄出来后变成了只有特效没字幕

Moderator

疯子

Rank: 5Rank: 5

发表于 2014-4-19 22:32:32 |显示全部楼层
linhao1105 发表于 2014-4-19 22:26
弄出来后变成了只有特效没字幕

你的图挂了

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2014-4-19 22:33:42 |显示全部楼层
linhao1105 发表于 2014-4-19 22:26
弄出来后变成了只有特效没字幕

图片挂了, 只有特效没字幕是啥意思

Rank: 4

发表于 2014-4-19 22:38:23 |显示全部楼层
就是这样
QQ图片20140419222523.jpg

Rank: 4

发表于 2014-4-19 22:39:15 |显示全部楼层
milkyjing 发表于 2014-4-19 22:33
图片挂了, 只有特效没字幕是啥意思

大大,就是下面那样,只有特效,字没了

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2014-4-19 22:42:46 |显示全部楼层
linhao1105 发表于 2014-4-19 22:39
大大,就是下面那样,只有特效,字没了

TCC文件或者py文件用错了吧... 检查一下名字和内容..

Moderator

疯子

Rank: 5Rank: 5

发表于 2014-4-19 22:45:32 |显示全部楼层
linhao1105 发表于 2014-4-19 22:38
就是这样

这个效果我写的时候没给里面加文字效果的,内置预览是我加了别的内置特效

Rank: 4

发表于 2014-4-19 22:48:41 |显示全部楼层
渣渣疯子 发表于 2014-4-19 22:45
这个效果我写的时候没给里面加文字效果的,内置预览是我加了别的内置特效 ...

那我该怎么加文字效果啊,小白一只啊,不懂

Moderator

疯子

Rank: 5Rank: 5

发表于 2014-4-19 22:54:28 |显示全部楼层
linhao1105 发表于 2014-4-19 22:48
那我该怎么加文字效果啊,小白一只啊,不懂

用别的内置,或者学习自己编写代码,脚本内底下一行test word,你把最前面的#去掉,这行代码就能产生最简单的文字

Rank: 4

发表于 2014-4-19 23:00:07 |显示全部楼层
渣渣疯子 发表于 2014-4-19 22:54
用别的内置,或者学习自己编写代码,脚本内底下一行test word,你把最前面的#去掉,这行代码就能产生最简 ...

还真行了,我试写了一次,好难啊,不知怎么开始学,写好久最后tcax还读不出来啊

Moderator

疯子

Rank: 5Rank: 5

发表于 2014-4-19 23:01:40 |显示全部楼层
linhao1105 发表于 2014-4-19 23:00
还真行了,我试写了一次,好难啊,不知怎么开始学,写好久最后tcax还读不出来啊 ...

http://www.tcax.org/forum.php?mo ... p;tid=1000#lastpost这里就有论坛的教程汇总,耐住性子去好好看看,应该能帮你解决问题的

Rank: 4

发表于 2014-4-19 23:02:35 |显示全部楼层
渣渣疯子 发表于 2014-4-19 23:01
http://www.tcax.org/forum.php?mod=viewthread&tid=1000#lastpost这里就有论坛的教程汇总,耐住性子 ...

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

GitHub|TCAX 主页

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

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH