nodejs-audio-visualizer 5.1.0 → 5.2.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.
Files changed (50) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +3 -2
  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 +78 -77
  10. package/dist/config.js +377 -369
  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 +34 -34
  15. package/dist/highlight.js +334 -334
  16. package/dist/image.d.ts +97 -92
  17. package/dist/image.js +545 -538
  18. package/dist/image.js.map +1 -1
  19. package/dist/index.d.ts +87 -79
  20. package/dist/index.js +597 -566
  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 +150 -120
  25. package/dist/video.js +677 -582
  26. package/dist/video.js.map +1 -1
  27. package/dist/waitForEventLoop.d.ts +1 -1
  28. package/dist/waitForEventLoop.js +5 -5
  29. package/package.json +62 -62
  30. package/src/audio.ts +129 -129
  31. package/src/beats.ts +279 -279
  32. package/src/bpmEncoder.ts +97 -97
  33. package/src/config.ts +487 -476
  34. package/src/dsp.ts +95 -95
  35. package/src/highlight.ts +291 -291
  36. package/src/image.ts +707 -700
  37. package/src/index.ts +79 -37
  38. package/src/subtitleConvert.ts +63 -63
  39. package/src/tests/audio.test.ts +102 -102
  40. package/src/tests/beats.test.ts +134 -134
  41. package/src/tests/config.test.ts +534 -496
  42. package/src/tests/dsp.test.ts +24 -24
  43. package/src/tests/highlight.test.ts +178 -178
  44. package/src/tests/image.test.ts +319 -308
  45. package/src/tests/index.test.ts +180 -180
  46. package/src/tests/subtitleConvert.test.ts +23 -23
  47. package/src/tests/video.test.ts +535 -447
  48. package/src/typings.d.ts +28 -28
  49. package/src/video.ts +856 -722
  50. package/src/waitForEventLoop.ts +2 -2
