@eleven-am/transcoder
Version:
High-performance HLS transcoding library with hardware acceleration, intelligent client management, and distributed processing support for Node.js
80 lines • 3.22 kB
TypeScript
import { TaskEither } from '@eleven-am/fp';
import { CodecType, FFMPEGOptions, HardwareAccelerationConfig } from './types';
export declare class HardwareAccelerationDetector {
/**
* Detect the best available hardware acceleration method
* @returns A TaskEither with the hardware acceleration configuration
*/
detectHardwareAcceleration(): TaskEither<HardwareAccelerationConfig>;
/**
* Apply the hardware acceleration configuration to FFmpeg options
* @param hwConfig Hardware acceleration configuration
* @param width Target width
* @param height Target height
* @param codec Target codec (h264 or h265)
* @returns Object with inputOptions, outputOptions, and videoFilters
*/
applyHardwareConfig(hwConfig: HardwareAccelerationConfig | null, width: number, height: number, codec?: CodecType): FFMPEGOptions;
/**
* Check if FFmpeg supports hardware acceleration with comprehensive testing
* @returns A TaskEither with a boolean indicating if hardware acceleration is supported
*/
private checkFfmpegHardwareAccelerationSupport;
/**
* Detect CUDA (NVIDIA) hardware acceleration support with comprehensive testing
* @returns A TaskEither with the CUDA hardware acceleration configuration
*/
private detectCuda;
/**
* Detect VAAPI (Intel/AMD on Linux) hardware acceleration support with comprehensive testing
* @returns A TaskEither with the VAAPI hardware acceleration configuration
*/
private detectVAAPI;
/**
* Detect VideoToolbox (macOS) hardware acceleration support with device testing
* @returns A TaskEither with the VideoToolbox hardware acceleration configuration
*/
private detectVideoToolbox;
/**
* Detect AMF (AMD) hardware acceleration support with device testing
* @returns A TaskEither with the AMF hardware acceleration configuration
*/
private detectAmf;
/**
* Detect Intel QuickSync Video support with device testing
* @returns A TaskEither with the QSV hardware acceleration configuration
*/
private detectQsv;
/**
* Get software encoding configuration (fallback)
* @returns Software encoding configuration
*/
private getSoftwareConfig;
/**
* Get CUDA hardware acceleration configuration
* @returns CUDA hardware acceleration configuration
*/
private getCudaConfig;
/**
* Get VAAPI hardware acceleration configuration
* @param renderDevice Path to render device (e.g. /dev/dri/renderD128)
* @returns VAAPI hardware acceleration configuration
*/
private getVAAPIConfig;
/**
* Get VideoToolbox hardware acceleration configuration
* @returns VideoToolbox hardware acceleration configuration
*/
private getVideoToolboxConfig;
/**
* Get AMD AMF hardware acceleration configuration
* @returns AMF hardware acceleration configuration
*/
private getAmfConfig;
/**
* Get Intel QuickSync Video hardware acceleration configuration
* @returns QSV hardware acceleration configuration
*/
private getQsvConfig;
}
//# sourceMappingURL=hardwareAccelerationDetector.d.ts.map