@pixerate/editor 0.85.0 → 0.86.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/dist/video-editor/index.cjs +395 -74
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.d.cts +71 -1
- package/dist/video-editor/index.d.ts +71 -1
- package/dist/video-editor/index.js +337 -16
- package/dist/video-editor/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/pixerate-video-editor/SKILL.md +12 -1
|
@@ -268,6 +268,13 @@ interface VideoMediaClip extends VideoClipBase {
|
|
|
268
268
|
in?: number;
|
|
269
269
|
/** Playback speed (default 1): it uses `duration × speed` of the source. */
|
|
270
270
|
speed?: number;
|
|
271
|
+
/**
|
|
272
|
+
* A speed ramp: keys mapping clip time to source time after the in point (`v` ms from `in`), so
|
|
273
|
+
* a key's slope is the speed there, a flat stretch is a freeze frame and eased keys ramp between
|
|
274
|
+
* speeds. Never runs backwards. Before the first key and after the last the picture holds. Takes
|
|
275
|
+
* the place of `speed` (see `videoSpeedRampKeys` for building one from speeds).
|
|
276
|
+
*/
|
|
277
|
+
timeRemap?: VideoKeyframes;
|
|
271
278
|
/** Gain (1 = unchanged, default 1), or keyframes. */
|
|
272
279
|
volume?: VideoAnimatable;
|
|
273
280
|
/** Silences this clip. */
|
|
@@ -344,6 +351,7 @@ declare function parseVideoAnimatable(v: unknown, path: string, range?: {
|
|
|
344
351
|
optional?: boolean;
|
|
345
352
|
}): VideoAnimatable | undefined;
|
|
346
353
|
declare function parseVideoTransform(v: unknown, path: string): VideoTransform | undefined;
|
|
354
|
+
declare function parseVideoTimeRemap(v: unknown, speed: unknown, path: string): VideoKeyframes | undefined;
|
|
347
355
|
declare function parseVideoClipAnimation(v: unknown, path: string): VideoClipAnimation | undefined;
|
|
348
356
|
declare function parseVideoGrade(v: unknown, path: string): VideoGrade | undefined;
|
|
349
357
|
declare function parseVideoTransition(v: unknown, path: string): VideoTransition | undefined;
|
|
@@ -635,6 +643,18 @@ type VideoEdit = ({
|
|
|
635
643
|
clip: string;
|
|
636
644
|
property: VideoKeyframeProperty;
|
|
637
645
|
keys: VideoKey[] | null;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* A speed ramp: keys mapping clip time to source ms after the in point (see `timeRemap`), or
|
|
649
|
+
* null to play at normal speed from where the ramp started. `duration` sets the clip's new length
|
|
650
|
+
* (default: unchanged); `ripple` moves later material with the change.
|
|
651
|
+
*/
|
|
652
|
+
| {
|
|
653
|
+
op: 'set_time_remap';
|
|
654
|
+
clip: string;
|
|
655
|
+
keys: VideoKey[] | null;
|
|
656
|
+
duration?: number;
|
|
657
|
+
ripple?: boolean;
|
|
638
658
|
} | {
|
|
639
659
|
op: 'close_gaps';
|
|
640
660
|
track: string;
|
|
@@ -1123,6 +1143,55 @@ declare function videoTranscriptEdit(assetId: string, text: string): VideoEdit;
|
|
|
1123
1143
|
/** The word playing at a timeline time, as its index in `words`, or -1. */
|
|
1124
1144
|
declare function videoWordAt(words: readonly VideoTimelineWord[], time: number): number;
|
|
1125
1145
|
|
|
1146
|
+
/**
|
|
1147
|
+
* Speed ramps and freeze frames: a media clip's `timeRemap` keys map clip time to source time after
|
|
1148
|
+
* its in point. The slope between two keys is the speed there; equal values are a freeze; an eased
|
|
1149
|
+
* segment changes speed smoothly. These helpers read and build them.
|
|
1150
|
+
*/
|
|
1151
|
+
/** Where in the source (ms) a media clip is at clip time `clipTime`, through its speed or its ramp. */
|
|
1152
|
+
declare function videoClipSourceTime(clip: VideoMediaClip, clipTime: number): number;
|
|
1153
|
+
/** The speed a media clip plays at at clip time `clipTime` (0 in a freeze), measured over a millisecond. */
|
|
1154
|
+
declare function videoClipSpeedAt(clip: VideoClip, clipTime: number): number;
|
|
1155
|
+
/** One stretch of a ramp: `duration` ms of the clip at `speed`, or easing from `speed` to `toSpeed`. 0 is a freeze. */
|
|
1156
|
+
interface VideoSpeedSegment {
|
|
1157
|
+
duration: number;
|
|
1158
|
+
speed: number;
|
|
1159
|
+
/** Ramp smoothly to this speed by the end of the stretch (default: stay at `speed`). */
|
|
1160
|
+
toSpeed?: number;
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* Remap keys for stretches of speed, from the clip's start: steady stretches are linear segments,
|
|
1164
|
+
* ramps a cubic-bezier ease that changes the speed evenly from one to the other (the source moves
|
|
1165
|
+
* the average of the two speeds over the stretch). Returns the keys and the source the clip plays.
|
|
1166
|
+
*/
|
|
1167
|
+
declare function videoSpeedRampKeys(segments: readonly VideoSpeedSegment[]): {
|
|
1168
|
+
keys: VideoKey[];
|
|
1169
|
+
duration: number;
|
|
1170
|
+
source: number;
|
|
1171
|
+
};
|
|
1172
|
+
/**
|
|
1173
|
+
* Checks remap keys: in time order and never going back in the source, eased segments included
|
|
1174
|
+
* (each is sampled, so a curve that overshoots and would play backwards is caught). Throws a
|
|
1175
|
+
* readable error.
|
|
1176
|
+
*/
|
|
1177
|
+
declare function checkVideoTimeRemap(remap: VideoKeyframes, path?: string): void;
|
|
1178
|
+
/** The stretch of source (ms, from the in point) a ramp plays: from its first key's value to its last's. */
|
|
1179
|
+
declare function videoTimeRemapSpan(remap: VideoKeyframes): {
|
|
1180
|
+
from: number;
|
|
1181
|
+
to: number;
|
|
1182
|
+
};
|
|
1183
|
+
/** Clip time and source time pairs tracing a ramp as straight lines (eased stretches sampled every `step` ms), with freezes marked. */
|
|
1184
|
+
declare function videoTimeRemapBreakpoints(remap: VideoKeyframes, step: number): {
|
|
1185
|
+
t: number;
|
|
1186
|
+
v: number;
|
|
1187
|
+
}[];
|
|
1188
|
+
/** The edit that plays a media clip through stretches of speed from the moment it shows at its start (see `videoSpeedRampKeys`). */
|
|
1189
|
+
declare function videoSpeedRampEdit(clip: VideoMediaClip, segments: readonly VideoSpeedSegment[], ripple?: boolean): VideoEdit;
|
|
1190
|
+
/** The edit that holds the frame a media clip shows at clip time `at` for `duration` ms, then plays on (the clip gets longer). */
|
|
1191
|
+
declare function videoFreezeFrameEdit(clip: VideoMediaClip, at: number, duration: number, ripple?: boolean): VideoEdit;
|
|
1192
|
+
/** A slow-motion ramp preset for a clip of `duration` ms: normal speed for half of it, a 500 ms glide down to 0.3×, then 1.5 s at 0.3×. */
|
|
1193
|
+
declare const videoSlowMotionRamp: (duration: number) => VideoSpeedSegment[];
|
|
1194
|
+
|
|
1126
1195
|
/** Radius of an iris `progress` (0–1) open: from nothing to the frame's corners. */
|
|
1127
1196
|
declare const videoIrisRadius: (frame: {
|
|
1128
1197
|
width: number;
|
|
@@ -1554,6 +1623,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
1554
1623
|
asset: string;
|
|
1555
1624
|
in?: number;
|
|
1556
1625
|
speed?: number;
|
|
1626
|
+
timeRemap?: VideoKeyframes;
|
|
1557
1627
|
volume?: VideoAnimatable;
|
|
1558
1628
|
muted?: boolean;
|
|
1559
1629
|
fadeInCurve?: VideoFadeCurve;
|
|
@@ -1771,4 +1841,4 @@ declare function videoKeyframeValueEdit(project: VideoProject, clipId: string, p
|
|
|
1771
1841
|
*/
|
|
1772
1842
|
declare function videoKeyframeToggleEdit(project: VideoProject, clipId: string, property: VideoKeyframeProperty, time: number): VideoEdit | null;
|
|
1773
1843
|
|
|
1774
|
-
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_BLEND_MODES, VIDEO_BLEND_MODE_LABELS, VIDEO_CLIP_ANIMATION_DURATION, VIDEO_CLIP_ANIMATION_EFFECTS, VIDEO_CLIP_ANIMATION_LABELS, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_FILLERS, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FADE_CURVES, VIDEO_FADE_CURVE_LABELS, VIDEO_FITS, VIDEO_GRADE_CONTROLS, VIDEO_GRADE_PRESETS, VIDEO_GRADE_PRESET_NAMES, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_PEAK_BLOCK, VIDEO_PLACEMENT_MODES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_LABELS, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, type VideoAudioLevel, type VideoAudioPeaks, VideoAudioPeaksCache, type VideoAudioPeaksLoader, type VideoAudioSource, type VideoBlendMode, type VideoCanvasContext, type VideoClip, type VideoClipAnimation, type VideoClipAnimationEffect, type VideoClipDragInput, type VideoClipDragMode, type VideoClipDragPlan, type VideoClipLocation, type VideoClipType, type VideoColorClip, type VideoEase, type VideoEdit, type VideoEditOp, type VideoEditOutcome, type VideoEditResult, VideoEditorController, type VideoEditorOptions, type VideoEditorState, type VideoEditorToolProviderOptions, type VideoEdlOptions, type VideoFadeCurve, type VideoFfmpegExport, type VideoFfmpegOptions, type VideoFit, type VideoFrame, type VideoGap, type VideoGrade, type VideoGradeControl, type VideoGradePreset, type VideoGradeStep, type VideoIssue, type VideoIssueCode, type VideoIssueSeverity, type VideoKey, type VideoKeyframeProperty, type VideoKeyframeRow, type VideoKeyframes, type VideoLayer, type VideoLoudnessMeasurement, type VideoLoudnessTarget, type VideoMarker, type VideoMediaClip, type VideoMediaProbe, type VideoPauseOptions, type VideoPlacementMode, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSilenceOptions, type VideoSnapOptions, type VideoSvgOptions, type VideoTextClip, type VideoTimelineWord, type VideoTrack, type VideoTrackKind, type VideoTranscriptRange, type VideoTranscriptWord, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWaveformMode, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, applyVideoGrade, buildVideoAudioPeaks, checkVideoProject, createVideoEditorToolProvider, createVideoProject, decodeVideoAudioPeaks, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoAudioSilences, findVideoClip, findVideoFillers, findVideoGaps, findVideoTranscriptPauses, findVideoTranscriptText, formatVideoSeconds, formatVideoTimecode, formatVideoTimecodeFrames, isVideoDropFrameRate, isVideoKeyframes, mergeVideoRanges, nextFreeVideoSlot, normalizeVideoGrade, normalizeVideoWord, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoClipAnimation, parseVideoGrade, parseVideoKeyframes, parseVideoLoudnessMeasurement, parseVideoMarker, parseVideoProject, parseVideoTrack, parseVideoTranscript, parseVideoTranscriptWords, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, toVideoLoudnessMeasure, videoAssetDropEdit, videoAssetHasSound, videoAssetKindOf, videoAssetMap, videoAudioLevels, videoAudioPeakRange, videoAudioPeakSpans, videoAudioPeaksDuration, videoClipAfter, videoClipAnimated, videoClipAnimationProperties, videoClipAnimationSpans, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipShowsWaveform, videoClipSoundGain, videoClipSourceRange, videoClipSpeed, videoClipTint, videoClipWaveform, videoClipWaveformPath, videoClipsAt, videoContactSheetSvg, videoDragLabel, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFadeCurveGain, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoGradeCssFilter, videoGradeFfmpegFilters, videoGradeGainsFilterId, videoGradePreset, videoGradeStepMatrix, videoGradeStepSvgValues, videoGradeSteps, videoGradeSvgDefs, videoGradeSvgFilter, videoHourFrames, videoIrisRadius, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoPeakDb, videoProjectDuration, videoProjectSvg, videoRemoveRangesEdits, videoRulerTicks, videoSnapPoints, videoTextStyle, videoTimecodeFrames, videoTimelineTranscript, videoTitleFrame, videoTrackSyncLocked, videoTranscriptEdit, videoTranscriptTrack, videoTransformAt, videoTransitionAudioCurve, videoTransitionEase, videoTransitionHasDirection, videoValueAt, videoWaveformPath, videoWipeRect, videoWordAt, videoWordsRange };
|
|
1844
|
+
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_BLEND_MODES, VIDEO_BLEND_MODE_LABELS, VIDEO_CLIP_ANIMATION_DURATION, VIDEO_CLIP_ANIMATION_EFFECTS, VIDEO_CLIP_ANIMATION_LABELS, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_FILLERS, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FADE_CURVES, VIDEO_FADE_CURVE_LABELS, VIDEO_FITS, VIDEO_GRADE_CONTROLS, VIDEO_GRADE_PRESETS, VIDEO_GRADE_PRESET_NAMES, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_PEAK_BLOCK, VIDEO_PLACEMENT_MODES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_LABELS, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, type VideoAudioLevel, type VideoAudioPeaks, VideoAudioPeaksCache, type VideoAudioPeaksLoader, type VideoAudioSource, type VideoBlendMode, type VideoCanvasContext, type VideoClip, type VideoClipAnimation, type VideoClipAnimationEffect, type VideoClipDragInput, type VideoClipDragMode, type VideoClipDragPlan, type VideoClipLocation, type VideoClipType, type VideoColorClip, type VideoEase, type VideoEdit, type VideoEditOp, type VideoEditOutcome, type VideoEditResult, VideoEditorController, type VideoEditorOptions, type VideoEditorState, type VideoEditorToolProviderOptions, type VideoEdlOptions, type VideoFadeCurve, type VideoFfmpegExport, type VideoFfmpegOptions, type VideoFit, type VideoFrame, type VideoGap, type VideoGrade, type VideoGradeControl, type VideoGradePreset, type VideoGradeStep, type VideoIssue, type VideoIssueCode, type VideoIssueSeverity, type VideoKey, type VideoKeyframeProperty, type VideoKeyframeRow, type VideoKeyframes, type VideoLayer, type VideoLoudnessMeasurement, type VideoLoudnessTarget, type VideoMarker, type VideoMediaClip, type VideoMediaProbe, type VideoPauseOptions, type VideoPlacementMode, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSilenceOptions, type VideoSnapOptions, type VideoSpeedSegment, type VideoSvgOptions, type VideoTextClip, type VideoTimelineWord, type VideoTrack, type VideoTrackKind, type VideoTranscriptRange, type VideoTranscriptWord, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWaveformMode, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, applyVideoGrade, buildVideoAudioPeaks, checkVideoProject, checkVideoTimeRemap, createVideoEditorToolProvider, createVideoProject, decodeVideoAudioPeaks, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoAudioSilences, findVideoClip, findVideoFillers, findVideoGaps, findVideoTranscriptPauses, findVideoTranscriptText, formatVideoSeconds, formatVideoTimecode, formatVideoTimecodeFrames, isVideoDropFrameRate, isVideoKeyframes, mergeVideoRanges, nextFreeVideoSlot, normalizeVideoGrade, normalizeVideoWord, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoClipAnimation, parseVideoGrade, parseVideoKeyframes, parseVideoLoudnessMeasurement, parseVideoMarker, parseVideoProject, parseVideoTimeRemap, parseVideoTrack, parseVideoTranscript, parseVideoTranscriptWords, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, toVideoLoudnessMeasure, videoAssetDropEdit, videoAssetHasSound, videoAssetKindOf, videoAssetMap, videoAudioLevels, videoAudioPeakRange, videoAudioPeakSpans, videoAudioPeaksDuration, videoClipAfter, videoClipAnimated, videoClipAnimationProperties, videoClipAnimationSpans, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipShowsWaveform, videoClipSoundGain, videoClipSourceRange, videoClipSourceTime, videoClipSpeed, videoClipSpeedAt, videoClipTint, videoClipWaveform, videoClipWaveformPath, videoClipsAt, videoContactSheetSvg, videoDragLabel, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFadeCurveGain, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoFreezeFrameEdit, videoGradeCssFilter, videoGradeFfmpegFilters, videoGradeGainsFilterId, videoGradePreset, videoGradeStepMatrix, videoGradeStepSvgValues, videoGradeSteps, videoGradeSvgDefs, videoGradeSvgFilter, videoHourFrames, videoIrisRadius, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoPeakDb, videoProjectDuration, videoProjectSvg, videoRemoveRangesEdits, videoRulerTicks, videoSlowMotionRamp, videoSnapPoints, videoSpeedRampEdit, videoSpeedRampKeys, videoTextStyle, videoTimeRemapBreakpoints, videoTimeRemapSpan, videoTimecodeFrames, videoTimelineTranscript, videoTitleFrame, videoTrackSyncLocked, videoTranscriptEdit, videoTranscriptTrack, videoTransformAt, videoTransitionAudioCurve, videoTransitionEase, videoTransitionHasDirection, videoValueAt, videoWaveformPath, videoWipeRect, videoWordAt, videoWordsRange };
|
|
@@ -268,6 +268,13 @@ interface VideoMediaClip extends VideoClipBase {
|
|
|
268
268
|
in?: number;
|
|
269
269
|
/** Playback speed (default 1): it uses `duration × speed` of the source. */
|
|
270
270
|
speed?: number;
|
|
271
|
+
/**
|
|
272
|
+
* A speed ramp: keys mapping clip time to source time after the in point (`v` ms from `in`), so
|
|
273
|
+
* a key's slope is the speed there, a flat stretch is a freeze frame and eased keys ramp between
|
|
274
|
+
* speeds. Never runs backwards. Before the first key and after the last the picture holds. Takes
|
|
275
|
+
* the place of `speed` (see `videoSpeedRampKeys` for building one from speeds).
|
|
276
|
+
*/
|
|
277
|
+
timeRemap?: VideoKeyframes;
|
|
271
278
|
/** Gain (1 = unchanged, default 1), or keyframes. */
|
|
272
279
|
volume?: VideoAnimatable;
|
|
273
280
|
/** Silences this clip. */
|
|
@@ -344,6 +351,7 @@ declare function parseVideoAnimatable(v: unknown, path: string, range?: {
|
|
|
344
351
|
optional?: boolean;
|
|
345
352
|
}): VideoAnimatable | undefined;
|
|
346
353
|
declare function parseVideoTransform(v: unknown, path: string): VideoTransform | undefined;
|
|
354
|
+
declare function parseVideoTimeRemap(v: unknown, speed: unknown, path: string): VideoKeyframes | undefined;
|
|
347
355
|
declare function parseVideoClipAnimation(v: unknown, path: string): VideoClipAnimation | undefined;
|
|
348
356
|
declare function parseVideoGrade(v: unknown, path: string): VideoGrade | undefined;
|
|
349
357
|
declare function parseVideoTransition(v: unknown, path: string): VideoTransition | undefined;
|
|
@@ -635,6 +643,18 @@ type VideoEdit = ({
|
|
|
635
643
|
clip: string;
|
|
636
644
|
property: VideoKeyframeProperty;
|
|
637
645
|
keys: VideoKey[] | null;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* A speed ramp: keys mapping clip time to source ms after the in point (see `timeRemap`), or
|
|
649
|
+
* null to play at normal speed from where the ramp started. `duration` sets the clip's new length
|
|
650
|
+
* (default: unchanged); `ripple` moves later material with the change.
|
|
651
|
+
*/
|
|
652
|
+
| {
|
|
653
|
+
op: 'set_time_remap';
|
|
654
|
+
clip: string;
|
|
655
|
+
keys: VideoKey[] | null;
|
|
656
|
+
duration?: number;
|
|
657
|
+
ripple?: boolean;
|
|
638
658
|
} | {
|
|
639
659
|
op: 'close_gaps';
|
|
640
660
|
track: string;
|
|
@@ -1123,6 +1143,55 @@ declare function videoTranscriptEdit(assetId: string, text: string): VideoEdit;
|
|
|
1123
1143
|
/** The word playing at a timeline time, as its index in `words`, or -1. */
|
|
1124
1144
|
declare function videoWordAt(words: readonly VideoTimelineWord[], time: number): number;
|
|
1125
1145
|
|
|
1146
|
+
/**
|
|
1147
|
+
* Speed ramps and freeze frames: a media clip's `timeRemap` keys map clip time to source time after
|
|
1148
|
+
* its in point. The slope between two keys is the speed there; equal values are a freeze; an eased
|
|
1149
|
+
* segment changes speed smoothly. These helpers read and build them.
|
|
1150
|
+
*/
|
|
1151
|
+
/** Where in the source (ms) a media clip is at clip time `clipTime`, through its speed or its ramp. */
|
|
1152
|
+
declare function videoClipSourceTime(clip: VideoMediaClip, clipTime: number): number;
|
|
1153
|
+
/** The speed a media clip plays at at clip time `clipTime` (0 in a freeze), measured over a millisecond. */
|
|
1154
|
+
declare function videoClipSpeedAt(clip: VideoClip, clipTime: number): number;
|
|
1155
|
+
/** One stretch of a ramp: `duration` ms of the clip at `speed`, or easing from `speed` to `toSpeed`. 0 is a freeze. */
|
|
1156
|
+
interface VideoSpeedSegment {
|
|
1157
|
+
duration: number;
|
|
1158
|
+
speed: number;
|
|
1159
|
+
/** Ramp smoothly to this speed by the end of the stretch (default: stay at `speed`). */
|
|
1160
|
+
toSpeed?: number;
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* Remap keys for stretches of speed, from the clip's start: steady stretches are linear segments,
|
|
1164
|
+
* ramps a cubic-bezier ease that changes the speed evenly from one to the other (the source moves
|
|
1165
|
+
* the average of the two speeds over the stretch). Returns the keys and the source the clip plays.
|
|
1166
|
+
*/
|
|
1167
|
+
declare function videoSpeedRampKeys(segments: readonly VideoSpeedSegment[]): {
|
|
1168
|
+
keys: VideoKey[];
|
|
1169
|
+
duration: number;
|
|
1170
|
+
source: number;
|
|
1171
|
+
};
|
|
1172
|
+
/**
|
|
1173
|
+
* Checks remap keys: in time order and never going back in the source, eased segments included
|
|
1174
|
+
* (each is sampled, so a curve that overshoots and would play backwards is caught). Throws a
|
|
1175
|
+
* readable error.
|
|
1176
|
+
*/
|
|
1177
|
+
declare function checkVideoTimeRemap(remap: VideoKeyframes, path?: string): void;
|
|
1178
|
+
/** The stretch of source (ms, from the in point) a ramp plays: from its first key's value to its last's. */
|
|
1179
|
+
declare function videoTimeRemapSpan(remap: VideoKeyframes): {
|
|
1180
|
+
from: number;
|
|
1181
|
+
to: number;
|
|
1182
|
+
};
|
|
1183
|
+
/** Clip time and source time pairs tracing a ramp as straight lines (eased stretches sampled every `step` ms), with freezes marked. */
|
|
1184
|
+
declare function videoTimeRemapBreakpoints(remap: VideoKeyframes, step: number): {
|
|
1185
|
+
t: number;
|
|
1186
|
+
v: number;
|
|
1187
|
+
}[];
|
|
1188
|
+
/** The edit that plays a media clip through stretches of speed from the moment it shows at its start (see `videoSpeedRampKeys`). */
|
|
1189
|
+
declare function videoSpeedRampEdit(clip: VideoMediaClip, segments: readonly VideoSpeedSegment[], ripple?: boolean): VideoEdit;
|
|
1190
|
+
/** The edit that holds the frame a media clip shows at clip time `at` for `duration` ms, then plays on (the clip gets longer). */
|
|
1191
|
+
declare function videoFreezeFrameEdit(clip: VideoMediaClip, at: number, duration: number, ripple?: boolean): VideoEdit;
|
|
1192
|
+
/** A slow-motion ramp preset for a clip of `duration` ms: normal speed for half of it, a 500 ms glide down to 0.3×, then 1.5 s at 0.3×. */
|
|
1193
|
+
declare const videoSlowMotionRamp: (duration: number) => VideoSpeedSegment[];
|
|
1194
|
+
|
|
1126
1195
|
/** Radius of an iris `progress` (0–1) open: from nothing to the frame's corners. */
|
|
1127
1196
|
declare const videoIrisRadius: (frame: {
|
|
1128
1197
|
width: number;
|
|
@@ -1554,6 +1623,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
1554
1623
|
asset: string;
|
|
1555
1624
|
in?: number;
|
|
1556
1625
|
speed?: number;
|
|
1626
|
+
timeRemap?: VideoKeyframes;
|
|
1557
1627
|
volume?: VideoAnimatable;
|
|
1558
1628
|
muted?: boolean;
|
|
1559
1629
|
fadeInCurve?: VideoFadeCurve;
|
|
@@ -1771,4 +1841,4 @@ declare function videoKeyframeValueEdit(project: VideoProject, clipId: string, p
|
|
|
1771
1841
|
*/
|
|
1772
1842
|
declare function videoKeyframeToggleEdit(project: VideoProject, clipId: string, property: VideoKeyframeProperty, time: number): VideoEdit | null;
|
|
1773
1843
|
|
|
1774
|
-
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_BLEND_MODES, VIDEO_BLEND_MODE_LABELS, VIDEO_CLIP_ANIMATION_DURATION, VIDEO_CLIP_ANIMATION_EFFECTS, VIDEO_CLIP_ANIMATION_LABELS, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_FILLERS, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FADE_CURVES, VIDEO_FADE_CURVE_LABELS, VIDEO_FITS, VIDEO_GRADE_CONTROLS, VIDEO_GRADE_PRESETS, VIDEO_GRADE_PRESET_NAMES, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_PEAK_BLOCK, VIDEO_PLACEMENT_MODES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_LABELS, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, type VideoAudioLevel, type VideoAudioPeaks, VideoAudioPeaksCache, type VideoAudioPeaksLoader, type VideoAudioSource, type VideoBlendMode, type VideoCanvasContext, type VideoClip, type VideoClipAnimation, type VideoClipAnimationEffect, type VideoClipDragInput, type VideoClipDragMode, type VideoClipDragPlan, type VideoClipLocation, type VideoClipType, type VideoColorClip, type VideoEase, type VideoEdit, type VideoEditOp, type VideoEditOutcome, type VideoEditResult, VideoEditorController, type VideoEditorOptions, type VideoEditorState, type VideoEditorToolProviderOptions, type VideoEdlOptions, type VideoFadeCurve, type VideoFfmpegExport, type VideoFfmpegOptions, type VideoFit, type VideoFrame, type VideoGap, type VideoGrade, type VideoGradeControl, type VideoGradePreset, type VideoGradeStep, type VideoIssue, type VideoIssueCode, type VideoIssueSeverity, type VideoKey, type VideoKeyframeProperty, type VideoKeyframeRow, type VideoKeyframes, type VideoLayer, type VideoLoudnessMeasurement, type VideoLoudnessTarget, type VideoMarker, type VideoMediaClip, type VideoMediaProbe, type VideoPauseOptions, type VideoPlacementMode, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSilenceOptions, type VideoSnapOptions, type VideoSvgOptions, type VideoTextClip, type VideoTimelineWord, type VideoTrack, type VideoTrackKind, type VideoTranscriptRange, type VideoTranscriptWord, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWaveformMode, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, applyVideoGrade, buildVideoAudioPeaks, checkVideoProject, createVideoEditorToolProvider, createVideoProject, decodeVideoAudioPeaks, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoAudioSilences, findVideoClip, findVideoFillers, findVideoGaps, findVideoTranscriptPauses, findVideoTranscriptText, formatVideoSeconds, formatVideoTimecode, formatVideoTimecodeFrames, isVideoDropFrameRate, isVideoKeyframes, mergeVideoRanges, nextFreeVideoSlot, normalizeVideoGrade, normalizeVideoWord, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoClipAnimation, parseVideoGrade, parseVideoKeyframes, parseVideoLoudnessMeasurement, parseVideoMarker, parseVideoProject, parseVideoTrack, parseVideoTranscript, parseVideoTranscriptWords, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, toVideoLoudnessMeasure, videoAssetDropEdit, videoAssetHasSound, videoAssetKindOf, videoAssetMap, videoAudioLevels, videoAudioPeakRange, videoAudioPeakSpans, videoAudioPeaksDuration, videoClipAfter, videoClipAnimated, videoClipAnimationProperties, videoClipAnimationSpans, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipShowsWaveform, videoClipSoundGain, videoClipSourceRange, videoClipSpeed, videoClipTint, videoClipWaveform, videoClipWaveformPath, videoClipsAt, videoContactSheetSvg, videoDragLabel, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFadeCurveGain, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoGradeCssFilter, videoGradeFfmpegFilters, videoGradeGainsFilterId, videoGradePreset, videoGradeStepMatrix, videoGradeStepSvgValues, videoGradeSteps, videoGradeSvgDefs, videoGradeSvgFilter, videoHourFrames, videoIrisRadius, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoPeakDb, videoProjectDuration, videoProjectSvg, videoRemoveRangesEdits, videoRulerTicks, videoSnapPoints, videoTextStyle, videoTimecodeFrames, videoTimelineTranscript, videoTitleFrame, videoTrackSyncLocked, videoTranscriptEdit, videoTranscriptTrack, videoTransformAt, videoTransitionAudioCurve, videoTransitionEase, videoTransitionHasDirection, videoValueAt, videoWaveformPath, videoWipeRect, videoWordAt, videoWordsRange };
|
|
1844
|
+
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_BLEND_MODES, VIDEO_BLEND_MODE_LABELS, VIDEO_CLIP_ANIMATION_DURATION, VIDEO_CLIP_ANIMATION_EFFECTS, VIDEO_CLIP_ANIMATION_LABELS, VIDEO_CLIP_TYPES, VIDEO_DEFAULT_FILLERS, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EASE_NAMES, VIDEO_EDIT_OPS, VIDEO_FADE_CURVES, VIDEO_FADE_CURVE_LABELS, VIDEO_FITS, VIDEO_GRADE_CONTROLS, VIDEO_GRADE_PRESETS, VIDEO_GRADE_PRESET_NAMES, VIDEO_ISSUE_CODES, VIDEO_KEYFRAME_LIMITS, VIDEO_KEYFRAME_PROPERTIES, VIDEO_PEAK_BLOCK, VIDEO_PLACEMENT_MODES, VIDEO_TIME_EPSILON, VIDEO_TRANSFORM_PROPERTIES, VIDEO_TRANSITION_LABELS, VIDEO_TRANSITION_TYPES, VIDEO_WIPE_DIRECTIONS, type VideoAnimatable, type VideoAsset, type VideoAssetKind, type VideoAudioLevel, type VideoAudioPeaks, VideoAudioPeaksCache, type VideoAudioPeaksLoader, type VideoAudioSource, type VideoBlendMode, type VideoCanvasContext, type VideoClip, type VideoClipAnimation, type VideoClipAnimationEffect, type VideoClipDragInput, type VideoClipDragMode, type VideoClipDragPlan, type VideoClipLocation, type VideoClipType, type VideoColorClip, type VideoEase, type VideoEdit, type VideoEditOp, type VideoEditOutcome, type VideoEditResult, VideoEditorController, type VideoEditorOptions, type VideoEditorState, type VideoEditorToolProviderOptions, type VideoEdlOptions, type VideoFadeCurve, type VideoFfmpegExport, type VideoFfmpegOptions, type VideoFit, type VideoFrame, type VideoGap, type VideoGrade, type VideoGradeControl, type VideoGradePreset, type VideoGradeStep, type VideoIssue, type VideoIssueCode, type VideoIssueSeverity, type VideoKey, type VideoKeyframeProperty, type VideoKeyframeRow, type VideoKeyframes, type VideoLayer, type VideoLoudnessMeasurement, type VideoLoudnessTarget, type VideoMarker, type VideoMediaClip, type VideoMediaProbe, type VideoPauseOptions, type VideoPlacementMode, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, type VideoPreviewSource, type VideoProject, type VideoRect, type VideoRulerTick, type VideoSilenceOptions, type VideoSnapOptions, type VideoSpeedSegment, type VideoSvgOptions, type VideoTextClip, type VideoTimelineWord, type VideoTrack, type VideoTrackKind, type VideoTranscriptRange, type VideoTranscriptWord, type VideoTransform, type VideoTransition, type VideoTransitionType, type VideoWaveformMode, type VideoWipeDirection, allVideoClipIds, applyVideoEdits, applyVideoGrade, buildVideoAudioPeaks, checkVideoProject, checkVideoTimeRemap, createVideoEditorToolProvider, createVideoProject, decodeVideoAudioPeaks, describeVideoProject, drawVideoFrame, ffmpegFilterValue, findVideoAudioSilences, findVideoClip, findVideoFillers, findVideoGaps, findVideoTranscriptPauses, findVideoTranscriptText, formatVideoSeconds, formatVideoTimecode, formatVideoTimecodeFrames, isVideoDropFrameRate, isVideoKeyframes, mergeVideoRanges, nextFreeVideoSlot, normalizeVideoGrade, normalizeVideoWord, parseVideoAnimatable, parseVideoAsset, parseVideoClip, parseVideoClipAnimation, parseVideoGrade, parseVideoKeyframes, parseVideoLoudnessMeasurement, parseVideoMarker, parseVideoProject, parseVideoTimeRemap, parseVideoTrack, parseVideoTranscript, parseVideoTranscriptWords, parseVideoTransform, parseVideoTransition, placeVideoRect, planVideoClipDrag, probeVideoMedia, removeVideoKey, retimeVideoAnimatable, setVideoKey, snapToVideoFrame, snapVideoTime, sortVideoKeys, sortedVideoClips, splitVideoAnimatable, toVideoEdl, toVideoFfmpeg, toVideoLoudnessMeasure, videoAssetDropEdit, videoAssetHasSound, videoAssetKindOf, videoAssetMap, videoAudioLevels, videoAudioPeakRange, videoAudioPeakSpans, videoAudioPeaksDuration, videoClipAfter, videoClipAnimated, videoClipAnimationProperties, videoClipAnimationSpans, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipShowsWaveform, videoClipSoundGain, videoClipSourceRange, videoClipSourceTime, videoClipSpeed, videoClipSpeedAt, videoClipTint, videoClipWaveform, videoClipWaveformPath, videoClipsAt, videoContactSheetSvg, videoDragLabel, videoDropTracks, videoEaseBezier, videoEaseProgress, videoFadeCurveGain, videoFrameAt, videoFrameDuration, videoFrameToSvg, videoFrames, videoFreezeFrameEdit, videoGradeCssFilter, videoGradeFfmpegFilters, videoGradeGainsFilterId, videoGradePreset, videoGradeStepMatrix, videoGradeStepSvgValues, videoGradeSteps, videoGradeSvgDefs, videoGradeSvgFilter, videoHourFrames, videoIrisRadius, videoIssueKey, videoKeyframeBreakpoints, videoKeyframeFfmpegExpr, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoOverlap, videoPeakDb, videoProjectDuration, videoProjectSvg, videoRemoveRangesEdits, videoRulerTicks, videoSlowMotionRamp, videoSnapPoints, videoSpeedRampEdit, videoSpeedRampKeys, videoTextStyle, videoTimeRemapBreakpoints, videoTimeRemapSpan, videoTimecodeFrames, videoTimelineTranscript, videoTitleFrame, videoTrackSyncLocked, videoTranscriptEdit, videoTranscriptTrack, videoTransformAt, videoTransitionAudioCurve, videoTransitionEase, videoTransitionHasDirection, videoValueAt, videoWaveformPath, videoWipeRect, videoWordAt, videoWordsRange };
|