Discord Player

FFmpeg

No description provided

FFmpeg extends Duplex

new FFmpeg(options);
ParameterTypeOptionalDescription
optionsFFmpegOptionsOptions to initialize ffmpeg

Properties

public process: any

Current FFmpeg process

public static sources: any

Supported FFmpeg sources.

public _reader: any

public _writer: any

Methods

public static addSource(source): boolean

Adds a new FFmpeg source.

ParameterTypeOptionalDescription
sourceFFmpegSourceFFmpeg source

public static isLoaded(): boolean

Checks if FFmpeg is loaded.

public static removeSource(source): boolean

Removes a FFmpeg source.

ParameterTypeOptionalDescription
sourceFFmpegSourceFFmpeg source

public static resolve(force?): ResolvedFFmpegSource

Resolves FFmpeg path. Throws an error if it fails to resolve.

ParameterTypeOptionalDescription
forcebooleanif it should relocate the command
### public static resolveSafe(force?): nullResolvedFFmpegSource

Resolves FFmpeg path safely. Returns null if it fails to resolve.

ParameterTypeOptionalDescription
forcebooleanif it should relocate the command

public static spawn(options?): ChildProcessWithoutNullStreams

Spawns ffmpeg process

ParameterTypeOptionalDescription
options{ args: Array<string>; shell: boolean; }Spawn options