nodejs-audio-visualizer 5.5.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.
Files changed (49) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +84 -83
  3. package/dist/audio.d.ts +13 -13
  4. package/dist/audio.js +128 -128
  5. package/dist/beats.d.ts +39 -39
  6. package/dist/beats.js +220 -220
  7. package/dist/bpmEncoder.d.ts +14 -14
  8. package/dist/bpmEncoder.js +97 -97
  9. package/dist/config.d.ts +81 -80
  10. package/dist/config.js +392 -391
  11. package/dist/config.js.map +1 -1
  12. package/dist/dsp.d.ts +16 -16
  13. package/dist/dsp.js +76 -76
  14. package/dist/highlight.d.ts +91 -91
  15. package/dist/highlight.js +606 -606
  16. package/dist/image.d.ts +107 -97
  17. package/dist/image.js +614 -545
  18. package/dist/image.js.map +1 -1
  19. package/dist/index.d.ts +98 -96
  20. package/dist/index.js +673 -667
  21. package/dist/index.js.map +1 -1
  22. package/dist/subtitleConvert.d.ts +3 -3
  23. package/dist/subtitleConvert.js +61 -61
  24. package/dist/video.d.ts +171 -171
  25. package/dist/video.js +743 -743
  26. package/dist/waitForEventLoop.d.ts +1 -1
  27. package/dist/waitForEventLoop.js +5 -5
  28. package/package.json +62 -62
  29. package/src/audio.ts +129 -129
  30. package/src/beats.ts +279 -279
  31. package/src/bpmEncoder.ts +97 -97
  32. package/src/config.ts +504 -501
  33. package/src/dsp.ts +95 -95
  34. package/src/highlight.ts +617 -617
  35. package/src/image.ts +791 -707
  36. package/src/index.ts +896 -885
  37. package/src/subtitleConvert.ts +63 -63
  38. package/src/tests/audio.test.ts +102 -102
  39. package/src/tests/beats.test.ts +134 -134
  40. package/src/tests/config.test.ts +568 -553
  41. package/src/tests/dsp.test.ts +24 -24
  42. package/src/tests/highlight.test.ts +397 -397
  43. package/src/tests/image.test.ts +371 -319
  44. package/src/tests/index.test.ts +180 -180
  45. package/src/tests/subtitleConvert.test.ts +23 -23
  46. package/src/tests/video.test.ts +652 -652
  47. package/src/typings.d.ts +28 -28
  48. package/src/video.ts +947 -947
  49. package/src/waitForEventLoop.ts +2 -2
