A Node JS Express/Serverless demo application that creates a slideshow video using the Pexels image library and Shotstack video editing API.

Overview

Shotstack Pexels Slideshow Video Demo

This project demonstrates how to use the Shotstack cloud video editing API to create a video using an HTML form and images sourced from the Pexels image library.

An HTML web form allows the user to search the Pexels library via the Pexels API, choose a soundtrack and add a title. Luma matte transitions are also used to create a more engaging video effect. The final video is the created by the Shotstack API using the images returned by the Pexels search and the soundtrack and title entered by the user.

View the live demo at: https://shotstack.io/demo/pexels-slideshow/

The demo is built using Node JS and can be used with either Express Framework or deployed as a serverless projects using AWS Lambda and API Gateway.

Requirements

Project Structure

The project is divided in to a two components:

Backend API

The backend API with an endpoint which searches the Pexels API, prepares the edit and posts the data to the Shotstack API. A status endpoint is also available which can be polled to return the status of the video as it renders.

The backend API source code is in the api directory.

Frontend Web Form & Player

The frontend is a simple HTML form that allows the user to enter a search term and basic options to create a video. The form uses jQuery to submit the data to the backend API and poll the status of the current render. There is also a video player that is loaded with the final rendered video when ready.

The front end API source code is in the web directory.

Installation

Install node module dependencies:

cd api
npm install

Configuration

Copy the .env.dist file and rename it .env:

cp .env.dist .env

Replace the environment variables below with your Pexels and Shotstack API key (staging key):

PEXELS_API_KEY=replace_with_your_pexels_key
SHOTSTACK_API_KEY=replace_with_your_shotstack_key

Run Locally

To start the API and serve the front end form (from the api directory):

npm run start

The visit http://localhost:3000

Deploy Serverless Application (optional)

The project has been built as a serverless application using the Serverless Framework and AWS Lambda. To understand more about the Serverless Framework and how to set everything up consult the documentation: https://serverless.com/framework/docs/providers/aws/

To deploy to AWS Lambda (from the api directory):

cd api
npm run serverless

Once the API is deployed set the var apiEndpoint variable in web/app.js to the returned API Gateway URL.

Run the web/index.html file locally or use AWS S3 static hosting to serve the web page.

You might also like...

Rebuilding TikTok with api.video, PWA, Next.js and Typescript 🎵

Rebuilding TikTok with api.video, PWA, Next.js and Typescript 🎵

Rebuilding TikTok with api.video, PWA, Next.js and Typescript 🎵 An open-source example application that allows users to list and upload videos in the

Jul 1, 2022

Free Anime Streaming Website Made with PHP and Gogoanime API. No Video ads

Free Anime Streaming Website Made with PHP and Gogoanime API. No Video ads

AniKatsu - Watch High Quality Anime Online Without Ads Demo https://anikatsu.ga This is a PHP application used for browsing, searching and watching an

Nov 7, 2022

This is a simple web based media player for playing video and audio. Build with pure HTML, CSS and Javascript. No framework or library included.

Aim-Player This is a simple web based media player for playing video and audio. Build with pure HTML, CSS and Javascript. No framework or library incl

Jun 27, 2021

Library to calculate a Mean Opinion Score (MOS) from 1 to 5 for audio and video real time communications

RTC SCORE Library to calculate a Mean Opinion Score (MOS) from 1 to 5 for audio and video real time communications. The first version of the algorithm

Nov 27, 2022

Bookwise is a video library web app that consists of a collection of Videos

Bookwise is a video library web app that consists of a collection of Videos

Bookwise is a video library web app that consists of a collection of Videos. It has features such as like videos, creating playlists, adding videos to playlists, adding to watch later, history, feed, etc. but of a specific niche.

Jun 13, 2022

A JavaScript library for optimizing html pages with video content that prevents videos from loading on mobile devices.

📱 js-vido — JavaScript Video Download Optimizer A JavaScript library for optimizing html pages with video content that prevents videos from loading o

Feb 9, 2021

A video media file convertor using FFmpeg's web assembly port

A video media file convertor using FFmpeg's web assembly port

Aug 25, 2022

A multi-purpose discord bot, that has 100+ commands. Includes 🎶 Music, 📷 Image Generation, 📊 Leaderboard, and more!

Cleckzie An open-source, multi-purpose discord bot, made with JavaScript. Has useful categories like: 🎶 Music - filter, seek, queue, volume and more.

Jul 2, 2022

Tritan is a Discord.js bot that has many general-purpose features such as logging, moderation, image manipulation, music, and much more!

Tritan Bot Tritan Bot is a Discord Verified general purpose bot built with discord.js and express (yes, it has a dashboard included). Please read thro

Jul 3, 2022
Owner
Shotstack
The Cloud Video Editing API
Shotstack
Multer-Cloudinary-MERN-image-video-pdf-upload

MERN Image,Video and PDF Upload using multer and Cloudinary Many times while building full stack application,we need to upload images, videos and pdf

Jaydip Dey 10 Dec 19, 2022
A Chrome extension to help you inspect Mp4 video content and find irregularities in video streams.

MP4Inspector A Chrome extension to help you inspect Mp4 video content and find irregularities in video streams. Installation In chrome navigate to chr

Bitmovin 48 Nov 28, 2022
Reference video calling application using Dolby.io Communications APIs.

Dolby.io Communications Video Call React App Video Call App The application available in this repository demonstrates the capabilities of Dolby.io's v

Dolby.io Samples 17 Jan 2, 2023
Video.js - open source HTML5 & Flash video player

Video.js - HTML5 Video Player Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 video and Media Source Ext

Video.js 34.8k Jan 5, 2023
A web video player built for the HTML5 world using React library.

video-react Video.React is a web video player built from the ground up for an HTML5 world using React library. Installation Install video-react and pe

null 2.4k Jan 6, 2023
Heroku setup demo

heroku-demo A basic guide to setting up a project hosted on Heroku with a PostgreSQL database using Giovanna Aveiro's and OliverJam's tutorial for Fou

Safia 7 Mar 31, 2022
An attempt to create the simplest demo to describe a Consumer-Driven Contract Testing workflow with Pact

Let's Play with Pact Abstract This is an attempt to create the simplest demo to describe a Consumer-Driven Contract Testing workflow with Pact. Prereq

Patrice Krakow 4 Feb 22, 2022
HTML5

One file. Any browser. Same UI. Author: John Dyer http://j.hn/ Website: http://mediaelementjs.com/ License: MIT Meaning: Use everywhere, keep copyrigh

MediaElement.js 8k Dec 27, 2022
HTML5

One file. Any browser. Same UI. Author: John Dyer http://j.hn/ Website: http://mediaelementjs.com/ License: MIT Meaning: Use everywhere, keep copyrigh

MediaElement.js 8k Jan 8, 2023
Web Application that represents a music player using the spotify API, React, JS, CSS, HTML, nodeJS, Firebase, material-ui, JSON and other technologies. Made by Yohan Hmaiti

Web Application that represents a music player using the spotify API, React, JS, CSS, HTML, nodeJS, Firebase, material-ui, JSON and other technologies. Made by Yohan Hmaiti

Yohan Hmaiti 2 Jan 8, 2022