simple-ffmpegjs 0.5.2 → 0.5.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.
- package/README.md +3 -1
- package/package.json +10 -3
- package/src/core/media_info.js +5 -5
- package/src/core/rotation.js +4 -4
- package/src/core/validation.js +228 -170
- package/src/ffmpeg/audio_builder.js +1 -1
- package/src/ffmpeg/bgm_builder.js +5 -5
- package/src/ffmpeg/command_builder.js +6 -6
- package/src/ffmpeg/effect_builder.js +11 -11
- package/src/ffmpeg/standalone_audio_builder.js +75 -0
- package/src/ffmpeg/strings.js +4 -17
- package/src/ffmpeg/subtitle_builder.js +6 -14
- package/src/ffmpeg/text_passes.js +33 -8
- package/src/ffmpeg/text_renderer.js +17 -17
- package/src/ffmpeg/video_builder.js +6 -4
- package/src/ffmpeg/watermark_builder.js +1 -1
- package/src/lib/utils.js +4 -4
- package/src/loaders.js +8 -8
- package/src/schema/formatter.js +15 -15
- package/src/schema/index.js +4 -4
- package/src/schema/modules/music.js +1 -1
- package/src/simpleffmpeg.js +166 -167
- package/types/index.d.ts +20 -0
package/types/index.d.ts
CHANGED
|
@@ -979,6 +979,26 @@ declare class SIMPLEFFMPEG {
|
|
|
979
979
|
*/
|
|
980
980
|
static getDuration(clips: SIMPLEFFMPEG.Clip[]): number;
|
|
981
981
|
|
|
982
|
+
/**
|
|
983
|
+
* Calculate the total transition overlap for a clips configuration.
|
|
984
|
+
* Returns the total seconds consumed by xfade transition overlaps
|
|
985
|
+
* among visual clips (video, image, color).
|
|
986
|
+
*
|
|
987
|
+
* Pure function — same clips always produce the same result. No file I/O.
|
|
988
|
+
*
|
|
989
|
+
* @param clips - Array of clip objects
|
|
990
|
+
* @returns Total transition overlap in seconds
|
|
991
|
+
*
|
|
992
|
+
* @example
|
|
993
|
+
* const overlap = SIMPLEFFMPEG.getTransitionOverlap([
|
|
994
|
+
* { type: "video", url: "./a.mp4", duration: 5 },
|
|
995
|
+
* { type: "video", url: "./b.mp4", duration: 10,
|
|
996
|
+
* transition: { type: "fade", duration: 0.5 } },
|
|
997
|
+
* ]);
|
|
998
|
+
* // overlap === 0.5
|
|
999
|
+
*/
|
|
1000
|
+
static getTransitionOverlap(clips: SIMPLEFFMPEG.Clip[]): number;
|
|
1001
|
+
|
|
982
1002
|
/**
|
|
983
1003
|
* Probe a media file and return comprehensive metadata.
|
|
984
1004
|
*
|