CCExtractor / CCExtractor/ccextractor

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

Ouverte
#2,310 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C
Étoiles
903
Forks
589
Merge moyen
3 j 2 h
PR mergées (30 j)
10

Description

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,
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.