2024-08-09 20:20:07 +00:00
|
|
|
/** @module lib/ffprobe */
|
2024-08-15 02:43:02 +00:00
|
|
|
interface VideoInfo {
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
fps?: number;
|
|
|
|
seconds?: number;
|
|
|
|
streams?: any[];
|
|
|
|
format?: any;
|
|
|
|
}
|
2024-08-09 20:20:07 +00:00
|
|
|
/**
|
|
|
|
* Class representing all ffprobe features.
|
|
|
|
*/
|
|
|
|
export declare class FFPROBE {
|
|
|
|
private bin;
|
|
|
|
private log;
|
|
|
|
constructor(bin?: string);
|
|
|
|
exists(path: string): Promise<boolean>;
|
|
|
|
/**
|
|
|
|
* Parse the fps entry into a float representing the fps of a video
|
|
|
|
**/
|
|
|
|
private parseFps;
|
|
|
|
/**
|
|
|
|
* Get info on a video in json format. Use for filmout.
|
|
|
|
*
|
|
|
|
* @param {string} video Path to video
|
|
|
|
*
|
|
|
|
* @returns {object} Video info in an object
|
|
|
|
**/
|
2024-08-15 02:43:02 +00:00
|
|
|
info(video: string): Promise<VideoInfo>;
|
2024-08-09 20:20:07 +00:00
|
|
|
private exec;
|
|
|
|
/**
|
|
|
|
* Count the number of frames in the video using one of two methods.
|
|
|
|
* The first uses -select_streams and is very fast. The second uses
|
|
|
|
* -count_frames and is VERY slow.
|
|
|
|
*
|
|
|
|
* @param {string} video Path to video
|
|
|
|
*
|
|
|
|
* @returns {integer} Number of frames in video
|
|
|
|
**/
|
|
|
|
frames(video: string): Promise<any>;
|
|
|
|
}
|
2024-08-15 02:43:02 +00:00
|
|
|
export type { VideoInfo };
|