package/dist/config.d.ts CHANGED
@@ -1,80 +1,81 @@
1
- import { Config } from './index';
2
- export declare const defaults: {
3
- fps: number;
4
- spectrumWidth: string;
5
- spectrumHeight: number;
6
- spectrumX: string;
7
- spectrumY: string;
8
- spectrumRotation: string;
9
- spectrumBusMargin: number;
10
- spectrumOpacity: string;
11
- polarX: string;
12
- polarY: string;
13
- polarInnerRadius: number;
14
- polarMaxBarLength: number;
15
- polarBarWidth: number;
16
- timeouts: {
17
- readVideoFrame: number;
18
- waitDrain: number;
19
- waitForProcessExit: number;
20
- };
21
- };
22
- export declare type SpectrumEffect = 'volume' | 'smooth';
23
- export declare const rotationAliasValues: readonly ["up", "down", "mirror"];
24
- export declare const checkIsPercentValue: (value: string) => boolean;
25
- export declare const getAudioFilePath: (config: Config) => string;
26
- export declare const getAudioAutoHighlight: (config: Config) => boolean;
27
- export declare const getAudioAutoHighlightCount: (config: Config) => number;
28
- export declare const getBackgroundImagePath: (config: Config) => string | undefined;
29
- export declare const getBackgroundVideoPaths: (config: Config) => string[] | undefined;
30
- export declare const getHookVideoPath: (config: Config) => string | undefined;
31
- export declare const getAutoEditVideo: (config: Config) => boolean;
32
- export declare const getCameraShakeEnabled: (config: Config) => boolean;
33
- export declare const getOutVideoPath: (config: Config) => string;
34
- export declare type SubtitleAlignment = 'top' | 'middle' | 'bottom';
35
- export declare type SubtitleRenderSpec = {
36
- source: {
37
- kind: 'file';
38
- path: string;
39
- } | {
40
- kind: 'inline';
41
- text: string;
42
- };
43
- alignment: SubtitleAlignment;
44
- };
45
- export declare const subtitleAlignmentToAss: (alignment: "top" | "middle" | "bottom") => number;
46
- export declare const getSubtitleRenderSpec: (config: Config) => SubtitleRenderSpec | undefined;
47
- export declare const getFPS: (config: Config) => number;
48
- export declare const getOutputResolution: (config: Config) => {
49
- width: number;
50
- height: number;
51
- } | undefined;
52
- export declare const getEnhanceFilters: (config: Config) => boolean;
53
- export declare const getSpectrumBusMargin: () => number;
54
- export declare const getSpectrumEffect: (config: Config) => "smooth" | "volume" | undefined;
55
- export declare const getSpectrumWidthAbsolute: (config: Config, backgroundImageWidth: number) => number;
56
- export declare const getSpectrumHeightAbsolute: (config: Config, backgroundImageHeight: number) => number;
57
- export declare const getSpectrumXAbsolute: (config: Config, spectrumWidth: number, backgroundImageWidth: number) => number;
58
- export declare const getSpectrumYAbsolute: (config: Config, spectrumHeight: number, backgroundImageHeight: number) => number;
59
- export declare const checkIsValidRotationAlias: (aliasName: string) => boolean;
60
- export declare const getSpectrumRotation: (config: Config) => "up" | "down" | "mirror";
61
- export declare const getSpectrumColor: (config: Config) => string | import("./image").Color | undefined;
62
- export declare const getSpectrumOpacity: (config: Config) => string;
63
- export declare const getSpectrumOpacityParsed: (config: Config) => number;
64
- export declare const getFfmpeg_cfr: (config: Config) => string | undefined;
65
- export declare const getFfmpeg_preset: (config: Config) => string | undefined;
66
- export declare const getFrame_processing_delay: (config: Config) => number | undefined;
67
- export declare const getVideoTimeouts: (config: Config) => {
68
- readVideoFrame: number;
69
- waitDrain: number;
70
- waitForProcessExit: number;
71
- };
72
- export declare const getPolarXAbsolute: (config: Config, backgroundImageWidth: number) => number;
73
- export declare const getPolarYAbsolute: (config: Config, backgroundImageHeight: number) => number;
74
- export declare const getPolarInnerRadius: (config: Config) => number;
75
- export declare const getPolarMaxBarLength: (config: Config) => number;
76
- export declare const getPolarBarWidth: (config: Config) => number;
77
- export declare const getPolarEffect: (config: Config) => "smooth" | "volume" | undefined;
78
- export declare const getPolarColor: (config: Config) => string | import("./image").Color | undefined;
79
- export declare const getPolarOpacity: (config: Config) => string;
80
- export declare const getPolarOpacityParsed: (config: Config) => number;
1
+ import { Config } from './index';
2
+ export declare const defaults: {
3
+ fps: number;
4
+ spectrumWidth: string;
5
+ spectrumHeight: number;
6
+ spectrumX: string;
7
+ spectrumY: string;
8
+ spectrumRotation: string;
9
+ spectrumBusMargin: number;
10
+ spectrumOpacity: string;
11
+ polarX: string;
12
+ polarY: string;
13
+ polarInnerRadius: number;
14
+ polarMaxBarLength: number;
15
+ polarBarWidth: number;
16
+ timeouts: {
17
+ readVideoFrame: number;
18
+ waitDrain: number;
19
+ waitForProcessExit: number;
20
+ };
21
+ };
22
+ export declare type SpectrumEffect = 'volume' | 'smooth';
23
+ export declare const rotationAliasValues: readonly ["up", "down", "mirror"];
24
+ export declare const checkIsPercentValue: (value: string) => boolean;
25
+ export declare const getAudioFilePath: (config: Config) => string;
26
+ export declare const getAudioAutoHighlight: (config: Config) => boolean;
27
+ export declare const getAudioAutoHighlightCount: (config: Config) => number;
28
+ export declare const getBackgroundImagePath: (config: Config) => string | undefined;
29
+ export declare const getBackgroundVideoPaths: (config: Config) => string[] | undefined;
30
+ export declare const getHookVideoPath: (config: Config) => string | undefined;
31
+ export declare const getAutoEditVideo: (config: Config) => boolean;
32
+ export declare const getCameraShakeEnabled: (config: Config) => boolean;
33
+ export declare const getCutZoomEnabled: (config: Config) => boolean;
34
+ export declare const getOutVideoPath: (config: Config) => string;
35
+ export declare type SubtitleAlignment = 'top' | 'middle' | 'bottom';
36
+ export declare type SubtitleRenderSpec = {
37
+ source: {
38
+ kind: 'file';
39
+ path: string;
40
+ } | {
41
+ kind: 'inline';
42
+ text: string;
43
+ };
44
+ alignment: SubtitleAlignment;
45
+ };
46
+ export declare const subtitleAlignmentToAss: (alignment: "top" | "middle" | "bottom") => number;
47
+ export declare const getSubtitleRenderSpec: (config: Config) => SubtitleRenderSpec | undefined;
48
+ export declare const getFPS: (config: Config) => number;
49
+ export declare const getOutputResolution: (config: Config) => {
50
+ width: number;
51
+ height: number;
52
+ } | undefined;
53
+ export declare const getEnhanceFilters: (config: Config) => boolean;
54
+ export declare const getSpectrumBusMargin: () => number;
55
+ export declare const getSpectrumEffect: (config: Config) => "smooth" | "volume" | undefined;
56
+ export declare const getSpectrumWidthAbsolute: (config: Config, backgroundImageWidth: number) => number;
57
+ export declare const getSpectrumHeightAbsolute: (config: Config, backgroundImageHeight: number) => number;
58
+ export declare const getSpectrumXAbsolute: (config: Config, spectrumWidth: number, backgroundImageWidth: number) => number;
59
+ export declare const getSpectrumYAbsolute: (config: Config, spectrumHeight: number, backgroundImageHeight: number) => number;
60
+ export declare const checkIsValidRotationAlias: (aliasName: string) => boolean;
61
+ export declare const getSpectrumRotation: (config: Config) => "up" | "down" | "mirror";
62
+ export declare const getSpectrumColor: (config: Config) => string | import("./image").Color | undefined;
63
+ export declare const getSpectrumOpacity: (config: Config) => string;
64
+ export declare const getSpectrumOpacityParsed: (config: Config) => number;
65
+ export declare const getFfmpeg_cfr: (config: Config) => string | undefined;
66
+ export declare const getFfmpeg_preset: (config: Config) => string | undefined;
67
+ export declare const getFrame_processing_delay: (config: Config) => number | undefined;
68
+ export declare const getVideoTimeouts: (config: Config) => {
69
+ readVideoFrame: number;
70
+ waitDrain: number;
71
+ waitForProcessExit: number;
72
+ };
73
+ export declare const getPolarXAbsolute: (config: Config, backgroundImageWidth: number) => number;
74
+ export declare const getPolarYAbsolute: (config: Config, backgroundImageHeight: number) => number;
75
+ export declare const getPolarInnerRadius: (config: Config) => number;
76
+ export declare const getPolarMaxBarLength: (config: Config) => number;
77
+ export declare const getPolarBarWidth: (config: Config) => number;
78
+ export declare const getPolarEffect: (config: Config) => "smooth" | "volume" | undefined;
79
+ export declare const getPolarColor: (config: Config) => string | import("./image").Color | undefined;
80
+ export declare const getPolarOpacity: (config: Config) => string;
81
+ export declare const getPolarOpacityParsed: (config: Config) => number;