ffmpeglab-sdk 0.3.11 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ This simple code allows you to render a small project
|
|
|
10
10
|
```ts
|
|
11
11
|
import * as ffmpeglab from 'ffmpeglab-sdk';
|
|
12
12
|
|
|
13
|
+
const mediaUrl = 'https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4'
|
|
13
14
|
const clientConfig = new ffmpeglab.Configuration({
|
|
14
15
|
accessToken: 'API_KEY',
|
|
15
16
|
basePath: 'https://api.ffmpeglab.com',
|
|
@@ -17,11 +18,13 @@ const clientConfig = new ffmpeglab.Configuration({
|
|
|
17
18
|
|
|
18
19
|
const client = new ffmpeglab.RendersApi(clientConfig);
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
project:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
client.rendersControllerCreate({
|
|
22
|
+
project: {
|
|
23
|
+
id:'myproject',
|
|
24
|
+
editor: {
|
|
25
|
+
code: '-i $MEDIA_1 -movflags +faststart myproject.mp4',
|
|
26
|
+
selectedCode: 'custom'
|
|
27
|
+
}
|
|
25
28
|
},
|
|
26
29
|
layers: [
|
|
27
30
|
{
|
|
@@ -29,14 +32,15 @@ const render = await client.rendersControllerCreate({
|
|
|
29
32
|
media: [
|
|
30
33
|
{
|
|
31
34
|
id: 'media1',
|
|
32
|
-
url:
|
|
35
|
+
url: mediaUrl,
|
|
33
36
|
},
|
|
34
37
|
],
|
|
35
38
|
},
|
|
36
39
|
],
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
})
|
|
41
|
+
.then((render)=>client.rendersControllerRunRender({
|
|
42
|
+
runDto:{id:render.id}
|
|
43
|
+
}))
|
|
40
44
|
```
|
|
41
45
|
|
|
42
46
|
|
package/package.json
CHANGED