nodejs-audio-visualizer 5.6.3 → 5.6.4
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.js +2 -2
- package/package.json +1 -1
- package/src/video.ts +2 -2
package/dist/video.js
CHANGED
|
@@ -96,7 +96,7 @@ exports.spawnFfmpegVideoWriter = function (config) {
|
|
|
96
96
|
return ffmpeg;
|
|
97
97
|
};
|
|
98
98
|
exports.detectSceneChanges = function (videoPath, threshold) {
|
|
99
|
-
if (threshold === void 0) { threshold = 0.
|
|
99
|
+
if (threshold === void 0) { threshold = 0.3; }
|
|
100
100
|
return new Promise(function (resolve, reject) {
|
|
101
101
|
if (!ffmpeg_static_1.default) {
|
|
102
102
|
reject(new Error('ffmpeg path not found'));
|
|
@@ -387,7 +387,7 @@ exports.waitForProcessExit = function (processStream, timeoutMs) {
|
|
|
387
387
|
});
|
|
388
388
|
};
|
|
389
389
|
var mergeSmallScenes = function (sceneChanges, videoDuration, minDuration) {
|
|
390
|
-
if (minDuration === void 0) { minDuration =
|
|
390
|
+
if (minDuration === void 0) { minDuration = 1; }
|
|
391
391
|
if (sceneChanges.length === 0)
|
|
392
392
|
return [];
|
|
393
393
|
var merged = [sceneChanges[0]];
|
package/package.json
CHANGED
package/src/video.ts
CHANGED
|
@@ -146,7 +146,7 @@ export interface SceneChange {
|
|
|
146
146
|
ptsTime: number;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
export const detectSceneChanges = (videoPath: string, threshold = 0.
|
|
149
|
+
export const detectSceneChanges = (videoPath: string, threshold = 0.3): Promise<SceneChange[]> =>
|
|
150
150
|
new Promise((resolve, reject) => {
|
|
151
151
|
if (!ffmpegPath) {
|
|
152
152
|
reject(new Error('ffmpeg path not found'));
|
|
@@ -496,7 +496,7 @@ export interface VideoSegment {
|
|
|
496
496
|
videoIndex?: number;
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
-
const mergeSmallScenes = (sceneChanges: SceneChange[], videoDuration: number, minDuration =
|
|
499
|
+
const mergeSmallScenes = (sceneChanges: SceneChange[], videoDuration: number, minDuration = 1): SceneChange[] => {
|
|
500
500
|
if (sceneChanges.length === 0) return [];
|
|
501
501
|
const merged: SceneChange[] = [sceneChanges[0]];
|
|
502
502
|
for (let i = 1; i < sceneChanges.length; i++) {
|