demuxe 0.3.0-beta.3

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.
Files changed (124) hide show
  1. package/LICENSE +352 -0
  2. package/README.md +75 -0
  3. package/bin/demuxe.mjs +30 -0
  4. package/docs/API-MIGRATION.md +54 -0
  5. package/docs/BETA.md +98 -0
  6. package/docs/BRANDING-MIGRATION.md +77 -0
  7. package/docs/COMPATIBILITY-EXPANSION.md +181 -0
  8. package/docs/LICENSING.md +83 -0
  9. package/docs/OPTIMIZATION-COMPLETION.md +511 -0
  10. package/docs/OPTIMIZATION-FLAC.md +178 -0
  11. package/docs/OPTIMIZATION-INTEGRATION.md +221 -0
  12. package/docs/OPTIMIZATION-REVIEW-FIXES.md +78 -0
  13. package/docs/PLAYER-COMPONENT.md +247 -0
  14. package/docs/PUBLIC-API-VALIDATION.md +163 -0
  15. package/docs/PUBLIC-API.md +245 -0
  16. package/docs/RELEASE.md +181 -0
  17. package/docs/RUNTIME-ASSETS.md +127 -0
  18. package/engine-build.json +8781 -0
  19. package/examples/custom-controls.html +14 -0
  20. package/examples/player-element.html +5 -0
  21. package/fixtures/DejaVuSans.ttf +0 -0
  22. package/fixtures/FONT-LICENSE.txt +187 -0
  23. package/index.d.ts +1 -0
  24. package/index.js +1 -0
  25. package/package.json +46 -0
  26. package/player.d.ts +1 -0
  27. package/player.js +1 -0
  28. package/release-manifest.json +541 -0
  29. package/sources.lock.json +96 -0
  30. package/third_party/notices/dav1d/COPYING +23 -0
  31. package/third_party/notices/emscripten/LICENSE +102 -0
  32. package/third_party/notices/emscripten/system/lib/compiler-rt/LICENSE.TXT +311 -0
  33. package/third_party/notices/emscripten/system/lib/libc/musl/COPYRIGHT +193 -0
  34. package/third_party/notices/emscripten/system/lib/libcxx/LICENSE.TXT +311 -0
  35. package/third_party/notices/emscripten/system/lib/libcxxabi/LICENSE.TXT +311 -0
  36. package/third_party/notices/emsdk/LICENSE +27 -0
  37. package/third_party/notices/ffmpeg/COPYING.GPLv2 +339 -0
  38. package/third_party/notices/ffmpeg/COPYING.GPLv3 +674 -0
  39. package/third_party/notices/ffmpeg/COPYING.LGPLv2.1 +502 -0
  40. package/third_party/notices/ffmpeg/LICENSE.md +129 -0
  41. package/third_party/notices/ffmpeg-adaptation/COPYING.LGPLv2.1 +502 -0
  42. package/third_party/notices/ffmpeg-adaptation/LICENSE.md +127 -0
  43. package/third_party/notices/freetype/LICENSE.TXT +46 -0
  44. package/third_party/notices/freetype/docs/FTL.TXT +169 -0
  45. package/third_party/notices/freetype/docs/GPLv2.TXT +340 -0
  46. package/third_party/notices/fribidi/COPYING +504 -0
  47. package/third_party/notices/harfbuzz/COPYING +42 -0
  48. package/third_party/notices/libass/COPYING +15 -0
  49. package/third_party/notices/libplacebo/LICENSE +458 -0
  50. package/third_party/notices/libxml2/Copyright +23 -0
  51. package/third_party/notices/libxml2/dict.c.notice +17 -0
  52. package/third_party/notices/libxml2/list.c.notice +16 -0
  53. package/third_party/notices/mpv/Copyright +78 -0
  54. package/third_party/notices/mpv/LICENSE.GPL +338 -0
  55. package/third_party/notices/mpv/LICENSE.LGPL +501 -0
  56. package/third_party/notices/vulkan-headers/LICENSE.txt +202 -0
  57. package/third_party/notices/zimg/COPYING +14 -0
  58. package/third_party/notices/zlib/LICENSE +22 -0
  59. package/third_party/notices.json +166 -0
  60. package/toolchain.lock.json +204 -0
  61. package/web/audio-worklet.js +45 -0
  62. package/web/cheap-mp4-probe.js +82 -0
  63. package/web/engine-adaptation/manifest.json +75 -0
  64. package/web/engine-adaptation/remux.mjs +2 -0
  65. package/web/engine-adaptation/remux.wasm +0 -0
  66. package/web/engine-ass/manifest.json +55 -0
  67. package/web/engine-ass/subtitles.mjs +2 -0
  68. package/web/engine-ass/subtitles.wasm +0 -0
  69. package/web/engine-hybrid/player.mjs +2 -0
  70. package/web/engine-hybrid/player.wasm +0 -0
  71. package/web/engine-remux/remux.mjs +2 -0
  72. package/web/engine-remux/remux.wasm +0 -0
  73. package/web/engine-software-full/player.mjs +2 -0
  74. package/web/engine-software-full/player.wasm +0 -0
  75. package/web/file-reader.js +34 -0
  76. package/web/filter-retained-engine-worker.js +292 -0
  77. package/web/generated/index.d.ts +6 -0
  78. package/web/generated/index.js +4 -0
  79. package/web/generated/internal/assets.d.ts +2 -0
  80. package/web/generated/internal/assets.js +7 -0
  81. package/web/generated/internal/backend.d.ts +27 -0
  82. package/web/generated/internal/backend.js +1 -0
  83. package/web/generated/internal/errors.d.ts +13 -0
  84. package/web/generated/internal/errors.js +54 -0
  85. package/web/generated/internal/native-ass.d.ts +38 -0
  86. package/web/generated/internal/native-ass.js +206 -0
  87. package/web/generated/internal/native-player.d.ts +95 -0
  88. package/web/generated/internal/native-player.js +502 -0
  89. package/web/generated/internal/playback-plans.d.ts +526 -0
  90. package/web/generated/internal/playback-plans.js +110 -0
  91. package/web/generated/internal/selection.d.ts +45 -0
  92. package/web/generated/internal/selection.js +45 -0
  93. package/web/generated/internal/state.d.ts +8 -0
  94. package/web/generated/internal/state.js +56 -0
  95. package/web/generated/internal/wasm-player.d.ts +127 -0
  96. package/web/generated/internal/wasm-player.js +372 -0
  97. package/web/generated/player/index.d.ts +198 -0
  98. package/web/generated/player/index.js +873 -0
  99. package/web/generated/player/interaction.d.ts +6 -0
  100. package/web/generated/player/interaction.js +14 -0
  101. package/web/generated/player/styles.d.ts +1 -0
  102. package/web/generated/player/styles.js +86 -0
  103. package/web/generated/types.d.ts +227 -0
  104. package/web/generated/types.js +2 -0
  105. package/web/generated/unified-player.d.ts +129 -0
  106. package/web/generated/unified-player.js +1074 -0
  107. package/web/io-worker.js +65 -0
  108. package/web/native-ass-worker.js +26 -0
  109. package/web/native-remux-player.js +301 -0
  110. package/web/native-remux-source-worker.js +25 -0
  111. package/web/native-remux-worker.js +46 -0
  112. package/web/range-reader.js +130 -0
  113. package/web/remux-packaging.js +11 -0
  114. package/web/resource-loader.js +173 -0
  115. package/web/retained-decoder-worker.js +200 -0
  116. package/web/retained-video.js +15 -0
  117. package/web/segmented-subtitles.js +37 -0
  118. package/web/software-full-engine-worker.js +234 -0
  119. package/web/source-probe.js +28 -0
  120. package/web/split-mp4.js +159 -0
  121. package/web/streaming-manifest.js +136 -0
  122. package/web/subtitle-overlay.js +26 -0
  123. package/web/video-codec-config.js +59 -0
  124. package/web/vod-manifest.js +54 -0
