UNPKG

get-video-duration

Version:
19 lines (18 loc) 767 B
import type { Readable } from "node:stream"; /** * Returns a promise that will be resolved with the duration of given video in * seconds. * * @param input Stream or URL or path to file to be used as * input for `ffprobe`. * @param [ffprobePath] Optional. Path to `ffprobe` binary. Do not provide any * value for this parameter unless you need to override the path to `ffprobe`. * Defaults to the path provided by `@ffprobe-installer/ffprobe`, which works in * most environments. * * @return Promise that will be resolved with given video duration in * seconds. */ declare const getVideoDurationInSeconds: (input: string | Readable, ffprobePath?: string) => Promise<number>; export default getVideoDurationInSeconds; export { getVideoDurationInSeconds };