The Node.js video editor SDK includes all the tools you need to edit video in your Node.js apps. It uses the Creatomate video editing API, which is a fully managed service for creating video in the cloud. When combined with the Preview SDK, developers can build complete video creation applications for both the frontend and the backend.
The following example demonstrates how to edit video on the backend using Node.js and the video editor, however, you can also integrate the editor into your application's frontend to allow users to edit videos themselves – all in the browser.
The online editor makes it possible to design reusable video editing templates. It offers hundreds of video editing features that can all be accessed through Node.js. These include cutting, trimming, stitching, transitions, filters, (text) animations, masking, blending, blurring, color overlays, and many more.
First, install the Creatomate Node.js package from NPM or GitHub. Once installed, creating a video is as simple as specifying the template ID and providing any values that you wish to include in the video. As soon as the "render" function completes, an MP4 file is returned.
As an alternative, you can replace the "template_id" parameter with "source" and provide any video editing instructions in JSON format. This allows you to generate an entire video from scratch within your Node.js application, for example, if you want to edit video that doesn't follow a specific template.
The process is that simple. For more examples, check out the Node.js examples in this GitHub repository.
As you can see from the example above, no matter if you're editing video by template or entirely by code, this offers a very flexible way to edit without having to manage your own server infrastructure. Our video editing API uses an auto-scaling cloud infrastructure, ensuring enough capacity even if thousands of videos are being processed at once.
Creatomate's video SDKs give you everything you need to build video editing apps, from the Node.js video editing library to the Preview SDK for rendering video in the browser.
As video editing is a CPU-intensive process that requires a powerful infrastructure, it is recommended to use a cloud-based video API for rendering. One such API is Creatomate, which can be used in your Node.js applications simply by installing the video editing SDK from NPM. The SDK can perform any video rendering tasks, such as stitching, trimming, resizing, and rendering from a video template.
FFmpeg offers some video editing capabilities for running on a local device, but it's challenging to run it in the cloud. For example, you need to ensure that your infrastructure is capable of handling concurrent video processing. Furthermore, it doesn't offer much video editing features. In fact, it was for these very reasons that we created the Creatomate API.
Compared to building your own video editing infrastructure, Creatomate's video editing API is considerably less costly. Its pricing begins at a level comparable to that of a single AWS EC2 server. However, an EC2 server can only handle one video at a time and needs maintenance, not to mention you have to develop your own rendering software.