Class: FfmpegOutput

FfmpegOutput

A Ffmpeg Output class

Extended by both the input and output classes

Constructor

new FfmpegOutput() → {FfmpegOutput}

Source:
Returns:
Type
FfmpegOutput

Extends

Methods

duration(value) → {FfmpegBase}

When used as an input option (before -i), limit the duration of data read from the input file. When used as an output option (before an output filename), stop writing the output after its duration reaches duration.

FFMPEG Command: -t duration (input/output)

Parameters:
Name Type Description
value number | string

Duration may be a number in seconds, or in hh:mm:ss[.xxx] form.

Inherited From:
Source:
Returns:
Type
FfmpegBase

format(value) → {FfmpegBase}

Force input or output file format. The format is normally auto detected for input files and guessed from the file extension for output files, so this option is not needed in most cases.

FFMPEG Command: -f fmt (input/output)

Parameters:
Name Type Description
value
Inherited From:
Source:
Returns:
Type
FfmpegBase

pixelFormat(value) → {FfmpegBase}

Set pixel format. Use -pix_fmts to show all the supported pixel formats. If the selected pixel format can not be selected, ffmpeg will print a warning and select the best pixel format supported by the encoder. If pix_fmt is prefixed by a +, ffmpeg will exit with an error if the requested pixel format can not be selected, and automatic conversions inside filtergraphs are disabled. If pix_fmt is a single +, ffmpeg selects the same pixel format as the input (or graph output) and automatic conversions are disabled.

FFMPEG Command: -pix_fmt[:stream_specifier] format (input/output,per-stream)

Parameters:
Name Type Description
value
Inherited From:
Source:
Returns:
Type
FfmpegBase

seek(value) → {FfmpegBase}

When used as an input option (before -i), seeks in this input file to position. Note the in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position. When transcoding this extra segment between the seek point and position will be decoded and discarded. When doing stream copy it will be preserved. When used as an output option (before an output filename), decodes but discards input until the timestamps reach position. Position may be either in seconds or in hh:mm:ss[.xxx] form.

FFMPEG Command: -ss position (input/output)

Parameters:
Name Type Description
value
Inherited From:
Source:
Returns:
Type
FfmpegBase

size(width, height) → {FfmpegBase}

Set frame size. As an input option, this is a shortcut for the video_size private option, recognized by some demuxers for which the frame size is either not stored in the file or is configurable – e.g. raw video or video grabbers. As an output option, this inserts the scale video filter to the end of the corresponding filtergraph. Please use the scale filter directly to insert it at the beginning or some other place. The format is ‘wxh’ (default - same as source).

FFMPEG Command: -s[:stream_specifier] size (input/output,per-stream)

Parameters:
Name Type Description
width number
height number
Inherited From:
Source:
Returns:
Type
FfmpegBase