Skip to content

kukhariev/ffmpeg-progress

Repository files navigation

ffmpeg-progress

npm CI

Extract progress status from FFmpeg

Install

npm install  @dropb/ffmpeg-progress

Usage

see examples

API

interface FfmpegProgressEvent {
  frame: number;
  fps: number;
  size: number;
  time: string;
  bitrate: number;
  speed: number;
  /**
   * Time (milliseconds)
   */
  time_ms: number;
  /**
   * ETA (milliseconds)
   */
  remaining?: number;
  /**
   * Progress percentage
   */
  percentage?: number;
}

FfmpegProgress Pipe

new FfmpegProgress(duration?: number)

Creates an instance of FfmpegProgress Pipe. (optional) duration - override video duration (milliseconds). Default - auto detect.

public properties:

  • exitMessage - error message
  • duration

parseProgress

parseProgress(data: string, duration?: number): FfmpegProgressEvent

License

MIT