@@ -0,0 +1,526 @@
1
+ import type { PlaybackMode } from '../types.js';
2
+ /** Finite execution plans; qualification is local to a feature, not a browser claim. */
3
+ export declare const PLAYBACK_PLANS: readonly Readonly<{
4
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
5
+ prerequisites: string;
6
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
7
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
8
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
9
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
10
+ id: "native-direct";
11
+ mode: "native";
12
+ video: "browser";
13
+ audio: "original";
14
+ qualification: "existing";
15
+ } | {
16
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
17
+ prerequisites: string;
18
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
19
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
20
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
21
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
22
+ id: "native-remux";
23
+ mode: "native";
24
+ video: "packet-copy";
25
+ audio: "packet-copy";
26
+ qualification: "existing";
27
+ } | {
28
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
29
+ prerequisites: string;
30
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
31
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
32
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
33
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
34
+ id: "native-direct-gain";
35
+ mode: "native";
36
+ video: "browser";
37
+ audio: "web-audio-gain";
38
+ qualification: "experimental";
39
+ } | {
40
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
41
+ prerequisites: string;
42
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
43
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
44
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
45
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
46
+ id: "native-remux-gain";
47
+ mode: "native";
48
+ video: "packet-copy";
49
+ audio: "web-audio-gain";
50
+ qualification: "experimental";
51
+ } | {
52
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
53
+ prerequisites: string;
54
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
55
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
56
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
57
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
58
+ id: "native-flac";
59
+ mode: "native";
60
+ video: "packet-copy";
61
+ audio: "flac-lossless";
62
+ qualification: "experimental";
63
+ } | {
64
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
65
+ prerequisites: string;
66
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
67
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
68
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
69
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
70
+ id: "native-flac-gain";
71
+ mode: "native";
72
+ video: "packet-copy";
73
+ audio: "flac-lossless+web-audio-gain";
74
+ qualification: "experimental";
75
+ } | {
76
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
77
+ prerequisites: string;
78
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
79
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
80
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
81
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
82
+ id: "native-direct-ass";
83
+ mode: "native";
84
+ video: "browser";
85
+ audio: "original";
86
+ qualification: "experimental";
87
+ } | {
88
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
89
+ prerequisites: string;
90
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
91
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
92
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
93
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
94
+ id: "native-direct-ass-gain";
95
+ mode: "native";
96
+ video: "browser";
97
+ audio: "original+web-audio-gain";
98
+ qualification: "experimental";
99
+ } | {
100
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
101
+ prerequisites: string;
102
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
103
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
104
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
105
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
106
+ id: "native-remux-ass";
107
+ mode: "native";
108
+ video: "packet-copy";
109
+ audio: "packet-copy";
110
+ qualification: "experimental";
111
+ } | {
112
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
113
+ prerequisites: string;
114
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
115
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
116
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
117
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
118
+ id: "native-remux-ass-gain";
119
+ mode: "native";
120
+ video: "packet-copy";
121
+ audio: "packet-copy+web-audio-gain";
122
+ qualification: "experimental";
123
+ } | {
124
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
125
+ prerequisites: string;
126
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
127
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
128
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
129
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
130
+ id: "native-flac-ass";
131
+ mode: "native";
132
+ video: "packet-copy";
133
+ audio: "flac-lossless";
134
+ qualification: "experimental";
135
+ } | {
136
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
137
+ prerequisites: string;
138
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
139
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
140
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
141
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
142
+ id: "native-flac-ass-gain";
143
+ mode: "native";
144
+ video: "packet-copy";
145
+ audio: "flac-lossless+web-audio-gain";
146
+ qualification: "experimental";
147
+ } | {
148
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
149
+ prerequisites: string;
150
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
151
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
152
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
153
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
154
+ id: "native-opus";
155
+ mode: "native";
156
+ video: "packet-copy";
157
+ audio: "opus-lossy";
158
+ qualification: "experimental";
159
+ } | {
160
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
161
+ prerequisites: string;
162
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
163
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
164
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
165
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
166
+ id: "native-opus-gain";
167
+ mode: "native";
168
+ video: "packet-copy";
169
+ audio: "opus-lossy+web-audio-gain";
170
+ qualification: "experimental";
171
+ } | {
172
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
173
+ prerequisites: string;
174
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
175
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
176
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
177
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
178
+ id: "hybrid";
179
+ mode: "hybrid";
180
+ video: "webcodecs";
181
+ audio: "mpv";
182
+ qualification: "existing";
183
+ } | {
184
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
185
+ prerequisites: string;
186
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
187
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
188
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
189
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
190
+ id: "hybrid-audio-filter";
191
+ mode: "hybrid";
192
+ video: "webcodecs";
193
+ audio: "mpv-filter";
194
+ qualification: "experimental";
195
+ } | {
196
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
197
+ prerequisites: string;
198
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
199
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
200
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
201
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
202
+ id: "hybrid-gain";
203
+ mode: "hybrid";
204
+ video: "webcodecs";
205
+ audio: "mpv+web-audio-gain";
206
+ qualification: "experimental";
207
+ } | {
208
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
209
+ prerequisites: string;
210
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
211
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
212
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
213
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
214
+ id: "hybrid-audio-filter-gain";
215
+ mode: "hybrid";
216
+ video: "webcodecs";
217
+ audio: "mpv-filter+web-audio-gain";
218
+ qualification: "experimental";
219
+ } | {
220
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
221
+ prerequisites: string;
222
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
223
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
224
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
225
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
226
+ id: "software-gain";
227
+ mode: "software";
228
+ video: "ffmpeg";
229
+ audio: "mpv+web-audio-gain";
230
+ qualification: "experimental";
231
+ } | {
232
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
233
+ prerequisites: string;
234
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
235
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
236
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
237
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
238
+ id: "software";
239
+ mode: "software";
240
+ video: "ffmpeg";
241
+ audio: "mpv";
242
+ qualification: "existing";
243
+ }>[];
244
+ export declare function qualifiedAudioFilter(chain: string): boolean;
245
+ export declare function featureRejection(mode: PlaybackMode, features: {
246
+ vf: string;
247
+ af: string;
248
+ toneMapping: string;
249
+ hybridAudioFilters?: boolean;
250
+ }): string | undefined;
251
+ export declare function executionPlan(mode: PlaybackMode, packaging: unknown, audioFilter: string, gain?: number, nativeASS?: boolean): Readonly<{
252
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
253
+ prerequisites: string;
254
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
255
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
256
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
257
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
258
+ id: "native-direct";
259
+ mode: "native";
260
+ video: "browser";
261
+ audio: "original";
262
+ qualification: "existing";
263
+ } | {
264
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
265
+ prerequisites: string;
266
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
267
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
268
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
269
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
270
+ id: "native-remux";
271
+ mode: "native";
272
+ video: "packet-copy";
273
+ audio: "packet-copy";
274
+ qualification: "existing";
275
+ } | {
276
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
277
+ prerequisites: string;
278
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
279
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
280
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
281
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
282
+ id: "native-direct-gain";
283
+ mode: "native";
284
+ video: "browser";
285
+ audio: "web-audio-gain";
286
+ qualification: "experimental";
287
+ } | {
288
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
289
+ prerequisites: string;
290
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
291
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
292
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
293
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
294
+ id: "native-remux-gain";
295
+ mode: "native";
296
+ video: "packet-copy";
297
+ audio: "web-audio-gain";
298
+ qualification: "experimental";
299
+ } | {
300
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
301
+ prerequisites: string;
302
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
303
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
304
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
305
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
306
+ id: "native-flac";
307
+ mode: "native";
308
+ video: "packet-copy";
309
+ audio: "flac-lossless";
310
+ qualification: "experimental";
311
+ } | {
312
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
313
+ prerequisites: string;
314
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
315
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
316
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
317
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
318
+ id: "native-flac-gain";
319
+ mode: "native";
320
+ video: "packet-copy";
321
+ audio: "flac-lossless+web-audio-gain";
322
+ qualification: "experimental";
323
+ } | {
324
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
325
+ prerequisites: string;
326
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
327
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
328
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
329
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
330
+ id: "native-direct-ass";
331
+ mode: "native";
332
+ video: "browser";
333
+ audio: "original";
334
+ qualification: "experimental";
335
+ } | {
336
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
337
+ prerequisites: string;
338
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
339
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
340
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
341
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
342
+ id: "native-direct-ass-gain";
343
+ mode: "native";
344
+ video: "browser";
345
+ audio: "original+web-audio-gain";
346
+ qualification: "experimental";
347
+ } | {
348
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
349
+ prerequisites: string;
350
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
351
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
352
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
353
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
354
+ id: "native-remux-ass";
355
+ mode: "native";
356
+ video: "packet-copy";
357
+ audio: "packet-copy";
358
+ qualification: "experimental";
359
+ } | {
360
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
361
+ prerequisites: string;
362
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
363
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
364
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
365
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
366
+ id: "native-remux-ass-gain";
367
+ mode: "native";
368
+ video: "packet-copy";
369
+ audio: "packet-copy+web-audio-gain";
370
+ qualification: "experimental";
371
+ } | {
372
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
373
+ prerequisites: string;
374
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
375
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
376
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
377
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
378
+ id: "native-flac-ass";
379
+ mode: "native";
380
+ video: "packet-copy";
381
+ audio: "flac-lossless";
382
+ qualification: "experimental";
383
+ } | {
384
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
385
+ prerequisites: string;
386
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
387
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
388
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
389
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
390
+ id: "native-flac-ass-gain";
391
+ mode: "native";
392
+ video: "packet-copy";
393
+ audio: "flac-lossless+web-audio-gain";
394
+ qualification: "experimental";
395
+ } | {
396
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
397
+ prerequisites: string;
398
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
399
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
400
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
401
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
402
+ id: "native-opus";
403
+ mode: "native";
404
+ video: "packet-copy";
405
+ audio: "opus-lossy";
406
+ qualification: "experimental";
407
+ } | {
408
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
409
+ prerequisites: string;
410
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
411
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
412
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
413
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
414
+ id: "native-opus-gain";
415
+ mode: "native";
416
+ video: "packet-copy";
417
+ audio: "opus-lossy+web-audio-gain";
418
+ qualification: "experimental";
419
+ } | {
420
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
421
+ prerequisites: string;
422
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
423
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
424
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
425
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
426
+ id: "hybrid";
427
+ mode: "hybrid";
428
+ video: "webcodecs";
429
+ audio: "mpv";
430
+ qualification: "existing";
431
+ } | {
432
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
433
+ prerequisites: string;
434
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
435
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
436
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
437
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
438
+ id: "hybrid-audio-filter";
439
+ mode: "hybrid";
440
+ video: "webcodecs";
441
+ audio: "mpv-filter";
442
+ qualification: "experimental";
443
+ } | {
444
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
445
+ prerequisites: string;
446
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
447
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
448
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
449
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
450
+ id: "hybrid-gain";
451
+ mode: "hybrid";
452
+ video: "webcodecs";
453
+ audio: "mpv+web-audio-gain";
454
+ qualification: "experimental";
455
+ } | {
456
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
457
+ prerequisites: string;
458
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
459
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
460
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
461
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
462
+ id: "hybrid-audio-filter-gain";
463
+ mode: "hybrid";
464
+ video: "webcodecs";
465
+ audio: "mpv-filter+web-audio-gain";
466
+ qualification: "experimental";
467
+ } | {
468
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
469
+ prerequisites: string;
470
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
471
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
472
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
473
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
474
+ id: "software-gain";
475
+ mode: "software";
476
+ video: "ffmpeg";
477
+ audio: "mpv+web-audio-gain";
478
+ qualification: "experimental";
479
+ } | {
480
+ source: "qualified random-access file and selected codec packaging" | "browser-supported source and selected tracks" | "existing mpv source/track contract";
481
+ prerequisites: string;
482
+ subtitles: "external ASS/SSA via pinned libass; container presentation only" | "browser text tracks" | "mpv/libass";
483
+ fidelity: "Explicitly permitted lossy audio; no resampling/downmix; video copied" | "Selected integer audio encoded losslessly as FLAC; video copied; no downmix/resample" | "No audio encoding, downmix or resampling added by route selection; existing backend output contracts apply";
484
+ resources: "existing bounded remux buffers when used; browser decoder allocations are opaque" | "existing mpv allocation, PCM ring and retained-frame limits";
485
+ fallback: "terminal" | "existing diagnosed-path fallback with source and user intent preserved";
486
+ id: "software";
487
+ mode: "software";
488
+ video: "ffmpeg";
489
+ audio: "mpv";
490
+ qualification: "existing";
491
+ }>;
492
+ export type PlanRejectionCode = 'FEATURE_UNSUPPORTED' | 'POLICY_PROHIBITS_TRANSFORM' | 'QUALIFICATION_REQUIRED' | 'SOURCE_UNSUPPORTED' | 'DEPLOYMENT_UNAVAILABLE' | 'PLAN_NOT_REQUESTED' | 'ISOLATION_REQUIRED';
493
+ export type PlanFacts = {
494
+ automatic: boolean;
495
+ vf: string;
496
+ af: string;
497
+ gain: number;
498
+ toneMapping: string;
499
+ hybridAudioFilters: boolean;
500
+ adaptation?: 'flac' | 'opus';
501
+ allowLossy: boolean;
502
+ nativeASS: boolean;
503
+ externalFormats: string[];
504
+ browserTextTracks: boolean;
505
+ audioOutput: string;
506
+ nativeRemux: 'auto' | 'never' | 'always';
507
+ manifest: boolean;
508
+ requiresRemux: boolean;
509
+ isolated: boolean;
510
+ mse: boolean;
511
+ webCodecs: boolean;
512
+ webAudio: boolean;
513
+ nativeSourceRejection?: string;
514
+ automaticLossless?: boolean;
515
+ adaptationSourceQualified?: boolean;
516
+ adaptationSourceRejection?: string;
517
+ };
518
+ /** Admission is executable and deliberately finite. Runtime output verification
519
+ * still owns acceptance; browser capability signals cannot prove presentation. */
520
+ export declare function planAdmission(f: PlanFacts): {
521
+ code?: PlanRejectionCode | undefined;
522
+ reason?: string | undefined;
523
+ id: "hybrid" | "software" | "native-direct" | "native-remux" | "native-direct-gain" | "native-remux-gain" | "native-flac" | "native-flac-gain" | "native-direct-ass" | "native-direct-ass-gain" | "native-remux-ass" | "native-remux-ass-gain" | "native-flac-ass" | "native-flac-ass-gain" | "native-opus" | "native-opus-gain" | "hybrid-audio-filter" | "hybrid-gain" | "hybrid-audio-filter-gain" | "software-gain";
524
+ mode: "native" | "hybrid" | "software";
525
+ eligible: boolean;
526
+ }[];