UNPKG

get-video-duration

Version:

Get the duration of a video file

19 lines (18 loc) 769 B
import { Readable } from '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 | undefined) => Promise<number>; export default getVideoDurationInSeconds; export { getVideoDurationInSeconds };