@eleven-am/transcoder
Version:
High-performance HLS transcoding library with hardware acceleration, intelligent client management, and distributed processing support for Node.js
73 lines • 1.95 kB
TypeScript
import { Readable } from 'stream';
import { ExtendedEventEmitter } from './utils';
interface FfmpegEventMap {
'start': {
command: string;
};
'progress': {
segment: number;
};
'end': void;
'error': Error;
}
export declare class FfmpegCommand extends ExtendedEventEmitter<FfmpegEventMap> {
private readonly inputPath;
private inputOpts;
private outputOpts;
private videoFilterOpts;
private outputPath;
private process;
private isRunning;
private processTimeout;
private readonly processTimeoutMs;
constructor(inputPath: string);
/**
* Add input options to the command
* @param options Array of input options
*/
inputOptions(options: string[]): FfmpegCommand;
/**
* Add output options to the command
* @param options Array of output options
*/
outputOptions(options: string[]): FfmpegCommand;
/**
* Add video filters to the command
* @param filters Video filter string
*/
videoFilters(filters: string): FfmpegCommand;
/**
* Set the output path
* @param outputPath Path for the output file
*/
output(outputPath: string): FfmpegCommand;
/**
* Execute the FFmpeg command
*/
run(): void;
/**
* Kill the FFmpeg process
* @param signal Signal to send to the process
*/
kill(signal?: NodeJS.Signals): void;
/**
* Cleanup resources
*/
private cleanup;
/**
* Pipe the FFmpeg output to a stream rather than a file
* @returns The stdout stream from the FFmpeg process
*/
pipe(): Readable;
/**
* Build the complete FFmpeg command arguments
*/
private buildArgs;
}
/**
* Factory function that mimics the fluent-ffmpeg module's interface
* @param inputPath Input file path
*/
export default function ffmpeg(inputPath: string): FfmpegCommand;
export {};
//# sourceMappingURL=ffmpeg.d.ts.map