-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjob-ffmpeg.json
71 lines (71 loc) · 2.44 KB
/
job-ffmpeg.json
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
"parameters": {
"poolId": {
"type": "string",
"metadata": {
"description": "The name of Azure Batch pool which runs the job"
}
},
"jobId": {
"type": "string",
"metadata": {
"description": "The name of Azure Batch job"
}
},
"resolution": {
"type": "string",
"defaultValue": "428x240",
"allowedValues": [
"428x240",
"854x480"
],
"metadata": {
"description": "Target video resolution"
}
}
},
"job": {
"type": "Microsoft.Batch/batchAccounts/jobs",
"apiVersion": "2016-12-01",
"properties": {
"id": "[parameters('jobId')]",
"constraints": {
"maxWallClockTime": "PT5H",
"maxTaskRetryCount": 1
},
"poolInfo": {
"poolId": "[parameters('poolId')]"
},
"taskFactory": {
"type": "taskPerFile",
"source": {
"fileGroup": "ffmpeg-input"
},
"repeatTask": {
"commandLine": "ffmpeg -i {fileName} -y -s [parameters('resolution')] -strict -2 {fileNameWithoutExtension}_[parameters('resolution')].mp4",
"resourceFiles": [
{
"blobSource": "{url}",
"filePath": "{fileName}"
}
],
"outputFiles": [
{
"filePattern": "{fileNameWithoutExtension}_[parameters('resolution')].mp4",
"destination": {
"autoStorage": {
"path": "{fileNameWithoutExtension}_[parameters('resolution')].mp4",
"fileGroup": "ffmpeg-output"
}
},
"uploadOptions": {
"uploadCondition": "TaskSuccess"
}
}
]
}
},
"onAllTasksComplete": "terminatejob"
}
}
}