CCExtractor / CCExtractor/ccextractor

Substation Alpha (SSA/ASS) output is not fully compliant with format specification

Đang mở
#2,310 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
903
Fork
589
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
10

Mô tả

Substation Alpha output produced by CCExtractor is correctly interpreted by most playback software, but is not _technically_ compliant with the format specification. Here is example output produced from [my previously uploaded DresdenTest.ts](https://1drv.ms/v/c/8b5ee05414946e03/IQDLLzwLvNY3RJi8rYvDN7PyAVTV7dC2YotrGHTGfnRkFUM?e=4YsJPQ):

```
Dialogue: 0,00:00:08.90,00:00:12.07,Default,,0000,0000,0000,,{\an7\pos(67,228)} - WHAT IS IT? \N - THIS WAS YOUR MOTHER'S.
Dialogue: 0,00:00:12.7,00:00:14.29,Default,,0000,0000,0000,,{\an7\pos(154,244)} GO AHEAD, OPEN IT.
```

The first issue is with the timing format. Substation Alpha timing format uses a fixed number of digits for all timings: two for all units **except the hours**, which are limited to one digit. All of the example lines use two digits for the hours rather than one. Additionally, the second line does not add the leading zero to the decimal for the start time, causing it to incorrectly be presented as starting at 12.70 seconds rather than 12.07 seconds. The correct format for the timings would be as follows:

```
Dialogue: 0,0:00:08.90,0:00:12.07,Default,,0000,0000,0000,,{\an7\pos(67,228)} - WHAT IS IT? \N - THIS WAS YOUR MOTHER'S.
Dialogue: 0,0:00:12.07,0:00:14.29,Default,,0000,0000,0000,,{\an7\pos(154,244)} GO AHEAD, OPEN IT.
```

Second, Substation Alpha does not use html tags for format changes, but rather its own formatting tags which can be applied mid-text like html, but unlike html **do not need to be followed by a corresponding close tag if the format persists to the end of the subtitle** since line formatting is reset to default with each new subtitle. Again, here is the current output produced from DresdenTest.ts:

```
Dialogue: 0,00:00:01.45,00:00:03.40,Default,,0000,0000,0000,,{\an7\pos(125,244)} ( opens chest )
Dialogue: 0,00:00:08.90,00:00:12.07,Default,,0000,0000,0000,,{\an7\pos(67,228)} - WHAT IS IT? \N - THIS WAS YOUR MOTHER'S.
Dialogue: 0,00:00:12.7,00:00:14.29,Default,,0000,0000,0000,,{\an7\pos(154,244)} GO AHEAD, OPEN IT.
Dialogue: 0,00:00:23.92,00:00:25.42,Default,,0000,0000,0000,,{\an7\pos(106,244)} THAT'S A SHIELD BRACELET.
Dialogue: 0,00:00:25.42,00:00:26.40,Default,,0000,0000,0000,,{\an7\pos(163,228)} I NEVER REALLY KNEW\N HOW IT WORKED,
```

To match Substation Alpha specification (including the timing issue mentioned above) the output should look as follows:

```
Dialogue: 0,0:00:01.45,0:00:03.40,Default,,0000,0000,0000,,{\an7\pos(125,244)} {\i1} ( opens chest )
Dialogue: 0,0:00:08.90,0:00:12.07,Default,,0000,0000,0000,,{\an7\pos(67,228)} - WHAT IS IT? \N - THIS WAS YOUR MOTHER'S.
Dialogue: 0,0:00:12.07,0:00:14.29,Default,,0000,0000,0000,,{\an7\pos(154,244)} {\i1} GO AHEAD, OPEN IT.
Dialogue: 0,0:00:23.92,0:00:25.42,Default,,0000,0000,0000,,{\an7\pos(106,244)} {\i1} THAT'S A SHIELD BRACELET.
Dialogue: 0,0:00:25.42,0:00:26.40,Default,,0000,0000,0000,,{\an7\pos(163,228)} {\i1} I NEVER REALLY KNEW{\i0}\N {\i1} HOW IT WORKED,
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.