-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_split.jvc
33 lines (33 loc) · 1.27 KB
/
test_split.jvc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
"assets": [
// these are US government videos not covered by copyright. resolution is 320x240
{
"name": "vid1",
"path": "https://archive.org/download/gov.archives.arc.1257628/gov.archives.arc.1257628_512kb.mp4",
"dest": "src/test/resources/sources/"
}
],
"operations": [
{
"operation": "split", // name of the operation
"creates": {
"name": "vid1_splits", // output assets will have this prefix
"dest": "src/test/resources/outputs/" // and be written to this directory
},
"source": "vid1", // split this source asset
"interval": "10", // split every ten seconds
"start": "65", // start one minute and five seconds into the video
"end": "100", // end 100 seconds into the video
"validate": [{
"comment": "expect output contain 4 assets",
"test": "output.assets.length === 4"
}, {
"comment": "expect first asset to be about 10 seconds long",
"test": "is_within(output.assets[0].duration, 10, 0.1)"
}, {
"comment": "expect last asset to be about 10 seconds long",
"test": "is_within(output.assets[output.assets.length-1].duration, 10, 0.1)"
}]
}
]
}