Skip to content

Commit 633f77b

Browse files
committed
Readme.md update
1 parent f012b93 commit 633f77b

File tree

1 file changed

+84
-1
lines changed

1 file changed

+84
-1
lines changed

README.md

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,84 @@
1-
# json2video-nodejs-sdk
1+
# Create videos programmatically in Node JS
2+
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.
3+
4+
[JSON2Video API](https://json2video.com) 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.
5+
6+
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.
7+
8+
Use cases
9+
* Automate the production of promotional videos for your e-commerce products
10+
* Automate publication of social media videos created directly from your news feed
11+
* Customize your advertising campaigns with different images, videos, texts and create tens or hundreds of different options
12+
* From weather forecasts to traffic bulletins or financial reports, if you have a data source you can create an audiovisual experience
13+
* Convert your text, pictures and information into engaging videos of your real estate properties
14+
* Add watermarks, bumpers, titles; Concatenate different videos into one; Add voice-over or music; Create photo slideshows; …
15+
16+
17+
## Get your FREE API Key
18+
JSON2Video is free to use. Get your API Key at [JSON2Video.com](https://json2video.com)
19+
20+
## Documentation
21+
The [API Specification](https://json2video.com/docs/api/) will provide you with all the details of the JSON payload and the endpoints.
22+
23+
For a step by step guide, read the [Tutorial](https://json2video.com/docs/tutorial/) that will introduce you through all features with code examples.
24+
25+
## NodeJS SDK installation
26+
27+
The SDK has no external dependencies on other packages.
28+
29+
1) Open the terminal and cd to your project directory
30+
2) Use npm:
31+
32+
```
33+
$ npm install json2video-sdk
34+
```
35+
36+
## Hello world
37+
JSON2Video makes video creation easy as a piece of cake:
38+
39+
```javascript
40+
const {Movie, Scene} = require("json2video-sdk");
41+
42+
// Create a new movie
43+
let movie = new Movie;
44+
45+
// Set your API key
46+
// Get your free API key at https://json2video.com
47+
movie.setAPIKey(YOUR_API_KEY);
48+
49+
// Set a project ID
50+
movie.set("project", "myproj");
51+
52+
// Set movie quality: low, medium, high
53+
movie.set("quality", "high");
54+
55+
// Create a new scene
56+
let scene = new Scene;
57+
58+
// Set the scene background color
59+
scene.set("background_color", "#4392F1");
60+
61+
// Add a text element printing "Hello world" in a fancy way (basic/006)
62+
// The element is 10 seconds long and starts 2 seconds from the scene start
63+
// Element's vertical position is 50 pixels from the top
64+
scene.addElement({
65+
type: "text",
66+
template: "basic/006",
67+
items: [
68+
{ text: "Hello world" }
69+
],
70+
y: 50,
71+
duration: 10,
72+
start: 2
73+
});
74+
75+
// Add the scene to the movie
76+
movie.addScene(scene);
77+
78+
// Call the API and render the movie
79+
movie.render();
80+
```
81+
82+
This is the resulting video:
83+
84+
https://assets.json2video.com/sites/github/hello-world.mp4

0 commit comments

Comments
 (0)