-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_scale.jvc
38 lines (38 loc) · 1.81 KB
/
test_scale.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
34
35
36
37
38
{
"vars": [
{"name": "out_width", "value": "1024"},
{"name": "out_height", "value": "source.height / 2"}
],
"assets": [
// wildcard matches multiple files, vid1_splits becomes a "list" asset. resolution is 320x240
{ "name": "vid1_splits", "path": "src/test/resources/outputs/vid1_splits_*.mp4" }
],
"operations": [
{
"operation": "scale", // name of the operation
"creates": "scaled_test1", // output asset name
"source": "vid1_splits[3]", // scale this source asset
"width": "out_width", // width of scaled asset. if omitted and height is present, width will be proportional
// here we reference the `out_width` variable defined above in the `vars` array
"height": "out_height", // height of scaled asset. if omitted and width is present, height will be proportional
// here we reference the `out_height` variable defined above in the `vars` array
"validate": [{
"comment": "expect output resolution of 1024x(source.height/2)",
"test": "output.width === 1024 && output.height === source.height/2"
}]
},
{
"operation": "scale", // name of the operation
"creates": "scaled_small", // asset it creates
"source": "vid1_splits[3]", // scale this source asset
"factor": "0.5", // scale factor. if factor is set, width and height are ignored.
"validate": [{
"comment": "expect output resolution that is half of source",
"test": "output.width === source.width/2 && output.height === source.height/2"
}, {
"comment": "expect output resolution that is 160x120",
"test": "output.width === 160 && output.height === 120"
}]
}
]
}