package/dist/config.d.ts CHANGED
@@ -1,77 +1,78 @@
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 getBackgroundVideoPath: (config: Config) => string | undefined;
30
- export declare const getAutoEditVideo: (config: Config) => boolean;
31
- export declare const getOutVideoPath: (config: Config) => string;
32
- export declare type SubtitleAlignment = 'top' | 'middle' | 'bottom';
33
- export declare type SubtitleRenderSpec = {
34
- source: {
35
- kind: 'file';
36
- path: string;
37
- } | {
38
- kind: 'inline';
39
- text: string;
40
- };
41
- alignment: SubtitleAlignment;
42
- };
43
- export declare const subtitleAlignmentToAss: (alignment: "top" | "middle" | "bottom") => number;
44
- export declare const getSubtitleRenderSpec: (config: Config) => SubtitleRenderSpec | undefined;
45
- export declare const getFPS: (config: Config) => number;
46
- export declare const getOutputResolution: (config: Config) => {
47
- width: number;
48
- height: number;
49
- } | undefined;
50
- export declare const getSpectrumBusMargin: () => number;
51
- export declare const getSpectrumEffect: (config: Config) => "smooth" | "volume" | undefined;
52
- export declare const getSpectrumWidthAbsolute: (config: Config, backgroundImageWidth: number) => number;
53
- export declare const getSpectrumHeightAbsolute: (config: Config, backgroundImageHeight: number) => number;
54
- export declare const getSpectrumXAbsolute: (config: Config, spectrumWidth: number, backgroundImageWidth: number) => number;
55
- export declare const getSpectrumYAbsolute: (config: Config, spectrumHeight: number, backgroundImageHeight: number) => number;
56
- export declare const checkIsValidRotationAlias: (aliasName: string) => boolean;
57
- export declare const getSpectrumRotation: (config: Config) => "up" | "down" | "mirror";
58
- export declare const getSpectrumColor: (config: Config) => string | import("./image").Color | undefined;
59
- export declare const getSpectrumOpacity: (config: Config) => string;
60
- export declare const getSpectrumOpacityParsed: (config: Config) => number;
61
- export declare const getFfmpeg_cfr: (config: Config) => string | undefined;
62
- export declare const getFfmpeg_preset: (config: Config) => string | undefined;
63
- export declare const getFrame_processing_delay: (config: Config) => number | undefined;
64
- export declare const getVideoTimeouts: (config: Config) => {
65
- readVideoFrame: number;
66
- waitDrain: number;
67
- waitForProcessExit: number;
68
- };
69
- export declare const getPolarXAbsolute: (config: Config, backgroundImageWidth: number) => number;
70
- export declare const getPolarYAbsolute: (config: Config, backgroundImageHeight: number) => number;
71
- export declare const getPolarInnerRadius: (config: Config) => number;
72
- export declare const getPolarMaxBarLength: (config: Config) => number;
73
- export declare const getPolarBarWidth: (config: Config) => number;
74
- export declare const getPolarEffect: (config: Config) => "smooth" | "volume" | undefined;
75
- export declare const getPolarColor: (config: Config) => string | import("./image").Color | undefined;
76
- export declare const getPolarOpacity: (config: Config) => string;
77
- 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 getAutoEditVideo: (config: Config) => boolean;
31
+ export declare const getCameraShakeEnabled: (config: Config) => boolean;
32
+ export declare const getOutVideoPath: (config: Config) => string;
33
+ export declare type SubtitleAlignment = 'top' | 'middle' | 'bottom';
34
+ export declare type SubtitleRenderSpec = {
35
+ source: {
36
+ kind: 'file';
37
+ path: string;
38
+ } | {
39
+ kind: 'inline';
40
+ text: string;
41
+ };
42
+ alignment: SubtitleAlignment;
43
+ };
44
+ export declare const subtitleAlignmentToAss: (alignment: "top" | "middle" | "bottom") => number;
45
+ export declare const getSubtitleRenderSpec: (config: Config) => SubtitleRenderSpec | undefined;
46
+ export declare const getFPS: (config: Config) => number;
47
+ export declare const getOutputResolution: (config: Config) => {
48
+ width: number;
49
+ height: number;
50
+ } | undefined;
51
+ export declare const getSpectrumBusMargin: () => number;
52
+ export declare const getSpectrumEffect: (config: Config) => "smooth" | "volume" | undefined;
53
+ export declare const getSpectrumWidthAbsolute: (config: Config, backgroundImageWidth: number) => number;
54
+ export declare const getSpectrumHeightAbsolute: (config: Config, backgroundImageHeight: number) => number;
55
+ export declare const getSpectrumXAbsolute: (config: Config, spectrumWidth: number, backgroundImageWidth: number) => number;
56
+ export declare const getSpectrumYAbsolute: (config: Config, spectrumHeight: number, backgroundImageHeight: number) => number;
57
+ export declare const checkIsValidRotationAlias: (aliasName: string) => boolean;
58
+ export declare const getSpectrumRotation: (config: Config) => "up" | "down" | "mirror";
59
+ export declare const getSpectrumColor: (config: Config) => string | import("./image").Color | undefined;
60
+ export declare const getSpectrumOpacity: (config: Config) => string;
61
+ export declare const getSpectrumOpacityParsed: (config: Config) => number;
62
+ export declare const getFfmpeg_cfr: (config: Config) => string | undefined;
63
+ export declare const getFfmpeg_preset: (config: Config) => string | undefined;
64
+ export declare const getFrame_processing_delay: (config: Config) => number | undefined;
65
+ export declare const getVideoTimeouts: (config: Config) => {
66
+ readVideoFrame: number;
67
+ waitDrain: number;
68
+ waitForProcessExit: number;
69
+ };
70
+ export declare const getPolarXAbsolute: (config: Config, backgroundImageWidth: number) => number;
71
+ export declare const getPolarYAbsolute: (config: Config, backgroundImageHeight: number) => number;
72
+ export declare const getPolarInnerRadius: (config: Config) => number;
73
+ export declare const getPolarMaxBarLength: (config: Config) => number;
74
+ export declare const getPolarBarWidth: (config: Config) => number;
75
+ export declare const getPolarEffect: (config: Config) => "smooth" | "volume" | undefined;
76
+ export declare const getPolarColor: (config: Config) => string | import("./image").Color | undefined;
77
+ export declare const getPolarOpacity: (config: Config) => string;
78
+ export declare const getPolarOpacityParsed: (config: Config) => number;