bitmovin-api 0.0.1.pre
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.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +87 -0
- data/Guardfile +22 -0
- data/README.md +16 -0
- data/Rakefile +10 -0
- data/bitcodinrestapi.apib +4068 -0
- data/bitmovin-api.gemspec +23 -0
- data/lib/bitmovin.rb +40 -0
- data/lib/bitmovin/client.rb +0 -0
- data/lib/bitmovin/encoding_profile.rb +179 -0
- data/lib/bitmovin/helpers.rb +136 -0
- data/lib/bitmovin/input.rb +157 -0
- data/lib/bitmovin/job.rb +180 -0
- data/lib/bitmovin/output.rb +118 -0
- data/lib/bitmovin/transfer_job.rb +101 -0
- data/lib/bitmovin/version.rb +3 -0
- data/test_api.rb +10 -0
- metadata +174 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1ad8ee104bffda90700716c5ce6930d099e42fdb
|
4
|
+
data.tar.gz: ccdc7775a35c4785c366096f70efc7d982f622ed
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e81e1cadaf9b79e523bc185421ae869c39e6c534c37fb4894769eead909c9ff4e284baf2d167bc426335c426a7645a24ecf8383f67ba7eee00d832c4173fccd2
|
7
|
+
data.tar.gz: 475a3ee628c2d24509e730b9f974860de6b187939343c0b65c7233b86448a35d9731bc80a49bc33b529977d8fcd5ba3b5640cbaa91ab8e1c6830e4b214482c8c
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
bitmovin-api (0.0.1.pre)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
addressable (2.5.0)
|
10
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
11
|
+
apib-mock_server (1.0.3)
|
12
|
+
addressable
|
13
|
+
rack
|
14
|
+
redsnow (>= 0.4.3)
|
15
|
+
byebug (9.0.4)
|
16
|
+
coderay (1.1.1)
|
17
|
+
crack (0.4.3)
|
18
|
+
safe_yaml (~> 1.0.0)
|
19
|
+
ffi (1.9.17)
|
20
|
+
formatador (0.2.5)
|
21
|
+
guard (2.14.1)
|
22
|
+
formatador (>= 0.2.4)
|
23
|
+
listen (>= 2.7, < 4.0)
|
24
|
+
lumberjack (~> 1.0)
|
25
|
+
nenv (~> 0.1)
|
26
|
+
notiffany (~> 0.0)
|
27
|
+
pry (>= 0.9.12)
|
28
|
+
shellany (~> 0.0)
|
29
|
+
thor (>= 0.18.1)
|
30
|
+
guard-compat (1.2.1)
|
31
|
+
guard-minitest (2.4.6)
|
32
|
+
guard-compat (~> 1.2)
|
33
|
+
minitest (>= 3.0)
|
34
|
+
hashdiff (0.3.0)
|
35
|
+
listen (3.0.8)
|
36
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
37
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
38
|
+
lumberjack (1.0.11)
|
39
|
+
method_source (0.8.2)
|
40
|
+
minitest (5.10.1)
|
41
|
+
minitest-color (0.0.2)
|
42
|
+
minitest (~> 5)
|
43
|
+
nenv (0.3.0)
|
44
|
+
notiffany (0.1.1)
|
45
|
+
nenv (~> 0.1)
|
46
|
+
shellany (~> 0.0)
|
47
|
+
pry (0.10.4)
|
48
|
+
coderay (~> 1.1.0)
|
49
|
+
method_source (~> 0.8.1)
|
50
|
+
slop (~> 3.4)
|
51
|
+
public_suffix (2.0.5)
|
52
|
+
rack (1.6.5)
|
53
|
+
rake (11.2.2)
|
54
|
+
rb-fsevent (0.9.8)
|
55
|
+
rb-inotify (0.9.8)
|
56
|
+
ffi (>= 0.5.0)
|
57
|
+
redsnow (0.4.4)
|
58
|
+
bundler (>= 1.7.0)
|
59
|
+
ffi (~> 1.9.3)
|
60
|
+
rake (>= 10.3.2)
|
61
|
+
yard (~> 0.9.5)
|
62
|
+
safe_yaml (1.0.4)
|
63
|
+
shellany (0.0.1)
|
64
|
+
slop (3.6.0)
|
65
|
+
thor (0.19.4)
|
66
|
+
webmock (1.24.6)
|
67
|
+
addressable (>= 2.3.6)
|
68
|
+
crack (>= 0.3.2)
|
69
|
+
hashdiff
|
70
|
+
yard (0.9.8)
|
71
|
+
|
72
|
+
PLATFORMS
|
73
|
+
ruby
|
74
|
+
|
75
|
+
DEPENDENCIES
|
76
|
+
apib-mock_server
|
77
|
+
bitmovin-api!
|
78
|
+
byebug
|
79
|
+
guard
|
80
|
+
guard-minitest
|
81
|
+
minitest-color
|
82
|
+
rake
|
83
|
+
webmock
|
84
|
+
yard
|
85
|
+
|
86
|
+
BUNDLED WITH
|
87
|
+
1.14.3
|
data/Guardfile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features) \
|
6
|
+
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
+
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
+
#
|
12
|
+
# $ mkdir config
|
13
|
+
# $ mv Guardfile config/
|
14
|
+
# $ ln -s config/Guardfile .
|
15
|
+
#
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
+
|
18
|
+
guard :minitest do
|
19
|
+
watch(%r{^test/(.*)\/?(.*)_test\.rb$})
|
20
|
+
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}#{m[2]}_test.rb" }
|
21
|
+
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
22
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
The Leightweight full-featured API client for [bitmovin cloud transcoding system](http://www.bitmovin.com) written in Ruby with no additional dependencies.
|
2
|
+
|
3
|
+
|
4
|
+
# Installation
|
5
|
+
|
6
|
+
Add to your gem file
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
gem 'bitmovin-api'
|
10
|
+
```
|
11
|
+
|
12
|
+
or run
|
13
|
+
|
14
|
+
```bash
|
15
|
+
gem install bitmovin-api
|
16
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,4068 @@
|
|
1
|
+
FORMAT: 1A
|
2
|
+
HOST: https://portal.bitcodin.com/api
|
3
|
+
|
4
|
+
# bitmovin REST API
|
5
|
+
## The bitmovin API
|
6
|
+
The bitmovin encoding API enables you to interact directly with the bitmovin encoding service. This comes along with the possibility to integrate bitmovin directly into your application, web portal, media workflows, etc. and fully automate your encoding process.
|
7
|
+
|
8
|
+
bitmovin also provides a wide range of [API clients](https://bitmovin.com/encoding-api/#API_Clients) for the most common programming languages and platforms. These clients are a wrapper on top of our REST API to ease development and help out customers to integrate the bitmovin encoding with lowest efforts.
|
9
|
+
|
10
|
+
**It is highly recommended to use our [API clients](https://bitmovin.com/encoding-api/#API_Clients), which simplify the integration of our service and help you to onboard quickly!**
|
11
|
+
## Request Format
|
12
|
+
GET requests have their parameter in the URL. For POST and PUT requests, the request body must be JSON, with the Content-Type header set to application/json.
|
13
|
+
|
14
|
+
Authentication is done via HTTP headers. The bitcodin-api-key header authenticates the endpoint, you just have to use your bitmovin API key. You can find your API key in the bitmovin portal in your account settings as shown below:
|
15
|
+
|
16
|
+

|
17
|
+
|
18
|
+
Secure communication using HTTPs is also possible. API requests can select a specific API version using the `bitcodin-api-version` header. Here you can see a header example:
|
19
|
+
|
20
|
+
```HTTP
|
21
|
+
Content-Type: application/json
|
22
|
+
bitcodin-api-version: v1
|
23
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
24
|
+
```
|
25
|
+
|
26
|
+
For Javascript usage, bitcodin supports cross-origin resource sharing (CORS), so that users can use these headers in conjunction with XMLHttpRequest.
|
27
|
+
|
28
|
+
## Response Header
|
29
|
+
|
30
|
+
The response format for all requests is a JSON object.
|
31
|
+
|
32
|
+
Whether a request succeeded is indicated by the HTTP status code. A 2xx status code indicates success, whereas a 4xx status code indicates failure. When a request fails, the response body is still JSON, but always contains information which you can use for debugging.
|
33
|
+
|
34
|
+
## Basic API Example
|
35
|
+
|
36
|
+
In the following you can see an sample request to add an new input file to bitcodin. This is a POST request, containing the JSON with the URL to the input video:
|
37
|
+
|
38
|
+
Header
|
39
|
+
```HTTP
|
40
|
+
Content-Type: application/json
|
41
|
+
bitcodin-api-version: v1
|
42
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
43
|
+
```
|
44
|
+
Body
|
45
|
+
```HTTP
|
46
|
+
{
|
47
|
+
"type": "url",
|
48
|
+
"url": "http://www.example.com/yourfolder/yourmovie.mp4"
|
49
|
+
}
|
50
|
+
```
|
51
|
+
|
52
|
+
Once this request is send, bitcodin will add this input video to your account, and you can also see it in the web interface at http://portal.bitcodin.com. bitcodin will respond to the API request with the details on the newly created input, e.g.:
|
53
|
+
|
54
|
+
Header
|
55
|
+
```HTTP
|
56
|
+
Content-Type: application/json
|
57
|
+
```
|
58
|
+
Body
|
59
|
+
```HTTP
|
60
|
+
{
|
61
|
+
"inputId": 3,
|
62
|
+
"filename": "yourmovie.mp4",
|
63
|
+
"createdAt": {
|
64
|
+
"date": "11.03.2015 16:41:00",
|
65
|
+
"timezone": {
|
66
|
+
"timezone_type": 3,
|
67
|
+
"timezone": "Europe/Berlin"
|
68
|
+
}
|
69
|
+
},
|
70
|
+
"updatedAt": {
|
71
|
+
"date": "11.03.2015 16:41:00",
|
72
|
+
"timezone": {
|
73
|
+
"timezone_type": 3,
|
74
|
+
"timezone": "Europe/Berlin"
|
75
|
+
}
|
76
|
+
},
|
77
|
+
"thumbnailUrl": "http://www.example.com/yourfolder/yourmovie_thumb.png",
|
78
|
+
"inputType": "url",
|
79
|
+
"url": "http://www.example.com/yourfolder/yourmovie.mp4",
|
80
|
+
"basicAuthUser": "",
|
81
|
+
"basicAuthPassword": "",
|
82
|
+
"mediaConfigurations": [
|
83
|
+
{
|
84
|
+
"streamId": 0,
|
85
|
+
"duration": 0,
|
86
|
+
"rate": 24,
|
87
|
+
"codec": "h264",
|
88
|
+
"type": "video",
|
89
|
+
"bitrate": 0,
|
90
|
+
"width": 1280,
|
91
|
+
"height": 544,
|
92
|
+
"pixelFormat": "yuv420p"
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"streamId": 1,
|
96
|
+
"duration": 0,
|
97
|
+
"rate": 48000,
|
98
|
+
"codec": "ac3",
|
99
|
+
"type": "audio",
|
100
|
+
"bitrate": 640000,
|
101
|
+
"sampleFormat": 6,
|
102
|
+
"channelFormat": 5.1
|
103
|
+
}
|
104
|
+
]
|
105
|
+
}
|
106
|
+
```
|
107
|
+
# Group Inputs
|
108
|
+
Inputs represent videos of the user, which can be retrieved from an input location such as an FTP server, an HTTP Web server or a cloud storage such as Amazon S3 or Google Compute Storage.
|
109
|
+
|
110
|
+
Once an input is created in the bitcodin system - either in the web portal, or using the bitcodin API - the video file is analyzed to get information on the number and details of audio and video tracks. Furthermore, bitcodin generates a preview picture (thumbnail) of the content, which can be used to check the content or as thumbnails for video players.
|
111
|
+
## Create Inputs [/input/create]
|
112
|
+
### Create an URL Input [POST]
|
113
|
+
Creates a new input in the bitcodin system from an HTTP(S) or (S)FTP source that can be used for a encoding job.
|
114
|
+
|
115
|
+
+ Attributes(object)
|
116
|
+
+ type: urlInputType (required, string) - For URL input, this must be URL or FTP
|
117
|
+
+ url: http://yourdomain.com/yourfile.mkv (required, string) - Valid HTTP URL to your file (Allowed protocols: http(s),(s)ftp)
|
118
|
+
+ username: your_username (optional, string) - Basic Auth Username
|
119
|
+
+ password: your_password (optional, string) - Basic Auth Password
|
120
|
+
|
121
|
+
+ Request (application/json)
|
122
|
+
+ Header
|
123
|
+
|
124
|
+
bitcodin-api-version: v1
|
125
|
+
bitcodin-api-key: yoursuperfancyencryptedapikeyF
|
126
|
+
|
127
|
+
+ Body
|
128
|
+
|
129
|
+
{
|
130
|
+
"type": "url",
|
131
|
+
"url": "http://www.example.com/yourfolder/yourmovie.mp4"
|
132
|
+
}
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
+ Response 201 (application/json)
|
137
|
+
|
138
|
+
{
|
139
|
+
"inputId": 3,
|
140
|
+
"status": "CREATED",
|
141
|
+
"statusDescription": "Successfully created input!",
|
142
|
+
"filename": "yourmovie.mp4",
|
143
|
+
"createdAt": {
|
144
|
+
"date": "11.03.2015 16:41:00",
|
145
|
+
"timezone": {
|
146
|
+
"timezone_type": 3,
|
147
|
+
"timezone": "Europe/Berlin"
|
148
|
+
}
|
149
|
+
},
|
150
|
+
"updatedAt": {
|
151
|
+
"date": "11.03.2015 16:41:00",
|
152
|
+
"timezone": {
|
153
|
+
"timezone_type": 3,
|
154
|
+
"timezone": "Europe/Berlin"
|
155
|
+
}
|
156
|
+
},
|
157
|
+
"thumbnailUrl": "http://www.example.com/yourfolder/yourmovie_thumb.png",
|
158
|
+
"inputType": "url",
|
159
|
+
"url": "http://www.example.com/yourfolder/yourmovie.mp4",
|
160
|
+
"basicAuthUser": "",
|
161
|
+
"basicAuthPassword": "",
|
162
|
+
"mediaConfigurations": [
|
163
|
+
{
|
164
|
+
"streamId": 0,
|
165
|
+
"duration": 0,
|
166
|
+
"rate": 24,
|
167
|
+
"codec": "h264",
|
168
|
+
"type": "video",
|
169
|
+
"bitrate": 0,
|
170
|
+
"width": 1280,
|
171
|
+
"height": 544,
|
172
|
+
"pixelFormat": "yuv420p"
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"streamId": 1,
|
176
|
+
"duration": 0,
|
177
|
+
"rate": 48000,
|
178
|
+
"codec": "ac3",
|
179
|
+
"type": "audio",
|
180
|
+
"bitrate": 640000,
|
181
|
+
"sampleFormat": 6,
|
182
|
+
"channelFormat": 5.1
|
183
|
+
}
|
184
|
+
]
|
185
|
+
}
|
186
|
+
|
187
|
+
### Create an GCS Input [POST]
|
188
|
+
Creates a new input in the bitcodin system from an GCS source that can be used for an encoding job.
|
189
|
+
|
190
|
+
+ Attributes(object)
|
191
|
+
+ type: inputType (required, string) - Input type must be "gcs" for GCS Input
|
192
|
+
+ accessKey: YourGCSAccessKey (required, string) - Your GCS AccessKey
|
193
|
+
+ secretKey: YourGCSSecretKey (required, string) - Your GCS SecretKey
|
194
|
+
+ bucket: YourGCSBucket (required, string) - Your GCS bucket name
|
195
|
+
+ objectKey: pathOnBucket/to/your/file.mp4 (required, string) - Path to your input file
|
196
|
+
|
197
|
+
+ Request (application/json)
|
198
|
+
+ Header
|
199
|
+
|
200
|
+
bitcodin-api-version: v1
|
201
|
+
bitcodin-api-key: yoursuperfancyencryptedapikeyF
|
202
|
+
|
203
|
+
+ Body
|
204
|
+
|
205
|
+
{
|
206
|
+
"type":"gcs",
|
207
|
+
"accessKey":"ourAccessKey",
|
208
|
+
"secretKey":"ourSecretKey",
|
209
|
+
"bucket":"yourbucketname",
|
210
|
+
"objectKey":"Sintel.2010.720p.mkv"
|
211
|
+
}
|
212
|
+
|
213
|
+
|
214
|
+
+ Response 201 (application/json)
|
215
|
+
|
216
|
+
{
|
217
|
+
"inputId": 18049,
|
218
|
+
"status": "CREATED",
|
219
|
+
"statusDescription": "Successfully created input!",
|
220
|
+
"filename": "Sintel.2010.720p.mkv",
|
221
|
+
"createdAt": {
|
222
|
+
"date": "03.09.2015 14:27:12",
|
223
|
+
"timezone": {
|
224
|
+
"timezone_type": 3,
|
225
|
+
"timezone": "UTC"
|
226
|
+
}
|
227
|
+
},
|
228
|
+
"updatedAt": {
|
229
|
+
"date": "03.09.2015 14:27:12",
|
230
|
+
"timezone": {
|
231
|
+
"timezone_type": 3,
|
232
|
+
"timezone": "UTC"
|
233
|
+
}
|
234
|
+
},
|
235
|
+
"thumbnailUrl": "//eu-storage-bitcodin.storage.googleapis.com/bitStorage/70_1300799def8754f3d04d4ba59ecc6e69/previews/55e858bd84a6d_55e858bf158b2_thumb.png",
|
236
|
+
"inputType": "gcs",
|
237
|
+
"host": "",
|
238
|
+
"bucket": "yourbucketname",
|
239
|
+
"prefix": "",
|
240
|
+
"accessKey": "ourAccessKey",
|
241
|
+
"secretKey": "ourSecretKey",
|
242
|
+
"mediaConfigurations": [
|
243
|
+
{
|
244
|
+
"streamId": 0,
|
245
|
+
"duration": 0,
|
246
|
+
"rate": 24,
|
247
|
+
"codec": "h264",
|
248
|
+
"type": "video",
|
249
|
+
"bitrate": 0,
|
250
|
+
"width": 1280,
|
251
|
+
"height": 544,
|
252
|
+
"pixelFormat": "yuv420p",
|
253
|
+
"sampleAspectRatioNum": 1,
|
254
|
+
"sampleAspectRatioDen": 1,
|
255
|
+
"displayAspectRatioNum": 40,
|
256
|
+
"displayAspectRatioDen": 17,
|
257
|
+
"closedCaptions": false
|
258
|
+
},
|
259
|
+
{
|
260
|
+
"streamId": 1,
|
261
|
+
"duration": 0,
|
262
|
+
"rate": 48000,
|
263
|
+
"codec": "ac3",
|
264
|
+
"type": "audio",
|
265
|
+
"bitrate": 640000,
|
266
|
+
"sampleFormat": 6,
|
267
|
+
"channelFormat": 5.1
|
268
|
+
}
|
269
|
+
]
|
270
|
+
}
|
271
|
+
|
272
|
+
|
273
|
+
### Create an S3 Input [POST]
|
274
|
+
Creates a new input in the bitcodin system from an S3 source that can be used for an encoding job.
|
275
|
+
|
276
|
+
+ Attributes(object)
|
277
|
+
+ type: inputType (required, string) - Input type must be "s3" for S3 Input
|
278
|
+
+ accessKey: YourAWSAccessKey (required, string) - Your AWS AccessKey
|
279
|
+
+ secretKey: YourAWSSecretKey (required, string) - Your AWS SecretKey
|
280
|
+
+ bucket: YourS3Bucket (required, string) - Your S3 bucket name
|
281
|
+
+ region: BucketRegion (required, string) - bucket region, e.g. eu-west-1
|
282
|
+
+ objectKey: pathOnBucket/to/your/file.mp4 (required, string) - Path to your input file
|
283
|
+
|
284
|
+
+ Request (application/json)
|
285
|
+
+ Header
|
286
|
+
|
287
|
+
bitcodin-api-version: v1
|
288
|
+
bitcodin-api-key: yoursuperfancyencryptedapikeyF
|
289
|
+
|
290
|
+
+ Body
|
291
|
+
|
292
|
+
{
|
293
|
+
"type":"s3",
|
294
|
+
"accessKey":"ourAccessKey",
|
295
|
+
"secretKey":"ourSecretKey",
|
296
|
+
"bucket":"yourbucketname",
|
297
|
+
"region":"eu-west-1",
|
298
|
+
"objectKey":"Sintel.2010.720p.mkv"
|
299
|
+
}
|
300
|
+
|
301
|
+
|
302
|
+
+ Response 201 (application/json)
|
303
|
+
|
304
|
+
{
|
305
|
+
"inputId": 18049,
|
306
|
+
"status": "CREATED",
|
307
|
+
"statusDescription": "Successfully created input!",
|
308
|
+
"filename": "Sintel.2010.720p.mkv",
|
309
|
+
"createdAt": {
|
310
|
+
"date": "03.09.2015 14:27:12",
|
311
|
+
"timezone": {
|
312
|
+
"timezone_type": 3,
|
313
|
+
"timezone": "UTC"
|
314
|
+
}
|
315
|
+
},
|
316
|
+
"updatedAt": {
|
317
|
+
"date": "03.09.2015 14:27:12",
|
318
|
+
"timezone": {
|
319
|
+
"timezone_type": 3,
|
320
|
+
"timezone": "UTC"
|
321
|
+
}
|
322
|
+
},
|
323
|
+
"thumbnailUrl": "//eu-storage-bitcodin.storage.googleapis.com/bitStorage/70_1300799def8754f3d04d4ba59ecc6e69/previews/55e858bd84a6d_55e858bf158b2_thumb.png",
|
324
|
+
"inputType": "s3",
|
325
|
+
"host": "",
|
326
|
+
"bucket": "bitbucketireland",
|
327
|
+
"region": "eu-west-1",
|
328
|
+
"prefix": "",
|
329
|
+
"accessKey": "ourAccessKey",
|
330
|
+
"secretKey": "ourSecretKey",
|
331
|
+
"mediaConfigurations": [
|
332
|
+
{
|
333
|
+
"streamId": 0,
|
334
|
+
"duration": 0,
|
335
|
+
"rate": 24,
|
336
|
+
"codec": "h264",
|
337
|
+
"type": "video",
|
338
|
+
"bitrate": 0,
|
339
|
+
"width": 1280,
|
340
|
+
"height": 544,
|
341
|
+
"pixelFormat": "yuv420p",
|
342
|
+
"sampleAspectRatioNum": 1,
|
343
|
+
"sampleAspectRatioDen": 1,
|
344
|
+
"displayAspectRatioNum": 40,
|
345
|
+
"displayAspectRatioDen": 17,
|
346
|
+
"closedCaptions": false
|
347
|
+
},
|
348
|
+
{
|
349
|
+
"streamId": 1,
|
350
|
+
"duration": 0,
|
351
|
+
"rate": 48000,
|
352
|
+
"codec": "ac3",
|
353
|
+
"type": "audio",
|
354
|
+
"bitrate": 640000,
|
355
|
+
"sampleFormat": 6,
|
356
|
+
"channelFormat": 5.1
|
357
|
+
}
|
358
|
+
]
|
359
|
+
}
|
360
|
+
|
361
|
+
|
362
|
+
### Create an Azure Input [POST]
|
363
|
+
Creates a new input in the bitcodin system from an Azure Blob Storage source that can be used for an encoding job.
|
364
|
+
|
365
|
+
+ Attributes(object)
|
366
|
+
+ type: inputType (required, string) - Input type must be "abs" for Azure Blob Storage Input
|
367
|
+
+ accountName: yourAzureAccountName (required, string) - Your Azure Account Name
|
368
|
+
+ accountKey: yourAzureAccountKey (required, string) - Your Azure Account Key
|
369
|
+
+ url: https://yourAccountName.blob.core.windows.net/yourContainerName/videoObjectInContainer.mkv (required, string) - The URL Path to your Video file
|
370
|
+
+ container: yourAzureStorageContainer (optional, string) - Your Azure Storage Container Name
|
371
|
+
|
372
|
+
|
373
|
+
+ Request (application/json)
|
374
|
+
+ Header
|
375
|
+
|
376
|
+
bitcodin-api-version: v1
|
377
|
+
bitcodin-api-key: yoursuperfancyencryptedapikeyF
|
378
|
+
|
379
|
+
+ Body
|
380
|
+
|
381
|
+
{
|
382
|
+
"type":"abs",
|
383
|
+
"accountName":"yourAzureAccountName",
|
384
|
+
"accountKey":"yourAzureAccountKey",
|
385
|
+
"container":"yourAzureStorageContainer",
|
386
|
+
"url":"https://yourAccountName.blob.core.windows.net/yourContainerName/videoObjectInContainer.mkv"
|
387
|
+
}
|
388
|
+
|
389
|
+
|
390
|
+
+ Response 201 (application/json)
|
391
|
+
|
392
|
+
{
|
393
|
+
"inputId": 25286,
|
394
|
+
"status": "CREATED",
|
395
|
+
"statusDescription": "Successfully created input!",
|
396
|
+
"filename": "https://yourAccountName.blob.core.windows.net/yourContainerName/videoObjectInContainer.mkv",
|
397
|
+
"createdAt": {
|
398
|
+
"date": "02.10.2015 06:05:38",
|
399
|
+
"timezone" : {
|
400
|
+
"timezone_type": 3,
|
401
|
+
"timezone": "UTC"
|
402
|
+
}
|
403
|
+
},
|
404
|
+
"updatedAt": {
|
405
|
+
"date": "02.10.2015 06:05:38",
|
406
|
+
"timezone": {
|
407
|
+
"timezone_type": 3,
|
408
|
+
"timezone": "UTC"
|
409
|
+
}
|
410
|
+
},
|
411
|
+
"thumbnailUrl": "//eu-storage-bitcodin.storage.googleapis.com/bitStorage/1168_3a6168e498f4367791c2df685dd9ef17/previews/560e1eaece0b5_560e1eb0b04d7_thumb.png",
|
412
|
+
"inputType": "abs",
|
413
|
+
"mediaConfigurations": [
|
414
|
+
{
|
415
|
+
"streamId": 0,
|
416
|
+
"duration": 0,
|
417
|
+
"rate": 24,
|
418
|
+
"codec": "h264",
|
419
|
+
"type": "video",
|
420
|
+
"bitrate": 0,
|
421
|
+
"width": 1920,
|
422
|
+
"height": 818,
|
423
|
+
"pixelFormat": "yuv420p",
|
424
|
+
"sampleAspectRatioNum": 1,
|
425
|
+
"sampleAspectRatioDen": 1,
|
426
|
+
"displayAspectRatioNum": 960,
|
427
|
+
"displayAspectRatioDen": 409,
|
428
|
+
"closedCaptions": false
|
429
|
+
},
|
430
|
+
{
|
431
|
+
"streamId": 1,
|
432
|
+
"duration": 0,
|
433
|
+
"rate": 48000,
|
434
|
+
"codec": "ac3",
|
435
|
+
"type": "audio",
|
436
|
+
"bitrate": 640000,
|
437
|
+
"sampleFormat": 6,
|
438
|
+
"channelFormat": 5.1
|
439
|
+
}
|
440
|
+
]
|
441
|
+
}
|
442
|
+
|
443
|
+
### Create an Aspera Input [POST]
|
444
|
+
Creates a new input in the bitcodin system from an Aspera source that can be used for an encoding job.
|
445
|
+
|
446
|
+
+ Attributes(object)
|
447
|
+
+ type: inputType (required, string) - Input type must be "aspera" for Aspera Input
|
448
|
+
+ url: fasp://urlof/your/asperasource/video.mp4 (required, string) - The URL Path to your Video file
|
449
|
+
+ minBandwidth: minimal_download_bandwidth (optional, string) - Minimal download bandwidth. Examples: 100k, 100m, 100g
|
450
|
+
+ maxBandwidth: maximal_download_bandwidth (optional, string) - Maximal download bandwidth. Examples: 100k, 100m, 100g
|
451
|
+
|
452
|
+
+ Request (application/json)
|
453
|
+
+ Header
|
454
|
+
|
455
|
+
bitcodin-api-version: v1
|
456
|
+
bitcodin-api-key: yoursuperfancyencryptedapikeyF
|
457
|
+
|
458
|
+
+ Body
|
459
|
+
|
460
|
+
{
|
461
|
+
"type":"aspera",
|
462
|
+
"url":"fasp://[user[:password]@]urlof/your/asperasource/video.mp4",
|
463
|
+
"minBandwidth":"300k",
|
464
|
+
"maxBandwidth":"1g"
|
465
|
+
}
|
466
|
+
|
467
|
+
|
468
|
+
+ Response 201 (application/json)
|
469
|
+
|
470
|
+
{
|
471
|
+
"inputId": 26296,
|
472
|
+
"status": "CREATED",
|
473
|
+
"statusDescription": "Successfully created input!",
|
474
|
+
"filename": "video.mp4",
|
475
|
+
"createdAt": {
|
476
|
+
"date": "02.10.2015 06:05:38",
|
477
|
+
"timezone": {
|
478
|
+
"timezone_type": 3,
|
479
|
+
"timezone": "UTC"
|
480
|
+
}
|
481
|
+
},
|
482
|
+
"updatedAt": {
|
483
|
+
"date": "02.10.2015 06:05:38",
|
484
|
+
"timezone": {
|
485
|
+
"timezone_type": 3,
|
486
|
+
"timezone": "UTC"
|
487
|
+
}
|
488
|
+
},
|
489
|
+
"thumbnailUrl": "//eu-storage-bitcodin.storage.googleapis.com/bitStorage/1168_3a6168e498f4367791c2df685dd9ef17/previews/560e1eaece0b5_560e1eb0b04d7_thumb.png",
|
490
|
+
"inputType": "aspera",
|
491
|
+
"mediaConfigurations": [
|
492
|
+
{
|
493
|
+
"streamId": 0,
|
494
|
+
"duration": 0,
|
495
|
+
"rate": 24,
|
496
|
+
"codec": "h264",
|
497
|
+
"type": "video",
|
498
|
+
"bitrate": 0,
|
499
|
+
"width": 1920,
|
500
|
+
"height": 818,
|
501
|
+
"pixelFormat": "yuv420p",
|
502
|
+
"sampleAspectRatioNum": 1,
|
503
|
+
"sampleAspectRatioDen": 1,
|
504
|
+
"displayAspectRatioNum": 960,
|
505
|
+
"displayAspectRatioDen": 409,
|
506
|
+
"closedCaptions": false
|
507
|
+
},
|
508
|
+
{
|
509
|
+
"streamId": 1,
|
510
|
+
"duration": 0,
|
511
|
+
"rate": 48000,
|
512
|
+
"codec": "ac3",
|
513
|
+
"type": "audio",
|
514
|
+
"bitrate": 640000,
|
515
|
+
"sampleFormat": 6,
|
516
|
+
"channelFormat": 5.1
|
517
|
+
}
|
518
|
+
]
|
519
|
+
}
|
520
|
+
|
521
|
+
## Asynchronous inputs [/input/createasync]
|
522
|
+
|
523
|
+
### Create an asynchronous Input [POST /input/createasync]
|
524
|
+
Creates a new input in the bitcodin system asynchronously. You can use the same request body as you would for synchronous inputs.
|
525
|
+
|
526
|
+
+ Attributes(object)
|
527
|
+
+ type: url (required, string) - For URL input, this must be URL or FTP, see appropriate input types above
|
528
|
+
+ url: http://yourdomain.com/yourfile.mkv (required, string) - Valid HTTP URL to your file (Allowed protocols: http(s),(s)ftp)
|
529
|
+
+ username: your_username (optional, string) - Basic Auth Username
|
530
|
+
+ password: your_password (optional, string) - Basic Auth Password
|
531
|
+
|
532
|
+
+ Request (application/json)
|
533
|
+
+ Header
|
534
|
+
|
535
|
+
bitcodin-api-version: v1
|
536
|
+
bitcodin-api-key: yoursuperfancyencryptedapikeyF
|
537
|
+
|
538
|
+
+ Body
|
539
|
+
|
540
|
+
{
|
541
|
+
"inputType": "url",
|
542
|
+
"url": "http://s3.amazonaws.com/akamai.netstorage/HD_downloads/earth_night_rotate_1080.mov"
|
543
|
+
}
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
+ Response 201 (application/json)
|
548
|
+
|
549
|
+
+ Body
|
550
|
+
|
551
|
+
{
|
552
|
+
"inputId": 57412,
|
553
|
+
"status": "ENQUEUED",
|
554
|
+
"statusDescription": "Enqueued input creation",
|
555
|
+
"filename": "earth_night_rotate_1080.mov",
|
556
|
+
"createdAt": {
|
557
|
+
"date": "20.11.2015 09:06:21",
|
558
|
+
"timezone": {
|
559
|
+
"timezone_type": 3,
|
560
|
+
"timezone": "UTC"
|
561
|
+
}
|
562
|
+
},
|
563
|
+
"updatedAt": {
|
564
|
+
"date": "20.11.2015 09:06:21",
|
565
|
+
"timezone": {
|
566
|
+
"timezone_type": 3,
|
567
|
+
"timezone": "UTC"
|
568
|
+
}
|
569
|
+
},
|
570
|
+
"thumbnailUrl": "",
|
571
|
+
"inputType": "url",
|
572
|
+
"url": "http://s3.amazonaws.com/akamai.netstorage/HD_downloads/earth_night_rotate_1080.mov"
|
573
|
+
}
|
574
|
+
|
575
|
+
### Get asynchronous input status [GET /input/{id}/asyncstatus]
|
576
|
+
Gets the status for an asynchronously created input.
|
577
|
+
|
578
|
+
+ Parameters
|
579
|
+
+ id (required, integer) ... Asynchronous Input ID
|
580
|
+
|
581
|
+
+ Request (application/json)
|
582
|
+
+ Header
|
583
|
+
|
584
|
+
bitcodin-api-version: v1
|
585
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
586
|
+
|
587
|
+
+ Response 200 (application/json)
|
588
|
+
|
589
|
+
+ Body
|
590
|
+
|
591
|
+
{
|
592
|
+
"inputId": 57412,
|
593
|
+
"status": "CREATED",
|
594
|
+
"statusDescription": "Successfully created input!"
|
595
|
+
}
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
## Analyze Inputs [/input/{id}/analyze]
|
600
|
+
### Analyze an Input [PATCH]
|
601
|
+
An existing input will be analyzed again and a new thumbnail will be created.
|
602
|
+
|
603
|
+
+ Parameters
|
604
|
+
+ id (required, integer) ... Input-ID
|
605
|
+
|
606
|
+
+ Request (application/json)
|
607
|
+
+ Header
|
608
|
+
|
609
|
+
bitcodin-api-version: v1
|
610
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
611
|
+
|
612
|
+
+ Response 200 (application/json)
|
613
|
+
|
614
|
+
{
|
615
|
+
"inputId": 3,
|
616
|
+
"filename": "yourmovie.mp4",
|
617
|
+
"createdAt": {
|
618
|
+
"date": "11.03.2015 16:41:00",
|
619
|
+
"timezone": {
|
620
|
+
"timezone_type": 3,
|
621
|
+
"timezone": "Europe/Berlin"
|
622
|
+
}
|
623
|
+
},
|
624
|
+
"updatedAt": {
|
625
|
+
"date": "11.03.2015 16:41:00",
|
626
|
+
"timezone": {
|
627
|
+
"timezone_type": 3,
|
628
|
+
"timezone": "Europe/Berlin"
|
629
|
+
}
|
630
|
+
},
|
631
|
+
"thumbnailUrl": "http://www.example.com/yourfolder/yourmovie_thumb.png",
|
632
|
+
"inputType": "url",
|
633
|
+
"url": "http://www.example.com/yourfolder/yourmovie.mp4",
|
634
|
+
"basicAuthUser": "",
|
635
|
+
"basicAuthPassword": "",
|
636
|
+
"mediaConfigurations": [
|
637
|
+
{
|
638
|
+
"streamId": 0,
|
639
|
+
"duration": 0,
|
640
|
+
"rate": 24,
|
641
|
+
"codec": "h264",
|
642
|
+
"type": "video",
|
643
|
+
"bitrate": 0,
|
644
|
+
"width": 1280,
|
645
|
+
"height": 544,
|
646
|
+
"pixelFormat": "yuv420p"
|
647
|
+
},
|
648
|
+
{
|
649
|
+
"streamId": 1,
|
650
|
+
"duration": 0,
|
651
|
+
"rate": 48000,
|
652
|
+
"codec": "ac3",
|
653
|
+
"type": "audio",
|
654
|
+
"bitrate": 640000,
|
655
|
+
"sampleFormat": 6,
|
656
|
+
"channelFormat": 5.1
|
657
|
+
}
|
658
|
+
]
|
659
|
+
}
|
660
|
+
|
661
|
+
## List Inputs [/inputs/{page}]
|
662
|
+
### List all Inputs [GET]
|
663
|
+
List all inputs of your account structured as pages.
|
664
|
+
+ Parameters
|
665
|
+
+ page (optional, integer) ... page number. If page number doesn't exist, last page will be returned. (10 Inputs per page)
|
666
|
+
+ Default: 1
|
667
|
+
|
668
|
+
+ Request (application/json)
|
669
|
+
|
670
|
+
+ Header
|
671
|
+
|
672
|
+
bitcodin-api-version: v1
|
673
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
674
|
+
|
675
|
+
+ Response 200 (application/json)
|
676
|
+
|
677
|
+
{
|
678
|
+
"perPage": 10,
|
679
|
+
"totalCount": 2,
|
680
|
+
"inputs": [
|
681
|
+
{
|
682
|
+
"inputId": 2,
|
683
|
+
"filename": "yourmovie.mp4",
|
684
|
+
"createdAt": {
|
685
|
+
"date": "11.03.2015 16:41:00",
|
686
|
+
"timezone": {
|
687
|
+
"timezone_type": 3,
|
688
|
+
"timezone": "Europe/Berlin"
|
689
|
+
}
|
690
|
+
},
|
691
|
+
"updatedAt": {
|
692
|
+
"date": "11.03.2015 16:41:00",
|
693
|
+
"timezone": {
|
694
|
+
"timezone_type": 3,
|
695
|
+
"timezone": "Europe/Berlin"
|
696
|
+
}
|
697
|
+
},
|
698
|
+
"thumbnailUrl": "http://www.example.com/yourfolder/yourmovie_thumb.png",
|
699
|
+
"inputType": "url",
|
700
|
+
"url": "http://www.example.com/yourfolder/yourmovie.mp4",
|
701
|
+
"basicAuthUser": "",
|
702
|
+
"basicAuthPassword": "",
|
703
|
+
"mediaConfigurations": [
|
704
|
+
{
|
705
|
+
"streamId": 0,
|
706
|
+
"duration": 0,
|
707
|
+
"rate": 24,
|
708
|
+
"codec": "h264",
|
709
|
+
"type": "video",
|
710
|
+
"bitrate": 0,
|
711
|
+
"width": 1280,
|
712
|
+
"height": 720,
|
713
|
+
"pixelFormat": "yuv420p"
|
714
|
+
},
|
715
|
+
{
|
716
|
+
"streamId": 1,
|
717
|
+
"duration": 0,
|
718
|
+
"rate": 48000,
|
719
|
+
"codec": "ac3",
|
720
|
+
"type": "audio",
|
721
|
+
"bitrate": 640000,
|
722
|
+
"sampleFormat": 6,
|
723
|
+
"channelFormat": 5.1
|
724
|
+
}
|
725
|
+
]
|
726
|
+
},
|
727
|
+
{
|
728
|
+
"inputId": 1,
|
729
|
+
"filename": "yourmovie.mp4",
|
730
|
+
"createdAt": {
|
731
|
+
"date": "11.03.2015 16:41:00",
|
732
|
+
"timezone": {
|
733
|
+
"timezone_type": 3,
|
734
|
+
"timezone": "Europe/Berlin"
|
735
|
+
}
|
736
|
+
},
|
737
|
+
"updatedAt": {
|
738
|
+
"date": "11.03.2015 16:41:00",
|
739
|
+
"timezone": {
|
740
|
+
"timezone_type": 3,
|
741
|
+
"timezone": "Europe/Berlin"
|
742
|
+
}
|
743
|
+
},
|
744
|
+
"thumbnailUrl": "http://www.example.com/yourfolder/yourmovie_thumb.png",
|
745
|
+
"inputType": "url",
|
746
|
+
"url": "http://www.example.com/yourfolder/yourmovie.mp4",
|
747
|
+
"basicAuthUser": "",
|
748
|
+
"basicAuthPassword": "",
|
749
|
+
"mediaConfigurations": [
|
750
|
+
{
|
751
|
+
"streamId": 0,
|
752
|
+
"duration": 0,
|
753
|
+
"rate": 23.916666666667,
|
754
|
+
"codec": "h264",
|
755
|
+
"type": "video",
|
756
|
+
"bitrate": 0,
|
757
|
+
"width": 960,
|
758
|
+
"height": 512,
|
759
|
+
"pixelFormat": "yuv420p"
|
760
|
+
},
|
761
|
+
{
|
762
|
+
"streamId": 1,
|
763
|
+
"duration": 0,
|
764
|
+
"rate": 48000,
|
765
|
+
"codec": "aac",
|
766
|
+
"type": "audio",
|
767
|
+
"bitrate": 126750,
|
768
|
+
"sampleFormat": 2,
|
769
|
+
"channelFormat": "stereo"
|
770
|
+
}
|
771
|
+
]
|
772
|
+
}
|
773
|
+
]
|
774
|
+
}
|
775
|
+
|
776
|
+
## Input Details [/input/{id}]
|
777
|
+
### Get Input details [GET]
|
778
|
+
This call can be used to get detailed information about an already created input.
|
779
|
+
|
780
|
+
The response will contain a attribute called "status" amongst various other attributes. It can take the following values with it:
|
781
|
+
|
782
|
+
| Value | Description |
|
783
|
+
|-----------------|-------------|
|
784
|
+
| ENQUEUED | The input has been enqueued and waits for to be processed. |
|
785
|
+
| PROCESSING | The input is being analyzed at the moment. |
|
786
|
+
| CREATED | The input-analyzation has finished successfully. |
|
787
|
+
| ERROR | Some error occured while processing the input. |
|
788
|
+
|
789
|
+
+ Parameters
|
790
|
+
+ id (required, integer) ... Input-ID
|
791
|
+
|
792
|
+
+ Request (application/json)
|
793
|
+
+ Header
|
794
|
+
|
795
|
+
bitcodin-api-version: v1
|
796
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
797
|
+
|
798
|
+
+ Response 200 (application/json)
|
799
|
+
|
800
|
+
{
|
801
|
+
"inputId": 2,
|
802
|
+
"filename": "yourmovie.mp4",
|
803
|
+
"createdAt": {
|
804
|
+
"date": "11.03.2015 16:41:00",
|
805
|
+
"timezone": {
|
806
|
+
"timezone_type": 3,
|
807
|
+
"timezone": "Europe/Berlin"
|
808
|
+
}
|
809
|
+
},
|
810
|
+
"updatedAt": {
|
811
|
+
"date": "11.03.2015 16:41:00",
|
812
|
+
"timezone": {
|
813
|
+
"timezone_type": 3,
|
814
|
+
"timezone": "Europe/Berlin"
|
815
|
+
}
|
816
|
+
},
|
817
|
+
"thumbnailUrl": "http://www.example.com/yourfolder/yourmovie_thumb.png",
|
818
|
+
"inputType": "url",
|
819
|
+
"url": "http://www.example.com/yourfolder/yourmovie.mp4",
|
820
|
+
"basicAuthUser": "",
|
821
|
+
"basicAuthPassword": "",
|
822
|
+
"mediaConfigurations": [
|
823
|
+
{
|
824
|
+
"streamId": 0,
|
825
|
+
"duration": 0,
|
826
|
+
"rate": 24,
|
827
|
+
"codec": "h264",
|
828
|
+
"type": "video",
|
829
|
+
"bitrate": 0,
|
830
|
+
"width": 1280,
|
831
|
+
"height": 720,
|
832
|
+
"pixelFormat": "yuv420p"
|
833
|
+
},
|
834
|
+
{
|
835
|
+
"streamId": 1,
|
836
|
+
"duration": 0,
|
837
|
+
"rate": 48000,
|
838
|
+
"codec": "ac3",
|
839
|
+
"type": "audio",
|
840
|
+
"bitrate": 640000,
|
841
|
+
"sampleFormat": 6,
|
842
|
+
"channelFormat": 5.1
|
843
|
+
}
|
844
|
+
]
|
845
|
+
}
|
846
|
+
### Delete Input [DELETE]
|
847
|
+
Deletes an input from the bitcodin system.
|
848
|
+
+ Parameters
|
849
|
+
+ id (required, integer) ... Input-ID
|
850
|
+
|
851
|
+
+ Request (application/json)
|
852
|
+
+ Header
|
853
|
+
|
854
|
+
bitcodin-api-version: v1
|
855
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
856
|
+
|
857
|
+
+ Response 204 (application/json)
|
858
|
+
|
859
|
+
# Group Outputs
|
860
|
+
The encoded videos can either be stored on the bitcodin storage - which is a highly reliable and redundant cloud storage - or transferred to any output location such as a FTP server, a Cloud-Storage or DropBox. Furthermore, finished encoding jobs can be downloaded as .zip archive from the bitcodin storage.
|
861
|
+
|
862
|
+
Once an output is created, bitcodin checks if the credentials are valid as well as if it is allowed to write files, and provides detailed feedback if problems occur.
|
863
|
+
## Create Output [/output/create]
|
864
|
+
### Create an S3 Output [POST]
|
865
|
+
Integrates your S3 bucket with the bitcodin system. Once the S3 output has been created it can be used to transfer encoded assets to it.
|
866
|
+
+ Attributes(object)
|
867
|
+
+ type: s3 (required, string) - Output-Type
|
868
|
+
+ name (required, string) - Name of your Output Profile
|
869
|
+
+ region (required, string) - AWS S3 Storage Region
|
870
|
+
+ accessKey (required, string) - Your AWS S3 Access Key
|
871
|
+
+ secretKey (required, string) - Your AWS S3 Secret Key
|
872
|
+
+ bucket (required, string) - AWS S3 Bucketname
|
873
|
+
+ prefix (optional, string) - Virtual Sub-Directory
|
874
|
+
+ makePublic (optional, boolean) - If true, all transfered files can be accessed by their respective URL from anyone
|
875
|
+
+ createSubDirectory (optional, boolean) - If true (default), creates a sub directory for your job (<jobid>_<hash>)
|
876
|
+
|
877
|
+
+ Request (application/json)
|
878
|
+
+ Header
|
879
|
+
|
880
|
+
bitcodin-api-version: v1
|
881
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
882
|
+
|
883
|
+
+ Body
|
884
|
+
|
885
|
+
{
|
886
|
+
"type": "s3",
|
887
|
+
"name": "AWS Output Destination",
|
888
|
+
"region": "eu-west-1",
|
889
|
+
"accessKey": "awsaccesskey",
|
890
|
+
"secretKey": "awssecretkey",
|
891
|
+
"bucket": "yourbucketname",
|
892
|
+
"prefix": "virtual/directory/inside/your/bucket",
|
893
|
+
"makePublic": false
|
894
|
+
}
|
895
|
+
|
896
|
+
+ Response 201 (application/json)
|
897
|
+
|
898
|
+
{
|
899
|
+
"outputId": 2,
|
900
|
+
"name": "AWS Output Destination",
|
901
|
+
"createdAt": {
|
902
|
+
"date": "11.03.2015 16:41:00",
|
903
|
+
"timezone": {
|
904
|
+
"timezone_type": 3,
|
905
|
+
"timezone": "Europe/Berlin"
|
906
|
+
}
|
907
|
+
},
|
908
|
+
"type": "s3",
|
909
|
+
"prefix": "virtual/directory/inside/your/bucket",
|
910
|
+
"host": "https://s3-eu-west-1.amazonaws.com",
|
911
|
+
"bucket": "yourbucketname",
|
912
|
+
"makePublic": false,
|
913
|
+
"path": "yourbucketname/virtual/directory/inside/your/bucket"
|
914
|
+
}
|
915
|
+
|
916
|
+
### Create an GCS Output [POST]
|
917
|
+
Integrates your GCS bucket with the bitcodin syste. Once the GCS output has been created it can be used to transfer encoded assets to it.
|
918
|
+
Please note: In order to use your GCS Output, you will need Access- and SecretKeys. Therefore you have to enable the "Interoperability mode" for your google-cloud-account. Please see https://cloud.google.com/storage/docs/migrating#keys for further instructions.
|
919
|
+
+ Attributes(object)
|
920
|
+
+ type: gcs (required, string) - Output-Type
|
921
|
+
+ name (required, string) - Name of your Output Profile
|
922
|
+
+ accessKey (required, string) - Your GCS Access Key ID
|
923
|
+
+ secretKey (required, string) - Your GCS Secret Access Key
|
924
|
+
+ bucket (required, string) - GCS Bucketname
|
925
|
+
+ prefix (optional, string) - Virtual Sub-Directory
|
926
|
+
+ makePublic (optional, boolean) - If true, all transfered files can be accessed by their respective URL from anyone
|
927
|
+
+ createSubDirectory (optional, boolean) - If true (default), creates a sub directory for your job (<jobid>_<hash>)
|
928
|
+
|
929
|
+
+ Request (application/json)
|
930
|
+
+ Header
|
931
|
+
|
932
|
+
bitcodin-api-version: v1
|
933
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
934
|
+
|
935
|
+
+ Body
|
936
|
+
|
937
|
+
{
|
938
|
+
"type": "gcs",
|
939
|
+
"name": "GCS Output Destination",
|
940
|
+
"accessKey": "gcsaccesskey",
|
941
|
+
"secretKey": "gcssecretaccesskey",
|
942
|
+
"bucket": "yourbucketname",
|
943
|
+
"prefix": "virtual/directory/inside/your/bucket",
|
944
|
+
"makePublic": false
|
945
|
+
}
|
946
|
+
|
947
|
+
+ Response 201 (application/json)
|
948
|
+
|
949
|
+
{
|
950
|
+
"outputId": 14,
|
951
|
+
"name": "GCS Output Destination",
|
952
|
+
"createdAt": {
|
953
|
+
"date": "15.07.2015 16:26:57",
|
954
|
+
"timezone": {
|
955
|
+
"timezone_type": 3,
|
956
|
+
"timezone": "UTC"
|
957
|
+
}
|
958
|
+
},
|
959
|
+
"type": "gcs",
|
960
|
+
"prefix": "virtual/directory/inside/your/bucket",
|
961
|
+
"host": "",
|
962
|
+
"bucket": "bit-packager",
|
963
|
+
"makePublic": false,
|
964
|
+
"path": "yourbucketname/virtual/directory/inside/your/bucket"
|
965
|
+
}
|
966
|
+
|
967
|
+
### Create an Azure Output [POST]
|
968
|
+
Integrates your Azure blob storage with the bitcodin system. Once the Azure output has been created it can be used to transfer encoded assets to it.
|
969
|
+
+ Attributes(object)
|
970
|
+
+ type: azure (required, string) - Output-Type
|
971
|
+
+ name (required, string) - Name of your Output Profile
|
972
|
+
+ accountName (required, string) - Your Azure account name
|
973
|
+
+ accountKey (required, string) - Your Azure account key
|
974
|
+
+ container (required, string) - Name of your azure storage container
|
975
|
+
+ prefix (optional, string) - Virtual Sub-Directory
|
976
|
+
+ createSubDirectory (optional, boolean) - If true (default), creates a sub directory for your job (<jobid>_<hash>)
|
977
|
+
|
978
|
+
+ Request (application/json)
|
979
|
+
+ Header
|
980
|
+
|
981
|
+
bitcodin-api-version: v1
|
982
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
983
|
+
|
984
|
+
+ Body
|
985
|
+
|
986
|
+
{
|
987
|
+
"name": "Azure Test Output",
|
988
|
+
"type": "azure",
|
989
|
+
"container": "yourAzureContainer",
|
990
|
+
"accountName": "yourAzureAccountName",
|
991
|
+
"accountKey": "yourAzureAccountKey",
|
992
|
+
"prefix": "your/desired/prefix/"
|
993
|
+
}
|
994
|
+
|
995
|
+
|
996
|
+
+ Response 201 (application/json)
|
997
|
+
|
998
|
+
{
|
999
|
+
"outputId": 12776,
|
1000
|
+
"name": "Azure Test Output",
|
1001
|
+
"createSubDirectory": true,
|
1002
|
+
"createdAt": {
|
1003
|
+
"date": "02.10.2015 12:53:32",
|
1004
|
+
"timezone": {
|
1005
|
+
"timezone_type": 3,
|
1006
|
+
"timezone": "UTC"
|
1007
|
+
}
|
1008
|
+
},
|
1009
|
+
"outputUrl": "https://yourAzureAccountName.bitblobstorage.blob.core.windows.net/yourAzureContainer/",
|
1010
|
+
"relOutputUrl": "https://yourAzureAccountName.bitblobstorage.blob.core.windows.net/yourAzureContainer/",
|
1011
|
+
"type": "azure",
|
1012
|
+
"prefix": "your/desired/prefix/",
|
1013
|
+
"container": "yourAzureContainer",
|
1014
|
+
"path": "yourAzureContainer/your/desired/prefix/"
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
|
1018
|
+
### Create an FTP Output [POST]
|
1019
|
+
Integrates your FTP server with the bitcodin system. Once the FTP output has been created it can be used to transfer encoded assets to it.
|
1020
|
+
+ Attributes(object)
|
1021
|
+
+ type: ftp (required, string) - Output-Type
|
1022
|
+
+ name (required, string) - Name of your Output Profile
|
1023
|
+
+ host: yourftpdomainorip.com/path/to/your/file (required, string) - Your FTP domain
|
1024
|
+
+ username (required, string) - Your FTP Username
|
1025
|
+
+ password (required, string) - Your FTP Password
|
1026
|
+
+ passive (optional, boolean) - Use passive mode
|
1027
|
+
+ createSubDirectory (optional, boolean) - If true (default), creates a sub directory for your job (<jobid>_<hash>)
|
1028
|
+
|
1029
|
+
+ Request (application/json)
|
1030
|
+
+ Header
|
1031
|
+
|
1032
|
+
bitcodin-api-version: v1
|
1033
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1034
|
+
|
1035
|
+
+ Body
|
1036
|
+
|
1037
|
+
{
|
1038
|
+
"type": "ftp",
|
1039
|
+
"name": "FTP Output Destination",
|
1040
|
+
"host": "yourdomain.com/path/to/your/directory",
|
1041
|
+
"username": "username",
|
1042
|
+
"password": "password",
|
1043
|
+
"passive": true
|
1044
|
+
}
|
1045
|
+
|
1046
|
+
+ Response 201 (application/json)
|
1047
|
+
|
1048
|
+
{
|
1049
|
+
"outputId": 3,
|
1050
|
+
"name": "FTP Output Destination",
|
1051
|
+
"createdAt": {
|
1052
|
+
"date": "11.03.2015 16:41:00",
|
1053
|
+
"timezone": {
|
1054
|
+
"timezone_type": 3,
|
1055
|
+
"timezone": "Europe/Berlin"
|
1056
|
+
}
|
1057
|
+
},
|
1058
|
+
"type": "ftp",
|
1059
|
+
"host": "yourdomain.com",
|
1060
|
+
"passive": true,
|
1061
|
+
"path": "path/to/your/directory"
|
1062
|
+
}
|
1063
|
+
|
1064
|
+
### Create an SFTP Output [POST]
|
1065
|
+
Integrates your SFTP server with the bitcodin system. Once the SFTP output has been created it can be used to transfer encoded assets to it.
|
1066
|
+
+ Attributes(object)
|
1067
|
+
+ type: sftp (required, string) - Output-Type
|
1068
|
+
+ name (required, string) - Name of your Output Profile
|
1069
|
+
+ host: yoursftpdomainorip.com/path/to/your/file (required, string) - Your SFTP domain
|
1070
|
+
+ username (required, string) - Your SFTP Username
|
1071
|
+
+ password (required, string) - Your SFTP Password
|
1072
|
+
+ passive (optional, boolean) - Use passive mode
|
1073
|
+
+ createSubDirectory (optional, boolean) - If true (default), creates a sub directory for your job (<jobid>_<hash>)
|
1074
|
+
|
1075
|
+
+ Request (application/json)
|
1076
|
+
+ Header
|
1077
|
+
|
1078
|
+
bitcodin-api-version: v1
|
1079
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1080
|
+
|
1081
|
+
+ Body
|
1082
|
+
|
1083
|
+
{
|
1084
|
+
"type": "ftp",
|
1085
|
+
"name": "SFTP Output Destination",
|
1086
|
+
"host": "yourdomain.com/path/to/your/directory",
|
1087
|
+
"username": "username",
|
1088
|
+
"password": "password",
|
1089
|
+
"passive": true
|
1090
|
+
}
|
1091
|
+
|
1092
|
+
+ Response 201 (application/json)
|
1093
|
+
|
1094
|
+
{
|
1095
|
+
"outputId": 3,
|
1096
|
+
"name": "SFTP Output Destination",
|
1097
|
+
"createdAt": {
|
1098
|
+
"date": "11.03.2015 16:41:00",
|
1099
|
+
"timezone": {
|
1100
|
+
"timezone_type": 3,
|
1101
|
+
"timezone": "Europe/Berlin"
|
1102
|
+
}
|
1103
|
+
},
|
1104
|
+
"type": "sftp",
|
1105
|
+
"host": "yourdomain.com",
|
1106
|
+
"passive": true,
|
1107
|
+
"path": "path/to/your/directory"
|
1108
|
+
}
|
1109
|
+
|
1110
|
+
## List Outputs [/outputs/{?page}]
|
1111
|
+
### List Outputs [GET]
|
1112
|
+
List all outputs of your account structured as pages.
|
1113
|
+
+ Parameters
|
1114
|
+
+ page (optional, integer) ... page number. If page number doesn't exist, last page will be returned. (10 Outputs per page)
|
1115
|
+
+ Default: 1
|
1116
|
+
|
1117
|
+
+ Request (application/json)
|
1118
|
+
+ Header
|
1119
|
+
|
1120
|
+
bitcodin-api-version: v1
|
1121
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1122
|
+
|
1123
|
+
+ Response 200 (application/json)
|
1124
|
+
|
1125
|
+
{
|
1126
|
+
"perPage": 10,
|
1127
|
+
"totalCount": 3,
|
1128
|
+
"status": null,
|
1129
|
+
"outputs": [
|
1130
|
+
{
|
1131
|
+
"outputId": 1,
|
1132
|
+
"name": "AWS Output Destination",
|
1133
|
+
"createdAt": {
|
1134
|
+
"date": "11.03.2015 16:41:00",
|
1135
|
+
"timezone": {
|
1136
|
+
"timezone_type": 3,
|
1137
|
+
"timezone": "Europe/Berlin"
|
1138
|
+
}
|
1139
|
+
},
|
1140
|
+
"type": "s3",
|
1141
|
+
"prefix": "virtual/directory/inside/your/bucket",
|
1142
|
+
"host": "https://s3-eu-west-1.amazonaws.com",
|
1143
|
+
"bucket": "yourbucketname",
|
1144
|
+
"makePublic": false,
|
1145
|
+
"path": "yourbucketname/virtual/directory/inside/your/bucket"
|
1146
|
+
},
|
1147
|
+
{
|
1148
|
+
"outputId": 2,
|
1149
|
+
"name": "GCS Output Destination",
|
1150
|
+
"createdAt": {
|
1151
|
+
"date": "11.03.2015 16:41:00",
|
1152
|
+
"timezone": {
|
1153
|
+
"timezone_type": 3,
|
1154
|
+
"timezone": "Europe/Berlin"
|
1155
|
+
}
|
1156
|
+
},
|
1157
|
+
"type": "gcs",
|
1158
|
+
"prefix": "virtual/directory/inside/your/bucket",
|
1159
|
+
"bucket": "yourbucketname",
|
1160
|
+
"makePublic": false,
|
1161
|
+
"path": "yourbucketname/virtual/directory/inside/your/bucket"
|
1162
|
+
},
|
1163
|
+
{
|
1164
|
+
"outputId": 3,
|
1165
|
+
"name": "FTP Output Destination",
|
1166
|
+
"createdAt": {
|
1167
|
+
"date": "11.03.2015 16:41:00",
|
1168
|
+
"timezone": {
|
1169
|
+
"timezone_type": 3,
|
1170
|
+
"timezone": "Europe/Berlin"
|
1171
|
+
}
|
1172
|
+
},
|
1173
|
+
"type": "ftp",
|
1174
|
+
"host": "yourdomain.com",
|
1175
|
+
"passive": true,
|
1176
|
+
"path": "path/to/your/directory"
|
1177
|
+
}
|
1178
|
+
]
|
1179
|
+
}
|
1180
|
+
|
1181
|
+
## Output Details [/output/{id}]
|
1182
|
+
### Get Output details [GET]
|
1183
|
+
This call can be used to get detailed information about an already created output.
|
1184
|
+
+ Parameters
|
1185
|
+
+ id (optional, integer) ... Output-ID
|
1186
|
+
|
1187
|
+
+ Request (application/json)
|
1188
|
+
+ Header
|
1189
|
+
|
1190
|
+
bitcodin-api-version: v1
|
1191
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1192
|
+
|
1193
|
+
+ Response 200 (application/json)
|
1194
|
+
|
1195
|
+
{
|
1196
|
+
"outputId": 3,
|
1197
|
+
"name": "FTP Output Destination",
|
1198
|
+
"createdAt": {
|
1199
|
+
"date": "11.03.2015 16:41:00",
|
1200
|
+
"timezone": {
|
1201
|
+
"timezone_type": 3,
|
1202
|
+
"timezone": "Europe/Berlin"
|
1203
|
+
}
|
1204
|
+
},
|
1205
|
+
"type": "ftp",
|
1206
|
+
"host": "yourdomain.com",
|
1207
|
+
"passive": true,
|
1208
|
+
"path": "path/to/your/directory"
|
1209
|
+
}
|
1210
|
+
|
1211
|
+
### Delete Output [DELETE]
|
1212
|
+
Deletes an output from the bitcodin system.
|
1213
|
+
+ Request (application/json)
|
1214
|
+
+ Header
|
1215
|
+
|
1216
|
+
bitcodin-api-version: v1
|
1217
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1218
|
+
|
1219
|
+
+ Response 204 (application/json)
|
1220
|
+
|
1221
|
+
# Group Encoding Profiles
|
1222
|
+
Encoding profiles help you to simplify your encoding process by organizing your encoding configuration. They consist of the number of audio and video output qualities/renditions as well as their encoding settings (bitrate, resolution, etc.), which will be generated out of an input file. Also pre-encoding settings like video rotation, cropping and watermarking are configurable via the encoding profile. The order which pre-encoding settings will be applied on the input video is as following: first watermark config, then rotation and last cropping config. This encoding profiles can either be generated on-the-fly for specific videos, or used as generic template for multiple inputs.
|
1223
|
+
|
1224
|
+
The **videoStreamConfigs** array contains objects with the following attributes:
|
1225
|
+
|
1226
|
+
| Attribute Name | Description |
|
1227
|
+
|-----------------------------|-------------|
|
1228
|
+
| defaultStreamId | ID of the video stream which should be encoded |
|
1229
|
+
| representationId | ID of the video stream config |
|
1230
|
+
| bitrate | Bitrate of the video stream. Value must be in the range from 32000 to 20000000 |
|
1231
|
+
| profile | Profile which should be used to encode video stream. Possible values are: baseline, main, high |
|
1232
|
+
| preset | Preset which should be used to encode video stream. Possible values are: standard, professional, premium |
|
1233
|
+
| height | Video-Width in px, must be in the range from 128 to 7680 |
|
1234
|
+
| width | Video-Height in px, must be in the range from 96 to 4320 |
|
1235
|
+
| rate (optional) | Only available using standard speed. The sample rate the encoded video should have in FPS. Values must be in the range from 1 to 120 |
|
1236
|
+
| codec (optional) | Only available using premium speed. Sets the video codec used for encoding. Possible values are: h264, hevc. Default value is h264. |
|
1237
|
+
| bFrames (optional) | Sets the amount of B-Frames. Valid value range: 0 - 16 |
|
1238
|
+
| refFrames (optional) | Sets the amount of Reference-Frames. Valid value range: 0 - 16 |
|
1239
|
+
| qpMin (optional) | Sets the minimum of quantization-factor. Valid value range: 0 - 69 |
|
1240
|
+
| qpMax (optional) | Sets the maximum of quantization-factor. Valid value range: 0 - 69 |
|
1241
|
+
| mvPredictionMode (optional) | Sets the Motion Vector Prediction Mode. Valid values: none, spatial, temporal, auto |
|
1242
|
+
| mvSearchRangeMax (optional) | Sets the maximum Motion-Vector-Search-Range. Valid value range: 16 - 24 |
|
1243
|
+
| noCabac (optional) | Disable CABAC. Valid values: boolean |
|
1244
|
+
|
1245
|
+
|
1246
|
+
The **audioStreamConfigs** array contains objects with the following attributes:
|
1247
|
+
|
1248
|
+
| Attribute Name | Description |
|
1249
|
+
|-----------------|-------------|
|
1250
|
+
| defaultStreamId | ID of the audio stream which should be encoded |
|
1251
|
+
| representationId| ID of the audio stream config |
|
1252
|
+
| bitrate | Bitrate of the audio stream. Values must be in the range from 8000 to 256000 |
|
1253
|
+
| rate (optional) | The sample rate the encoded audio should have in Hz. Possible values are: 0, 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000|
|
1254
|
+
|
1255
|
+
|
1256
|
+
## Create Encoding Profiles [/encoding-profile/create]
|
1257
|
+
### Create an Encoding Profile [POST]
|
1258
|
+
Creates an Encoding Profile that can be used for all your encoding jobs in the bitcodin system.
|
1259
|
+
+ Attributes (EncodingProfile)
|
1260
|
+
+ Request (application/json)
|
1261
|
+
+ Header
|
1262
|
+
|
1263
|
+
bitcodin-api-version: v1
|
1264
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1265
|
+
|
1266
|
+
+ Body
|
1267
|
+
|
1268
|
+
{
|
1269
|
+
"name": "bitcodin Encoding Profile",
|
1270
|
+
"videoStreamConfigs": [
|
1271
|
+
{
|
1272
|
+
"defaultStreamId": 0,
|
1273
|
+
"bitrate": 1024000,
|
1274
|
+
"profile": "Main",
|
1275
|
+
"preset": "Standard",
|
1276
|
+
"codec": "h264",
|
1277
|
+
"height": 480,
|
1278
|
+
"width": 204
|
1279
|
+
}
|
1280
|
+
],
|
1281
|
+
"audioStreamConfigs": [
|
1282
|
+
{
|
1283
|
+
"defaultStreamId": 0,
|
1284
|
+
"bitrate": 256000
|
1285
|
+
}
|
1286
|
+
]
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
+ Response 201 (application/json)
|
1290
|
+
|
1291
|
+
{
|
1292
|
+
"encodingProfileId": 5,
|
1293
|
+
"createdAt": {
|
1294
|
+
"date": "11.03.2015 16:41:00",
|
1295
|
+
"timezone": {
|
1296
|
+
"timezone_type": 3,
|
1297
|
+
"timezone": "Europe/Berlin"
|
1298
|
+
}
|
1299
|
+
},
|
1300
|
+
"type": "private",
|
1301
|
+
"name": "bitcodin Encoding Profile",
|
1302
|
+
"videoStreamConfigs": [
|
1303
|
+
{
|
1304
|
+
"defaultStreamId": 0,
|
1305
|
+
"representationId": 5678,
|
1306
|
+
"bitrate": 1024000,
|
1307
|
+
"codec": "h264",
|
1308
|
+
"profile": "Main",
|
1309
|
+
"preset": "Standard",
|
1310
|
+
"height": 480,
|
1311
|
+
"width": 204
|
1312
|
+
}
|
1313
|
+
],
|
1314
|
+
"audioStreamConfigs": [
|
1315
|
+
{
|
1316
|
+
"defaultStreamId": 0,
|
1317
|
+
"representationId": 5678,
|
1318
|
+
"codec": "aac",
|
1319
|
+
"bitrate": 1500000,
|
1320
|
+
"sampleRate": 48000
|
1321
|
+
}
|
1322
|
+
]
|
1323
|
+
}
|
1324
|
+
|
1325
|
+
## Watermark [/encoding-profile/create]
|
1326
|
+
### Create a watermarked Encoding Profile [POST]
|
1327
|
+
Creates a watermarked Encoding Profile.
|
1328
|
+
+ Attributes(EncodingProfile)
|
1329
|
+
+ Request (application/json)
|
1330
|
+
+ Header
|
1331
|
+
|
1332
|
+
bitcodin-api-version: v1
|
1333
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1334
|
+
|
1335
|
+
+ Body
|
1336
|
+
|
1337
|
+
{
|
1338
|
+
"name": "bitcodin Encoding Profile",
|
1339
|
+
"videoStreamConfigs": [
|
1340
|
+
{
|
1341
|
+
"defaultStreamId": 0,
|
1342
|
+
"bitrate": 1024000,
|
1343
|
+
"profile": "Main",
|
1344
|
+
"preset": "Standard",
|
1345
|
+
"height": 480,
|
1346
|
+
"width": 204
|
1347
|
+
}
|
1348
|
+
],
|
1349
|
+
"audioStreamConfigs": [
|
1350
|
+
{
|
1351
|
+
"defaultStreamId": 0,
|
1352
|
+
"bitrate": 256000
|
1353
|
+
}
|
1354
|
+
],
|
1355
|
+
"watermarkConfig":
|
1356
|
+
{
|
1357
|
+
"top" : 10,
|
1358
|
+
"right" : 100,
|
1359
|
+
"image" : "http://bitdash-a.akamaihd.net/webpages/bitcodin/images/bitcodin-bitmovin-logo-small.png"
|
1360
|
+
}
|
1361
|
+
}
|
1362
|
+
|
1363
|
+
+ Response 201 (application/json)
|
1364
|
+
|
1365
|
+
{
|
1366
|
+
"encodingProfileId": 5,
|
1367
|
+
"createdAt": {
|
1368
|
+
"date": "11.03.2015 16:41:00",
|
1369
|
+
"timezone": {
|
1370
|
+
"timezone_type": 3,
|
1371
|
+
"timezone": "Europe/Berlin"
|
1372
|
+
}
|
1373
|
+
},
|
1374
|
+
"type": "private",
|
1375
|
+
"name": "bitcodin Encoding Profile",
|
1376
|
+
"videoStreamConfigs": [
|
1377
|
+
{
|
1378
|
+
"defaultStreamId": 0,
|
1379
|
+
"representationId": 5678,
|
1380
|
+
"bitrate": 1024000,
|
1381
|
+
"codec": "h264",
|
1382
|
+
"profile": "Main",
|
1383
|
+
"preset": "Standard",
|
1384
|
+
"height": 480,
|
1385
|
+
"width": 204
|
1386
|
+
}
|
1387
|
+
],
|
1388
|
+
"audioStreamConfigs": [
|
1389
|
+
{
|
1390
|
+
"defaultStreamId": 0,
|
1391
|
+
"representationId": 5678,
|
1392
|
+
"codec": "aac",
|
1393
|
+
"bitrate": 1500000,
|
1394
|
+
"sampleRate": 48000
|
1395
|
+
}
|
1396
|
+
],
|
1397
|
+
"watermarkConfig":
|
1398
|
+
{
|
1399
|
+
"top" : 10,
|
1400
|
+
"right" : 100,
|
1401
|
+
"image" : "http://bitdash-a.akamaihd.net/webpages/bitcodin/images/bitcodin-bitmovin-logo-small.png"
|
1402
|
+
}
|
1403
|
+
}
|
1404
|
+
|
1405
|
+
## Cropping [/encoding-profile/create]
|
1406
|
+
### Create a cropped Encoding Profile [POST]
|
1407
|
+
Creates a cropped Encoding Profile.
|
1408
|
+
+ Attributes(EncodingProfile)
|
1409
|
+
|
1410
|
+
+ Request Create a cropped Encoding Profile(application/json)
|
1411
|
+
+ Header
|
1412
|
+
|
1413
|
+
bitcodin-api-version: v1
|
1414
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1415
|
+
|
1416
|
+
+ Body
|
1417
|
+
|
1418
|
+
{
|
1419
|
+
"name": "bitcodin Encoding Profile",
|
1420
|
+
"videoStreamConfigs": [
|
1421
|
+
{
|
1422
|
+
"defaultStreamId": 0,
|
1423
|
+
"bitrate": 1024000,
|
1424
|
+
"profile": "Main",
|
1425
|
+
"preset": "Standard",
|
1426
|
+
"height": 480,
|
1427
|
+
"width": 204
|
1428
|
+
}
|
1429
|
+
],
|
1430
|
+
"audioStreamConfigs": [
|
1431
|
+
{
|
1432
|
+
"defaultStreamId": 0,
|
1433
|
+
"bitrate": 256000
|
1434
|
+
}
|
1435
|
+
],
|
1436
|
+
"croppingConfig":
|
1437
|
+
{
|
1438
|
+
"top" : 100,
|
1439
|
+
"right" : 5,
|
1440
|
+
"bottom" : 100,
|
1441
|
+
"left" : 5
|
1442
|
+
}
|
1443
|
+
}
|
1444
|
+
|
1445
|
+
+ Response 201 (application/json)
|
1446
|
+
|
1447
|
+
{
|
1448
|
+
"encodingProfileId": 5,
|
1449
|
+
"createdAt": {
|
1450
|
+
"date": "11.03.2015 16:41:00",
|
1451
|
+
"timezone": {
|
1452
|
+
"timezone_type": 3,
|
1453
|
+
"timezone": "Europe/Berlin"
|
1454
|
+
}
|
1455
|
+
},
|
1456
|
+
"type": "private",
|
1457
|
+
"name": "bitcodin Encoding Profile",
|
1458
|
+
"videoStreamConfigs": [
|
1459
|
+
{
|
1460
|
+
"defaultStreamId": 0,
|
1461
|
+
"representationId": 5678,
|
1462
|
+
"bitrate": 1024000,
|
1463
|
+
"codec": "h264",
|
1464
|
+
"profile": "Main",
|
1465
|
+
"preset": "Standard",
|
1466
|
+
"height": 480,
|
1467
|
+
"width": 204
|
1468
|
+
}
|
1469
|
+
],
|
1470
|
+
"audioStreamConfigs": [
|
1471
|
+
{
|
1472
|
+
"defaultStreamId": 0,
|
1473
|
+
"representationId": 5678,
|
1474
|
+
"codec": "aac",
|
1475
|
+
"bitrate": 1500000,
|
1476
|
+
"sampleRate": 48000
|
1477
|
+
}
|
1478
|
+
],
|
1479
|
+
"croppingConfig":
|
1480
|
+
{
|
1481
|
+
"top" : 100,
|
1482
|
+
"right" : 5,
|
1483
|
+
"bottom" : 100,
|
1484
|
+
"left" : 5
|
1485
|
+
}
|
1486
|
+
}
|
1487
|
+
|
1488
|
+
## Rotation [/encoding-profile/create]
|
1489
|
+
### Create an rotated Encoding Profile [POST]
|
1490
|
+
Creates a rotated Encoding Profile.
|
1491
|
+
+ Attributes(object)
|
1492
|
+
+ name (required, string) - Name of your new Encoding Profile
|
1493
|
+
+ videoStreamConfigs (required, array[VideoStreamConfig]) - Array of VideoStreamConfig-Settings of your choice
|
1494
|
+
+ audioStreamConfigs (required, array[AudioStreamConfig]) - Array of AudioStreamConfig-Settings of your choice
|
1495
|
+
+ segmentLength: 2 (optional, number) - Only available using standard speed. Defines the length of a segment. Must be a value between 1 and 9 seconds.
|
1496
|
+
+ rotation: 0 (optional, number) - Rotation of the video in degrees. A positive value will rotate the video clockwise and a negative one counter clockwise.
|
1497
|
+
+ Request (application/json)
|
1498
|
+
+ Header
|
1499
|
+
|
1500
|
+
bitcodin-api-version: v1
|
1501
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1502
|
+
|
1503
|
+
+ Body
|
1504
|
+
|
1505
|
+
{
|
1506
|
+
"name": "bitcodin Encoding Profile",
|
1507
|
+
"videoStreamConfigs": [
|
1508
|
+
{
|
1509
|
+
"defaultStreamId": 0,
|
1510
|
+
"bitrate": 1024000,
|
1511
|
+
"profile": "Main",
|
1512
|
+
"preset": "Standard",
|
1513
|
+
"height": 480,
|
1514
|
+
"width": 204
|
1515
|
+
}
|
1516
|
+
],
|
1517
|
+
"audioStreamConfigs": [
|
1518
|
+
{
|
1519
|
+
"defaultStreamId": 0,
|
1520
|
+
"bitrate": 256000
|
1521
|
+
}
|
1522
|
+
],
|
1523
|
+
"rotation" : 45
|
1524
|
+
}
|
1525
|
+
|
1526
|
+
+ Response 201 (application/json)
|
1527
|
+
|
1528
|
+
{
|
1529
|
+
"encodingProfileId": 5,
|
1530
|
+
"createdAt": {
|
1531
|
+
"date": "11.03.2015 16:41:00",
|
1532
|
+
"timezone": {
|
1533
|
+
"timezone_type": 3,
|
1534
|
+
"timezone": "Europe/Berlin"
|
1535
|
+
}
|
1536
|
+
},
|
1537
|
+
"type": "private",
|
1538
|
+
"name": "bitcodin Encoding Profile",
|
1539
|
+
"videoStreamConfigs": [
|
1540
|
+
{
|
1541
|
+
"defaultStreamId": 0,
|
1542
|
+
"representationId": 5678,
|
1543
|
+
"bitrate": 1024000,
|
1544
|
+
"codec": "h264",
|
1545
|
+
"profile": "Main",
|
1546
|
+
"preset": "Standard",
|
1547
|
+
"height": 480,
|
1548
|
+
"width": 204
|
1549
|
+
}
|
1550
|
+
],
|
1551
|
+
"audioStreamConfigs": [
|
1552
|
+
{
|
1553
|
+
"defaultStreamId": 0,
|
1554
|
+
"representationId": 5678,
|
1555
|
+
"codec": "aac",
|
1556
|
+
"bitrate": 1500000,
|
1557
|
+
"sampleRate": 48000
|
1558
|
+
}
|
1559
|
+
],
|
1560
|
+
"rotation" : 45
|
1561
|
+
}
|
1562
|
+
|
1563
|
+
## List Encoding Profiles [/encoding-profiles/{page}]
|
1564
|
+
### List Encoding Profiles [GET]
|
1565
|
+
List all Encoding Profiles of your account structured as pages.
|
1566
|
+
+ Parameters
|
1567
|
+
+ page (optional, integer) ... page number. If page number doesn't exist, last page will be returned. (10 Encoding-Profiles per page)
|
1568
|
+
+ Default: 1
|
1569
|
+
|
1570
|
+
+ Request (application/json)
|
1571
|
+
+ Header
|
1572
|
+
|
1573
|
+
bitcodin-api-version: v1
|
1574
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1575
|
+
|
1576
|
+
+ Response 200 (application/json)
|
1577
|
+
|
1578
|
+
{
|
1579
|
+
"perPage": 10,
|
1580
|
+
"totalCount": 1,
|
1581
|
+
"profiles": [
|
1582
|
+
{
|
1583
|
+
"encodingProfileId": 5,
|
1584
|
+
"createdAt": {
|
1585
|
+
"date": "11.03.2015 16:41:00",
|
1586
|
+
"timezone": {
|
1587
|
+
"timezone_type": 3,
|
1588
|
+
"timezone": "Europe/Berlin"
|
1589
|
+
}
|
1590
|
+
},
|
1591
|
+
"type": "private",
|
1592
|
+
"name": "bitcodin Encoding Profile",
|
1593
|
+
"videoStreamConfigs": [
|
1594
|
+
{
|
1595
|
+
"defaultStreamId": 0,
|
1596
|
+
"representationId": 5678,
|
1597
|
+
"bitrate": 1024000,
|
1598
|
+
"codec": "h264",
|
1599
|
+
"profile": "Main",
|
1600
|
+
"preset": "Standard",
|
1601
|
+
"height": 480,
|
1602
|
+
"width": 204
|
1603
|
+
}
|
1604
|
+
],
|
1605
|
+
"audioStreamConfigs": [
|
1606
|
+
{
|
1607
|
+
"defaultStreamId": 0,
|
1608
|
+
"representationId": 5678,
|
1609
|
+
"codec": "aac",
|
1610
|
+
"bitrate": 1500000,
|
1611
|
+
"sampleRate": 48000
|
1612
|
+
}
|
1613
|
+
],
|
1614
|
+
"rotation" : 0
|
1615
|
+
}
|
1616
|
+
]
|
1617
|
+
}
|
1618
|
+
|
1619
|
+
## Get Encoding Profile [/encoding-profile/{id}]
|
1620
|
+
### Get Encoding Profile Details[GET]
|
1621
|
+
This call can be used to get detailed information about an already created Encoding Profile.
|
1622
|
+
+ Parameters
|
1623
|
+
+ id (required, integer) ... Encoding Profile ID
|
1624
|
+
|
1625
|
+
+ Request (application/json)
|
1626
|
+
+ Header
|
1627
|
+
|
1628
|
+
bitcodin-api-version: v1
|
1629
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1630
|
+
|
1631
|
+
+ Response 200 (application/json)
|
1632
|
+
|
1633
|
+
{
|
1634
|
+
"encodingProfileId": 1,
|
1635
|
+
"createdAt": "2014-09-16 08:30:12",
|
1636
|
+
"type": "private",
|
1637
|
+
"name": "Default Release Settings",
|
1638
|
+
"rotation" : 0,
|
1639
|
+
"videoStreamConfigs": [
|
1640
|
+
{
|
1641
|
+
"defaultStreamId":0,
|
1642
|
+
"representationId": 5678,
|
1643
|
+
"codec": "h264",
|
1644
|
+
"profile": "Main",
|
1645
|
+
"preset": "Standard",
|
1646
|
+
"height":1080,
|
1647
|
+
"width":1920,
|
1648
|
+
"bitrate": 6000000
|
1649
|
+
},
|
1650
|
+
{
|
1651
|
+
"defaultStreamId":0,
|
1652
|
+
"representationId": 5678,
|
1653
|
+
"codec": "h264",
|
1654
|
+
"profile": "Main",
|
1655
|
+
"preset": "Standard",
|
1656
|
+
"height":720,
|
1657
|
+
"width":1280,
|
1658
|
+
"bitrate": 3500000
|
1659
|
+
},
|
1660
|
+
{
|
1661
|
+
"defaultStreamId":0,
|
1662
|
+
"representationId": 5678,
|
1663
|
+
"codec": "h264",
|
1664
|
+
"profile": "Main",
|
1665
|
+
"preset": "Standard",
|
1666
|
+
"height":480,
|
1667
|
+
"width":853,
|
1668
|
+
"bitrate": 2500000
|
1669
|
+
},
|
1670
|
+
{
|
1671
|
+
"defaultStreamId":0,
|
1672
|
+
"representationId": 5678,
|
1673
|
+
"codec": "h264",
|
1674
|
+
"profile": "Main",
|
1675
|
+
"preset": "Standard",
|
1676
|
+
"height":360,
|
1677
|
+
"width":640,
|
1678
|
+
"bitrate": 1500000
|
1679
|
+
}
|
1680
|
+
],
|
1681
|
+
"audioStreamConfigs": [
|
1682
|
+
{
|
1683
|
+
"defaultStreamId":0,
|
1684
|
+
"representationId": 5678,
|
1685
|
+
"codec": "aac",
|
1686
|
+
"bitrate": 1500000,
|
1687
|
+
"sampleRate": 48000
|
1688
|
+
},
|
1689
|
+
{
|
1690
|
+
"defaultStreamId":1,
|
1691
|
+
"representationId": 5678,
|
1692
|
+
"codec": "aac",
|
1693
|
+
"bitrate": 1500000,
|
1694
|
+
"sampleRate": 48000
|
1695
|
+
}
|
1696
|
+
]
|
1697
|
+
}
|
1698
|
+
|
1699
|
+
### Delete Encoding Profile [DELETE]
|
1700
|
+
Deletes an Encoding Profile from the bitcodin system.
|
1701
|
+
+ Parameters
|
1702
|
+
+ id (required, integer) ... Encoding-Profile-ID
|
1703
|
+
|
1704
|
+
+ Request (application/json)
|
1705
|
+
+ Header
|
1706
|
+
|
1707
|
+
bitcodin-api-version: v1
|
1708
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1709
|
+
|
1710
|
+
+ Response 204 (application/json)
|
1711
|
+
|
1712
|
+
# Group Jobs
|
1713
|
+
Encoding-jobs are the central element of bitcodin, they consist of an input which is encoded according to an encoding profile into MPEG-DASH and/or HLS output.
|
1714
|
+
|
1715
|
+
Using the concepts of input and encoding profile, the complexity of video encoding gets reduced significantly, which helps our users to save time and money.
|
1716
|
+
|
1717
|
+
The bitcodin API provides a comprehensive set of possibilities around the creation of jobs, which makes it easy to integrate bitcodin into existing media workflows, web portal, apps, asset management systems, etc.
|
1718
|
+
|
1719
|
+
## Job [/job/create]
|
1720
|
+
### Create a Job [POST]
|
1721
|
+
Creates an encoding job in the encoding system, which encodes an already created input based on the defined encoding profile to HLS and/or MPEG-DASH. It is also possible to define a DRM configuration for Widevine, PlayReady and both combined. Encryption of your HLS content is also possible.
|
1722
|
+
|
1723
|
+
The attribute "speed" in the request can take one of the two possible values "standard" and "premium" (latter is default if this attribute was not specified explicitly). The premium speed is faster than the standard speed and is available for no additional costs at present. Please note that some features are not available when using premium speed yet.
|
1724
|
+
|
1725
|
+
```HTTP
|
1726
|
+
{
|
1727
|
+
...
|
1728
|
+
"speed": "standard|premium",
|
1729
|
+
...
|
1730
|
+
}
|
1731
|
+
```
|
1732
|
+
|
1733
|
+
If you already created an output destination (see Outputs), you can add its ID to your createJob-Call to automatically transfer your encoded output to the given destination.
|
1734
|
+
|
1735
|
+
```HTTP
|
1736
|
+
{
|
1737
|
+
...
|
1738
|
+
"outputId": 1234,
|
1739
|
+
...
|
1740
|
+
}
|
1741
|
+
```
|
1742
|
+
|
1743
|
+
If you have interlaced inputs you can use the de-interlace-option to remove it.
|
1744
|
+
|
1745
|
+
```HTTP
|
1746
|
+
{
|
1747
|
+
...
|
1748
|
+
"deinterlace": true
|
1749
|
+
...
|
1750
|
+
}
|
1751
|
+
```
|
1752
|
+
|
1753
|
+
It is also possible to protect your DASH content with DRM and to encrypt your HLS content. For more infos have a look at the DRM sections below.
|
1754
|
+
|
1755
|
+
If you are having Inputfiles with multiple mono audiostreams, that need to be merged into one stereo or 5.1 audio stream, you can use the so called MergeAudioChannelConfigs (standard encodings only).
|
1756
|
+
This allows you to choose which audio input streams will be merged together to form a new stream. Using MergeAudioChannelConfigs means that the information about input audio streams will be overwritten and replaced with the resulting streams of the merged audio streams.
|
1757
|
+
Here is an example for merging mono stream 1 and 2 to one stereo audio stream and mono stream 3 and 4 to another stereo input stream:
|
1758
|
+
|
1759
|
+
```HTTP
|
1760
|
+
{
|
1761
|
+
...
|
1762
|
+
"mergeAudioChannelConfigs": [{"audioChannels": [1,2]}, {"audioChannels": [3,4]}],
|
1763
|
+
...
|
1764
|
+
}
|
1765
|
+
```
|
1766
|
+
|
1767
|
+
|
1768
|
+
+ Attributes(object)
|
1769
|
+
+ inputId (required, number) - Input-ID to choose encode input
|
1770
|
+
+ encodingProfileId (required, number) - EncodingProfile-ID
|
1771
|
+
+ manifestTypes: mpd, m3u8 (required, array[string]) - Manifest-Filetypes to create
|
1772
|
+
+ outputId (optional, number) - Output-ID to transfer your encoded output to
|
1773
|
+
+ speed: standard, premium (optional, string) - Speed of the encoding
|
1774
|
+
+ Default: `premium`
|
1775
|
+
+ audioMetaData (optional, AudioMetaData) - Meta data of the audio streams (Only available when using `standard` as speed setting)
|
1776
|
+
+ extractClosedCaptions (optional, boolean) - Extract closed captions from the input file
|
1777
|
+
+ Default: false
|
1778
|
+
+ deinterlace (optional, boolean) - Create de-interlaced output
|
1779
|
+
+ Default: false
|
1780
|
+
+ mergeAudioChannelConfigs (optional, array[]) - Merge multiple mono audio input streams to stereo or 5.1 audio streams (Only available when using `standard` as speed setting)
|
1781
|
+
+ audioChannels: Array of mono audio input streams
|
1782
|
+
+ duration (optional, number) - Defines how many seconds from the input will be encoded.
|
1783
|
+
+ startTime (optional, number) - Defines the offset in seconds from which the encoding should start, beginning at 0.
|
1784
|
+
|
1785
|
+
+ Request (application/json)
|
1786
|
+
+ Header
|
1787
|
+
|
1788
|
+
bitcodin-api-version: v1
|
1789
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1790
|
+
|
1791
|
+
+ Body
|
1792
|
+
|
1793
|
+
{
|
1794
|
+
"inputId": 1,
|
1795
|
+
"encodingProfileId": 1,
|
1796
|
+
"manifestTypes":["mpd","m3u8"],
|
1797
|
+
"speed": "standard",
|
1798
|
+
"audioMetaData": [
|
1799
|
+
{
|
1800
|
+
"defaultStreamId": 0,
|
1801
|
+
"language": "en",
|
1802
|
+
"label": "English"
|
1803
|
+
}
|
1804
|
+
],
|
1805
|
+
"extractClosedCaptions": true
|
1806
|
+
}
|
1807
|
+
|
1808
|
+
+ Response 201 (application/json)
|
1809
|
+
|
1810
|
+
{
|
1811
|
+
"jobId": 1,
|
1812
|
+
"status": "Enqueued",
|
1813
|
+
"frameRate": 0,
|
1814
|
+
"segmentsSplitted": 0,
|
1815
|
+
"totalFramesWritten": 0,
|
1816
|
+
"bytesWritten": 0,
|
1817
|
+
"useStrictSegmentLength": true,
|
1818
|
+
"progress": 0,
|
1819
|
+
"jobFolder": "123456_abcdefghijklmnopqrstuvwxyz012345",
|
1820
|
+
"input": {
|
1821
|
+
"inputId": 1,
|
1822
|
+
"filename": "video.mkv",
|
1823
|
+
"createdAt": {
|
1824
|
+
"date": "22.06.2015 23:43:30",
|
1825
|
+
"timezone": {
|
1826
|
+
"timezone_type": 3,
|
1827
|
+
"timezone": "UTC"
|
1828
|
+
}
|
1829
|
+
},
|
1830
|
+
"updatedAt": {
|
1831
|
+
"date": "22.06.2015 23:43:30",
|
1832
|
+
"timezone": {
|
1833
|
+
"timezone_type": 3,
|
1834
|
+
"timezone": "UTC"
|
1835
|
+
}
|
1836
|
+
},
|
1837
|
+
"thumbnailUrl": "http:\\/\\path\\/to\\/thumbnail.png",
|
1838
|
+
"inputType": "url",
|
1839
|
+
"url": "http:\\/\\/path\\/to\\/video.mkv",
|
1840
|
+
"basicAuthUser": "",
|
1841
|
+
"basicAuthPassword": "",
|
1842
|
+
"mediaConfigurations": [
|
1843
|
+
{}
|
1844
|
+
]
|
1845
|
+
},
|
1846
|
+
"encodingProfiles": [
|
1847
|
+
{}
|
1848
|
+
],
|
1849
|
+
"statusDescription": "",
|
1850
|
+
"createdAt": {
|
1851
|
+
"date": "29.07.2015 15:09:34",
|
1852
|
+
"timezone": {
|
1853
|
+
"timezone_type": 3,
|
1854
|
+
"timezone": "UTC"
|
1855
|
+
}
|
1856
|
+
},
|
1857
|
+
"duration": 0,
|
1858
|
+
"startTime": 0,
|
1859
|
+
"encodedDuration": 0,
|
1860
|
+
"enqueueDuration": 0,
|
1861
|
+
"realtimeFactor": 0,
|
1862
|
+
"inputDuration": 0,
|
1863
|
+
"enqueuedAt": {
|
1864
|
+
"date": "29.07.2015 15:09:34",
|
1865
|
+
"timezone": {
|
1866
|
+
"timezone_type": 3,
|
1867
|
+
"timezone": "UTC"
|
1868
|
+
}
|
1869
|
+
},
|
1870
|
+
"manifestUrls": {
|
1871
|
+
"mpdUrl": "http:\\/\\/path\\/to\\/mpd_file.mpd",
|
1872
|
+
"m3u8Url": "http:\\/\\/path\\/to\\/m3u8_file.m3u8"
|
1873
|
+
}
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
|
1877
|
+
## DRM Widevine [/job/create]
|
1878
|
+
### Create a Widevine Job [POST]
|
1879
|
+
#### Widevine
|
1880
|
+
```HTTP
|
1881
|
+
{
|
1882
|
+
...
|
1883
|
+
"speed": "standard",
|
1884
|
+
"drmConfig": {
|
1885
|
+
"system": "widevine",
|
1886
|
+
"provider": "widevine_test",
|
1887
|
+
"signingKey": "1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9",
|
1888
|
+
"signingIV": "d58ce954203b7c9a9a9d467f59839249",
|
1889
|
+
"requestUrl": "http://license.uat.widevine.com/cenc/getcontentkey",
|
1890
|
+
"contentId": "746573745f69645f4639465043304e4f",
|
1891
|
+
"method": "mpeg_cenc"
|
1892
|
+
}
|
1893
|
+
}
|
1894
|
+
```
|
1895
|
+
|
1896
|
+
The parameters of the Widevine configuration have the following meaning:
|
1897
|
+
|
1898
|
+
| Attribute Name | Description |
|
1899
|
+
|-----------------|-------------|
|
1900
|
+
| system | We support widevine, playready, widevine_playready and clearkey |
|
1901
|
+
| provider | Also known as portal, owner or organization. You will get this value from Widevine. |
|
1902
|
+
| signingKey | Replace this with the signing key you received from Widevine. |
|
1903
|
+
| signingIV | Replace this with the signing IV you received from Widevine. |
|
1904
|
+
| requestUrl | This is your private Widevine license server URL. |
|
1905
|
+
| contentId | This ID is used to link your content to the generated keys in the Widevine key managment system. This is up to you or your licensing provider. You can choose any value you like. |
|
1906
|
+
| method | Currently we only support MPEG-CENC. |
|
1907
|
+
|
1908
|
+
|
1909
|
+
+ Attributes(object)
|
1910
|
+
+ inputId (required, number) - Input-ID to choose encode input
|
1911
|
+
+ encodingProfileId (required, number) - EncodingProfile-ID
|
1912
|
+
+ manifestTypes: mpd, m3u8 (required, array[string]) - Manifest-Filetypes to create
|
1913
|
+
+ speed: standard, premium (optional, string) - Speed of the encoding
|
1914
|
+
+ Default: `premium`
|
1915
|
+
+ drmConfig (optional, object) - DRM related settings
|
1916
|
+
+ system (required, string) - We support widevine, playready, widevine_playready and clearkey
|
1917
|
+
+ provider (required, string) - Also known as portal, owner or organization. You will get this value from Widevine.
|
1918
|
+
+ signingKey (optional, string) - Replace this with the signing key you received from Widevine.
|
1919
|
+
+ signingIV (required, string) - Replace this with the signing IV you received from Widevine.
|
1920
|
+
+ requestUrl (required, string) - This is your private Widevine license server URL.
|
1921
|
+
+ contentId (required, string) - This ID is used to link your content to the generated keys in the Widevine key managment system. This is up to you or your licensing provider. You can choose any value you like.
|
1922
|
+
+ method (required, string) - Currently we only support MPEG-CENC ('mpeg_cenc').
|
1923
|
+
|
1924
|
+
+ Request (application/json)
|
1925
|
+
+ Header
|
1926
|
+
|
1927
|
+
bitcodin-api-version: v1
|
1928
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
1929
|
+
|
1930
|
+
+ Body
|
1931
|
+
|
1932
|
+
{
|
1933
|
+
"inputId": 1,
|
1934
|
+
"encodingProfileId": 1,
|
1935
|
+
"manifestTypes":["mpd","m3u8"],
|
1936
|
+
"speed": "standard"
|
1937
|
+
}
|
1938
|
+
|
1939
|
+
+ Response 201 (application/json)
|
1940
|
+
|
1941
|
+
{
|
1942
|
+
"jobId": 1,
|
1943
|
+
"status": "Enqueued",
|
1944
|
+
"frameRate": 0,
|
1945
|
+
"segmentsSplitted": 0,
|
1946
|
+
"totalFramesWritten": 0,
|
1947
|
+
"bytesWritten": 0,
|
1948
|
+
"useStrictSegmentLength": true,
|
1949
|
+
"progress": 0,
|
1950
|
+
"jobFolder": "123456_abcdefghijklmnopqrstuvwxyz012345",
|
1951
|
+
"input": {
|
1952
|
+
"inputId": 1,
|
1953
|
+
"filename": "video.mkv",
|
1954
|
+
"createdAt": {
|
1955
|
+
"date": "22.06.2015 23:43:30",
|
1956
|
+
"timezone": {
|
1957
|
+
"timezone_type": 3,
|
1958
|
+
"timezone": "UTC"
|
1959
|
+
}
|
1960
|
+
},
|
1961
|
+
"updatedAt": {
|
1962
|
+
"date": "22.06.2015 23:43:30",
|
1963
|
+
"timezone": {
|
1964
|
+
"timezone_type": 3,
|
1965
|
+
"timezone": "UTC"
|
1966
|
+
}
|
1967
|
+
},
|
1968
|
+
"thumbnailUrl": "http:\\/\\path\\/to\\/thumbnail.png",
|
1969
|
+
"inputType": "url",
|
1970
|
+
"url": "http:\\/\\/path\\/to\\/video.mkv",
|
1971
|
+
"basicAuthUser": "",
|
1972
|
+
"basicAuthPassword": "",
|
1973
|
+
"mediaConfigurations": [
|
1974
|
+
/*
|
1975
|
+
* mediaConfigs
|
1976
|
+
*/
|
1977
|
+
]
|
1978
|
+
},
|
1979
|
+
"encodingProfiles": [
|
1980
|
+
/*
|
1981
|
+
* encodingProfiles
|
1982
|
+
*/
|
1983
|
+
]
|
1984
|
+
}
|
1985
|
+
],
|
1986
|
+
"statusDescription": "",
|
1987
|
+
"createdAt": {
|
1988
|
+
"date": "29.07.2015 15:09:34",
|
1989
|
+
"timezone": {
|
1990
|
+
"timezone_type": 3,
|
1991
|
+
"timezone": "UTC"
|
1992
|
+
}
|
1993
|
+
},
|
1994
|
+
"duration": 0,
|
1995
|
+
"encodedDuration": 0,
|
1996
|
+
"enqueueDuration": 0,
|
1997
|
+
"realtimeFactor": 0,
|
1998
|
+
"inputDuration": 0,
|
1999
|
+
"enqueuedAt": {
|
2000
|
+
"date": "29.07.2015 15:09:34",
|
2001
|
+
"timezone": {
|
2002
|
+
"timezone_type": 3,
|
2003
|
+
"timezone": "UTC"
|
2004
|
+
}
|
2005
|
+
},
|
2006
|
+
"manifestUrls": {
|
2007
|
+
"mpdUrl": "http:\\/\\/path\\/to\\/mpd_file.mpd",
|
2008
|
+
"m3u8Url": "http:\\/\\/path\\/to\\/m3u8_file.m3u8"
|
2009
|
+
}
|
2010
|
+
}
|
2011
|
+
|
2012
|
+
|
2013
|
+
## DRM PlayReady [/job/create]
|
2014
|
+
### Create a PlayReady Job [POST]
|
2015
|
+
#### PlayReady
|
2016
|
+
```HTTP
|
2017
|
+
{
|
2018
|
+
...
|
2019
|
+
"speed": "standard",
|
2020
|
+
"drmConfig": {
|
2021
|
+
"system": "playready",
|
2022
|
+
"keySeed": "XVBovsmzhP9gRIZxWfFta3VVRPzVEWmJsazEJ46I",
|
2023
|
+
"laUrl": "http://playready.directtaps.net/pr/svc/rightsmanager.asmx",
|
2024
|
+
"method": "mpeg_cenc",
|
2025
|
+
"kid": "746573745f69645f4639465043304e4f"
|
2026
|
+
}
|
2027
|
+
}
|
2028
|
+
```
|
2029
|
+
|
2030
|
+
The parameters of the PlayReady configuration have the following meaning:
|
2031
|
+
|
2032
|
+
| Attribute Name | Description |
|
2033
|
+
|-----------------|-------------|
|
2034
|
+
| system | We support widevine, playready, widevine_playready and clearkey |
|
2035
|
+
| keySeed | Key seed (base64) to generate key (keySeed or key is required) |
|
2036
|
+
| key | Encryption key (keySeed or key is required) |
|
2037
|
+
| laUrl | Url of the license server |
|
2038
|
+
| method | Encryption method |
|
2039
|
+
| kid | Key identifier in hex format |
|
2040
|
+
|
2041
|
+
|
2042
|
+
|
2043
|
+
+ Attributes(object)
|
2044
|
+
+ inputId (required, number) - Input-ID to choose encode input
|
2045
|
+
+ encodingProfileId (required, number) - EncodingProfile-ID
|
2046
|
+
+ manifestTypes: mpd, m3u8 (required, array[string]) - Manifest-Filetypes to create
|
2047
|
+
+ speed: standard, premium (optional, string) - Speed of the encoding
|
2048
|
+
+ Default: `premium`
|
2049
|
+
+ drmConfig (optional, object) - DRM related settings
|
2050
|
+
+ system (required, string) - We support widevine, playready, widevine_playready and clearkey
|
2051
|
+
+ keySeed (required, string) - Key seed to generate key
|
2052
|
+
+ laUrl (optional, string) - Url of the license server
|
2053
|
+
+ method (required, string) - Encryption method
|
2054
|
+
+ kid (required, string) - Key identifier
|
2055
|
+
|
2056
|
+
|
2057
|
+
|
2058
|
+
+ Request (application/json)
|
2059
|
+
+ Header
|
2060
|
+
|
2061
|
+
bitcodin-api-version: v1
|
2062
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2063
|
+
|
2064
|
+
+ Body
|
2065
|
+
|
2066
|
+
{
|
2067
|
+
"inputId": 1,
|
2068
|
+
"encodingProfileId": 1,
|
2069
|
+
"manifestTypes":["mpd","m3u8"],
|
2070
|
+
"speed": "standard",
|
2071
|
+
"drmConfig": {
|
2072
|
+
"system": "playready",
|
2073
|
+
"keySeed": "XVBovsmzhP9gRIZxWfFta3VVRPzVEWmJsazEJ46I",
|
2074
|
+
"laUrl": "http://playready.directtaps.net/pr/svc/rightsmanager.asmx",
|
2075
|
+
"method": "mpeg_cenc",
|
2076
|
+
"kid": "746573745f69645f4639465043304e4f"
|
2077
|
+
}
|
2078
|
+
}
|
2079
|
+
|
2080
|
+
+ Response 201 (application/json)
|
2081
|
+
|
2082
|
+
{
|
2083
|
+
"jobId": 1,
|
2084
|
+
"status": "Enqueued",
|
2085
|
+
"frameRate": 0,
|
2086
|
+
"segmentsSplitted": 0,
|
2087
|
+
"totalFramesWritten": 0,
|
2088
|
+
"bytesWritten": 0,
|
2089
|
+
"useStrictSegmentLength": true,
|
2090
|
+
"progress": 0,
|
2091
|
+
"jobFolder": "123456_abcdefghijklmnopqrstuvwxyz012345",
|
2092
|
+
"input": {
|
2093
|
+
"inputId": 1,
|
2094
|
+
"filename": "video.mkv",
|
2095
|
+
"createdAt": {
|
2096
|
+
"date": "22.06.2015 23:43:30",
|
2097
|
+
"timezone": {
|
2098
|
+
"timezone_type": 3,
|
2099
|
+
"timezone": "UTC"
|
2100
|
+
}
|
2101
|
+
},
|
2102
|
+
"updatedAt": {
|
2103
|
+
"date": "22.06.2015 23:43:30",
|
2104
|
+
"timezone": {
|
2105
|
+
"timezone_type": 3,
|
2106
|
+
"timezone": "UTC"
|
2107
|
+
}
|
2108
|
+
},
|
2109
|
+
"thumbnailUrl": "http:\\/\\path\\/to\\/thumbnail.png",
|
2110
|
+
"inputType": "url",
|
2111
|
+
"url": "http:\\/\\/path\\/to\\/video.mkv",
|
2112
|
+
"basicAuthUser": "",
|
2113
|
+
"basicAuthPassword": "",
|
2114
|
+
"mediaConfigurations": [
|
2115
|
+
/*
|
2116
|
+
* mediaConfigs
|
2117
|
+
*/
|
2118
|
+
]
|
2119
|
+
},
|
2120
|
+
"encodingProfiles": [
|
2121
|
+
/*
|
2122
|
+
* encodingProfiles
|
2123
|
+
*/
|
2124
|
+
]
|
2125
|
+
}
|
2126
|
+
],
|
2127
|
+
"statusDescription": "",
|
2128
|
+
"createdAt": {
|
2129
|
+
"date": "29.07.2015 15:09:34",
|
2130
|
+
"timezone": {
|
2131
|
+
"timezone_type": 3,
|
2132
|
+
"timezone": "UTC"
|
2133
|
+
}
|
2134
|
+
},
|
2135
|
+
"duration": 0,
|
2136
|
+
"encodedDuration": 0,
|
2137
|
+
"enqueueDuration": 0,
|
2138
|
+
"realtimeFactor": 0,
|
2139
|
+
"inputDuration": 0,
|
2140
|
+
"enqueuedAt": {
|
2141
|
+
"date": "29.07.2015 15:09:34",
|
2142
|
+
"timezone": {
|
2143
|
+
"timezone_type": 3,
|
2144
|
+
"timezone": "UTC"
|
2145
|
+
}
|
2146
|
+
},
|
2147
|
+
"manifestUrls": {
|
2148
|
+
"mpdUrl": "http:\\/\\/path\\/to\\/mpd_file.mpd",
|
2149
|
+
"m3u8Url": "http:\\/\\/path\\/to\\/m3u8_file.m3u8"
|
2150
|
+
}
|
2151
|
+
}
|
2152
|
+
|
2153
|
+
## DRM PlayReady and Widevine combined [/job/create]
|
2154
|
+
### Create a combined DRM Job [POST]
|
2155
|
+
#### PlayReady
|
2156
|
+
```HTTP
|
2157
|
+
{
|
2158
|
+
...
|
2159
|
+
"speed": "standard",
|
2160
|
+
"drmConfig": {
|
2161
|
+
"system": "widevine_playready",
|
2162
|
+
"kid": "eb676abbcb345e96bbcf616630f1a3da",
|
2163
|
+
"key": "100b6c20940f779a4589152b57d2dacb"
|
2164
|
+
"laUrl": "http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&ContentKey=EAtsIJQPd5pFiRUrV9Layw==",
|
2165
|
+
"method": "mpeg_cenc",
|
2166
|
+
"pssh": "#CAESEOtnarvLNF6Wu89hZjDxo9oaDXdpZGV2aW5lX3Rlc3QiEGZrajNsamFTZGZhbGtyM2oqAkhEMgA=",
|
2167
|
+
|
2168
|
+
}
|
2169
|
+
}
|
2170
|
+
```
|
2171
|
+
|
2172
|
+
The parameters of the Combined PlayReady and Widevine configuration have the following meaning:
|
2173
|
+
|
2174
|
+
| Attribute Name | Description |
|
2175
|
+
|-----------------|-------------|
|
2176
|
+
| system | We support widevine, playready, widevine_playready and clearkey |
|
2177
|
+
| kid | This is the common unique identifier for your content key (hex format) |
|
2178
|
+
| key | This is the common content encryption key |
|
2179
|
+
| laUrl | This is the URL to the PlayReady license server |
|
2180
|
+
| method | Enryption method |
|
2181
|
+
| pssh | This is the value for the Widevine pssh box. |
|
2182
|
+
|
2183
|
+
|
2184
|
+
|
2185
|
+
+ Attributes(object)
|
2186
|
+
+ inputId (required, number) - Input-ID to choose encode input
|
2187
|
+
+ encodingProfileId (required, number) - EncodingProfile-ID
|
2188
|
+
+ manifestTypes: mpd, m3u8 (required, array[string]) - Manifest-Filetypes to create
|
2189
|
+
+ speed: standard, premium (optional, string) - Speed of the encoding
|
2190
|
+
+ Default: `premium`
|
2191
|
+
+ drmConfig (optional, object) - DRM related settings
|
2192
|
+
+ system (required, string) - We support widevine, playready, widevine_playready and clearkey
|
2193
|
+
+ kid (required, string) - Key identifier (hex)
|
2194
|
+
+ key (required, string) - Encryption key
|
2195
|
+
+ laUrl (optional, string) - Url of the license server
|
2196
|
+
+ method (required, string) - Encryption method
|
2197
|
+
+ pssh (optional, string) - Value of pssh field which will be stored in the mp4 container.
|
2198
|
+
|
2199
|
+
|
2200
|
+
|
2201
|
+
+ Request (application/json)
|
2202
|
+
+ Header
|
2203
|
+
|
2204
|
+
bitcodin-api-version: v1
|
2205
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2206
|
+
|
2207
|
+
+ Body
|
2208
|
+
|
2209
|
+
{
|
2210
|
+
"inputId": 1,
|
2211
|
+
"encodingProfileId": 1,
|
2212
|
+
"manifestTypes":["mpd","m3u8"],
|
2213
|
+
"speed": "standard",
|
2214
|
+
"drmConfig": {
|
2215
|
+
"system": "widevine_playready",
|
2216
|
+
"kid": "eb676abbcb345e96bbcf616630f1a3da",
|
2217
|
+
"key": "100b6c20940f779a4589152b57d2dacb"
|
2218
|
+
"laUrl": "http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&ContentKey=EAtsIJQPd5pFiRUrV9Layw==",
|
2219
|
+
"method": "mpeg_cenc",
|
2220
|
+
"pssh": "#CAESEOtnarvLNF6Wu89hZjDxo9oaDXdpZGV2aW5lX3Rlc3QiEGZrajNsamFTZGZhbGtyM2oqAkhEMgA=",
|
2221
|
+
}
|
2222
|
+
}
|
2223
|
+
|
2224
|
+
+ Response 201 (application/json)
|
2225
|
+
|
2226
|
+
{
|
2227
|
+
"jobId": 1,
|
2228
|
+
"status": "Enqueued",
|
2229
|
+
"frameRate": 0,
|
2230
|
+
"segmentsSplitted": 0,
|
2231
|
+
"totalFramesWritten": 0,
|
2232
|
+
"bytesWritten": 0,
|
2233
|
+
"useStrictSegmentLength": true,
|
2234
|
+
"progress": 0,
|
2235
|
+
"jobFolder": "123456_abcdefghijklmnopqrstuvwxyz012345",
|
2236
|
+
"input": {
|
2237
|
+
"inputId": 1,
|
2238
|
+
"filename": "video.mkv",
|
2239
|
+
"createdAt": {
|
2240
|
+
"date": "22.06.2015 23:43:30",
|
2241
|
+
"timezone": {
|
2242
|
+
"timezone_type": 3,
|
2243
|
+
"timezone": "UTC"
|
2244
|
+
}
|
2245
|
+
},
|
2246
|
+
"updatedAt": {
|
2247
|
+
"date": "22.06.2015 23:43:30",
|
2248
|
+
"timezone": {
|
2249
|
+
"timezone_type": 3,
|
2250
|
+
"timezone": "UTC"
|
2251
|
+
}
|
2252
|
+
},
|
2253
|
+
"thumbnailUrl": "http:\\/\\path\\/to\\/thumbnail.png",
|
2254
|
+
"inputType": "url",
|
2255
|
+
"url": "http:\\/\\/path\\/to\\/video.mkv",
|
2256
|
+
"basicAuthUser": "",
|
2257
|
+
"basicAuthPassword": "",
|
2258
|
+
"mediaConfigurations": [
|
2259
|
+
/*
|
2260
|
+
* mediaConfigs
|
2261
|
+
*/
|
2262
|
+
]
|
2263
|
+
},
|
2264
|
+
"encodingProfiles": [
|
2265
|
+
/*
|
2266
|
+
* encodingProfiles
|
2267
|
+
*/
|
2268
|
+
]
|
2269
|
+
}
|
2270
|
+
],
|
2271
|
+
"statusDescription": "",
|
2272
|
+
"createdAt": {
|
2273
|
+
"date": "29.07.2015 15:09:34",
|
2274
|
+
"timezone": {
|
2275
|
+
"timezone_type": 3,
|
2276
|
+
"timezone": "UTC"
|
2277
|
+
}
|
2278
|
+
},
|
2279
|
+
"duration": 0,
|
2280
|
+
"encodedDuration": 0,
|
2281
|
+
"enqueueDuration": 0,
|
2282
|
+
"realtimeFactor": 0,
|
2283
|
+
"inputDuration": 0,
|
2284
|
+
"enqueuedAt": {
|
2285
|
+
"date": "29.07.2015 15:09:34",
|
2286
|
+
"timezone": {
|
2287
|
+
"timezone_type": 3,
|
2288
|
+
"timezone": "UTC"
|
2289
|
+
}
|
2290
|
+
},
|
2291
|
+
"manifestUrls": {
|
2292
|
+
"mpdUrl": "http:\\/\\/path\\/to\\/mpd_file.mpd",
|
2293
|
+
"m3u8Url": "http:\\/\\/path\\/to\\/m3u8_file.m3u8"
|
2294
|
+
}
|
2295
|
+
}
|
2296
|
+
|
2297
|
+
## MPEG-DASH ClearKey encryption [/job/create]
|
2298
|
+
### Create a MPEG-DASH ClearKey encryption job [POST]
|
2299
|
+
#### ClearKey encryption
|
2300
|
+
```HTTP
|
2301
|
+
{
|
2302
|
+
...
|
2303
|
+
"speed": "premium",
|
2304
|
+
"drmConfig": {
|
2305
|
+
"system": "clearkey",
|
2306
|
+
"kid": "eb676abbcb345e96bbcf616630f1a3da",
|
2307
|
+
"key": "100b6c20940f779a4589152b57d2dacb"
|
2308
|
+
"method": "mpeg_cenc"
|
2309
|
+
}
|
2310
|
+
}
|
2311
|
+
```
|
2312
|
+
|
2313
|
+
The parameters of the ClearKey encryption configuration have the following meaning:
|
2314
|
+
|
2315
|
+
| Attribute Name | Description |
|
2316
|
+
|-----------------|-------------|
|
2317
|
+
| system | We support widevine, playready, widevine_playready and clearkey |
|
2318
|
+
| kid | This is the unique identifier for your content key (hex format) |
|
2319
|
+
| key | This is the content encryption key (hex format) |
|
2320
|
+
| method | Enryption method |
|
2321
|
+
|
2322
|
+
+ Attributes(object)
|
2323
|
+
+ speed: standard, premium (optional, string) - For ClearKey encryption only premium is permitted
|
2324
|
+
+ Default: `premium`
|
2325
|
+
+ drmConfig (optional, object) - DRM related settings
|
2326
|
+
+ system (required, string) - We support widevine, playready, widevine_playready and clearkey
|
2327
|
+
+ kid (required, string) - Key identifier (hex)
|
2328
|
+
+ key (required, string) - Encryption key
|
2329
|
+
+ method (required, string) - Encryption method
|
2330
|
+
|
2331
|
+
+ Request (application/json)
|
2332
|
+
+ Header
|
2333
|
+
|
2334
|
+
bitcodin-api-version: v1
|
2335
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2336
|
+
|
2337
|
+
+ Body
|
2338
|
+
|
2339
|
+
{
|
2340
|
+
"inputId": 1,
|
2341
|
+
"encodingProfileId": 1,
|
2342
|
+
"manifestTypes":["mpd","m3u8"],
|
2343
|
+
"speed": "standard",
|
2344
|
+
"drmConfig": {
|
2345
|
+
"system": "clearkey",
|
2346
|
+
"kid": "eb676abbcb345e96bbcf616630f1a3da",
|
2347
|
+
"key": "100b6c20940f779a4589152b57d2dacb",
|
2348
|
+
"method": "mpeg_cenc"
|
2349
|
+
}
|
2350
|
+
}
|
2351
|
+
|
2352
|
+
+ Response 201 (application/json)
|
2353
|
+
|
2354
|
+
{
|
2355
|
+
"jobId": 1,
|
2356
|
+
"status": "Enqueued",
|
2357
|
+
"frameRate": 0,
|
2358
|
+
"segmentsSplitted": 0,
|
2359
|
+
"totalFramesWritten": 0,
|
2360
|
+
"bytesWritten": 0,
|
2361
|
+
"useStrictSegmentLength": true,
|
2362
|
+
"progress": 0,
|
2363
|
+
"jobFolder": "123456_abcdefghijklmnopqrstuvwxyz012345",
|
2364
|
+
"input": {
|
2365
|
+
"inputId": 1,
|
2366
|
+
"filename": "video.mkv",
|
2367
|
+
"createdAt": {
|
2368
|
+
"date": "22.06.2015 23:43:30",
|
2369
|
+
"timezone": {
|
2370
|
+
"timezone_type": 3,
|
2371
|
+
"timezone": "UTC"
|
2372
|
+
}
|
2373
|
+
},
|
2374
|
+
"updatedAt": {
|
2375
|
+
"date": "22.06.2015 23:43:30",
|
2376
|
+
"timezone": {
|
2377
|
+
"timezone_type": 3,
|
2378
|
+
"timezone": "UTC"
|
2379
|
+
}
|
2380
|
+
},
|
2381
|
+
"thumbnailUrl": "http:\\/\\path\\/to\\/thumbnail.png",
|
2382
|
+
"inputType": "url",
|
2383
|
+
"url": "http:\\/\\/path\\/to\\/video.mkv",
|
2384
|
+
"basicAuthUser": "",
|
2385
|
+
"basicAuthPassword": "",
|
2386
|
+
"mediaConfigurations": [
|
2387
|
+
/*
|
2388
|
+
* mediaConfigs
|
2389
|
+
*/
|
2390
|
+
]
|
2391
|
+
},
|
2392
|
+
"encodingProfiles": [
|
2393
|
+
/*
|
2394
|
+
* encodingProfiles
|
2395
|
+
*/
|
2396
|
+
]
|
2397
|
+
}
|
2398
|
+
],
|
2399
|
+
"statusDescription": "",
|
2400
|
+
"createdAt": {
|
2401
|
+
"date": "29.07.2015 15:09:34",
|
2402
|
+
"timezone": {
|
2403
|
+
"timezone_type": 3,
|
2404
|
+
"timezone": "UTC"
|
2405
|
+
}
|
2406
|
+
},
|
2407
|
+
"duration": 0,
|
2408
|
+
"encodedDuration": 0,
|
2409
|
+
"enqueueDuration": 0,
|
2410
|
+
"realtimeFactor": 0,
|
2411
|
+
"inputDuration": 0,
|
2412
|
+
"enqueuedAt": {
|
2413
|
+
"date": "29.07.2015 15:09:34",
|
2414
|
+
"timezone": {
|
2415
|
+
"timezone_type": 3,
|
2416
|
+
"timezone": "UTC"
|
2417
|
+
}
|
2418
|
+
},
|
2419
|
+
"manifestUrls": {
|
2420
|
+
"mpdUrl": "http:\\/\\/path\\/to\\/mpd_file.mpd",
|
2421
|
+
"m3u8Url": "http:\\/\\/path\\/to\\/m3u8_file.m3u8"
|
2422
|
+
}
|
2423
|
+
}
|
2424
|
+
|
2425
|
+
## DRM HLS encryption [/job/create]
|
2426
|
+
### Create a HLS encryption Job [POST]
|
2427
|
+
#### HLS encryption
|
2428
|
+
```HTTP
|
2429
|
+
{
|
2430
|
+
...
|
2431
|
+
"speed": "standard",
|
2432
|
+
"hlsEncryptionConfig": {
|
2433
|
+
"method": "SAMPLE-AES",
|
2434
|
+
"key": "cab5b529ae28d5cc5e3e7bc3fd4a544d",
|
2435
|
+
"iv": "08eecef4b026deec395234d94218273d",
|
2436
|
+
"uri": "https://your.license.server/getlicense"
|
2437
|
+
}
|
2438
|
+
}
|
2439
|
+
```
|
2440
|
+
|
2441
|
+
The parameters of the HLS encryption configuration have the following meaning:
|
2442
|
+
|
2443
|
+
| Attribute Name | Description |
|
2444
|
+
|-----------------|-------------|
|
2445
|
+
| method | We support SAMPLE-AES and AES-128 encryption |
|
2446
|
+
| key | Encryption key (16 byte; 32 hexadecimal characters) |
|
2447
|
+
| iv | Initialization vector, optional (16 byte; 32 hexadecimal characters) |
|
2448
|
+
| uri | URI to the license server providing the license for playout. Optional. If not provided a keyfile will be generated in linked in the manifest. |
|
2449
|
+
|
2450
|
+
+ Attributes(object)
|
2451
|
+
+ inputId (required, number) - Input-ID to choose encode input
|
2452
|
+
+ encodingProfileId (required, number) - EncodingProfile-ID
|
2453
|
+
+ manifestTypes: mpd, m3u8 (required, array[string]) - Manifest-Filetypes to create
|
2454
|
+
+ speed: standard, premium (optional, string) - Speed of the encoding
|
2455
|
+
+ Default: `premium`
|
2456
|
+
+ hlsEncryptionConfig (optional, object) - HLS encryption settings
|
2457
|
+
+ method (required, string) - We support SAMPLE-AES and AES-128
|
2458
|
+
+ key (required, string) - 16 byte Encryption key
|
2459
|
+
+ iv (optional, string) - 16 byte Initialization vector
|
2460
|
+
|
2461
|
+
+ Request (application/json)
|
2462
|
+
+ Header
|
2463
|
+
|
2464
|
+
bitcodin-api-version: v1
|
2465
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2466
|
+
|
2467
|
+
+ Body
|
2468
|
+
|
2469
|
+
{
|
2470
|
+
"inputId": 1,
|
2471
|
+
"encodingProfileId": 1,
|
2472
|
+
"manifestTypes":["mpd","m3u8"],
|
2473
|
+
"speed": "standard",
|
2474
|
+
"hlsEncryptionConfig": {
|
2475
|
+
"method": "AES-128",
|
2476
|
+
"key": "cab5b529ae28d5cc5e3e7bc3fd4a544d",
|
2477
|
+
"iv": "08eecef4b026deec395234d94218273d"
|
2478
|
+
}
|
2479
|
+
}
|
2480
|
+
|
2481
|
+
+ Response 201 (application/json)
|
2482
|
+
|
2483
|
+
{
|
2484
|
+
"jobId": 1,
|
2485
|
+
"status": "Enqueued",
|
2486
|
+
"frameRate": 0,
|
2487
|
+
"segmentsSplitted": 0,
|
2488
|
+
"totalFramesWritten": 0,
|
2489
|
+
"bytesWritten": 0,
|
2490
|
+
"useStrictSegmentLength": true,
|
2491
|
+
"progress": 0,
|
2492
|
+
"jobFolder": "123456_abcdefghijklmnopqrstuvwxyz012345",
|
2493
|
+
"input": {
|
2494
|
+
"inputId": 1,
|
2495
|
+
"filename": "video.mkv",
|
2496
|
+
"createdAt": {
|
2497
|
+
"date": "22.06.2015 23:43:30",
|
2498
|
+
"timezone": {
|
2499
|
+
"timezone_type": 3,
|
2500
|
+
"timezone": "UTC"
|
2501
|
+
}
|
2502
|
+
},
|
2503
|
+
"updatedAt": {
|
2504
|
+
"date": "22.06.2015 23:43:30",
|
2505
|
+
"timezone": {
|
2506
|
+
"timezone_type": 3,
|
2507
|
+
"timezone": "UTC"
|
2508
|
+
}
|
2509
|
+
},
|
2510
|
+
"thumbnailUrl": "http:\\/\\path\\/to\\/thumbnail.png",
|
2511
|
+
"inputType": "url",
|
2512
|
+
"url": "http:\\/\\/path\\/to\\/video.mkv",
|
2513
|
+
"basicAuthUser": "",
|
2514
|
+
"basicAuthPassword": "",
|
2515
|
+
"mediaConfigurations": [
|
2516
|
+
/*
|
2517
|
+
* mediaConfigs
|
2518
|
+
*/
|
2519
|
+
]
|
2520
|
+
},
|
2521
|
+
"encodingProfiles": [
|
2522
|
+
/*
|
2523
|
+
* encodingProfiles
|
2524
|
+
*/
|
2525
|
+
]
|
2526
|
+
}
|
2527
|
+
],
|
2528
|
+
"statusDescription": "",
|
2529
|
+
"createdAt": {
|
2530
|
+
"date": "29.07.2015 15:09:34",
|
2531
|
+
"timezone": {
|
2532
|
+
"timezone_type": 3,
|
2533
|
+
"timezone": "UTC"
|
2534
|
+
}
|
2535
|
+
},
|
2536
|
+
"duration": 0,
|
2537
|
+
"encodedDuration": 0,
|
2538
|
+
"enqueueDuration": 0,
|
2539
|
+
"realtimeFactor": 0,
|
2540
|
+
"inputDuration": 0,
|
2541
|
+
"enqueuedAt": {
|
2542
|
+
"date": "29.07.2015 15:09:34",
|
2543
|
+
"timezone": {
|
2544
|
+
"timezone_type": 3,
|
2545
|
+
"timezone": "UTC"
|
2546
|
+
}
|
2547
|
+
},
|
2548
|
+
"manifestUrls": {
|
2549
|
+
"mpdUrl": "http:\\/\\/path\\/to\\/mpd_file.mpd",
|
2550
|
+
"m3u8Url": "http:\\/\\/path\\/to\\/m3u8_file.m3u8"
|
2551
|
+
}
|
2552
|
+
}
|
2553
|
+
|
2554
|
+
## List Jobs [/jobs/{page}/{status}]
|
2555
|
+
### List all jobs [GET]
|
2556
|
+
List all jobs of your account structured as pages.
|
2557
|
+
+ Parameters
|
2558
|
+
+ page (optional, integer) - page number. If page number doesn't exist, last page will be returned. (10 Jobs per page)
|
2559
|
+
+ Default: 1
|
2560
|
+
+ status (optional, string) - status. Available values: all | finished | enqueued | inprogress | error (10 Jobs per page)
|
2561
|
+
+ Default: all
|
2562
|
+
|
2563
|
+
+ Request (application/json)
|
2564
|
+
|
2565
|
+
+ Header
|
2566
|
+
|
2567
|
+
bitcodin-api-version: v1
|
2568
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2569
|
+
|
2570
|
+
+ Response 200 (application/json)
|
2571
|
+
|
2572
|
+
{
|
2573
|
+
"perPage": 10,
|
2574
|
+
"totalCount": 3,
|
2575
|
+
"status": null,
|
2576
|
+
"jobs": [
|
2577
|
+
{
|
2578
|
+
"jobId": 3,
|
2579
|
+
"status": "Finished",
|
2580
|
+
"frameRate": 24,
|
2581
|
+
"segmentsSplitted": 78,
|
2582
|
+
"totalFramesWritten": 10807,
|
2583
|
+
"bytesWritten": 326163921,
|
2584
|
+
"jobFolder": "123456_abcdefghijklmnopqrstuvwxyz012345",
|
2585
|
+
"input": {
|
2586
|
+
"ref": "see Inputs Section"
|
2587
|
+
},
|
2588
|
+
"encodingProfiles": [
|
2589
|
+
{ "ref": "see EncodingProfiles Section" }
|
2590
|
+
],
|
2591
|
+
"statusDescription": "",
|
2592
|
+
"createdAt": {
|
2593
|
+
"date": "11.03.2015 16:41:00",
|
2594
|
+
"timezone": {
|
2595
|
+
"timezone_type": 3,
|
2596
|
+
"timezone": "Europe/Berlin"
|
2597
|
+
}
|
2598
|
+
},
|
2599
|
+
"duration": 125,
|
2600
|
+
"encodedDuration": 450,
|
2601
|
+
"enqueueDuration": 67,
|
2602
|
+
"realtimeFactor": 3.6,
|
2603
|
+
"enqueuedAt": {
|
2604
|
+
"date": "11.03.2015 16:41:00",
|
2605
|
+
"timezone": {
|
2606
|
+
"timezone_type": 3,
|
2607
|
+
"timezone": "Europe/Berlin"
|
2608
|
+
}
|
2609
|
+
},
|
2610
|
+
"startedAt": {
|
2611
|
+
"date": "11.03.2015 16:41:00",
|
2612
|
+
"timezone": {
|
2613
|
+
"timezone_type": 3,
|
2614
|
+
"timezone": "Europe/Berlin"
|
2615
|
+
}
|
2616
|
+
},
|
2617
|
+
"finishedAt": {
|
2618
|
+
"date": "11.03.2015 16:41:00",
|
2619
|
+
"timezone": {
|
2620
|
+
"timezone_type": 3,
|
2621
|
+
"timezone": "Europe/Berlin"
|
2622
|
+
}
|
2623
|
+
},
|
2624
|
+
"manifestUrls": {
|
2625
|
+
"mpdUrl": "URL_TO_MPD",
|
2626
|
+
"m3u8Url": "URL_TO_HLS_PLAYLIST"
|
2627
|
+
}
|
2628
|
+
}
|
2629
|
+
]
|
2630
|
+
}
|
2631
|
+
|
2632
|
+
## Job Details [/job/{id}]
|
2633
|
+
### Get Job details [GET]
|
2634
|
+
This call can be used to get detailed information about an already created job.
|
2635
|
+
+ Parameters
|
2636
|
+
+ id (required, integer) - Job-ID
|
2637
|
+
|
2638
|
+
+ Request (application/json)
|
2639
|
+
+ Header
|
2640
|
+
|
2641
|
+
bitcodin-api-version: v1
|
2642
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2643
|
+
|
2644
|
+
+ Response 200 (application/json)
|
2645
|
+
|
2646
|
+
{
|
2647
|
+
"jobId": 3,
|
2648
|
+
"status": "Finished",
|
2649
|
+
"frameRate": 24,
|
2650
|
+
"segmentsSplitted": 78,
|
2651
|
+
"totalFramesWritten": 10807,
|
2652
|
+
"bytesWritten": 326163921,
|
2653
|
+
"jobFolder": "123456_abcdefghijklmnopqrstuvwxyz012345",
|
2654
|
+
"input": {
|
2655
|
+
"ref": "see Inputs Section"
|
2656
|
+
},
|
2657
|
+
"encodingProfiles": [
|
2658
|
+
{ "ref": "see EncodingProfiles Section" }
|
2659
|
+
],
|
2660
|
+
"statusDescription": "",
|
2661
|
+
"createdAt": {
|
2662
|
+
"date": "11.03.2015 16:41:00",
|
2663
|
+
"timezone": {
|
2664
|
+
"timezone_type": 3,
|
2665
|
+
"timezone": "Europe/Berlin"
|
2666
|
+
}
|
2667
|
+
},
|
2668
|
+
"warnings": [
|
2669
|
+
"Decoder/Encoder warnings"
|
2670
|
+
],
|
2671
|
+
"duration": 125,
|
2672
|
+
"encodedDuration": 450,
|
2673
|
+
"enqueueDuration": 67,
|
2674
|
+
"realtimeFactor": 3.6,
|
2675
|
+
"enqueuedAt": {
|
2676
|
+
"date": "11.03.2015 16:41:00",
|
2677
|
+
"timezone": {
|
2678
|
+
"timezone_type": 3,
|
2679
|
+
"timezone": "Europe/Berlin"
|
2680
|
+
}
|
2681
|
+
},
|
2682
|
+
"startedAt": {
|
2683
|
+
"date": "11.03.2015 16:41:00",
|
2684
|
+
"timezone": {
|
2685
|
+
"timezone_type": 3,
|
2686
|
+
"timezone": "Europe/Berlin"
|
2687
|
+
}
|
2688
|
+
},
|
2689
|
+
"finishedAt": {
|
2690
|
+
"date": "11.03.2015 16:41:00",
|
2691
|
+
"timezone": {
|
2692
|
+
"timezone_type": 3,
|
2693
|
+
"timezone": "Europe/Berlin"
|
2694
|
+
}
|
2695
|
+
},
|
2696
|
+
"manifestUrls": {
|
2697
|
+
"mpdUrl": "URL_TO_MPD",
|
2698
|
+
"m3u8Url": "URL_TO_HLS_PLAYLIST"
|
2699
|
+
}
|
2700
|
+
}
|
2701
|
+
|
2702
|
+
### Delete Job [DELETE]
|
2703
|
+
Deletes a job from the bitcodin system.
|
2704
|
+
+ Parameters
|
2705
|
+
+ id (required, integer) ... Job-ID
|
2706
|
+
|
2707
|
+
+ Request (application/json)
|
2708
|
+
+ Header
|
2709
|
+
|
2710
|
+
bitcodin-api-version: v1
|
2711
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2712
|
+
|
2713
|
+
+ Response 204 (application/json)
|
2714
|
+
|
2715
|
+
## Job Status [/job/{id}/status]
|
2716
|
+
### Get current job status [GET]
|
2717
|
+
Get the status of an already created job, which contains information about how many frames have already been encoded or how many MB have been written, etc.
|
2718
|
+
|
2719
|
+
The response will contain a attribute called "status" amongst various other attributes. It can take the following values with it:
|
2720
|
+
|
2721
|
+
| Value | Description |
|
2722
|
+
|-----------------|-------------|
|
2723
|
+
| Created | The job has been successfully created and will be enqueued soon. |
|
2724
|
+
| Enqueued | The job has been enqueued and waits for to be processed. |
|
2725
|
+
| In Progress | The job is being processed at the moment - encoding runs. |
|
2726
|
+
| Finished | The encoding process has finished successfully. |
|
2727
|
+
| Error | Some error occured while processing the job. |
|
2728
|
+
|
2729
|
+
|
2730
|
+
+ Parameters
|
2731
|
+
+ id (required, integer) - Job-ID
|
2732
|
+
|
2733
|
+
+ Request (application/json)
|
2734
|
+
+ Header
|
2735
|
+
|
2736
|
+
bitcodin-api-version: v1
|
2737
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2738
|
+
|
2739
|
+
+ Response 200 (application/json)
|
2740
|
+
|
2741
|
+
{
|
2742
|
+
"jobId": 3,
|
2743
|
+
"status": "Finished",
|
2744
|
+
"frameRate": 24,
|
2745
|
+
"segmentsSplitted": 78,
|
2746
|
+
"totalFramesWritten": 10807,
|
2747
|
+
"bytesWritten": 326163921,
|
2748
|
+
"jobFolder": "123456_abcdefghijklmnopqrstuvwxyz012345",
|
2749
|
+
"input": {
|
2750
|
+
"ref": "see Inputs Section"
|
2751
|
+
},
|
2752
|
+
"encodingProfiles": [
|
2753
|
+
{ "ref": "see EncodingProfiles Section" }
|
2754
|
+
],
|
2755
|
+
"statusDescription": "",
|
2756
|
+
"createdAt": {
|
2757
|
+
"date": "11.03.2015 16:41:00",
|
2758
|
+
"timezone": {
|
2759
|
+
"timezone_type": 3,
|
2760
|
+
"timezone": "Europe/Berlin"
|
2761
|
+
}
|
2762
|
+
},
|
2763
|
+
"duration": 125,
|
2764
|
+
"encodedDuration": 450,
|
2765
|
+
"enqueueDuration": 67,
|
2766
|
+
"realtimeFactor": 3.6,
|
2767
|
+
"enqueuedAt": {
|
2768
|
+
"date": "11.03.2015 16:41:00",
|
2769
|
+
"timezone": {
|
2770
|
+
"timezone_type": 3,
|
2771
|
+
"timezone": "Europe/Berlin"
|
2772
|
+
}
|
2773
|
+
},
|
2774
|
+
"startedAt": {
|
2775
|
+
"date": "11.03.2015 16:41:00",
|
2776
|
+
"timezone": {
|
2777
|
+
"timezone_type": 3,
|
2778
|
+
"timezone": "Europe/Berlin"
|
2779
|
+
}
|
2780
|
+
},
|
2781
|
+
"finishedAt": {
|
2782
|
+
"date": "11.03.2015 16:41:00",
|
2783
|
+
"timezone": {
|
2784
|
+
"timezone_type": 3,
|
2785
|
+
"timezone": "Europe/Berlin"
|
2786
|
+
}
|
2787
|
+
},
|
2788
|
+
"manifestUrls": {
|
2789
|
+
"mpdUrl": "URL_TO_MPD",
|
2790
|
+
"m3u8Url": "URL_TO_HLS_PLAYLIST"
|
2791
|
+
}
|
2792
|
+
}
|
2793
|
+
|
2794
|
+
## Transfer Job [/job/transfer]
|
2795
|
+
### Create a Transfer Job [POST]
|
2796
|
+
Transfers a job to an already created output such as an S3 bucket or a FTP server.
|
2797
|
+
+ Attributes(object)
|
2798
|
+
+ jobId (required, number) - Job-ID
|
2799
|
+
+ outputId (required, number) - Output-ID
|
2800
|
+
|
2801
|
+
+ Request (application/json)
|
2802
|
+
+ Header
|
2803
|
+
|
2804
|
+
bitcodin-api-version: v1
|
2805
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2806
|
+
|
2807
|
+
+ Body
|
2808
|
+
|
2809
|
+
{
|
2810
|
+
"jobId": 1,
|
2811
|
+
"outputId": 1
|
2812
|
+
}
|
2813
|
+
|
2814
|
+
+ Response 201 (application/json)
|
2815
|
+
|
2816
|
+
{
|
2817
|
+
"id": 123,
|
2818
|
+
"jobId": 1,
|
2819
|
+
"status": "preparing",
|
2820
|
+
"progress": 0,
|
2821
|
+
"createdAt": "2015-08-06 11:03:16",
|
2822
|
+
"outputId": 3,
|
2823
|
+
"outputName": "Output Profile Name"
|
2824
|
+
}
|
2825
|
+
|
2826
|
+
|
2827
|
+
## List Transfer Jobs [/job/{jobId}/transfers]
|
2828
|
+
### List Transfer Jobs [GET]
|
2829
|
+
List all transfers for a given job, e.g., to which destinations this job has been transfered.
|
2830
|
+
|
2831
|
+
The response will contain a attribute called "status" amongst various other attributes. It can take the following values with it:
|
2832
|
+
|
2833
|
+
| Value | Description |
|
2834
|
+
|-----------------|-------------|
|
2835
|
+
| preparing | The transfer-request has been enqueued and waits for to be processed. |
|
2836
|
+
| transfer | The transfer is being processed at the moment. |
|
2837
|
+
| finished | The transfer has been created successfully. |
|
2838
|
+
| error | Some error occured while creating the transfer. |
|
2839
|
+
|
2840
|
+
+ Parameters
|
2841
|
+
+ jobId (required, number) - Job-ID
|
2842
|
+
|
2843
|
+
+ Request (application/json)
|
2844
|
+
+ Header
|
2845
|
+
|
2846
|
+
bitcodin-api-version: v1
|
2847
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2848
|
+
|
2849
|
+
+ Response 200 (application/json)
|
2850
|
+
|
2851
|
+
[
|
2852
|
+
{
|
2853
|
+
"id": 123,
|
2854
|
+
"jobId": 1,
|
2855
|
+
"status": "finished",
|
2856
|
+
"progress": 100,
|
2857
|
+
"outputProfile": {
|
2858
|
+
"name": "Output Profile Name",
|
2859
|
+
"outputUrl": "https://domain.com/path/to/your/content",
|
2860
|
+
"relOutputUrl": "path/to/your/content"
|
2861
|
+
},
|
2862
|
+
"createdAt": "yyyy-mm-dd hh:mm:ss",
|
2863
|
+
"finishedAt": "yyyy-mm-dd hh:mm:ss",
|
2864
|
+
"duration": 120
|
2865
|
+
}
|
2866
|
+
]
|
2867
|
+
|
2868
|
+
## Get Manifest Info [/job/{jobId}/manifest-info]
|
2869
|
+
### Get Manifest Info [GET]
|
2870
|
+
Returns all values needed to build your own manifest files.
|
2871
|
+
+ Parameters
|
2872
|
+
+ jobId (required, number) - Job-ID
|
2873
|
+
|
2874
|
+
+ Request (application/json)
|
2875
|
+
+ Header
|
2876
|
+
|
2877
|
+
bitcodin-api-version: v1
|
2878
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2879
|
+
|
2880
|
+
+ Response 200 (application/json)
|
2881
|
+
|
2882
|
+
{
|
2883
|
+
"job_id": "1",
|
2884
|
+
"media_type": "static",
|
2885
|
+
"media_duration": 70,
|
2886
|
+
"encoding_started": "dd.mm.yyyy hh:mm:ss.mmmmmm GMT",
|
2887
|
+
"encoding_finished": "dd.mm.yyyy hh:mm:ss.mmmmmm GMT",
|
2888
|
+
"base_url": "http://www.yourhost.com/path_to_your/encoding_job_files",
|
2889
|
+
"video_tracks": [
|
2890
|
+
{
|
2891
|
+
"codec": "avc1.42c00d",
|
2892
|
+
"mime_type": "video/mp4",
|
2893
|
+
"video_width": 480,
|
2894
|
+
"video_height": 202,
|
2895
|
+
"video_framerate": "24",
|
2896
|
+
"bitrate": 512000,
|
2897
|
+
"segment_duration": 119973,
|
2898
|
+
"timescale": 29956,
|
2899
|
+
"number_of_segments": 18,
|
2900
|
+
"dash": {
|
2901
|
+
"init_segment": "video/202_512000/dash/init.mp4",
|
2902
|
+
"segment_template": "video/202_512000/dash/segment_$Number$.m4s"
|
2903
|
+
},
|
2904
|
+
"hls": {
|
2905
|
+
"segment_template": "video/202_512000/hls/segment_$Number$.ts"
|
2906
|
+
}
|
2907
|
+
}
|
2908
|
+
],
|
2909
|
+
"audio_tracks": [
|
2910
|
+
{
|
2911
|
+
"audio_channels": 2,
|
2912
|
+
"language": "en",
|
2913
|
+
"codec": "mp4a.40.2",
|
2914
|
+
"mime_type": "audio/mp4",
|
2915
|
+
"audio_sampling_rate": 48000,
|
2916
|
+
"bitrate": 128000,
|
2917
|
+
"segment_duration": 176091,
|
2918
|
+
"timescale": 44100,
|
2919
|
+
"number_of_segments": 18,
|
2920
|
+
"dash": {
|
2921
|
+
"init_segment": "audio/1_stereo_128000/dash/init.mp4",
|
2922
|
+
"segment_template": "audio/1_stereo_128000/dash/segment_$Number$.m4s"
|
2923
|
+
},
|
2924
|
+
"hls": {
|
2925
|
+
"segment_template": "audio/1_stereo_128000/hls/segment_$Number$.ts"
|
2926
|
+
}
|
2927
|
+
}
|
2928
|
+
]
|
2929
|
+
}
|
2930
|
+
|
2931
|
+
# Group Manifests
|
2932
|
+
Create your own Playlist by merging your finished Encoding-Jobs into one Multi-Period Manifest File.
|
2933
|
+
## Multi Period MPD [/manifest/mpd/multi-period]
|
2934
|
+
### Create multi period mpd [POST]
|
2935
|
+
|
2936
|
+
+ Request (application/json)
|
2937
|
+
+ `jobs` (required, integer array): Job ids of *Finished* jobs that created an mpd file
|
2938
|
+
+ Header
|
2939
|
+
|
2940
|
+
bitcodin-api-version: v1
|
2941
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2942
|
+
|
2943
|
+
+ Body
|
2944
|
+
|
2945
|
+
{
|
2946
|
+
"jobs": [1,2,3]
|
2947
|
+
}
|
2948
|
+
|
2949
|
+
+ Response 200 (application/json)
|
2950
|
+
|
2951
|
+
http://example.com/path/to/mpd/multi_period_55a6158c67494.mpd
|
2952
|
+
|
2953
|
+
|
2954
|
+
## VTT MPD [/manifest/mpd/vtt]
|
2955
|
+
### Create vtt mpd [POST]
|
2956
|
+
|
2957
|
+
+ Attributes(object)
|
2958
|
+
+ jobId (required, number) - Job id of Finished job to create vtt mpd file from.
|
2959
|
+
+ subtitles (required, string) - URL to your vtt file to include in your mpd.
|
2960
|
+
+ outputFileName (optional, string) - Output filename of the mpd
|
2961
|
+
|
2962
|
+
+ Request (application/json)
|
2963
|
+
+ Header
|
2964
|
+
|
2965
|
+
bitcodin-api-version: v1
|
2966
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
2967
|
+
|
2968
|
+
+ Body
|
2969
|
+
|
2970
|
+
{
|
2971
|
+
"jobId": 1,
|
2972
|
+
"subtitles":
|
2973
|
+
[
|
2974
|
+
{
|
2975
|
+
"langShort": "de",
|
2976
|
+
"langLong": "Deutsch",
|
2977
|
+
"url": "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_de.vtt"
|
2978
|
+
},
|
2979
|
+
{
|
2980
|
+
"langShort": "en",
|
2981
|
+
"langLong": "English",
|
2982
|
+
"url": "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_en.vtt"
|
2983
|
+
},
|
2984
|
+
{
|
2985
|
+
"langShort": "es",
|
2986
|
+
"langLong": "Spanish",
|
2987
|
+
"url": "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_es.vtt"
|
2988
|
+
}
|
2989
|
+
]
|
2990
|
+
}
|
2991
|
+
|
2992
|
+
+ Response 200 (application/json)
|
2993
|
+
|
2994
|
+
{
|
2995
|
+
"mpdUrl": "http://example.com/path/to/mpd/vtt_55a6158c67494.mpd"
|
2996
|
+
}
|
2997
|
+
|
2998
|
+
|
2999
|
+
## VTT HLS [/manifest/hls/vtt]
|
3000
|
+
### Create a vtt hls[POST]
|
3001
|
+
|
3002
|
+
+ Attributes(object)
|
3003
|
+
+ jobId (required, number) - Job id of *Finished* job to create vtt hls file from.
|
3004
|
+
+ subtitles (required, string) - URL to your vtt file to include in your vtt hls.
|
3005
|
+
+ outputFileName (optional, string) - Output filename of the vtt hls
|
3006
|
+
|
3007
|
+
+ Request (application/json)
|
3008
|
+
|
3009
|
+
+ Header
|
3010
|
+
|
3011
|
+
bitcodin-api-version: v1
|
3012
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3013
|
+
|
3014
|
+
+ Body
|
3015
|
+
|
3016
|
+
{
|
3017
|
+
"jobId": 1,
|
3018
|
+
"subtitles":
|
3019
|
+
[
|
3020
|
+
{
|
3021
|
+
"langShort": "de",
|
3022
|
+
"langLong": "Deutsch",
|
3023
|
+
"url": "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_de.vtt"
|
3024
|
+
},
|
3025
|
+
{
|
3026
|
+
"langShort": "en",
|
3027
|
+
"langLong": "English",
|
3028
|
+
"url": "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_en.vtt"
|
3029
|
+
},
|
3030
|
+
{
|
3031
|
+
"langShort": "es",
|
3032
|
+
"langLong": "Spanish",
|
3033
|
+
"url": "https://bitdash-a.akamaihd.net/content/sintel/subtitles/subtitles_es.vtt"
|
3034
|
+
}
|
3035
|
+
]
|
3036
|
+
}
|
3037
|
+
|
3038
|
+
+ Response 200 (application/json)
|
3039
|
+
|
3040
|
+
{
|
3041
|
+
"hlsUrl": "http://example.com/path/to/mpd/vtt_55a6158c67494.m3u8"
|
3042
|
+
}
|
3043
|
+
|
3044
|
+
# Group Transmux *BETA*
|
3045
|
+
This feature is currently a beta-version. Options, routes, and parameters might change until its final release.
|
3046
|
+
|
3047
|
+
## Transmux [/transmux]
|
3048
|
+
### Create a Transmux [POST]
|
3049
|
+
Create a transmuxing of an already existing encoding.
|
3050
|
+
You can get the videoRepresentationId and audioRepresentationId from the encoding profile.
|
3051
|
+
|
3052
|
+
+ Attributes (object)
|
3053
|
+
+ jobId: 123 (required, number) - Job id to create a thumbnail from.
|
3054
|
+
+ videoRepresentationId: 12345 (required, number) - Unique identifier to select the encoded video-representation, which shall be used for transmuxing.
|
3055
|
+
+ audioRepresentationIds: 67899 (required, array) - Unique identifier to select the encoded audio-representation, which shall be used for transmuxing. See encoding-profile-details. There you find the representationId for video/audio configurations
|
3056
|
+
+ filename (optional, string) - custom filename, e.g. your-filename.mp4
|
3057
|
+
+ encryptionConfig (optional, object) - config with keyAscii and kid
|
3058
|
+
|
3059
|
+
|
3060
|
+
+ Request (application/json)
|
3061
|
+
+ Header
|
3062
|
+
|
3063
|
+
bitcodin-api-version: v1
|
3064
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3065
|
+
|
3066
|
+
+ Body
|
3067
|
+
|
3068
|
+
{
|
3069
|
+
"jobId": 123,
|
3070
|
+
"videoRepresentationId": 12345,
|
3071
|
+
"audioRepresentationIds": [67899],
|
3072
|
+
"filename": "your-filename.mp4"
|
3073
|
+
}
|
3074
|
+
|
3075
|
+
+ Response 201 (application/json)
|
3076
|
+
|
3077
|
+
{
|
3078
|
+
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
|
3079
|
+
"jobId": 123,
|
3080
|
+
"videoRepresentationId": 12345,
|
3081
|
+
"audioRepresentationIds": [67899],
|
3082
|
+
"filename": "your-filename.mp4",
|
3083
|
+
"status": "finished",
|
3084
|
+
"bytesWritten": 123456789,
|
3085
|
+
"outputUrl": "http://domain-for-your-content.com/path/to/your/transmuxed/content.mp4",
|
3086
|
+
"relOutputUrl": "path/to/your/transmuxed/content.mp4"
|
3087
|
+
"createdAt": {
|
3088
|
+
"date": "2015-06-12 12:28:03.000000",
|
3089
|
+
"timezone_type": 3,
|
3090
|
+
"Europe/Berlin"
|
3091
|
+
},
|
3092
|
+
"startedAt": {
|
3093
|
+
"date": "2015-06-12 12:28:03.000000",
|
3094
|
+
"timezone_type": 3,
|
3095
|
+
"Europe/Berlin"
|
3096
|
+
},
|
3097
|
+
"finishedAt": {
|
3098
|
+
"date": "2015-06-12 12:28:03.000000",
|
3099
|
+
"timezone_type": 3,
|
3100
|
+
"Europe/Berlin"
|
3101
|
+
},
|
3102
|
+
}
|
3103
|
+
|
3104
|
+
### Create a Transmux with encryption [POST]
|
3105
|
+
Create a transmuxing of an already existing encoding and apply encryption.
|
3106
|
+
|
3107
|
+
+ Attributes (object)
|
3108
|
+
+ jobId: 123 (required, number) - Job id to create a thumbnail from.
|
3109
|
+
+ videoRepresentationId: 12345 (required, number) - Unique identifier to select the encoded video-representation, which shall be used for transmuxing.
|
3110
|
+
+ audioRepresentationIds: 67899 (required, array) - Unique identifier to select the encoded audio-representation, which shall be used for transmuxing. See encoding-profile-details. There you find the representationId for video/audio configurations
|
3111
|
+
+ filename (optional, string) - custom filename, e.g. your-filename.mp4
|
3112
|
+
+ encryptionConfig (optional, object) - config with keyAscii and kid
|
3113
|
+
|
3114
|
+
|
3115
|
+
+ Request (application/json)
|
3116
|
+
+ Header
|
3117
|
+
|
3118
|
+
bitcodin-api-version: v1
|
3119
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3120
|
+
|
3121
|
+
+ Body
|
3122
|
+
|
3123
|
+
{
|
3124
|
+
"jobId": 123,
|
3125
|
+
"videoRepresentationId": 12345,
|
3126
|
+
"audioRepresentationIds": [67899],
|
3127
|
+
"filename": "your-filename.mp4",
|
3128
|
+
"encryptionConfig": {
|
3129
|
+
"keyAscii": "12341234123412341234123412341234",
|
3130
|
+
"kid": "6269746d6f76696e7465737474657374"
|
3131
|
+
}
|
3132
|
+
}
|
3133
|
+
|
3134
|
+
+ Response 201 (application/json)
|
3135
|
+
|
3136
|
+
{
|
3137
|
+
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
|
3138
|
+
"jobId": 123,
|
3139
|
+
"videoRepresentationId": 12345,
|
3140
|
+
"audioRepresentationIds": [67899],
|
3141
|
+
"filename": "your-filename.mp4",
|
3142
|
+
"encryptionConfig": {
|
3143
|
+
"keyAscii": "12341234123412341234123412341234",
|
3144
|
+
"kid": "6269746d6f76696e7465737474657374"
|
3145
|
+
},
|
3146
|
+
"status": "finished",
|
3147
|
+
"bytesWritten": 123456789,
|
3148
|
+
"outputUrl": "http://domain-for-your-content.com/path/to/your/transmuxed/content.mp4",
|
3149
|
+
"relOutputUrl": "path/to/your/transmuxed/content.mp4"
|
3150
|
+
"createdAt": {
|
3151
|
+
"date": "2015-06-12 12:28:03.000000",
|
3152
|
+
"timezone_type": 3,
|
3153
|
+
"Europe/Berlin"
|
3154
|
+
},
|
3155
|
+
"startedAt": {
|
3156
|
+
"date": "2015-06-12 12:28:03.000000",
|
3157
|
+
"timezone_type": 3,
|
3158
|
+
"Europe/Berlin"
|
3159
|
+
},
|
3160
|
+
"finishedAt": {
|
3161
|
+
"date": "2015-06-12 12:28:03.000000",
|
3162
|
+
"timezone_type": 3,
|
3163
|
+
"Europe/Berlin"
|
3164
|
+
}
|
3165
|
+
}
|
3166
|
+
|
3167
|
+
## Transmux Details [/transmux/{id}]
|
3168
|
+
### Get Transmux details [GET]
|
3169
|
+
This call can be used to get detailed information about an already executed transmuxing.
|
3170
|
+
|
3171
|
+
The response will contain a attribute called "status" amongst various other attributes. It can take the following values with it:
|
3172
|
+
|
3173
|
+
| Value | Description |
|
3174
|
+
|-----------------|-------------|
|
3175
|
+
| created | The transmux-request has been created and waits for to be processed. |
|
3176
|
+
| assigned | The transmux has been enqueued. |
|
3177
|
+
| inprogress | The transmux is in progress. |
|
3178
|
+
| finished | The transmux has been finsihed successfully. |
|
3179
|
+
| error | Some error occured while creating the transmux. |
|
3180
|
+
|
3181
|
+
+ Request (application/json)
|
3182
|
+
+ Header
|
3183
|
+
|
3184
|
+
bitcodin-api-version: v1
|
3185
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3186
|
+
|
3187
|
+
+ Response 200 (application/json)
|
3188
|
+
|
3189
|
+
{
|
3190
|
+
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
|
3191
|
+
"jobId": 123,
|
3192
|
+
"videoRepresentationId": 12345,
|
3193
|
+
"audioRepresentationIds": [67899],
|
3194
|
+
"filename": "your-filename.mp4",
|
3195
|
+
"status": "finished",
|
3196
|
+
"bytesWritten": 123456789,
|
3197
|
+
"outputUrl": "http://domain-for-your-content.com/path/to/your/transmuxed/content.mp4",
|
3198
|
+
"relOutputUrl": "path/to/your/transmuxed/content.mp4"
|
3199
|
+
"createdAt": {
|
3200
|
+
"date": "2015-06-12 12:28:03.000000",
|
3201
|
+
"timezone_type": 3,
|
3202
|
+
"Europe/Berlin"
|
3203
|
+
},
|
3204
|
+
"startedAt": {
|
3205
|
+
"date": "2015-06-12 12:28:03.000000",
|
3206
|
+
"timezone_type": 3,
|
3207
|
+
"Europe/Berlin"
|
3208
|
+
},
|
3209
|
+
"finishedAt": {
|
3210
|
+
"date": "2015-06-12 12:28:03.000000",
|
3211
|
+
"timezone_type": 3,
|
3212
|
+
"Europe/Berlin"
|
3213
|
+
}
|
3214
|
+
}
|
3215
|
+
|
3216
|
+
|
3217
|
+
# Group Notifications *BETA*
|
3218
|
+
This feature is currently a beta-version. Options, routes, and parameters might change until its final release.
|
3219
|
+
|
3220
|
+
The request-body we are using when we send a POST-Request to your callback-URL, always has the following format and its payload-property contains the details of the specific resource (e.g. encoding-details):
|
3221
|
+
```HTTP
|
3222
|
+
{
|
3223
|
+
"payload": {
|
3224
|
+
...
|
3225
|
+
<resource-details>
|
3226
|
+
...
|
3227
|
+
},
|
3228
|
+
"callbackAttempt": 0,
|
3229
|
+
"eventTriggerId": "<eventTriggerId>",
|
3230
|
+
"subscription": {
|
3231
|
+
"id": "<your-subscription-id>",
|
3232
|
+
"event": {
|
3233
|
+
"id": "46faf62b-4f80-4f8a-b9e4-b23bf050f43c",
|
3234
|
+
"name": "encoding.finished",
|
3235
|
+
"description": "Occurs once an encoding is finished and ready to be transferred or to be consumed by other bitmovin services"
|
3236
|
+
},
|
3237
|
+
"url": "<your-callback-url>"
|
3238
|
+
}
|
3239
|
+
}
|
3240
|
+
```
|
3241
|
+
Our notification-service expects the HTTP Status Code ```200 OK´´´ as a result, otherwise it will attempt to deliver the event 3 more times, with exponential backoff, until it get labelled as failed.
|
3242
|
+
|
3243
|
+
## Events [/notifications/events]
|
3244
|
+
### Get all available Events [GET]
|
3245
|
+
Get a list of all available notification-events and their IDs which is needed to create a subscription.
|
3246
|
+
|
3247
|
+
+ Request (application/json)
|
3248
|
+
+ Header
|
3249
|
+
|
3250
|
+
bitcodin-api-version: v1
|
3251
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3252
|
+
|
3253
|
+
+ Response 200 (application/json)
|
3254
|
+
|
3255
|
+
[
|
3256
|
+
{
|
3257
|
+
"id": "175dd18f-602e-449d-8ad8-714645ae2e4e",
|
3258
|
+
"name": "encoding.error",
|
3259
|
+
"description": "Occurs if an encoding has failed"
|
3260
|
+
},
|
3261
|
+
{
|
3262
|
+
"id": "46faf62b-4f80-4f8a-b9e4-b23bf050f43c",
|
3263
|
+
"name": "encoding.finished",
|
3264
|
+
"description": "Occurs once an encoding is finished and ready to be transferred or to be consumed by other bitmovin services"
|
3265
|
+
}
|
3266
|
+
]
|
3267
|
+
|
3268
|
+
## Subscriptions [/notifications/subscriptions]
|
3269
|
+
### Create a Subscription for an Event [POST]
|
3270
|
+
Create a subscription for and specific event with an callback-URL, which will receive the POST request containing a payload with details about the affected resource.
|
3271
|
+
|
3272
|
+
+ Attributes (object)
|
3273
|
+
+ eventId: 46faf62b-4f80-4f8a-b9e4-b23bf050f43c (required, string) - EventId you want to subscribe to.
|
3274
|
+
+ url: 12345 (required, string) - Callback-URL which is able to handle the POST-request from our service with
|
3275
|
+
|
3276
|
+
+ Request (application/json)
|
3277
|
+
+ Header
|
3278
|
+
|
3279
|
+
bitcodin-api-version: v1
|
3280
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3281
|
+
|
3282
|
+
+ Body
|
3283
|
+
|
3284
|
+
{
|
3285
|
+
"eventId": "46faf62b-4f80-4f8a-b9e4-b23bf050f43c",
|
3286
|
+
"url": "<your-callback-url>"
|
3287
|
+
}
|
3288
|
+
|
3289
|
+
+ Response 201 (application/json)
|
3290
|
+
|
3291
|
+
{
|
3292
|
+
"id": "<your-subscription-id>",
|
3293
|
+
"event": {
|
3294
|
+
"id": "46faf62b-4f80-4f8a-b9e4-b23bf050f43c",
|
3295
|
+
"name": "encoding.finished",
|
3296
|
+
"description": "Occurs once an encoding is finished and ready to be transferred or to be consumed by other bitmovin services"
|
3297
|
+
},
|
3298
|
+
"url": "<your-callback-url>"
|
3299
|
+
}
|
3300
|
+
|
3301
|
+
### Get all Subscriptions [GET]
|
3302
|
+
Get a list of all your subscriptions.
|
3303
|
+
|
3304
|
+
+ Request (application/json)
|
3305
|
+
+ Header
|
3306
|
+
|
3307
|
+
bitcodin-api-version: v1
|
3308
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3309
|
+
|
3310
|
+
+ Response 200 (application/json)
|
3311
|
+
|
3312
|
+
[
|
3313
|
+
{
|
3314
|
+
"id": "<your-subscription-id>",
|
3315
|
+
"event": {
|
3316
|
+
"id": "46faf62b-4f80-4f8a-b9e4-b23bf050f43c",
|
3317
|
+
"name": "encoding.finished",
|
3318
|
+
"description": "Occurs once an encoding is finished and ready to be transferred or to be consumed by other bitmovin services"
|
3319
|
+
},
|
3320
|
+
"url": "<your-callback-url>"
|
3321
|
+
}
|
3322
|
+
]
|
3323
|
+
|
3324
|
+
### Get all Events fired of an Subscription [GET /notifications/subscriptions/{id}/trigger]
|
3325
|
+
Get all Events fired of an Subscription
|
3326
|
+
|
3327
|
+
+ Request (application/json)
|
3328
|
+
+ Header
|
3329
|
+
|
3330
|
+
bitcodin-api-version: v1
|
3331
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3332
|
+
|
3333
|
+
+ Response 200 (application/json)
|
3334
|
+
|
3335
|
+
[
|
3336
|
+
{
|
3337
|
+
"id": "<event-trigger-id>",
|
3338
|
+
"callbackAttempts": [
|
3339
|
+
{
|
3340
|
+
"id": "<callback-attempt-id-1>",
|
3341
|
+
"connectionTime": "2016-07-15T17:24:36.236",
|
3342
|
+
"attemptNumber": 1,
|
3343
|
+
"errorMessage": null,
|
3344
|
+
"status": "successful",
|
3345
|
+
"responseCode": 200,
|
3346
|
+
"responseData": "ok",
|
3347
|
+
"method": "POST"
|
3348
|
+
}
|
3349
|
+
],
|
3350
|
+
"subscription": {
|
3351
|
+
"id": "<subscription-id>",
|
3352
|
+
"event": {
|
3353
|
+
"id": "<event-id>",
|
3354
|
+
"name": "encoding.finished",
|
3355
|
+
"description": "Occurs once an encoding is finished and ready to be transferred or to be consumed by other bitmovin services"
|
3356
|
+
},
|
3357
|
+
"url": "<your-callback-url>"
|
3358
|
+
},
|
3359
|
+
"payload": "{\"jobId\":123456,\"status\":\"Finished\",\"speed\":\"premium\", ... }",
|
3360
|
+
"status": "completed",
|
3361
|
+
"latestCallbackAttempt": {
|
3362
|
+
"id": "<callback-attempt-id-1>",
|
3363
|
+
"connectionTime": "2016-07-15T17:24:36.236",
|
3364
|
+
"attemptNumber": 1,
|
3365
|
+
"errorMessage": null,
|
3366
|
+
"status": "successful",
|
3367
|
+
"responseCode": 200,
|
3368
|
+
"responseData": "ok",
|
3369
|
+
"method": "POST"
|
3370
|
+
}
|
3371
|
+
}
|
3372
|
+
]
|
3373
|
+
|
3374
|
+
|
3375
|
+
### Get a specific Subscription [GET /notifications/subscriptions/{id}]
|
3376
|
+
Get a specific Subscription
|
3377
|
+
|
3378
|
+
+ Request (application/json)
|
3379
|
+
+ Header
|
3380
|
+
|
3381
|
+
bitcodin-api-version: v1
|
3382
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3383
|
+
|
3384
|
+
+ Response 200 (application/json)
|
3385
|
+
|
3386
|
+
{
|
3387
|
+
"id": "<your-subscription-id>",
|
3388
|
+
"event": {
|
3389
|
+
"id": "46faf62b-4f80-4f8a-b9e4-b23bf050f43c",
|
3390
|
+
"name": "encoding.finished",
|
3391
|
+
"description": "Occurs once an encoding is finished and ready to be transferred or to be consumed by other bitmovin services"
|
3392
|
+
},
|
3393
|
+
"url": "<your-callback-url>"
|
3394
|
+
}
|
3395
|
+
|
3396
|
+
### Remove a specific Subscription [DELETE /notifications/subscriptions/{id}]
|
3397
|
+
Remove a specific Subscription
|
3398
|
+
|
3399
|
+
+ Request (application/json)
|
3400
|
+
+ Header
|
3401
|
+
|
3402
|
+
bitcodin-api-version: v1
|
3403
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3404
|
+
|
3405
|
+
+ Response 200 (application/json)
|
3406
|
+
|
3407
|
+
{
|
3408
|
+
"id": "<your-subscription-id>",
|
3409
|
+
"event": {
|
3410
|
+
"id": "46faf62b-4f80-4f8a-b9e4-b23bf050f43c",
|
3411
|
+
"name": "encoding.finished",
|
3412
|
+
"description": "Occurs once an encoding is finished and ready to be transferred or to be consumed by other bitmovin services"
|
3413
|
+
},
|
3414
|
+
"url": "<your-callback-url>"
|
3415
|
+
}
|
3416
|
+
|
3417
|
+
|
3418
|
+
# Group Thumbnails
|
3419
|
+
|
3420
|
+
## Thumbnail [/thumbnail]
|
3421
|
+
### Create a Thumbnail Async [POST]
|
3422
|
+
Create a thumbnail of a given job asynchronous.
|
3423
|
+
|
3424
|
+
+ Attributes (object)
|
3425
|
+
+ jobId: 3 (required, number) - Job id to create a thumbnail from.
|
3426
|
+
+ height: 320 (required, number) - Height of the thumbnail
|
3427
|
+
+ position: 24 (required, number) - Position in seconds where the thumbnail should be created from
|
3428
|
+
+ filename (optional, string) - A filename to store your thumbnail
|
3429
|
+
+ async (optional, boolean) - Create the thumbnail asynchronous
|
3430
|
+
|
3431
|
+
+ Request (application/json)
|
3432
|
+
+ Header
|
3433
|
+
|
3434
|
+
bitcodin-api-version: v1
|
3435
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3436
|
+
|
3437
|
+
+ Body
|
3438
|
+
|
3439
|
+
{
|
3440
|
+
"jobId": 3,
|
3441
|
+
"height": 320,
|
3442
|
+
"position": 24,
|
3443
|
+
"async": true
|
3444
|
+
}
|
3445
|
+
|
3446
|
+
+ Response 200 (application/json)
|
3447
|
+
|
3448
|
+
{
|
3449
|
+
"id": "e2fa8063-e92d-42f4-9085-a4c7ad997a72",
|
3450
|
+
"thumbnailUrl": "https://url.to/your/thumbnail",
|
3451
|
+
"state": "IN_PROGRESS"
|
3452
|
+
}
|
3453
|
+
|
3454
|
+
### Get Thumbnail [GET /thumbnail/{id}]
|
3455
|
+
Get the status of a thumbnail creation.
|
3456
|
+
|
3457
|
+
The response will contain a attribute called "status" amongst various other attributes. It can take the following values with it:
|
3458
|
+
|
3459
|
+
| Value | Description |
|
3460
|
+
|-----------------|-------------|
|
3461
|
+
| ENQUEUED | The thumbnail-request has been enqueued and waits for to be processed. |
|
3462
|
+
| IN_PROGRESS | The thumbnail is being created at the moment. |
|
3463
|
+
| FINISHED | The thumbnail has been created successfully. |
|
3464
|
+
| ERROR | Some error occured while creating the thumbnail. |
|
3465
|
+
|
3466
|
+
+ Parameter
|
3467
|
+
+ id (required, string, `6d84e126-d10c-4e52-bbfb-bd4c92bc8333`) ... UUID of the thumbnail.
|
3468
|
+
|
3469
|
+
+ Response 200 (application/json)
|
3470
|
+
|
3471
|
+
{
|
3472
|
+
"id": "e2fa8063-e92d-42f4-9085-a4c7ad997a72",
|
3473
|
+
"thumbnailUrl": "https://url.to/your/thumbnail",
|
3474
|
+
"state": "FINISHED"
|
3475
|
+
}
|
3476
|
+
|
3477
|
+
### Create a Thumbnail - deprecated [POST]
|
3478
|
+
*** This call is deprecated ***<br>
|
3479
|
+
This call will be removed latest on 1st July 2016<br>
|
3480
|
+
Please use the async version of this call below.
|
3481
|
+
|
3482
|
+
+ Attributes (object)
|
3483
|
+
+ jobId: 3 (required, number) - Job id to create a thumbnail from.
|
3484
|
+
+ height: 320 (required, number) - Height of the thumbnail
|
3485
|
+
+ position: 24 (required, number) - Position in seconds where the thumbnail should be created from
|
3486
|
+
+ filename (optional, string) - A filename to store your thumbnail
|
3487
|
+
|
3488
|
+
+ Request (application/json)
|
3489
|
+
+ Header
|
3490
|
+
|
3491
|
+
bitcodin-api-version: v1
|
3492
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3493
|
+
|
3494
|
+
+ Body
|
3495
|
+
|
3496
|
+
{
|
3497
|
+
"jobId": 3,
|
3498
|
+
"height": 320,
|
3499
|
+
"position": 24
|
3500
|
+
}
|
3501
|
+
|
3502
|
+
+ Response 200 (application/json)
|
3503
|
+
|
3504
|
+
{
|
3505
|
+
"thumbnailUrl": "https://url.to/your/thumbnail"
|
3506
|
+
}
|
3507
|
+
|
3508
|
+
## Sprite [/sprite]
|
3509
|
+
|
3510
|
+
### Create a Sprite Async [POST]
|
3511
|
+
Create a sprite for thumbnail seeking with our bitdash player.
|
3512
|
+
|
3513
|
+
+ Attributes (object)
|
3514
|
+
+ jobId: 37647(required, number) - Id of the job to create a sprite from.
|
3515
|
+
+ height: 240 (required, number) - Height of one thumbnail
|
3516
|
+
+ width: 320 (required, number) - Width of one thumbnail.
|
3517
|
+
+ distance: 10 (optional, string) - Distance in seconds between a screenshot.
|
3518
|
+
+ async: true (optional, boolean) - Create the sprite asynchronous
|
3519
|
+
|
3520
|
+
|
3521
|
+
+ Request (application/json)
|
3522
|
+
+ Header
|
3523
|
+
|
3524
|
+
bitcodin-api-version: v1
|
3525
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3526
|
+
|
3527
|
+
+ Body
|
3528
|
+
|
3529
|
+
{
|
3530
|
+
"jobId": 37647,
|
3531
|
+
"height": 240,
|
3532
|
+
"width": 320,
|
3533
|
+
"distance": 10,
|
3534
|
+
"async": true
|
3535
|
+
}
|
3536
|
+
|
3537
|
+
+ Response 200 (application/json)
|
3538
|
+
|
3539
|
+
{
|
3540
|
+
"id": "e2fa8063-e92d-42f4-9085-a4c7ad997a72",
|
3541
|
+
"state": "IN_PROGRESS",
|
3542
|
+
"vttUrl": "http://url.to/your/sprite.vtt",
|
3543
|
+
"spriteUrl": "http://url.to/your/sprite.jpg"
|
3544
|
+
}
|
3545
|
+
|
3546
|
+
### Get Sprite [GET /sprite/{id}]
|
3547
|
+
Get the status of a sprite creation.
|
3548
|
+
|
3549
|
+
The response will contain a attribute called "status" amongst various other attributes. It can take the following values with it:
|
3550
|
+
|
3551
|
+
| Value | Description |
|
3552
|
+
|-----------------|-------------|
|
3553
|
+
| ENQUEUED | The sprite-request has been enqueued and waits for to be processed. |
|
3554
|
+
| IN_PROGRESS | The sprite is being created at the moment. |
|
3555
|
+
| FINISHED | The sprite has been created successfully. |
|
3556
|
+
| ERROR | Some error occured while creating the sprite. |
|
3557
|
+
|
3558
|
+
+ Parameter
|
3559
|
+
+ id (required, string, `6d84e126-d10c-4e52-bbfb-bd4c92bc8333`) ... UUID of the sprite.
|
3560
|
+
|
3561
|
+
+ Response 200 (application/json)
|
3562
|
+
|
3563
|
+
{
|
3564
|
+
"id": "e2fa8063-e92d-42f4-9085-a4c7ad997a72",
|
3565
|
+
"state": "FINISHED",
|
3566
|
+
"vttUrl": "http://url.to/your/sprite.vtt",
|
3567
|
+
"spriteUrl": "http://url.to/your/sprite.jpg"
|
3568
|
+
}
|
3569
|
+
|
3570
|
+
### Create a Sprite - deprecated [POST]
|
3571
|
+
*** This call is deprecated ***<br>
|
3572
|
+
This call will be removed latest on 1st July 2016<br>
|
3573
|
+
Please use the async version of this call.
|
3574
|
+
|
3575
|
+
+ Attributes (object)
|
3576
|
+
+ jobId: 37647(required, number) - Id of the job to create a sprite from.
|
3577
|
+
+ height: 240 (required, number) - Height of one thumbnail
|
3578
|
+
+ width: 320 (required, number) - Width of one thumbnail.
|
3579
|
+
+ distance: 10 (optional, string) - Distance in seconds between a screenshot.
|
3580
|
+
|
3581
|
+
+ Request (application/json)
|
3582
|
+
+ Header
|
3583
|
+
|
3584
|
+
bitcodin-api-version: v1
|
3585
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3586
|
+
|
3587
|
+
+ Body
|
3588
|
+
|
3589
|
+
{
|
3590
|
+
"jobId": 37647,
|
3591
|
+
"height": 240,
|
3592
|
+
"width": 320,
|
3593
|
+
"distance": 10
|
3594
|
+
}
|
3595
|
+
|
3596
|
+
+ Response 200 (application/json)
|
3597
|
+
|
3598
|
+
{
|
3599
|
+
"vttUrl": "http://url.to/your/sprite.vtt",
|
3600
|
+
"spriteUrl": "http://url.to/your/sprite.jpg"
|
3601
|
+
}
|
3602
|
+
|
3603
|
+
|
3604
|
+
|
3605
|
+
# Group Statistics
|
3606
|
+
The bitcodin system also provides detailed statistics over all jobs and on a monthly basis. This statistics show you how many jobs have been encoded in a given time window, how many MB of output you have produced, how fast the encoding was in average, etc.
|
3607
|
+
## Job Statistics [/statistics]
|
3608
|
+
### Get job statistics from current month[GET]
|
3609
|
+
This call provides the statistics for the current month.
|
3610
|
+
+ Request (application/json)
|
3611
|
+
+ Header
|
3612
|
+
|
3613
|
+
bitcodin-api-version: v1
|
3614
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3615
|
+
|
3616
|
+
|
3617
|
+
+ Response 200 (application/json)
|
3618
|
+
|
3619
|
+
{
|
3620
|
+
"jobCountFinished": 3,
|
3621
|
+
"realtimeFactor": 3.42,
|
3622
|
+
"totalBytesWritten": "903.08 MB",
|
3623
|
+
"avgBytesWritten": "301.03 MB",
|
3624
|
+
"totalTimeEnqueued": "6 min 18 sec",
|
3625
|
+
"avgTimeEnqueued": "2 min 6 sec",
|
3626
|
+
"totalTimeEncoded": "8 min 38 sec",
|
3627
|
+
"avgTimeEncoded": "2 min 52 sec",
|
3628
|
+
"totalTime": "15 min 1 sec",
|
3629
|
+
"avgJobTime": "5 min",
|
3630
|
+
"volume-chart": [
|
3631
|
+
[
|
3632
|
+
"ids",
|
3633
|
+
"volume [GB]"
|
3634
|
+
],
|
3635
|
+
[
|
3636
|
+
1,
|
3637
|
+
0.295
|
3638
|
+
],
|
3639
|
+
[
|
3640
|
+
2,
|
3641
|
+
0.326
|
3642
|
+
],
|
3643
|
+
[
|
3644
|
+
3,
|
3645
|
+
0.326
|
3646
|
+
]
|
3647
|
+
],
|
3648
|
+
"duration-chart": [
|
3649
|
+
[
|
3650
|
+
"ids",
|
3651
|
+
"duration [min]"
|
3652
|
+
],
|
3653
|
+
[
|
3654
|
+
1,
|
3655
|
+
6.35
|
3656
|
+
],
|
3657
|
+
[
|
3658
|
+
2,
|
3659
|
+
5.433
|
3660
|
+
],
|
3661
|
+
[
|
3662
|
+
3,
|
3663
|
+
3.233
|
3664
|
+
]
|
3665
|
+
],
|
3666
|
+
"realtime-chart": [
|
3667
|
+
[
|
3668
|
+
"ids",
|
3669
|
+
"factor"
|
3670
|
+
],
|
3671
|
+
[
|
3672
|
+
1,
|
3673
|
+
4.169
|
3674
|
+
],
|
3675
|
+
[
|
3676
|
+
2,
|
3677
|
+
2.5
|
3678
|
+
],
|
3679
|
+
[
|
3680
|
+
3,
|
3681
|
+
3.6
|
3682
|
+
]
|
3683
|
+
]
|
3684
|
+
}
|
3685
|
+
|
3686
|
+
## Custom Job Statistics [/statistics/jobs/{from}/{to}]
|
3687
|
+
### Get job statistics in given time window [GET]
|
3688
|
+
This call provides the statistics for time window defined by the user.
|
3689
|
+
+ Parameters
|
3690
|
+
+ from: `2000-12-24` (required, string) - Beginning of date-range
|
3691
|
+
+ to: `2100-12-24` (required, string) - End of date-range
|
3692
|
+
|
3693
|
+
+ Request (application/json)
|
3694
|
+
+ Header
|
3695
|
+
|
3696
|
+
bitcodin-api-version: v1
|
3697
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3698
|
+
|
3699
|
+
+ Response 200 (application/json)
|
3700
|
+
|
3701
|
+
{
|
3702
|
+
"averageDurationInSeconds": 577200,
|
3703
|
+
"durationAllInSeconds": 1731600,
|
3704
|
+
"allJobs": 911,
|
3705
|
+
"jobsFinished": 900,
|
3706
|
+
"jobsUnfinished": 11,
|
3707
|
+
"workloadPercentage": 3.14159265359,
|
3708
|
+
"timeWindowInSeconds": 3156537600
|
3709
|
+
}
|
3710
|
+
|
3711
|
+
|
3712
|
+
# Group Payment
|
3713
|
+
The payment api calls allow you get, create and update your payment information.
|
3714
|
+
|
3715
|
+
## User Information [/payment/user]
|
3716
|
+
### Get user-payment information [GET]
|
3717
|
+
This call returns the payment user information such as amount of money that is available.
|
3718
|
+
+ Request (application/json)
|
3719
|
+
+ Header
|
3720
|
+
|
3721
|
+
bitcodin-api-version: v1
|
3722
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3723
|
+
|
3724
|
+
|
3725
|
+
+ Response 200 (application/json)
|
3726
|
+
|
3727
|
+
{
|
3728
|
+
"hasCreditCard": false,
|
3729
|
+
"hasInvoiceInfo": false,
|
3730
|
+
"amount": 0,
|
3731
|
+
"currency": "USD",
|
3732
|
+
"billsCount": 6,
|
3733
|
+
"vat": false,
|
3734
|
+
"plan": {
|
3735
|
+
"id": 1,
|
3736
|
+
"name": "FREE",
|
3737
|
+
"maxTranscodings": 10,
|
3738
|
+
"chargePerGb": -1,
|
3739
|
+
"maxGb": 2500000000,
|
3740
|
+
"price": 0
|
3741
|
+
}
|
3742
|
+
}
|
3743
|
+
|
3744
|
+
## Bills [/payment/bills/{page}]
|
3745
|
+
### Get a list of all bills [GET]
|
3746
|
+
List all bills on your bitcodin account structured as pages.
|
3747
|
+
+ Parameters
|
3748
|
+
+ page (optional, integer) ... page number. If page number doesn't exist, last page will be returned. (10 Bills per page)
|
3749
|
+
+ Default: 1
|
3750
|
+
|
3751
|
+
+ Request (application/json)
|
3752
|
+
+ Header
|
3753
|
+
|
3754
|
+
bitcodin-api-version: v1
|
3755
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3756
|
+
|
3757
|
+
|
3758
|
+
+ Response 200 (application/json)
|
3759
|
+
|
3760
|
+
{
|
3761
|
+
"perPage": 10,
|
3762
|
+
"totalCount": 6,
|
3763
|
+
"bills": [
|
3764
|
+
{
|
3765
|
+
"id": 4188,
|
3766
|
+
"jobId": 4188,
|
3767
|
+
"amount": 0,
|
3768
|
+
"description": "Transcoding JobID: 4188",
|
3769
|
+
"isPayed": true,
|
3770
|
+
"isError": false
|
3771
|
+
},
|
3772
|
+
{
|
3773
|
+
"id": 4187,
|
3774
|
+
"jobId": 4187,
|
3775
|
+
"amount": 0,
|
3776
|
+
"description": "Transcoding JobID: 4187",
|
3777
|
+
"isPayed": true,
|
3778
|
+
"isError": false
|
3779
|
+
},
|
3780
|
+
{
|
3781
|
+
"id": 4168,
|
3782
|
+
"jobId": 4168,
|
3783
|
+
"amount": 0,
|
3784
|
+
"description": "JobID 4168 canceled due to insufficient contingent",
|
3785
|
+
"isPayed": true,
|
3786
|
+
"isError": true
|
3787
|
+
},
|
3788
|
+
{
|
3789
|
+
"id": 4106,
|
3790
|
+
"jobId": 4106,
|
3791
|
+
"amount": 0,
|
3792
|
+
"description": "Transcoding JobID: 4106",
|
3793
|
+
"isPayed": true,
|
3794
|
+
"isError": false
|
3795
|
+
},
|
3796
|
+
{
|
3797
|
+
"id": 4105,
|
3798
|
+
"jobId": 4105,
|
3799
|
+
"amount": 0,
|
3800
|
+
"description": "Transcoding JobID: 4105",
|
3801
|
+
"isPayed": true,
|
3802
|
+
"isError": false
|
3803
|
+
},
|
3804
|
+
{
|
3805
|
+
"id": 4101,
|
3806
|
+
"jobId": 4101,
|
3807
|
+
"amount": 0,
|
3808
|
+
"description": "JobID 4101 canceled due to insufficient contingent",
|
3809
|
+
"isPayed": true,
|
3810
|
+
"isError": true
|
3811
|
+
}
|
3812
|
+
]
|
3813
|
+
}
|
3814
|
+
|
3815
|
+
# Group Live Streaming
|
3816
|
+
|
3817
|
+
## Live Stream [/livestream]
|
3818
|
+
Endpoint for your RTMP live streams.
|
3819
|
+
|
3820
|
+
The response will contain a attribute called "status" amongst various other attributes. It can take the following values with it:
|
3821
|
+
|
3822
|
+
| Value | Description |
|
3823
|
+
|-----------------|-------------|
|
3824
|
+
| STARTING | Your Livestream-RTMP-Endpoint is preparing |
|
3825
|
+
| RUNNING | Your Livestream-RTMP-Endpoint is ready to use |
|
3826
|
+
| STOPPING | Your Livestream-RTMP-Endpoint is shutting down |
|
3827
|
+
| TERMINATED | Your Livestream-RTMP-Endpoint shut down successfully |
|
3828
|
+
| ERROR | Your Livestream-RTMP-Endpoint is no longer reachable due to an internal error |
|
3829
|
+
|
3830
|
+
The **rtmpPushUrl** consists of `{protocol}://{server address}:{port}/{application name}`
|
3831
|
+
|
3832
|
+
The `application name` is **bitcodin**
|
3833
|
+
|
3834
|
+
**NOTE!** In some RTMP clients the `application name` and the `stream key` has to be appended to the rtmp push url if they are not extra input fields.
|
3835
|
+
|
3836
|
+
### Create a Live Stream [POST]
|
3837
|
+
Creates a RTMP live stream.
|
3838
|
+
|
3839
|
+
Before you can use your instance you have to wait until the status is `RUNNING`
|
3840
|
+
|
3841
|
+
+ Attributes(object)
|
3842
|
+
+ label: testlivestream (required, string) - A string to name your livestream
|
3843
|
+
+ encodingProfileId: 44 (required, number) - The id of the encoding profile for your live stream
|
3844
|
+
+ outputId: 23 (required, number) - The id of the GCS output for your live stream
|
3845
|
+
+ streamKey: stream (optional, string) - Stream identifies your stream in the bitcodin encoding service
|
3846
|
+
+ timeshift: 600 (optional, number) - Timeshift buffer in seconds
|
3847
|
+
+ liveEdgeOffset: 60 (optional, number) - Value range: 1 to 3600 seconds, Offset to the time when the first segment was available
|
3848
|
+
+ region: `europe-west1-c` (optional, string) - Available regions: us-west1-a,us-west1-b,us-central1-b,us-central1-c,us-central1-f,us-east1-b,us-east1-c,us-east1-d,europe-west1-c,europe-west1-d,asia-east1-a,asia-east1-b,asia-east1-c
|
3849
|
+
|
3850
|
+
+ Request (application/json)
|
3851
|
+
+ Header
|
3852
|
+
|
3853
|
+
bitcodin-api-version: v1
|
3854
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3855
|
+
|
3856
|
+
+ Body
|
3857
|
+
|
3858
|
+
{
|
3859
|
+
"label": "test-livestream",
|
3860
|
+
"streamKey": "stream",
|
3861
|
+
"timeshift": 600,
|
3862
|
+
"encodingProfileId": 44,
|
3863
|
+
"outputId": 23
|
3864
|
+
}
|
3865
|
+
|
3866
|
+
+ Response 200 (application/json)
|
3867
|
+
|
3868
|
+
{
|
3869
|
+
"id": 7,
|
3870
|
+
"status": "STARTING",
|
3871
|
+
"label": "test-livestream",
|
3872
|
+
"timeshift": 600,
|
3873
|
+
"createdAt": {
|
3874
|
+
"date": "2015-06-12 12:28:03.000000",
|
3875
|
+
"timezone_type": 3,
|
3876
|
+
"Europe/Berlin"
|
3877
|
+
},
|
3878
|
+
"generatedBytes": 20034,
|
3879
|
+
"outputId": 14671,
|
3880
|
+
"encodingProfileId": 23003,
|
3881
|
+
"terminatedAt": null,
|
3882
|
+
"rtmpPushUrl": null,
|
3883
|
+
"streamKey": "stream",
|
3884
|
+
"mpdUrl": null,
|
3885
|
+
"hlsUrl": null
|
3886
|
+
}
|
3887
|
+
|
3888
|
+
|
3889
|
+
### Live Stream Details [GET /livestream/{id}]
|
3890
|
+
Retrieve details of your live stream.
|
3891
|
+
|
3892
|
+
+ Parameters
|
3893
|
+
+ id (required, integer) ... Live Stream id
|
3894
|
+
|
3895
|
+
+ Request (application/json)
|
3896
|
+
+ Header
|
3897
|
+
|
3898
|
+
bitcodin-api-version: v1
|
3899
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3900
|
+
|
3901
|
+
+ Response 200 (application/json)
|
3902
|
+
|
3903
|
+
{
|
3904
|
+
"id": 7,
|
3905
|
+
"status": "RUNNING",
|
3906
|
+
"label": "test-livestream",
|
3907
|
+
"timeshift": 600,
|
3908
|
+
"createdAt": {
|
3909
|
+
"date": "2015-06-12 12:28:03.000000",
|
3910
|
+
"timezone_type": 3,
|
3911
|
+
"Europe/Berlin"
|
3912
|
+
},
|
3913
|
+
"generatedBytes": 132408000,
|
3914
|
+
"outputId": 14671,
|
3915
|
+
"encodingProfileId": 23003,
|
3916
|
+
"terminatedAt": null,
|
3917
|
+
"rtmpPushUrl": "rtmp://52.18.149.124:1935/bitcodin",
|
3918
|
+
"streamKey": "stream",
|
3919
|
+
"mpdUrl": "http://output.url/mpds/stream.mpd",
|
3920
|
+
"hlsUrl": "http://output.url/m3u8s/stream.m3u8"
|
3921
|
+
}
|
3922
|
+
|
3923
|
+
### List your Live Stream [GET /livestream]
|
3924
|
+
Retrieve a list of all your previous and active live streams.
|
3925
|
+
|
3926
|
+
+ Request (application/json)
|
3927
|
+
+ Header
|
3928
|
+
|
3929
|
+
bitcodin-api-version: v1
|
3930
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
3931
|
+
|
3932
|
+
+ Response 200 (application/json)
|
3933
|
+
|
3934
|
+
[{
|
3935
|
+
"id": 7,
|
3936
|
+
"status": "RUNNING",
|
3937
|
+
"label": "test-livestream",
|
3938
|
+
"timeshift": 600,
|
3939
|
+
"createdAt": {
|
3940
|
+
"date": "2015-06-12 12:28:03.000000",
|
3941
|
+
"timezone_type": 3,
|
3942
|
+
"Europe/Berlin"
|
3943
|
+
},
|
3944
|
+
"generatedBytes": 132408000,
|
3945
|
+
"outputId": 14671,
|
3946
|
+
"encodingProfileId": 23003,
|
3947
|
+
"terminatedAt": null,
|
3948
|
+
"rtmpPushUrl": "rtmp://52.18.123.124:1935/bitcodin",
|
3949
|
+
"streamKey": "stream",
|
3950
|
+
"mpdUrl": "http://output.url/mpds/stream.mpd",
|
3951
|
+
"hlsUrl": "http://output.url/m3u8s/stream.m3u8"
|
3952
|
+
},
|
3953
|
+
{
|
3954
|
+
"id": 8,
|
3955
|
+
"status": "TERMINATED",
|
3956
|
+
"label": "test-livestream",
|
3957
|
+
"timeshift": 600,
|
3958
|
+
"createdAt": {
|
3959
|
+
"date": "2015-06-12 10:23:33.000000",
|
3960
|
+
"timezone_type": 3,
|
3961
|
+
"Europe/Berlin"
|
3962
|
+
},
|
3963
|
+
"generatedBytes": 145408000,
|
3964
|
+
"outputId": 15631,
|
3965
|
+
"encodingProfileId": 23003,
|
3966
|
+
"terminatedAt": {
|
3967
|
+
"date": "2015-06-12 14:12:32.000000",
|
3968
|
+
"timezone_type": 3,
|
3969
|
+
"Europe/Berlin"
|
3970
|
+
},
|
3971
|
+
"rtmpPushUrl": "rtmp://96.44.234.124:1935/bitcodin",
|
3972
|
+
"streamKey": "test",
|
3973
|
+
"mpdUrl": "http://output.url/mpds/stream.mpd",
|
3974
|
+
"hlsUrl": "http://output.url/m3u8s/stream.m3u8"
|
3975
|
+
},
|
3976
|
+
{
|
3977
|
+
"id": 10,
|
3978
|
+
"status": "RUNNING",
|
3979
|
+
"label": "test-livestream",
|
3980
|
+
"timeshift": 600,
|
3981
|
+
"createdAt": {
|
3982
|
+
"date": "2015-06-12 13:39:03.000000",
|
3983
|
+
"timezone_type": 3,
|
3984
|
+
"Europe/Berlin"
|
3985
|
+
},
|
3986
|
+
"generatedBytes": 235408000,
|
3987
|
+
"outputId": 3453,
|
3988
|
+
"encodingProfileId": 2235,
|
3989
|
+
"terminatedAt": null,
|
3990
|
+
"rtmpPushUrl": "rtmp://87.34.145.124:1935/bitcodin",
|
3991
|
+
"streamKey": "asdf",
|
3992
|
+
"mpdUrl": "http://output.url/mpds/stream.mpd",
|
3993
|
+
"hlsUrl": "http://output.url/m3u8s/stream.m3u8"
|
3994
|
+
}]
|
3995
|
+
|
3996
|
+
### Delete Live Stream [DELETE /livestream/{id}]
|
3997
|
+
Terminates your live stream.
|
3998
|
+
|
3999
|
+
+ Parameters
|
4000
|
+
+ id (required, integer) ... Live Stream id
|
4001
|
+
|
4002
|
+
+ Request (application/json)
|
4003
|
+
+ Header
|
4004
|
+
|
4005
|
+
bitcodin-api-version: v1
|
4006
|
+
bitcodin-api-key: yoursuperfancyencryptedapikey
|
4007
|
+
|
4008
|
+
+ Response 204 (application/json)
|
4009
|
+
|
4010
|
+
|
4011
|
+
# Data Structures
|
4012
|
+
|
4013
|
+
## EncodingProfile (object)
|
4014
|
+
+ name (string, required) - Name of your new Encoding Profile
|
4015
|
+
+ videoStreamConfigs (array[VideoStreamConfig], required) - Array of VideoStreamConfig-Settings of your choice
|
4016
|
+
+ audioStreamConfigs (array[AudioStreamConfig], required) - Array of AudioStreamConfig-Settings of your choice
|
4017
|
+
+ watermarkConfig (WaterMarkConfig, optional) - A watermark image can be overlayed to the input file via the watermarkConfig. The position of the image in pixels can be specified via the 'top', 'bottom', 'left' and 'right' parameters. Only one horizontal and one vertical distance parameter is allowed.
|
4018
|
+
+ croppingConfig (CroppingConfig, optional) - The parameters `top`, `bottom`, `left` and `right` specify how much pixels of the input video will be cropped on each side of your input before encoding starts.
|
4019
|
+
+ rotation: 0 (optional, number) - Rotation of the video in degrees. A positive value will rotate the video clockwise and a negative one counter clockwise.
|
4020
|
+
+ segmentLength: 4 (optional, number) - Only available using standard speed. Defines the length of a segment. Must be a value between 1 and 9 seconds.
|
4021
|
+
|
4022
|
+
## VideoStreamConfig (object)
|
4023
|
+
|
4024
|
+
+ defaultStreamId: 0 (number, required) - The default stream mapping
|
4025
|
+
+ bitrate: 5000000 (number, required) - Video bitrate in bit/s (max 20Mbit/s)
|
4026
|
+
+ codec: "h264, hevc" (string, optional) - Name of the codec
|
4027
|
+
+ profile "main, high, baseline" (string, required) - Name of the profile
|
4028
|
+
+ preset (string, required) - Name of the preset
|
4029
|
+
+ height (number, required) - Video height
|
4030
|
+
+ width (number, required) - Video width
|
4031
|
+
+ rate (number, optional) - Only available using standard speed. The sample rate the encoded video should have in FPS. Values must be in the range from 1 to 120
|
4032
|
+
|
4033
|
+
## AudioStreamConfig (object)
|
4034
|
+
|
4035
|
+
+ defaultStreamId: 0 (number, required) - 0 = First VideoInputStream, 1 = Second VideoInputStream and so on
|
4036
|
+
+ bitrate: 256000 (number, required) - Audio Bitrate in Bit/s (max 256kBit/s)
|
4037
|
+
+ rate (number, optional) - The sample rate the encoded audio should have in Hz. Possible values are: 0, 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000
|
4038
|
+
|
4039
|
+
## WaterMarkConfig (object)
|
4040
|
+
|
4041
|
+
+ image (string) - Url to image which should be used as watermark.
|
4042
|
+
+ top (number, optional) - Distance between the top of the watermark image and the top of the input video
|
4043
|
+
+ left (number, optional) - Distance between the left side of the watermark image and the left side of the input video
|
4044
|
+
+ bottom (number, optional) - Distance between the bottom of the watermark image and the bottom of the input video
|
4045
|
+
+ right (number, optional) - Distance between the right of the watermark image and the right of the input video
|
4046
|
+
|
4047
|
+
## CroppingConfig (object)
|
4048
|
+
|
4049
|
+
+ top (number, optional) - Amount of pixel which will be cropped of the input video from the top.
|
4050
|
+
+ left (number, optional) - Amount of pixel which will be cropped of the input video from the left side.
|
4051
|
+
+ bottom (number, optional) - Amount of pixel which will be cropped of the input video from the bottom.
|
4052
|
+
+ right (number, optional) - Amount of pixel which will be cropped of the input video from the right side.
|
4053
|
+
|
4054
|
+
## AudioMetaData (object)
|
4055
|
+
|
4056
|
+
+ defaultStreamId (number, required) - Default stream id of the audio stream
|
4057
|
+
+ language (string, required) - Language abbreviation [ISO 639-1]
|
4058
|
+
+ label (string, required) - Label of the language field
|
4059
|
+
|
4060
|
+
## DrmConfig (object)
|
4061
|
+
|
4062
|
+
+ system (string, required) - We support widevine, playready, widevine_playready and clearkey
|
4063
|
+
+ provider (string, required) - Also known as portal, owner or organization. You will get this value from Widevine.
|
4064
|
+
+ signingKey (string, optional) - Replace this with the signing key you received from Widevine.
|
4065
|
+
+ signingIV (string, required) - Replace this with the signing IV you received from Widevine.
|
4066
|
+
+ requestUrl (string, required) - This is your private Widevine license server URL.
|
4067
|
+
+ contentId (string, required) - This ID is used to link your content to the generated keys in the Widevine key managment system. This is up to you or your licensing provider. You can choose any value you like.
|
4068
|
+
+ method (string, required) - Currently we only support MPEG-CENC ('mpeg_cenc').
|