

The color parameter specifies which color to use for padding, and must be a color code or name supported by ffmpeg (defaults to 'black'). This method enables applying auto-padding to the output video. aspect ( 1.33333 ) autopad(): enable auto-padding the output videoĪliases: applyAutopadding(), applyAutoPadding(), applyAutopad(), applyAutoPad(), withAutopadding(), withAutoPadding(), withAutopad(), withAutoPad(), autoPad(). Note that for compatibility with some codecs, computed dimensions are always rounded down to multiples of 2.įfmpeg ( '/path/to/file.avi' ).

50%: rescale both width and height to the given percentage.If aspect() is also called, it is used to compute video width otherwise it is computed so that the input aspect ratio is preserved. ?x480: set a fixed height and compute width automatically.If aspect() is also called, it is used to compute video height otherwise it is computed so that the input aspect ratio is preserved. 640x?: set a fixed width and compute height automatically.Unless autopad() is called, this may result in the video being stretched or squeezed to fit the requested size. 640x480: set a fixed output frame size.The size argument may have one of the following formats: They all work together to generate the appropriate video filters. The following methods enable resizing the output video frame size. When options is not specified, the filter will be added without any options.įfmpeg ( '/path/to/file.avi' ). createReadStream ( '/path/to/file.avi' ) ) var command = ffmpeg ( ). Var command = ffmpeg ( '/path/to/file.avi' ) var command = ffmpeg ( fs. The fluent-ffmpeg module returns a constructor that you can use to instanciate FFmpeg commands.
#FLUENT FFMPEG PROGRESS FULL#
tFlvtoolPath(path) Argument path is a string with the full path to the flvtool2 or flvmeta binary.tFfprobePath(path) Argument path is a string with the full path to the ffprobe binary.tFfmpegPath(path) Argument path is a string with the full path to the ffmpeg binary.Setting binary paths manuallyĪlternatively, you may set the ffmpeg, ffprobe and flvtool2/flvmeta binary paths manually by using the following API commands:

If you set either the FLVTOOL2_PATH or FLVMETA_PATH, fluent-ffmpeg will try to use it instead of searching in the PATH. If you intend to encode FLV videos, you must have either flvtool2 or flvmeta installed and in your PATH or fluent-ffmpeg won't be able to produce streamable output files. deb package at (For Ubuntu, the ppa:mc3man/trusty-media PPA provides recent builds). You can either compile it from source or find a pre-built. They should be mostly compatible, but should you encounter any issue, you may want to use the real ffmpeg instead.
#FLUENT FFMPEG PROGRESS WINDOWS#
Windows users: most probably ffmpeg and ffprobe will not be in your %PATH, so you must set %FFMPEG_PATH and %FFPROBE_PATH.ĭebian/Ubuntu users: the official repositories have the ffmpeg/ffprobe executable in the libav-tools package, and they are actually rebranded avconv/avprobe executables (avconv is a fork of ffmpeg). Most features should work when using avconv and avprobe instead of ffmpeg and ffprobe, but they are not officially supported at the moment. Similarly, fluent-ffmpeg will use the FFPROBE_PATH environment variable if it is set, otherwise it will attempt to call it in the PATH.

You must also have ffprobe installed (it comes with ffmpeg in most distributions). Otherwise, it will attempt to call ffmpeg directly (so it should be in your PATH). If the FFMPEG_PATH environment variable is set, fluent-ffmpeg will use it as the full path to the ffmpeg executable. It may work with previous versions but several features won't be available (and the library is not tested with lower versions anylonger). Prerequisites ffmpeg and ffprobeįluent-ffmpeg requires ffmpeg >= 0.9 to work. You will find a lot of usage examples (including a real-time streaming example using flowplayer and express!) in the examples folder. $ git submodule add git:///schaermu/node-fluent-ffmpeg.git vendor/fluent-ffmpeg Usage
