Files
NapCatQQ/.pnpm-store/v3/files/76/e7a392c4414c22f41394613837a3fb6f34ee38afd481197085e7f9d377e244c228528a14f4e8b92ff6414d432faeebeed98d562c6233714228ff251c4657fc
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

48 lines
1.3 KiB
Plaintext

/**
* FFmpeg Native Addon Adapter
* 使用原生 Node.js Addon 实现的 FFmpeg 适配器
*/
import type { IFFmpegAdapter, VideoInfoResult } from './ffmpeg-adapter-interface';
/**
* FFmpeg Native Addon 适配器实现
*/
export declare class FFmpegAddonAdapter implements IFFmpegAdapter {
readonly name = "FFmpegAddon";
private addon;
private binaryPath;
constructor(binaryPath: string);
/**
* 检查 Addon 是否可用
*/
isAvailable(): Promise<boolean>;
private ensureAddon;
/**
* 获取视频信息
*/
getVideoInfo(videoPath: string): Promise<VideoInfoResult>;
/**
* 获取时长
*/
getDuration(filePath: string): Promise<number>;
/**
* 判断是否为 Silk 格式
*/
isSilk(filePath: string): Promise<boolean>;
/**
* 转换为 PCM
*/
convertToPCM(filePath: string, pcmPath: string): Promise<{
result: boolean;
sampleRate: number;
}>;
/**
* 转换文件
*/
convertFile(inputFile: string, outputFile: string, format: string): Promise<void>;
convertToNTSilkTct(inputFile: string, outputFile: string): Promise<void>;
/**
* 提取缩略图
*/
extractThumbnail(videoPath: string, thumbnailPath: string): Promise<void>;
}