@hyperframes/studio-server 0.8.107 → 0.8.109
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/dist/{chunk-KUEG5MYA.js → chunk-EPL4YKGI.js} +11 -5
- package/dist/chunk-EPL4YKGI.js.map +1 -0
- package/dist/chunk-TEYDBVSK.js +361 -0
- package/dist/chunk-TEYDBVSK.js.map +1 -0
- package/dist/{chunk-W6TFBTP2.js → chunk-Z4DIWF3Z.js} +16 -2
- package/dist/chunk-Z4DIWF3Z.js.map +1 -0
- package/dist/helpers/loudness.d.ts +87 -0
- package/dist/helpers/loudness.js +29 -0
- package/dist/helpers/loudness.js.map +1 -0
- package/dist/helpers/mediaProxyPreview.d.ts +1 -1
- package/dist/helpers/sourceMutation.d.ts +3 -1
- package/dist/helpers/sourceMutation.js +3 -1
- package/dist/history/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +581 -59
- package/dist/index.js.map +1 -1
- package/dist/{mediaProxyPreview-rleU3r_Q.d.ts → mediaProxyPreview-CCxjB3rf.d.ts} +1 -0
- package/package.json +7 -3
- package/dist/chunk-KUEG5MYA.js.map +0 -1
- package/dist/chunk-W6TFBTP2.js.map +0 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
interface AttributeSpan {
|
|
2
|
+
value: string;
|
|
3
|
+
valueStart: number;
|
|
4
|
+
valueEnd: number;
|
|
5
|
+
}
|
|
6
|
+
type MediaTagName = "audio" | "video";
|
|
7
|
+
interface AudioTag {
|
|
8
|
+
tag: MediaTagName;
|
|
9
|
+
id: string;
|
|
10
|
+
src: string;
|
|
11
|
+
volume: number;
|
|
12
|
+
mediaStart: number;
|
|
13
|
+
duration: number | null;
|
|
14
|
+
playbackRate: number;
|
|
15
|
+
start: number;
|
|
16
|
+
end: number;
|
|
17
|
+
volumeAttribute: AttributeSpan | null;
|
|
18
|
+
}
|
|
19
|
+
interface LoudnessMeasurement {
|
|
20
|
+
integratedLufs: number;
|
|
21
|
+
truePeakDbfs: number;
|
|
22
|
+
}
|
|
23
|
+
interface NormalizationTrack extends LoudnessMeasurement {
|
|
24
|
+
id: string;
|
|
25
|
+
volume: number;
|
|
26
|
+
}
|
|
27
|
+
interface AudioNormalizationPlan {
|
|
28
|
+
referenceId: string;
|
|
29
|
+
targetId: string;
|
|
30
|
+
referenceLufs: number;
|
|
31
|
+
targetLufs: number;
|
|
32
|
+
previousVolume: number;
|
|
33
|
+
volume: number;
|
|
34
|
+
gainDb: number;
|
|
35
|
+
changeDb: number;
|
|
36
|
+
projectedLufs: number;
|
|
37
|
+
projectedTruePeakDbfs: number;
|
|
38
|
+
}
|
|
39
|
+
/** Read the authored clips with sound — `<audio>` and audible `<video>` — without reserializing. */
|
|
40
|
+
declare function audioTags(html: string): AudioTag[];
|
|
41
|
+
/** Resolve only a file contained by the project. Remote and traversal sources are not measured. */
|
|
42
|
+
declare function resolveLocalAudioPath(projectDir: string, src: string): string;
|
|
43
|
+
/** Parse FFmpeg's final EBU R128 summary, not its per-window log lines. */
|
|
44
|
+
declare function parseEbur128Summary(stderr: string): LoudnessMeasurement;
|
|
45
|
+
declare function gainDb(volume: number): number;
|
|
46
|
+
/** Calculate the target's absolute authored gain while keeping the reference unchanged. */
|
|
47
|
+
declare function audioNormalizationPlan(referenceTrack: NormalizationTrack, targetTrack: NormalizationTrack): AudioNormalizationPlan;
|
|
48
|
+
/** Patch one authored attribute in place so scripts/styles/comments remain byte-stable. */
|
|
49
|
+
declare function updateAudioVolume(html: string, id: string, volume: number): string;
|
|
50
|
+
/**
|
|
51
|
+
* FFmpeg arguments that measure exactly the window the composition plays.
|
|
52
|
+
*
|
|
53
|
+
* `-ss` / `-t` go BEFORE `-i`, as INPUT options. After `-i` they bound the
|
|
54
|
+
* output, and with `-f null` there is no real output to bound: ffmpeg keeps
|
|
55
|
+
* feeding the filter graph past the limit, so ebur128 integrates audio the clip
|
|
56
|
+
* never plays. Measured on a 12 s file whose first 4 s — the played window — is
|
|
57
|
+
* -61.8 LUFS: output-side `-t 4` reported -33.8 LUFS, input-side reports -61.8,
|
|
58
|
+
* the same as physically cutting the file first.
|
|
59
|
+
*/
|
|
60
|
+
declare function loudnessMeasureArgs(file: string, tag: MeasuredWindow): string[];
|
|
61
|
+
type MeasuredWindow = Pick<AudioTag, "mediaStart" | "duration"> & Partial<Pick<AudioTag, "playbackRate">>;
|
|
62
|
+
declare function measureAudio(ffmpegPath: string, file: string, tag: MeasuredWindow): Promise<LoudnessMeasurement>;
|
|
63
|
+
declare function requiredFfmpeg(): string;
|
|
64
|
+
declare const DEFAULT_TARGET_LUFS = -16;
|
|
65
|
+
declare const NORMALIZE_TRUE_PEAK_CEILING_DBFS = -1.5;
|
|
66
|
+
type LoudnessLimit = "gain-ceiling" | "true-peak";
|
|
67
|
+
interface AbsoluteLoudnessPlan {
|
|
68
|
+
targetId: string;
|
|
69
|
+
targetLufs: number;
|
|
70
|
+
sourceLufs: number;
|
|
71
|
+
previousVolume: number;
|
|
72
|
+
volume: number;
|
|
73
|
+
gainDb: number;
|
|
74
|
+
changeDb: number;
|
|
75
|
+
projectedLufs: number;
|
|
76
|
+
projectedTruePeakDbfs: number;
|
|
77
|
+
limitedBy: LoudnessLimit | null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The authored gain that brings one clip's played window to an absolute
|
|
81
|
+
* loudness. Unlike reference matching it never refuses: past the +12 dB
|
|
82
|
+
* authoring ceiling or the true-peak ceiling it applies the most that fits and
|
|
83
|
+
* names which limit stopped it.
|
|
84
|
+
*/
|
|
85
|
+
declare function absoluteLoudnessPlan(track: NormalizationTrack, targetLufs?: number): AbsoluteLoudnessPlan;
|
|
86
|
+
|
|
87
|
+
export { type AbsoluteLoudnessPlan, type AudioNormalizationPlan, type AudioTag, DEFAULT_TARGET_LUFS, type LoudnessLimit, type LoudnessMeasurement, type MeasuredWindow, NORMALIZE_TRUE_PEAK_CEILING_DBFS, type NormalizationTrack, absoluteLoudnessPlan, audioNormalizationPlan, audioTags, gainDb, loudnessMeasureArgs, measureAudio, parseEbur128Summary, requiredFfmpeg, resolveLocalAudioPath, updateAudioVolume };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_TARGET_LUFS,
|
|
3
|
+
NORMALIZE_TRUE_PEAK_CEILING_DBFS,
|
|
4
|
+
absoluteLoudnessPlan,
|
|
5
|
+
audioNormalizationPlan,
|
|
6
|
+
audioTags,
|
|
7
|
+
gainDb,
|
|
8
|
+
loudnessMeasureArgs,
|
|
9
|
+
measureAudio,
|
|
10
|
+
parseEbur128Summary,
|
|
11
|
+
requiredFfmpeg,
|
|
12
|
+
resolveLocalAudioPath,
|
|
13
|
+
updateAudioVolume
|
|
14
|
+
} from "../chunk-TEYDBVSK.js";
|
|
15
|
+
export {
|
|
16
|
+
DEFAULT_TARGET_LUFS,
|
|
17
|
+
NORMALIZE_TRUE_PEAK_CEILING_DBFS,
|
|
18
|
+
absoluteLoudnessPlan,
|
|
19
|
+
audioNormalizationPlan,
|
|
20
|
+
audioTags,
|
|
21
|
+
gainDb,
|
|
22
|
+
loudnessMeasureArgs,
|
|
23
|
+
measureAudio,
|
|
24
|
+
parseEbur128Summary,
|
|
25
|
+
requiredFfmpeg,
|
|
26
|
+
resolveLocalAudioPath,
|
|
27
|
+
updateAudioVolume
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=loudness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as PreviewApiAdapter, P as PreviewDocumentStore, i as injectMediaCodecMap, f as injectMediaCodecMapIntoHtml, g as isAutoProxyEnabled, p as proxyEtagSalt, r as resolvePreviewMediaCodecProbeCache } from '../mediaProxyPreview-
|
|
1
|
+
export { a as PreviewApiAdapter, P as PreviewDocumentStore, i as injectMediaCodecMap, f as injectMediaCodecMapIntoHtml, g as isAutoProxyEnabled, p as proxyEtagSalt, r as resolvePreviewMediaCodecProbeCache } from '../mediaProxyPreview-CCxjB3rf.js';
|
|
2
2
|
import './mediaCodecMap.js';
|
|
3
3
|
import '@hyperframes/core';
|
|
4
4
|
import '@hyperframes/parsers';
|
|
@@ -84,5 +84,7 @@ interface UnwrapChildTrack {
|
|
|
84
84
|
track?: number;
|
|
85
85
|
}
|
|
86
86
|
declare function unwrapElementsFromHtml(source: string, groupTarget: SourceMutationTarget, childTracks?: UnwrapChildTrack[]): UnwrapElementsResult;
|
|
87
|
+
/** After a cut, give each linked group's right halves their own `data-link` and `data-sync-origin`. */
|
|
88
|
+
declare function relinkSplitHalvesInHtml(source: string, rightHalfIds: readonly string[]): string;
|
|
87
89
|
|
|
88
|
-
export { type ElementRebase, type PatchOperation, type SourceMutationTarget, type SplitElementResult, type UnwrapChildTrack, type UnwrapElementsResult, type WrapElementsResult, dedupeClonedCompositionId, findTargetElement, isHTMLElement, parseSourceDocument, patchElementInHtml, probeElementInSource, removeElementFromHtml, splitElementInHtml, unwrapElementsFromHtml, wrapElementsInHtml };
|
|
90
|
+
export { type ElementRebase, type PatchOperation, type SourceMutationTarget, type SplitElementResult, type UnwrapChildTrack, type UnwrapElementsResult, type WrapElementsResult, dedupeClonedCompositionId, findTargetElement, isHTMLElement, parseSourceDocument, patchElementInHtml, probeElementInSource, relinkSplitHalvesInHtml, removeElementFromHtml, splitElementInHtml, unwrapElementsFromHtml, wrapElementsInHtml };
|
|
@@ -5,11 +5,12 @@ import {
|
|
|
5
5
|
parseSourceDocument,
|
|
6
6
|
patchElementInHtml,
|
|
7
7
|
probeElementInSource,
|
|
8
|
+
relinkSplitHalvesInHtml,
|
|
8
9
|
removeElementFromHtml,
|
|
9
10
|
splitElementInHtml,
|
|
10
11
|
unwrapElementsFromHtml,
|
|
11
12
|
wrapElementsInHtml
|
|
12
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-Z4DIWF3Z.js";
|
|
13
14
|
export {
|
|
14
15
|
dedupeClonedCompositionId,
|
|
15
16
|
findTargetElement,
|
|
@@ -17,6 +18,7 @@ export {
|
|
|
17
18
|
parseSourceDocument,
|
|
18
19
|
patchElementInHtml,
|
|
19
20
|
probeElementInSource,
|
|
21
|
+
relinkSplitHalvesInHtml,
|
|
20
22
|
removeElementFromHtml,
|
|
21
23
|
splitElementInHtml,
|
|
22
24
|
unwrapElementsFromHtml,
|
package/dist/history/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
|
-
import { S as StudioApiAdapter, P as PreviewDocumentStore, M as MediaProcessingJobState } from './mediaProxyPreview-
|
|
3
|
-
export { L as LintResult, a as PreviewApiAdapter, R as RenderJobState, b as ResolvedProject, c as StudioSelectionResponse, d as StudioSelectionSnapshot, e as StudioSelectionTextField } from './mediaProxyPreview-
|
|
2
|
+
import { S as StudioApiAdapter, P as PreviewDocumentStore, M as MediaProcessingJobState } from './mediaProxyPreview-CCxjB3rf.js';
|
|
3
|
+
export { L as LintResult, a as PreviewApiAdapter, R as RenderJobState, b as ResolvedProject, c as StudioSelectionResponse, d as StudioSelectionSnapshot, e as StudioSelectionTextField } from './mediaProxyPreview-CCxjB3rf.js';
|
|
4
4
|
export { C as ClosedWindow, D as DEFAULT_HISTORY_ROOT, S as HISTORY_START, H as HistoryClosedError, a as HistoryEntry, b as HistoryEntrySide, c as HistoryFileChange, d as HistoryListItem, e as HistoryResult, f as HistoryWho, g as HistoryWindow, M as MAX_WINDOW_IDLE_MS, P as ProjectHistory, h as ProjectHistoryOptions, U as UNDO_MODES, i as UndoMode, o as openProjectHistory } from './projectHistory-Cm8Mdmmv.js';
|
|
5
5
|
export { HistoryBusyError, HistoryIdError, ProjectHistoryRecord, PrunedHistory, historyCache, listProjectHistories, pruneGoneProjectHistories } from './history/index.js';
|
|
6
6
|
export { CACHE_DIR_NAME as PROXY_CACHE_DIR_NAME } from './helpers/proxyTranscoder.js';
|