
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 above example converts the input file to the size of 640×480 dimension and stores the result in the path provided in the output parameter. Via npm: $ npm install examples const ffmpegPath = ffmpeg = require('fluent-ffmpeg') it installs a binary of ffmpeg for the current platform and provides a path and version. Via npm: $ npm install fluent-ffmpeg Setting binary pathįor the binary path, you can use the FFmpeg installer which is a platform-independent binary installer of FFmpeg for node projects. A local development environment for Node.js.To complete this tutorial, you will need: under a wide variety of build environments, machine architectures, and configurations. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. No matter if they were designed by some standards committee, the community, or a corporation. It supports the most obscure ancient formats up to the cutting edge. In the documentation, we read:įFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.

Manipulating a video with Node.js itself would be extremely hard, so instead, we are going to use the most popular video manipulation tool: FFmpeg.
