Create Slideshow Video using Node.js

If you have multiple pictures that you want to compose into a compelling video, then perhaps consider creating a video slideshow of them using a few subtitle animations. This makes it way more interesting to be shared on social media, such as Instagram, Facebook, TikTok, and Twitter. Here are a few use cases for why you want to generate slideshows using Node.js:
  • Create video by static images
  • Automating social media with Node.js
  • Developing Node.js slideshow creators

Tutorial: How to Generate Slideshows with Node.js

Of course, if you want to do this at scale, you are looking for a way to automate this process. If you're already familiar with Node.js, this isn't difficult to accomplish. Generating a slideshow with Node.js is as simple as using the Video API library of Creatomate. This library allows you to create video in Node.js without needing powerful hardware on the system where your application is running.

Start with a video template

To generate a slideshow, we first have to start by creating a slideshow template. There are a number of slideshow video templates available that are pre-made and can be used out-of-the-box.

However, it is also possible to create your own slideshow designs using the online video editor. This editor provides a drag-and-drop environment where you can make your own designs.

npm install creatomate
const Creatomate = require('creatomate');
const client = new Creatomate.Client('Your API key');

await client.render({
  templateId: 'Your Slideshow Template ID',

  modifications: {
    'Title': 'A Custom Slideshow Title',
    'Slide-1-Photo': '',
    'Slide-2-Photo': '',
    'Slide-3-Photo': '',

Set up a Node.js script

Once you have a video template, you can then use it from your Node.js applications. To do this, install the Creatomate Node.js SDK that can be found on NPM. Then from your code, import the library and set your API key for communicating with the video servers.

Then, it is simply a matter of calling the render method and refering to your video template from step 1. By specifying any modifications, we can create a slideshow based on that template. In this example, we are replacing the pictures in the slideshow template with our own ones. After the function completes, we'll get back a MP4.

Start generating 100s of slideshows

As you can see, by utilizing Node.js and a video template, we generated a single slideshow video. You can imagine that generating hundreds of slideshow videos in bulk by calling the function each time we want to create a new video.

As the process of generating the video slideshows is running on Creatomate's servers, there no need to scale up your own hardware, as call to render simply spins up a video server in the cloud to render our slideshow at scale.

Frequently asked questions

How do I make a slideshow using Node.js?
To create a slideshow in Node.js, simply import the Creatomate Video API package into your application, and start rendering a MP4 from a video template. This package is available on NPM and can be installed using npm install creatomate.
What's the best video API to create slideshows?
Creatomate is the most recommended video API for creating slideshow videos from a collection of pictures. This is because each the software allows you to design your own slideshow template, then use the powerful API to create a video based on that template.
Do I need to use a video template?
No. The API allows you to generate slideshow video from a JSON-based format as well, allowing you to generate very dynamic slideshows with Node.js and dynamically generated JSON. This feature is particularly useful for slideshows that contain a variable amount of photos and slides.
How can video slideshows be generated by Node.js?
A video slideshow can be generated by using any variety of images, and turning it into a video MP4. This can all be accomplished from within your Node.js application without installing any heavy software. You'll only need to connect to an API that does the heavy lifting.
Do I need additional hardware to create video slideshows?
No! We outsource the entire video rendering process to Creatomate's video cloud servers that scale up automatically according to demand, so you don't have to rent expensive cloud servers for creating video slideshows. It is as simple as calling the API and receiving an MP4 video in return.
Can't I just use FFmpeg to generate video slideshows?
Although FFmpeg is capable of creating video slideshows based on a collection of pictures, the slideshows generated by FFmpeg offer limited possibilities in terms of customization and styling. Furthermore, it is considerably more expensive as you will be required to manage your own video processing servers, which is more costly than using Creatomate's video API.

Quickly get started

Learn how to automate your videos by following our practical tutorials.

Start automating today

Start with a full-featured trial with 50 credits, no credit card required.
Get started for free