Create videos programmatically in the cloud from PHP: add watermarks, resize videos, create slideshows, add soundtrack, voice-over with text-to-speech (TTS), text animations.

Overview

Create videos programmatically in PHP

Create and edit videos: add watermarks, resize videos, create slideshows, add soundtrack, automate the creation of videos in multiple languages, add voice-over, add text animations.

JSON2Video API is the easiest way to create, edit and customise videos programmatically. Its dead simple approach, close to the web development mindset, makes it the ultimate solution for developers that want to create or customise videos in an automated way.

Additionally, the simple integration of real HTML5+CSS elements, the already built-in text animations and voice generation (TTS) converts JSON2Video in the best solution in its category.

Use cases

  • Automate the production of promotional videos for your e-commerce products
  • Automate publication of social media videos created directly from your news feed
  • Customize your advertising campaigns with different images, videos, texts and create tens or hundreds of different options
  • From weather forecasts to traffic bulletins or financial reports, if you have a data source you can create an audiovisual experience
  • Convert your text, pictures and information into engaging videos of your real estate properties
  • Add watermarks, bumpers, titles; Concatenate different videos into one; Add voice-over or music; Create photo slideshows; …

Get your FREE API Key

JSON2Video is free to use. Get your API Key at JSON2Video.com

Documentation

The API Specification will provide you with all the details of the JSON payload and the endpoints.

For a step by step guide, read the Tutorial that will introduce you through all features with code examples.

PHP SDK installation

You can use JSON2Video PHP SDK as a Composer package or with a simple require_once.

Using require_once

The simplest way :-)

  1. Download all.php from the /bundled folder into your project directory
  2. Import the library:

    require_once 'path/to/the/sdk/all.php';

Using Composer

The SDK has no external dependencies on other packages.

  1. Open the terminal and cd to your project directory
  2. Use composer:
$ composer require json2video/json2video-php-sdk

Hello world

JSON2Video makes video creation easy as a piece of cake:

addElement([ 'type' => 'text', 'template' => 'basic/006', 'items' => [ [ 'text' => 'Hello world' ] ], 'y' => 50, 'duration' => 10, 'start' => 2 ]); // Add the scene to the movie $movie->addScene($scene); // Call the API and render the movie $movie->render();">

    // Create a new movie
    $movie = new Movie;

    // Set your API key
    // Get your free API key at https://json2video.com
    $movie->setAPIKey(YOUR_API_KEY);

    // Set a project ID
    $movie->project = 'myproj';

    // Set movie quality: low, medium, high
    $movie->quality = 'high';

    // Create a new scene
    $scene = new Scene;

    // Set the scene background color
    $scene->background_color = '#4392F1';

    // Add a text element printing "Hello world" in a fancy way (basic/006)
    // The element is 10 seconds long and starts 2 seconds from the scene start
    // Element's vertical position is 50 pixels from the top
    $scene->addElement([
        'type' => 'text',
        'template' => 'basic/006',
        'items' => [
            [ 'text' => 'Hello world' ]
        ],
        'y' => 50,
        'duration' => 10,
        'start' => 2
    ]);

    // Add the scene to the movie
    $movie->addScene($scene);

    // Call the API and render the movie
    $movie->render();

This is the resulting video:

https://assets.json2video.com/sites/github/hello-world.mp4

You might also like...
Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.
Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.

Centreon - IT and Application monitoring software Introduction Centreon is one of the most flexible and powerful monitoring softwares on the market;

A full-featured home hosted Cloud Drive, Personal Assistant, App Launcher, File Converter, Streamer, Share Tool & More!
A full-featured home hosted Cloud Drive, Personal Assistant, App Launcher, File Converter, Streamer, Share Tool & More!

A Fully Featured home-hosted Cloud Storage platform and Personal Assistant that Converts files, OCR's images & documents, Creates archives, Scans for viruses, Protects your server, Keeps itself up-to-date, and Runs your own AppLauncher!

Create a PHP 8 CRUD (Create, Read, Update, Delete) RESTful API with an MySQL database.
Create a PHP 8 CRUD (Create, Read, Update, Delete) RESTful API with an MySQL database.

Créer une API RESTful PHP 8 CRUD (Create, Read, Update , Delete) simple avec MySQL et PDO (PHP Data Objects) Détails du référentiel : Lire, insérer, m

A simple tool that I share with you. This tool serves to make conversions from text to audio Google Translate.

