You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:用Advanced SubStation Alpha实现逐词高亮动画遇显示异常

解决ASS逐词高亮字幕异常问题(附Hormozi风格实现方案)

问题根源分析

你当前的ASS代码存在以下核心问题:

  • 时间轴混乱:多个Dialogue的结束时间早于开始时间(如0:00:09.88到0:00:01.48),导致字幕显示顺序错乱、重叠
  • 位置错误:硬编码横屏中心坐标\pos(640,480),与竖屏1080x1920的适配完全不符,且重复设置导致所有字幕堆叠
  • 冗余文本:每个Dialogue重复全量句子,未控制显示时间段,引发文本重叠
  • 颜色代码冗余:白色代码\c&H00FFFFFF&中的前两位00是Alpha通道(不透明可省略),正确格式为\c&HFFFFFF&

修正后的完整ASS代码

包含适配竖屏的Hormozi风格样式,以及正确的逐词高亮时间轴:

[Script Info]
Title: Hormozi Style Word-by-Word Subtitles
ScriptType: v4.00+
PlayResX: 1080
PlayResY: 1920
WrapStyle: 0
ScaledBorderAndShadow: yes

[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,Anton,72,&H00FFFFFF,&H000000FF,&H00000000,&H80000000,-1,0,0,0,100,100,0,0,1,2,4,5,40,40,60,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:02.48,0:00:03.28,Default,,0,0,0,,{\c&H00FF00&}In{\c&HFFFFFF&} the tapestry of time, a visitor from shadows past shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:03.28,0:00:04.28,Default,,0,0,0,,In {\c&H00FF00&}the{\c&HFFFFFF&} tapestry of time, a visitor from shadows past shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:04.28,0:00:09.68,Default,,0,0,0,,In the {\c&H00FF00&}tapestry{\c&HFFFFFF&} of time, a visitor from shadows past shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:09.68,0:00:10.48,Default,,0,0,0,,In the tapestry {\c&H00FF00&}of{\c&HFFFFFF&} time, a visitor from shadows past shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:10.48,0:00:14.89,Default,,0,0,0,,In the tapestry of {\c&H00FF00&}time{\c&HFFFFFF&}, a visitor from shadows past shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:14.89,0:00:18.49,Default,,0,0,0,,In the tapestry of time, {\c&H00FF00&}a{\c&HFFFFFF&} visitor from shadows past shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:18.49,0:00:21.29,Default,,0,0,0,,In the tapestry of time, a {\c&H00FF00&}visitor{\c&HFFFFFF&} from shadows past shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:21.29,0:00:25.49,Default,,0,0,0,,In the tapestry of time, a visitor {\c&H00FF00&}from{\c&HFFFFFF&} shadows past shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:25.49,0:00:29.49,Default,,0,0,0,,In the tapestry of time, a visitor from {\c&H00FF00&}shadows{\c&HFFFFFF&} past shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:29.49,0:00:32.89,Default,,0,0,0,,In the tapestry of time, a visitor from shadows {\c&H00FF00&}past{\c&HFFFFFF&} shall emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:32.89,0:00:36.61,Default,,0,0,0,,In the tapestry of time, a visitor from shadows past {\c&H00FF00&}shall{\c&HFFFFFF&} emerge, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:36.61,0:00:40.09,Default,,0,0,0,,In the tapestry of time, a visitor from shadows past shall {\c&H00FF00&}emerge{\c&HFFFFFF&}, igniting flames of forgotten yearnings.
Dialogue: 0,0:00:40.09,0:00:43.57,Default,,0,0,0,,In the tapestry of time, a visitor from shadows past shall emerge, {\c&H00FF00&}igniting{\c&HFFFFFF&} flames of forgotten yearnings.
Dialogue: 0,0:00:43.57,0:00:46.97,Default,,0,0,0,,In the tapestry of time, a visitor from shadows past shall emerge, igniting {\c&H00FF00&}flames{\c&HFFFFFF&} of forgotten yearnings.
Dialogue: 0,0:00:46.97,0:00:49.09,Default,,0,0,0,,In the tapestry of time, a visitor from shadows past shall emerge, igniting flames {\c&H00FF00&}of{\c&HFFFFFF&} forgotten yearnings.
Dialogue: 0,0:00:49.09,0:00:52.55,Default,,0,0,0,,In the tapestry of time, a visitor from shadows past shall emerge, igniting flames of {\c&H00FF00&}forgotten{\c&HFFFFFF&} yearnings.
Dialogue: 0,0:00:52.55,0:00:58.31,Default,,0,0,0,,In the tapestry of time, a visitor from shadows past shall emerge, igniting flames of forgotten {\c&H00FF00&}yearnings{\c&HFFFFFF&}.

关键修正说明

  1. 适配竖屏:在[Script Info]中设置PlayResX:1080和PlayResY:1920,Style里设置Alignment:5(屏幕中心居中),无需手动加\pos
  2. Hormozi风格样式:使用粗体无衬线字体(Anton)、大字号(72)、深色阴影(增强视觉冲击力),符合Hormozi字幕的醒目特点
  3. 修复时间轴:将所有Dialogue的时间轴调整为连续且递增,避免重叠和倒序
  4. 简化颜色代码:绿色用\c&H00FF00&(BGR格式,对应RGB的#00FF00),白色用\c&HFFFFFF&

FFmpeg烧录注意事项

保持原命令不变,但需确保ASS文件与视频文件在同一目录下:

ffmpeg -i FortuneTeller1.mp4 -vf "ass=FortuneTeller1.ass" Subtitled.mp4

内容的提问来源于stack exchange,提问作者Nick Powers

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 06:49:52