import { type IAgentRuntime, IVideoService, type Media, type Service, type VideoDownloadOptions, type VideoFormat, type VideoInfo, type VideoProcessingOptions } from "@elizaos/core"; import { BinaryResolver } from "./binaries"; /** Minimal yt-dlp JSON shape used by this service (fields vary by extractor). */ interface YtDlpSubtitleTrack { url: string; ext?: string; } interface YtDlpJson { title?: string; description?: string; channel?: string; duration?: number; thumbnail?: string; view_count?: number; upload_date?: string; formats?: unknown; categories?: string[]; subtitles?: Record; automatic_captions?: Record; } export declare class VideoService extends IVideoService { readonly capabilityDescription = "Video download, processing, and conversion capabilities"; static readonly serviceType: "video"; private cacheKey; private dataDir; private readonly binaries; private ffmpegPathConfigured; /** Serialize downloads/processing so cache keys and temp files do not race. */ private processingChain; constructor(runtime?: IAgentRuntime, binaries?: BinaryResolver); static start(runtime: IAgentRuntime): Promise; initialize(_runtime: IAgentRuntime): Promise; private configureFfmpeg; stop(): Promise; getVideoInfo(url: string): Promise; downloadVideo(url: string, options?: VideoDownloadOptions): Promise; extractAudio(videoPath: string, outputPath?: string): Promise; getThumbnail(videoPath: string, timestamp?: number): Promise; convertVideo(videoPath: string, outputPath: string, options?: VideoProcessingOptions): Promise; getAvailableFormats(url: string): Promise; private ensureDataDirectoryExists; isVideoUrl(url: string): boolean; downloadMedia(url: string): Promise; processVideo(url: string, runtime: IAgentRuntime): Promise; private processVideoFromUrl; private getVideoId; fetchVideoInfo(url: string): Promise; private getTranscript; private downloadCaption; private parseCaption; private parseSRT; private downloadSRT; transcribeAudio(url: string, runtime: IAgentRuntime): Promise; private convertMp4ToMp3; private downloadAudio; } export {};