A simple tool that I share with you. This tool serves to make conversions from text to audio Google Translate. You can download this conversion 100% for free. Good luck.

PHP backend Scripts to add and Manage Live tv Streaming android app
PHP backend Scripts to add and Manage Live tv Streaming android app

PHP Backend to Manage Live TV Streaming Android app Follow Given Steps to Setup Local Environment to run this php Script Setting Up Local Environment

Add instagram feed to page from JSON Data
Add instagram feed to page from JSON Data

Custom Instagram Feed Add instagram feed to page from URL 🚧 Edit - As of 13th April 2021 - This code does not work. Solution is being looked into, ho

Server manager is a open source project made for people so that they can add the servers to one single place irrespective of their provider and manage it through one location.
Server manager is a open source project made for people so that they can add the servers to one single place irrespective of their provider and manage it through one location.

Server Manager Are you sick of having to log into hundreads of different website just to access your server? Well we got you, Server manager is a open

Add Item Custom For pocketmine 4 🥔
Add Item Custom For pocketmine 4 🥔

CustomItem (API / Configuration) A plugin to add items hyper easily ! Note: Creates issues if you find bugs :) Plugins Your Imagination no longer imit

Updated project with extra Features like WISHLIST, List Orders, add Reviews, updated routing, resolved search bug is available for Premium

Updated project with extra Features like WISHLIST, List Orders, add Reviews, updated routing, resolved search bug is available for Premium Projects We

Releases(v2.0.1)
Owner
null
¡BACKEND OVER APP! API REST IMPLEMENTANDO CONCEPTOS DE ARQUITECTURA HEXAGONAL, DDD, TDD Y SOLID. HECHO EN LARAVEL & PHP

¡BACKEND OVER APP! API REST IMPLEMENTANDO CONCEPTOS DE ARQUITECTURA HEXAGONAL, DDD, TDD Y SOLID. HECHO EN LARAVEL & PHP

Cristian Camilo Vasquez 17 Dec 27, 2022
Simple Dynamic DNS Web management self-hosting. Run over dnsmasq.

MyDDNS [BETA] Simple Dynamic DNS Web management self-hosting. It use dnsmasq. It was inspired on duckdns.org. Preparation You need root access to a se

Iván Eixarch 4 Jul 6, 2022
A simple website for estimating withdrawal availability over multiple exchanges.

IOTA exchange status FAQs | Installation | Contributing IOTA exchange status is a simple website for tracking the current withdrawal possibility of IO

Brayd 1 Aug 4, 2022
Download Porn Adult XXX Videos Online Ready Site No Installation No Database Required

Download Porn Adult XXX Videos Online Ready Site No Installation No Database Required PHP / HTML How to USE Search Videos from any of the Supported Si

null 16 Apr 17, 2022
A dumb sharing site for photos and videos, made by me, using a bit of borrowed code.

ShitShare A dumb sharing site for photos and videos, made by me, using a bit of borrowed code. Information This was made on Windows, so when video upl

null 1 Dec 14, 2022
Download YouTube videos in MP4 and MP3 formats easily

Laravel Youtube Downloader Download YouTube videos in MP4 and MP3 formats easily ✨ Demo Install git clone https://github.com/IhsanDevs/LaravelYoutubeD

Ihsan Devs 4 Apr 18, 2022
BicBucStriim streams books, digital books. It fills a gap in the functionality of current NAS devices that provide access to music, videos and photos

BicBucStriim streams books, digital books. It fills a gap in the functionality of current NAS devices that provide access to music, videos and photos -- but not books. BicBucStriim fills this gap and provides web-based access to your e-book collection.

Rainer Volz 392 Dec 31, 2022
A PHP based cloud disk.

cloudStorage 一个基于PHP的云盘,此版本可实现用户注册、登录、修改密码,列出用户目录下文件,新建文件夹和上传文件,并加入了用户限制 修正了读取2GB以上文件大小出错的bug,并以KB,MB,GB代替字节显示文件大小 用户权限分为0,1,2三种;0无限制;1最大空间4G,单次上传文件最大

841973620 5 May 15, 2022
Web Based, Cloud IDE

Codiad Web IDE Codiad is a web-based IDE framework with a small footprint and minimal requirements. Codiad was built with simplicity in mind, allowing

Codiad IDE 2.8k Dec 30, 2022