WEBVTT
00:37.138 --> 00:38.990
<i>New Yorkers, a season high,
seven inches of rain last night.</i>
00:39.090 --> 00:42.076
<i>It looks like the storm has passed.</i>
I do cargo run, and i get this subs.ass:
[Script Info]
ScriptType: V4.00+
Synch Point:
WrapStyle: 0
PlayResY: 480
Title: subtitle
ScaledBorderAndShadows: yes
Script Updated By: rsubs lib
PlayResX: 640
Collisions: Normal
[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,Trebuchet MS,20,&H00FFFFFF,&H00000000,&H00000000,&H00000000,0,-1,-1,-1,120,120,0,0,1,1,1,2,0000,0000,0030,0
[Events]
Format: Layer,Start,End,Style,Name,MarginL,MarginR,MarginV,Effect,Text
Dialogue: 0,0:00:37.13,0:00:38.99,Default,,0000,0000,0000,,New Yorkers, a season high,
seven inches of rain last night.
Dialogue: 0,0:00:39.09,0:00:42.07,Default,,0000,0000,0000,,It looks like the storm has passed.
As you can see, the .ass file is losing rich-text informaion. <i> and </i> are being replaced with empty strings. (I think this happens inside replace_invalid_lines() in vtt.rs)
I'm my opinion we should replace <i>text</i> (that is found very often in .srt or .vtt files) with {\i1}text{\i0} (supported by .ass files)
We should write conversions somewhere, something like this:
I have this
main.rs
:and this
subs.vtt
:I do
cargo run
, and i get thissubs.ass
:As you can see, the .ass file is losing rich-text informaion.
<i>
and</i>
are being replaced with empty strings. (I think this happens insidereplace_invalid_lines()
invtt.rs
)I'm my opinion we should replace
<i>text</i>
(that is found very often in .srt or .vtt files) with{\i1}text{\i0}
(supported by .ass files) We should write conversions somewhere, something like this: