Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.ass 字幕样式导入 + .ass 字幕导出功能支持 #16

Open
Graysonnwu opened this issue Dec 31, 2023 · 2 comments
Open

.ass 字幕样式导入 + .ass 字幕导出功能支持 #16

Graysonnwu opened this issue Dec 31, 2023 · 2 comments

Comments

@Graysonnwu
Copy link

.ass 字幕样式导入

可以在这里加入一个ass字幕样式导入吗?最好能同时设置原文样式与翻译后样式。(Aegisub与Arctime Pro都有该功能)

image

结构大概如下(这是我自己常用的):

Style: ENG,Reforma1969-Negra,54,&H00FFFFFF,&H00000000,&H00000000,&H00000000,0,0,0,0,94,100,0,0,1,3,3,2,15,15,10,1
Style: CHN,Alibaba PuHuiTi 2.0,80,&H00FFFFFF,&H0055060A,&H0055060A,&H00000000,-1,0,0,0,98,100,0,0,1,4.5,3,2,15,15,56,1

.ass 字幕导出

我帮忙写了一个脚本,可以作为默认模板。ass字幕对于各大字幕组来说还是比较常用的

[Script Info]
; generated by Whisper Mate
; time: {{ time1 }}
Title: {{ projectName }}
ScriptType: v4.00+
WrapStyle: 2
ScaledBorderAndShadow: yes
PlayResX: {{ videoWidth }}
PlayResY: {{ videoHeight }}

[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: ENG,Reforma1969-Negra,54,&H00FFFFFF,&H00000000,&H00000000,&H00000000,0,0,0,0,94,100,0,0,1,3,3,2,15,15,10,1
Style: CHN,Alibaba PuHuiTi 2.0,80,&H00FFFFFF,&H0055060A,&H0055060A,&H00000000,-1,0,0,0,98,100,0,0,1,4.5,3,2,15,15,56,1
; 上面替换为用户自定义的字幕样式

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text{% for st in subtitles %}
Dialogue: 1,{{ st.t0f5 }},{{ st.t1f5 }},ENG,{{ st.speakers }},0,0,0,,{{ st.text }}{% if st.text1 != "" %}
Dialogue: 2,{{ st.t0f5 }},{{ st.t1f5 }},CHN,{{ st.speakers }},0,0,0,,{{ st.text1 }}{% endif %}{% endfor %}

@Marksdo
Copy link
Owner

Marksdo commented Jan 1, 2024

谢谢帮忙写的脚本,我看下怎么在下个版本加进来

@Marksdo
Copy link
Owner

Marksdo commented Jan 20, 2024

image .ass style format is now support in previewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants