@torrent-tv/proxy 2.73.1 → 2.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1447 -1437
- package/CLAUDE.md +165 -160
- package/docs/container-architecture.md +192 -184
- package/package.json +1 -1
- package/routes/api/subtitles/get.js +205 -205
- package/services/container/Container.js +354 -135
- package/services/container/MatroskaContainer.js +1155 -516
- package/services/container/Mp4Container.js +858 -392
- package/services/container/SubtitleFileContainer.js +323 -261
- package/services/controllers/SubtitleController.js +128 -127
- package/services/delivery-probe.js +64 -6
- package/services/hls-session-manager.js +32 -35
- package/services/language-detect.js +174 -228
- package/services/playback-planner.js +747 -747
- package/services/produced-index.js +300 -0
- package/services/torrent-worker/subtitle-cues.js +582 -633
- package/services/tracks/TextSubtitleTrack.js +287 -47
- package/services/tracks/index.js +14 -14
- package/test/delivery-probe.test.js +67 -0
- package/test/matroska-blocks.test.js +0 -0
- package/test/mp4-subtitles.test.js +173 -127
- package/test/produced-index.test.js +188 -0
- package/test/subtitle-cue-framing.test.js +200 -202
- package/test/subtitle-cue-walk.test.js +369 -0
- package/test/subtitle-defaults.test.js +97 -97
- package/test/subtitle-language.test.js +252 -252
- package/test/subtitle-track-numbering.test.js +370 -370
- package/services/container-index/matroska-blocks.js +0 -202
- package/services/container-index/matroska-subtitles.js +0 -372
- package/services/container-index/mp4-subtitles.js +0 -404
- package/services/subtitle-convert.js +0 -144
- package/services/subtitle-defaults.js +0 -157
- package/services/tracks/subtitle-markup.js +0 -104
|
@@ -1,184 +1,192 @@
|
|
|
1
|
-
# Container & Track architecture
|
|
2
|
-
|
|
3
|
-
Domain → Application → Interface, per RFC 9559 (Matroska) and ISO/IEC 14496-12 (MP4).
|
|
4
|
-
|
|
5
|
-
## Two axes, and what is NOT a third
|
|
6
|
-
|
|
7
|
-
Everything here is placed on exactly two axes: **which container** a track lives
|
|
8
|
-
in, and **what kind of track** it is (video / audio / subtitle). A file lying
|
|
9
|
-
beside the video — a dub as `<name>.mka`, subtitles as `<name>.ass` — is not a
|
|
10
|
-
third kind of anything:
|
|
11
|
-
|
|
12
|
-
- a `.mka` **is** Matroska. `ContainerFactory` sniffs it, `MatroskaContainer`
|
|
13
|
-
reads its `TrackEntry` list, and out comes an `AudioTrack` with its language,
|
|
14
|
-
title and flags. It differs from the picture's own file only in having no
|
|
15
|
-
video track. The same holds for `.m4a` and `Mp4Container`;
|
|
16
|
-
- "external" is therefore not a TYPE. It is the answer to WHERE a track's bytes
|
|
17
|
-
are, and that is torrent knowledge — which this layer must not have
|
|
18
|
-
(`ContainerFactory`: no torrent knowledge; `ContainerOrchestrator`:
|
|
19
|
-
transport-agnostic). The pairing of a sidecar file with a picture lives in
|
|
20
|
-
`services/sidecar-files.js`, and the numbered list a viewer chooses from lives
|
|
21
|
-
in `services/audio-inventory.js`. Both are pure and both are application-layer.
|
|
22
|
-
|
|
23
|
-
A class called `ExternalSubtitleFile` used to sit in `tracks/` asserting the
|
|
24
|
-
opposite. It did not extend `ContainerTrack`, duplicated four of its fields, and
|
|
25
|
-
was imported by nothing; it was deleted rather than extended. Nothing replaced
|
|
26
|
-
it — a subtitle file beside the video is a `TextSubtitleTrack` whose bytes are
|
|
27
|
-
read from another file, and a raw `.srt` needs no `Container` subclass because
|
|
28
|
-
it has no track table and no index to read: the whole file is the payload, and
|
|
29
|
-
`SubtitleController` already reads it as such.
|
|
30
|
-
|
|
31
|
-
## Who answers what — the rule
|
|
32
|
-
|
|
33
|
-
A fact the container DECLARES is read from the container. A fact only the media
|
|
34
|
-
itself has is measured from the media, which means ffmpeg.
|
|
35
|
-
|
|
36
|
-
That is the whole boundary, and it is not about speed. Speed is a consequence:
|
|
37
|
-
this layer asks for the smallest region that holds the answer — 64 KB of header,
|
|
38
|
-
the Cues block, a sample table — while ffmpeg cannot be asked for a bounded
|
|
39
|
-
region at all. Its input analysis pulls megabytes before it will say anything,
|
|
40
|
-
and over a torrent those megabytes may not exist yet. Measured 2026-09-03 on one
|
|
41
|
-
`.mka`: this layer read its header in **8 ms**, and an ffmpeg reading the same
|
|
42
|
-
header of the same file through the proxy's own `/stream`, in the same second,
|
|
43
|
-
took **8121 ms** — and spent all of it waiting for a DURATION its caller did not
|
|
44
|
-
want, because its early exit is gated on one.
|
|
45
|
-
|
|
46
|
-
So ffmpeg keeps exactly three jobs, and nothing else:
|
|
47
|
-
|
|
48
|
-
1. producing media — the encode run;
|
|
49
|
-
2. measuring THIS MACHINE — encoder detection and its strict test, decode
|
|
50
|
-
calibration, the contention penalty;
|
|
51
|
-
3. answering what the container does not declare — above all keyframe positions
|
|
52
|
-
in a container with no index, where a packet scan is the only source. Even
|
|
53
|
-
there the container is asked FIRST: measured, the container index gave 570
|
|
54
|
-
keyframes in 0.8 s from two point reads of 16 KB, while a scan of the same
|
|
55
|
-
file found 77 in 45 s and did not finish.
|
|
56
|
-
|
|
57
|
-
`null` in `ContainerMediaInfo` means the container does not declare the field.
|
|
58
|
-
That is a final answer about the container, and the point at which a caller may
|
|
59
|
-
go to the media — not "unknown, ask again".
|
|
60
|
-
|
|
61
|
-
## Where byte access lives, and why not on a track
|
|
62
|
-
|
|
63
|
-
A `ContainerTrack` is a DECLARATION. It carries no `readRange` and no file
|
|
64
|
-
identity, and it should not: byte access is the `Container`'s, injected as
|
|
65
|
-
`readRange(start, end)` and bound to one file.
|
|
66
|
-
|
|
67
|
-
The obvious-looking improvement — hand the track a reader so it can fetch its own
|
|
68
|
-
bytes — was reviewed on 2026-09-03 and is **not** the right shape:
|
|
69
|
-
|
|
70
|
-
- for video and audio, this layer never reads the payload at all. It goes to
|
|
71
|
-
ffmpeg by URL, where seeking and gigabytes belong. A `readRange` on a
|
|
72
|
-
`VideoTrack` would be a capability with no consumer, inviting reads of a size
|
|
73
|
-
this path is not built for;
|
|
74
|
-
- tracks cross the worker boundary as PLAIN OBJECTS (`plainTrack()`), because a
|
|
75
|
-
class instance does not survive it as a class. A back-reference to a container
|
|
76
|
-
cannot cross either, so such a track would be able to read its own bytes only
|
|
77
|
-
on the thread where the container is already at hand.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
`
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
SF
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
PC
|
|
134
|
-
SC
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
|
147
|
-
|
|
148
|
-
| `
|
|
149
|
-
| `
|
|
150
|
-
| `
|
|
151
|
-
| `
|
|
152
|
-
| `
|
|
153
|
-
| `
|
|
154
|
-
| `
|
|
155
|
-
|
|
156
|
-
`
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
`
|
|
168
|
-
|
|
169
|
-
##
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
|
180
|
-
|
|
181
|
-
| `
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
1
|
+
# Container & Track architecture
|
|
2
|
+
|
|
3
|
+
Domain → Application → Interface, per RFC 9559 (Matroska) and ISO/IEC 14496-12 (MP4).
|
|
4
|
+
|
|
5
|
+
## Two axes, and what is NOT a third
|
|
6
|
+
|
|
7
|
+
Everything here is placed on exactly two axes: **which container** a track lives
|
|
8
|
+
in, and **what kind of track** it is (video / audio / subtitle). A file lying
|
|
9
|
+
beside the video — a dub as `<name>.mka`, subtitles as `<name>.ass` — is not a
|
|
10
|
+
third kind of anything:
|
|
11
|
+
|
|
12
|
+
- a `.mka` **is** Matroska. `ContainerFactory` sniffs it, `MatroskaContainer`
|
|
13
|
+
reads its `TrackEntry` list, and out comes an `AudioTrack` with its language,
|
|
14
|
+
title and flags. It differs from the picture's own file only in having no
|
|
15
|
+
video track. The same holds for `.m4a` and `Mp4Container`;
|
|
16
|
+
- "external" is therefore not a TYPE. It is the answer to WHERE a track's bytes
|
|
17
|
+
are, and that is torrent knowledge — which this layer must not have
|
|
18
|
+
(`ContainerFactory`: no torrent knowledge; `ContainerOrchestrator`:
|
|
19
|
+
transport-agnostic). The pairing of a sidecar file with a picture lives in
|
|
20
|
+
`services/sidecar-files.js`, and the numbered list a viewer chooses from lives
|
|
21
|
+
in `services/audio-inventory.js`. Both are pure and both are application-layer.
|
|
22
|
+
|
|
23
|
+
A class called `ExternalSubtitleFile` used to sit in `tracks/` asserting the
|
|
24
|
+
opposite. It did not extend `ContainerTrack`, duplicated four of its fields, and
|
|
25
|
+
was imported by nothing; it was deleted rather than extended. Nothing replaced
|
|
26
|
+
it — a subtitle file beside the video is a `TextSubtitleTrack` whose bytes are
|
|
27
|
+
read from another file, and a raw `.srt` needs no `Container` subclass because
|
|
28
|
+
it has no track table and no index to read: the whole file is the payload, and
|
|
29
|
+
`SubtitleController` already reads it as such.
|
|
30
|
+
|
|
31
|
+
## Who answers what — the rule
|
|
32
|
+
|
|
33
|
+
A fact the container DECLARES is read from the container. A fact only the media
|
|
34
|
+
itself has is measured from the media, which means ffmpeg.
|
|
35
|
+
|
|
36
|
+
That is the whole boundary, and it is not about speed. Speed is a consequence:
|
|
37
|
+
this layer asks for the smallest region that holds the answer — 64 KB of header,
|
|
38
|
+
the Cues block, a sample table — while ffmpeg cannot be asked for a bounded
|
|
39
|
+
region at all. Its input analysis pulls megabytes before it will say anything,
|
|
40
|
+
and over a torrent those megabytes may not exist yet. Measured 2026-09-03 on one
|
|
41
|
+
`.mka`: this layer read its header in **8 ms**, and an ffmpeg reading the same
|
|
42
|
+
header of the same file through the proxy's own `/stream`, in the same second,
|
|
43
|
+
took **8121 ms** — and spent all of it waiting for a DURATION its caller did not
|
|
44
|
+
want, because its early exit is gated on one.
|
|
45
|
+
|
|
46
|
+
So ffmpeg keeps exactly three jobs, and nothing else:
|
|
47
|
+
|
|
48
|
+
1. producing media — the encode run;
|
|
49
|
+
2. measuring THIS MACHINE — encoder detection and its strict test, decode
|
|
50
|
+
calibration, the contention penalty;
|
|
51
|
+
3. answering what the container does not declare — above all keyframe positions
|
|
52
|
+
in a container with no index, where a packet scan is the only source. Even
|
|
53
|
+
there the container is asked FIRST: measured, the container index gave 570
|
|
54
|
+
keyframes in 0.8 s from two point reads of 16 KB, while a scan of the same
|
|
55
|
+
file found 77 in 45 s and did not finish.
|
|
56
|
+
|
|
57
|
+
`null` in `ContainerMediaInfo` means the container does not declare the field.
|
|
58
|
+
That is a final answer about the container, and the point at which a caller may
|
|
59
|
+
go to the media — not "unknown, ask again".
|
|
60
|
+
|
|
61
|
+
## Where byte access lives, and why not on a track
|
|
62
|
+
|
|
63
|
+
A `ContainerTrack` is a DECLARATION. It carries no `readRange` and no file
|
|
64
|
+
identity, and it should not: byte access is the `Container`'s, injected as
|
|
65
|
+
`readRange(start, end)` and bound to one file.
|
|
66
|
+
|
|
67
|
+
The obvious-looking improvement — hand the track a reader so it can fetch its own
|
|
68
|
+
bytes — was reviewed on 2026-09-03 and is **not** the right shape:
|
|
69
|
+
|
|
70
|
+
- for video and audio, this layer never reads the payload at all. It goes to
|
|
71
|
+
ffmpeg by URL, where seeking and gigabytes belong. A `readRange` on a
|
|
72
|
+
`VideoTrack` would be a capability with no consumer, inviting reads of a size
|
|
73
|
+
this path is not built for;
|
|
74
|
+
- tracks cross the worker boundary as PLAIN OBJECTS (`plainTrack()`), because a
|
|
75
|
+
class instance does not survive it as a class. A back-reference to a container
|
|
76
|
+
cannot cross either, so such a track would be able to read its own bytes only
|
|
77
|
+
on the thread where the container is already at hand.
|
|
78
|
+
|
|
79
|
+
**That split is closed.** `SubtitleTrack` carries `clusterPositions` and
|
|
80
|
+
`samples` — byte POSITIONS — and the reading of those positions is now the
|
|
81
|
+
container's: `MatroskaContainer.walkHeldClusters(plan, walked)` and
|
|
82
|
+
`Mp4Container.readHeldSamples(track, harvested)`, beside `readTracks`,
|
|
83
|
+
`readKeyframeIndex`, `readMediaInfo` and `cueTextOf`.
|
|
84
|
+
|
|
85
|
+
The obstacle was real and this is how it was answered. The two readers want
|
|
86
|
+
different read POLICIES over the same file: the track table fetches what is
|
|
87
|
+
missing from the swarm, while the cue walk deliberately reads only what is
|
|
88
|
+
already downloaded, so that turning subtitles on never pulls bytes the viewer is
|
|
89
|
+
not waiting for. A container is now built with BOTH — `readRange` that fetches,
|
|
90
|
+
`readHeld` that does not, and `isHeld` that says whether a range can be read
|
|
91
|
+
without fetching — so one instance per file serves both readers and the per-file
|
|
92
|
+
cache is kept.
|
|
93
|
+
|
|
94
|
+
What the container is NOT given is the torrent. Those three functions are the
|
|
95
|
+
whole of what the caller knows and the container does not, and reducing the
|
|
96
|
+
torrent to them is what lets the reading live where the format is specified.
|
|
97
|
+
`torrent-worker/subtitle-cues.js` supplies them (`containerOver`) and keeps only
|
|
98
|
+
what is genuinely its own: the found-order cursor a browser follows, the
|
|
99
|
+
per-file state, and one walk of a file at a time.
|
|
100
|
+
|
|
101
|
+
## Layers
|
|
102
|
+
|
|
103
|
+
```mermaid
|
|
104
|
+
flowchart TB
|
|
105
|
+
subgraph Domain
|
|
106
|
+
C[Container<br/>abstract<br/>RFC9559 / 14496-12]
|
|
107
|
+
MC[MatroskaContainer]
|
|
108
|
+
MpC[Mp4Container]
|
|
109
|
+
AC[AviContainer]
|
|
110
|
+
CT[ContainerTrack<br/>isEnabled/isDefault/language]
|
|
111
|
+
VT[VideoTrack]
|
|
112
|
+
AT[AudioTrack]
|
|
113
|
+
ST[SubtitleTrack]
|
|
114
|
+
TST[TextSubtitleTrack<br/>S_TEXT/UTF8 tx3g wvtt]
|
|
115
|
+
IST[ImageSubtitleTrack<br/>PGS VobSub subp]
|
|
116
|
+
C --> MC & MpC & AC
|
|
117
|
+
CT --> VT & AT & ST
|
|
118
|
+
ST --> TST & IST
|
|
119
|
+
MC & MpC & AC -- readTracks --> CT
|
|
120
|
+
end
|
|
121
|
+
subgraph Application
|
|
122
|
+
CF[ContainerFactory<br/>detect 16 bytes]
|
|
123
|
+
CO[ContainerOrchestrator<br/>cache + getTracks/getKeyframeIndex]
|
|
124
|
+
SO[SubtitleOrchestrator<br/>cursor + per-file state]
|
|
125
|
+
SF[sidecar-files.js<br/>which file goes with which]
|
|
126
|
+
AI[audio-inventory.js<br/>one flat numbering]
|
|
127
|
+
CF --> CO
|
|
128
|
+
CO --> SO
|
|
129
|
+
SF --> AI
|
|
130
|
+
CO --> AI
|
|
131
|
+
end
|
|
132
|
+
subgraph Interface
|
|
133
|
+
PC[PlaybackController]
|
|
134
|
+
SC[SubtitleController]
|
|
135
|
+
R1[routes/api/playback-plan]
|
|
136
|
+
R2[routes/api/subtitles]
|
|
137
|
+
PC --> R1
|
|
138
|
+
SC --> R2
|
|
139
|
+
CO --> PC
|
|
140
|
+
SO --> SC
|
|
141
|
+
end
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Class responsibilities (spec-grounded)
|
|
145
|
+
|
|
146
|
+
| Class | Spec section | Fields | Not responsible |
|
|
147
|
+
|---|---|---|---|
|
|
148
|
+
| `ContainerTrack` | RFC9559 TrackEntry common + ISO 14496-12 tkhd/mdhd/hdlr/elng | `trackNumber`, `declaredIndex`, `codecId`, `language`/`languageBcp47` (MUST rule), `name`, `isEnabled` (0xB9 / track_enabled), `isDefault`+`declaresDefault` (0x88) | Type-specific flags |
|
|
149
|
+
| `VideoTrack` | RFC9559 Video, ISO 14496-12 tkhd width/height, stsd | `width/height/display*`, `fps`, `isHdr`, `bitDepth` | Subtitle flags |
|
|
150
|
+
| `AudioTrack` | RFC9559 FlagOriginal 0x55AE, FlagCommentary 0x55AF, FlagVisualImpaired 0x55AC | `isOriginal/isCommentary/isVisualImpaired`, `channels/samplingFrequency` | FlagForced |
|
|
151
|
+
| `SubtitleTrack` | RFC9559 FlagForced 0x55AA (subtitle-only), FlagHearingImpaired 0x55AB | `isForced/isHearingImpaired`, `clusterPositions`/`samples` | Video dims |
|
|
152
|
+
| `TextSubtitleTrack` | `S_TEXT/UTF8, S_TEXT/ASS, tx3g, wvtt` | `toVtt()` convertible | Image tracks |
|
|
153
|
+
| `sidecar-files.js` | — (torrent naming) | which files of a torrent are one picture's sound and subtitles | what is inside them |
|
|
154
|
+
| `audio-inventory.js` | RFC9559 audio flags, merged against ffmpeg's numbering | one flat number per soundtrack → `(fileIndex, 0:a:N)` | display labels |
|
|
155
|
+
| `ImageSubtitleTrack` | `S_HDMV/PGS, S_VOBSUB, subp, clcp` | kept for `declaredIndex` alignment | Conversion |
|
|
156
|
+
| `MatroskaContainer` | RFC9559 SeekHead, Tracks, Cues, Clusters | single Tracks walk for all types, EBML via `ebml-reader.js` | HTTP |
|
|
157
|
+
| `Mp4Container` | ISO 14496-12 moov/trak/tkhd/mdhd/hdlr/elng/stbl | `alternate_group` grouping, packed language, `tx3g` forced bits | Torrent |
|
|
158
|
+
| `AviContainer` | RIFF AVI idx1 | `AVIIF_KEYFRAME` keyframe times | Tracks beyond video |
|
|
159
|
+
|
|
160
|
+
`VideoTrack` never carries `isForced` — spec states FlagForced "Applies only to subtitles". Placing it in base would pollute video with irrelevant state.
|
|
161
|
+
|
|
162
|
+
## Orchestrators & Controllers
|
|
163
|
+
|
|
164
|
+
- `ContainerFactory.create({readRange,fileSize})` — sniffs 16 bytes, returns precise `Container` subclass. No torrent knowledge.
|
|
165
|
+
- `ContainerOrchestrator` — per-file cache (`sourceKey:fileIndex`), `getTracks()` / `getKeyframeIndex()`. Transport-agnostic.
|
|
166
|
+
- `SubtitleOrchestrator` — wraps `torrent-worker/subtitle-cues.js` (`planFor`, `cuesHeldFor`, `warmSubtitleCues`) behind the `ContainerTrack` abstraction. Routes depend on this, not on the worker directly. The reading itself is the containers' — that module supplies the torrent's read policy and keeps the cursor.
|
|
167
|
+
- `PlaybackController` / `SubtitleController` — thin interface adapters; `routes/api/*` delegate to them, handle HTTP headers (`X-Subtitle-Language`, `X-Subtitle-Cursor`) only.
|
|
168
|
+
|
|
169
|
+
## Legacy
|
|
170
|
+
|
|
171
|
+
`services/container-index/` holds what is NOT specific to one media kind: EBML
|
|
172
|
+
element walking, and the Matroska/MP4/AVI keyframe tables. Everything a container
|
|
173
|
+
states about its own subtitles — the track table, the Cues, the blocks in a
|
|
174
|
+
cluster, the sample table — is in the container class itself. Direct imports from
|
|
175
|
+
routes are deprecated — use `orchestrators/` and `controllers/` instead.
|
|
176
|
+
|
|
177
|
+
## Flags matrix
|
|
178
|
+
|
|
179
|
+
| Flag | Matroska ID | Applies to | Base or subclass |
|
|
180
|
+
|---|---|---|---|
|
|
181
|
+
| `FlagEnabled` | 0xB9 default 1 | all | `ContainerTrack` |
|
|
182
|
+
| `FlagDefault` | 0x88 default 1 | all | `ContainerTrack` (`declaresDefault`) |
|
|
183
|
+
| `Language` | 0x22B59C | all | `ContainerTrack` |
|
|
184
|
+
| `LanguageBCP47` | 0x22B59D MUST | all | `ContainerTrack` |
|
|
185
|
+
| `FlagForced` | 0x55AA | subtitle only | `SubtitleTrack` |
|
|
186
|
+
| `FlagHearingImpaired` | 0x55AB | subtitle | `SubtitleTrack` |
|
|
187
|
+
| `FlagVisualImpaired` | 0x55AC | audio (descriptive) + subtitle | `AudioTrack`/`SubtitleTrack` |
|
|
188
|
+
| `FlagOriginal` | 0x55AE | audio | `AudioTrack` |
|
|
189
|
+
| `FlagCommentary` | 0x55AF | audio | `AudioTrack` |
|
|
190
|
+
| `track_enabled` | tkhd 0x000001 | all | `ContainerTrack` |
|
|
191
|
+
| `alternate_group` | tkhd | audio/video alternates | `ContainerTrack.alternateGroup` |
|
|
192
|
+
| `elng` | 14496-12 §8.4.6 | all | `ContainerTrack.languageBcp47` |
|