add-music-to-video
Version:
Add background music to my videos very easily
31 lines (30 loc) • 1.5 kB
TypeScript
/// <reference types="node" />
import { CliOptions } from "../../types/cli";
declare const channels: readonly [{
readonly title: "Local File System";
readonly value: "local";
}, {
readonly title: "Youtube";
readonly value: "youtube";
}, {
readonly title: "Random";
readonly value: "random";
}];
export type Channel = (typeof channels)[number]["value"];
export declare const downloadMusic: (duration: number, options?: CliOptions, { select, getLocalMusic, getYoutubeMusic, getRandomMusic, }?: {
select?: (() => Promise<Channel>) | undefined;
getLocalMusic?: ((duration: number, { truncate, getFilePath }?: {
truncate?: ((mp3File: string, duration: number) => Promise<string>) | undefined;
getFilePath?: ((root?: string | undefined) => Promise<string>) | undefined;
}) => Promise<string>) | undefined;
getYoutubeMusic?: ((duration: number, { getYoutubeUrl, download, convert, truncate, }?: {
getYoutubeUrl?: (() => Promise<string>) | undefined;
download?: ((url: string) => Promise<string>) | undefined;
convert?: ((m4aFile: string) => Promise<string>) | undefined;
truncate?: ((mp3File: string, duration: number) => Promise<string>) | undefined;
}) => Promise<string>) | undefined;
getRandomMusic?: ((duration: number, { getStream, }?: {
getStream?: ((outFilePath: string) => Promise<import("stream").Readable>) | undefined;
}) => Promise<string>) | undefined;
}) => Promise<string>;
export {};