active_encode 0.5.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +80 -0
  3. data/.rubocop.yml +9 -70
  4. data/.rubocop_todo.yml +68 -0
  5. data/Gemfile +5 -4
  6. data/README.md +69 -0
  7. data/active_encode.gemspec +12 -3
  8. data/app/controllers/active_encode/encode_record_controller.rb +1 -0
  9. data/app/jobs/active_encode/polling_job.rb +1 -1
  10. data/app/models/active_encode/encode_record.rb +1 -0
  11. data/db/migrate/20180822021048_create_active_encode_encode_records.rb +1 -0
  12. data/db/migrate/20190702153755_add_create_options_to_active_encode_encode_records.rb +6 -0
  13. data/db/migrate/20190712174821_add_progress_to_active_encode_encode_records.rb +6 -0
  14. data/lib/active_encode.rb +1 -0
  15. data/lib/active_encode/base.rb +2 -2
  16. data/lib/active_encode/callbacks.rb +1 -0
  17. data/lib/active_encode/core.rb +4 -3
  18. data/lib/active_encode/engine.rb +1 -0
  19. data/lib/active_encode/engine_adapter.rb +1 -0
  20. data/lib/active_encode/engine_adapters.rb +4 -1
  21. data/lib/active_encode/engine_adapters/elastic_transcoder_adapter.rb +31 -29
  22. data/lib/active_encode/engine_adapters/ffmpeg_adapter.rb +138 -87
  23. data/lib/active_encode/engine_adapters/matterhorn_adapter.rb +5 -4
  24. data/lib/active_encode/engine_adapters/media_convert_adapter.rb +399 -0
  25. data/lib/active_encode/engine_adapters/media_convert_output.rb +104 -0
  26. data/lib/active_encode/engine_adapters/pass_through_adapter.rb +239 -0
  27. data/lib/active_encode/engine_adapters/test_adapter.rb +5 -4
  28. data/lib/active_encode/engine_adapters/zencoder_adapter.rb +3 -2
  29. data/lib/active_encode/errors.rb +6 -0
  30. data/lib/active_encode/global_id.rb +2 -1
  31. data/lib/active_encode/input.rb +3 -2
  32. data/lib/active_encode/output.rb +3 -2
  33. data/lib/active_encode/persistence.rb +11 -5
  34. data/lib/active_encode/polling.rb +3 -2
  35. data/lib/active_encode/spec/shared_specs.rb +2 -0
  36. data/{spec/shared_specs/engine_adapter_specs.rb → lib/active_encode/spec/shared_specs/engine_adapter.rb} +37 -38
  37. data/lib/active_encode/status.rb +1 -0
  38. data/lib/active_encode/technical_metadata.rb +3 -2
  39. data/lib/active_encode/version.rb +2 -1
  40. data/lib/file_locator.rb +8 -9
  41. data/spec/controllers/encode_record_controller_spec.rb +4 -3
  42. data/spec/fixtures/ffmpeg/cancelled-id/cancelled +0 -0
  43. data/spec/fixtures/file with space.low.mp4 +0 -0
  44. data/spec/fixtures/file with space.mp4 +0 -0
  45. data/spec/fixtures/fireworks.low.mp4 +0 -0
  46. data/spec/fixtures/media_convert/endpoints.json +1 -0
  47. data/spec/fixtures/media_convert/job_canceled.json +412 -0
  48. data/spec/fixtures/media_convert/job_canceling.json +1 -0
  49. data/spec/fixtures/media_convert/job_completed.json +359 -0
  50. data/spec/fixtures/media_convert/job_completed_detail.json +1 -0
  51. data/spec/fixtures/media_convert/job_completed_detail_query.json +1 -0
  52. data/spec/fixtures/media_convert/job_completed_empty_detail.json +1 -0
  53. data/spec/fixtures/media_convert/job_created.json +408 -0
  54. data/spec/fixtures/media_convert/job_failed.json +406 -0
  55. data/spec/fixtures/media_convert/job_progressing.json +414 -0
  56. data/spec/fixtures/pass_through/cancelled-id/cancelled +0 -0
  57. data/spec/fixtures/pass_through/cancelled-id/input_metadata +90 -0
  58. data/spec/fixtures/pass_through/completed-id/completed +0 -0
  59. data/spec/fixtures/pass_through/completed-id/input_metadata +102 -0
  60. data/spec/fixtures/pass_through/completed-id/output_metadata-high +90 -0
  61. data/spec/fixtures/pass_through/completed-id/output_metadata-low +90 -0
  62. data/spec/fixtures/pass_through/completed-id/video-high.mp4 +0 -0
  63. data/spec/fixtures/pass_through/completed-id/video-low.mp4 +0 -0
  64. data/spec/fixtures/pass_through/failed-id/error.log +1 -0
  65. data/spec/fixtures/pass_through/failed-id/input_metadata +90 -0
  66. data/spec/fixtures/pass_through/running-id/input_metadata +90 -0
  67. data/spec/integration/elastic_transcoder_adapter_spec.rb +30 -30
  68. data/spec/integration/ffmpeg_adapter_spec.rb +93 -25
  69. data/spec/integration/matterhorn_adapter_spec.rb +45 -44
  70. data/spec/integration/media_convert_adapter_spec.rb +152 -0
  71. data/spec/integration/pass_through_adapter_spec.rb +151 -0
  72. data/spec/integration/zencoder_adapter_spec.rb +210 -209
  73. data/spec/rails_helper.rb +1 -0
  74. data/spec/routing/encode_record_controller_routing_spec.rb +1 -0
  75. data/spec/spec_helper.rb +2 -2
  76. data/spec/test_app_templates/lib/generators/test_app_generator.rb +13 -12
  77. data/spec/units/callbacks_spec.rb +3 -2
  78. data/spec/units/core_spec.rb +26 -25
  79. data/spec/units/engine_adapter_spec.rb +1 -0
  80. data/spec/units/file_locator_spec.rb +20 -19
  81. data/spec/units/global_id_spec.rb +12 -11
  82. data/spec/units/input_spec.rb +8 -5
  83. data/spec/units/output_spec.rb +8 -5
  84. data/spec/units/persistence_spec.rb +15 -11
  85. data/spec/units/polling_job_spec.rb +7 -6
  86. data/spec/units/polling_spec.rb +1 -0
  87. data/spec/units/status_spec.rb +3 -3
  88. metadata +158 -14
  89. data/.travis.yml +0 -19
@@ -0,0 +1,359 @@
1
+ {
2
+ "job": {
3
+ "acceleration_settings": {
4
+ "mode": "DISABLED"
5
+ },
6
+ "acceleration_status": "NOT_APPLICABLE",
7
+ "arn": "arn:aws:mediaconvert:us-east-1:123456789012:jobs/1625859001514-vvqfwj",
8
+ "created_at": "2021-07-09T13:08:02.000-05:00",
9
+ "id": "1625859001514-vvqfwj",
10
+ "messages": {
11
+ "info": [],
12
+ "warning": []
13
+ },
14
+ "output_group_details": [{
15
+ "output_details": [{
16
+ "duration_in_ms": 888020,
17
+ "video_details": {
18
+ "height_in_px": 1080,
19
+ "width_in_px": 1920
20
+ }
21
+ }, {
22
+ "duration_in_ms": 888020,
23
+ "video_details": {
24
+ "height_in_px": 720,
25
+ "width_in_px": 1280
26
+ }
27
+ }, {
28
+ "duration_in_ms": 888020,
29
+ "video_details": {
30
+ "height_in_px": 540,
31
+ "width_in_px": 960
32
+ }
33
+ }]
34
+ }],
35
+ "priority": 0,
36
+ "queue": "arn:aws:mediaconvert:us-east-1:123456789012:queues/Default",
37
+ "role": "arn:aws:iam::123456789012:role/service-role/MediaConvert_Default_Role",
38
+ "settings": {
39
+ "inputs": [{
40
+ "audio_selectors": {
41
+ "Audio Selector 1": {
42
+ "default_selection": "DEFAULT"
43
+ }
44
+ },
45
+ "file_input": "s3://input-bucket/test_files/sintel-1280-surround.mp4",
46
+ "timecode_source": "ZEROBASED",
47
+ "video_selector": {}
48
+ }],
49
+ "output_groups": [{
50
+ "output_group_settings": {
51
+ "hls_group_settings": {
52
+ "destination": "s3://output-bucket/active-encode-test/output",
53
+ "min_segment_length": 0,
54
+ "segment_control": "SEGMENTED_FILES",
55
+ "segment_length": 10
56
+ },
57
+ "type": "HLS_GROUP_SETTINGS"
58
+ },
59
+ "outputs": [{
60
+ "audio_descriptions": [{
61
+ "audio_type": 0,
62
+ "audio_type_control": "FOLLOW_INPUT",
63
+ "codec_settings": {
64
+ "aac_settings": {
65
+ "audio_description_broadcaster_mix": "NORMAL",
66
+ "bitrate": 128000,
67
+ "codec_profile": "LC",
68
+ "coding_mode": "CODING_MODE_2_0",
69
+ "rate_control_mode": "CBR",
70
+ "raw_format": "NONE",
71
+ "sample_rate": 48000,
72
+ "specification": "MPEG4"
73
+ },
74
+ "codec": "AAC"
75
+ },
76
+ "language_code_control": "FOLLOW_INPUT"
77
+ }],
78
+ "container_settings": {
79
+ "container": "M3U8",
80
+ "m3u_8_settings": {
81
+ "audio_frames_per_pes": 4,
82
+ "audio_pids": [482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498],
83
+ "pat_interval": 0,
84
+ "pcr_control": "PCR_EVERY_PES_PACKET",
85
+ "pmt_interval": 0,
86
+ "pmt_pid": 480,
87
+ "private_metadata_pid": 503,
88
+ "program_number": 1,
89
+ "scte_35_pid": 500,
90
+ "timed_metadata_pid": 502,
91
+ "video_pid": 481
92
+ }
93
+ },
94
+ "name_modifier": "-1080",
95
+ "preset": "System-Avc_16x9_1080p_29_97fps_8500kbps",
96
+ "video_description": {
97
+ "afd_signaling": "NONE",
98
+ "anti_alias": "ENABLED",
99
+ "codec_settings": {
100
+ "codec": "H_264",
101
+ "h264_settings": {
102
+ "adaptive_quantization": "HIGH",
103
+ "bitrate": 8500000,
104
+ "codec_level": "LEVEL_4",
105
+ "codec_profile": "HIGH",
106
+ "entropy_encoding": "CABAC",
107
+ "field_encoding": "PAFF",
108
+ "flicker_adaptive_quantization": "DISABLED",
109
+ "framerate_control": "SPECIFIED",
110
+ "framerate_conversion_algorithm": "DUPLICATE_DROP",
111
+ "framerate_denominator": 1001,
112
+ "framerate_numerator": 30000,
113
+ "gop_b_reference": "DISABLED",
114
+ "gop_closed_cadence": 1,
115
+ "gop_size": 90.0,
116
+ "gop_size_units": "FRAMES",
117
+ "hrd_buffer_initial_fill_percentage": 90,
118
+ "hrd_buffer_size": 12750000,
119
+ "interlace_mode": "PROGRESSIVE",
120
+ "min_i_interval": 0,
121
+ "number_b_frames_between_reference_frames": 1,
122
+ "number_reference_frames": 3,
123
+ "par_control": "SPECIFIED",
124
+ "par_denominator": 1,
125
+ "par_numerator": 1,
126
+ "quality_tuning_level": "MULTI_PASS_HQ",
127
+ "rate_control_mode": "CBR",
128
+ "repeat_pps": "DISABLED",
129
+ "scene_change_detect": "ENABLED",
130
+ "slices": 1,
131
+ "slow_pal": "DISABLED",
132
+ "spatial_adaptive_quantization": "ENABLED",
133
+ "syntax": "DEFAULT",
134
+ "telecine": "NONE",
135
+ "temporal_adaptive_quantization": "ENABLED",
136
+ "unregistered_sei_timecode": "DISABLED"
137
+ }
138
+ },
139
+ "color_metadata": "INSERT",
140
+ "drop_frame_timecode": "ENABLED",
141
+ "height": 1080,
142
+ "respond_to_afd": "NONE",
143
+ "scaling_behavior": "DEFAULT",
144
+ "sharpness": 50,
145
+ "timecode_insertion": "DISABLED",
146
+ "video_preprocessors": {
147
+ "deinterlacer": {
148
+ "algorithm": "INTERPOLATE",
149
+ "control": "NORMAL",
150
+ "mode": "DEINTERLACE"
151
+ }
152
+ },
153
+ "width": 1920
154
+ }
155
+ }, {
156
+ "audio_descriptions": [{
157
+ "audio_type": 0,
158
+ "audio_type_control": "FOLLOW_INPUT",
159
+ "codec_settings": {
160
+ "aac_settings": {
161
+ "audio_description_broadcaster_mix": "NORMAL",
162
+ "bitrate": 96000,
163
+ "codec_profile": "HEV1",
164
+ "coding_mode": "CODING_MODE_2_0",
165
+ "rate_control_mode": "CBR",
166
+ "raw_format": "NONE",
167
+ "sample_rate": 48000,
168
+ "specification": "MPEG4"
169
+ },
170
+ "codec": "AAC"
171
+ },
172
+ "language_code_control": "FOLLOW_INPUT"
173
+ }],
174
+ "container_settings": {
175
+ "container": "M3U8",
176
+ "m3u_8_settings": {
177
+ "audio_frames_per_pes": 4,
178
+ "audio_pids": [482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498],
179
+ "pat_interval": 0,
180
+ "pcr_control": "PCR_EVERY_PES_PACKET",
181
+ "pmt_interval": 0,
182
+ "pmt_pid": 480,
183
+ "private_metadata_pid": 503,
184
+ "program_number": 1,
185
+ "scte_35_pid": 500,
186
+ "timed_metadata_pid": 502,
187
+ "video_pid": 481
188
+ }
189
+ },
190
+ "name_modifier": "-720",
191
+ "preset": "System-Avc_16x9_720p_29_97fps_5000kbps",
192
+ "video_description": {
193
+ "afd_signaling": "NONE",
194
+ "anti_alias": "ENABLED",
195
+ "codec_settings": {
196
+ "codec": "H_264",
197
+ "h264_settings": {
198
+ "adaptive_quantization": "HIGH",
199
+ "bitrate": 5000000,
200
+ "codec_level": "LEVEL_3_1",
201
+ "codec_profile": "MAIN",
202
+ "entropy_encoding": "CABAC",
203
+ "field_encoding": "PAFF",
204
+ "flicker_adaptive_quantization": "DISABLED",
205
+ "framerate_control": "SPECIFIED",
206
+ "framerate_conversion_algorithm": "DUPLICATE_DROP",
207
+ "framerate_denominator": 1001,
208
+ "framerate_numerator": 30000,
209
+ "gop_b_reference": "DISABLED",
210
+ "gop_closed_cadence": 1,
211
+ "gop_size": 90.0,
212
+ "gop_size_units": "FRAMES",
213
+ "hrd_buffer_initial_fill_percentage": 90,
214
+ "hrd_buffer_size": 7500000,
215
+ "interlace_mode": "PROGRESSIVE",
216
+ "min_i_interval": 0,
217
+ "number_b_frames_between_reference_frames": 1,
218
+ "number_reference_frames": 3,
219
+ "par_control": "SPECIFIED",
220
+ "par_denominator": 1,
221
+ "par_numerator": 1,
222
+ "quality_tuning_level": "MULTI_PASS_HQ",
223
+ "rate_control_mode": "CBR",
224
+ "repeat_pps": "DISABLED",
225
+ "scene_change_detect": "ENABLED",
226
+ "slices": 1,
227
+ "slow_pal": "DISABLED",
228
+ "spatial_adaptive_quantization": "ENABLED",
229
+ "syntax": "DEFAULT",
230
+ "telecine": "NONE",
231
+ "temporal_adaptive_quantization": "ENABLED",
232
+ "unregistered_sei_timecode": "DISABLED"
233
+ }
234
+ },
235
+ "color_metadata": "INSERT",
236
+ "drop_frame_timecode": "ENABLED",
237
+ "height": 720,
238
+ "respond_to_afd": "NONE",
239
+ "scaling_behavior": "DEFAULT",
240
+ "sharpness": 50,
241
+ "timecode_insertion": "DISABLED",
242
+ "video_preprocessors": {
243
+ "deinterlacer": {
244
+ "algorithm": "INTERPOLATE",
245
+ "control": "NORMAL",
246
+ "mode": "DEINTERLACE"
247
+ }
248
+ },
249
+ "width": 1280
250
+ }
251
+ }, {
252
+ "audio_descriptions": [{
253
+ "audio_type": 0,
254
+ "audio_type_control": "FOLLOW_INPUT",
255
+ "codec_settings": {
256
+ "aac_settings": {
257
+ "audio_description_broadcaster_mix": "NORMAL",
258
+ "bitrate": 96000,
259
+ "codec_profile": "HEV1",
260
+ "coding_mode": "CODING_MODE_2_0",
261
+ "rate_control_mode": "CBR",
262
+ "raw_format": "NONE",
263
+ "sample_rate": 48000,
264
+ "specification": "MPEG4"
265
+ },
266
+ "codec": "AAC"
267
+ },
268
+ "language_code_control": "FOLLOW_INPUT"
269
+ }],
270
+ "container_settings": {
271
+ "container": "M3U8",
272
+ "m3u_8_settings": {
273
+ "audio_frames_per_pes": 4,
274
+ "audio_pids": [482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498],
275
+ "pat_interval": 0,
276
+ "pcr_control": "PCR_EVERY_PES_PACKET",
277
+ "pmt_interval": 0,
278
+ "pmt_pid": 480,
279
+ "private_metadata_pid": 503,
280
+ "program_number": 1,
281
+ "scte_35_pid": 500,
282
+ "timed_metadata_pid": 502,
283
+ "video_pid": 481
284
+ }
285
+ },
286
+ "name_modifier": "-540",
287
+ "preset": "System-Avc_16x9_540p_29_97fps_3500kbps",
288
+ "video_description": {
289
+ "afd_signaling": "NONE",
290
+ "anti_alias": "ENABLED",
291
+ "codec_settings": {
292
+ "codec": "H_264",
293
+ "h264_settings": {
294
+ "adaptive_quantization": "HIGH",
295
+ "bitrate": 3500000,
296
+ "codec_level": "LEVEL_3_1",
297
+ "codec_profile": "MAIN",
298
+ "entropy_encoding": "CABAC",
299
+ "field_encoding": "PAFF",
300
+ "flicker_adaptive_quantization": "DISABLED",
301
+ "framerate_control": "SPECIFIED",
302
+ "framerate_conversion_algorithm": "DUPLICATE_DROP",
303
+ "framerate_denominator": 1001,
304
+ "framerate_numerator": 30000,
305
+ "gop_b_reference": "DISABLED",
306
+ "gop_closed_cadence": 1,
307
+ "gop_size": 90.0,
308
+ "gop_size_units": "FRAMES",
309
+ "hrd_buffer_initial_fill_percentage": 90,
310
+ "hrd_buffer_size": 5250000,
311
+ "interlace_mode": "PROGRESSIVE",
312
+ "min_i_interval": 0,
313
+ "number_b_frames_between_reference_frames": 3,
314
+ "number_reference_frames": 3,
315
+ "par_control": "SPECIFIED",
316
+ "par_denominator": 1,
317
+ "par_numerator": 1,
318
+ "quality_tuning_level": "MULTI_PASS_HQ",
319
+ "rate_control_mode": "CBR",
320
+ "repeat_pps": "DISABLED",
321
+ "scene_change_detect": "ENABLED",
322
+ "slices": 1,
323
+ "slow_pal": "DISABLED",
324
+ "spatial_adaptive_quantization": "ENABLED",
325
+ "syntax": "DEFAULT",
326
+ "telecine": "NONE",
327
+ "temporal_adaptive_quantization": "ENABLED",
328
+ "unregistered_sei_timecode": "DISABLED"
329
+ }
330
+ },
331
+ "color_metadata": "INSERT",
332
+ "drop_frame_timecode": "ENABLED",
333
+ "height": 540,
334
+ "respond_to_afd": "NONE",
335
+ "scaling_behavior": "DEFAULT",
336
+ "sharpness": 50,
337
+ "timecode_insertion": "DISABLED",
338
+ "video_preprocessors": {
339
+ "deinterlacer": {
340
+ "algorithm": "INTERPOLATE",
341
+ "control": "NORMAL",
342
+ "mode": "DEINTERLACE"
343
+ }
344
+ },
345
+ "width": 960
346
+ }
347
+ }]
348
+ }]
349
+ },
350
+ "status": "COMPLETE",
351
+ "status_update_interval": "SECONDS_60",
352
+ "timing": {
353
+ "finish_time": "2021-07-09T13:18:56.000-05:00",
354
+ "start_time": "2021-07-09T13:08:05.000-05:00",
355
+ "submit_time": "2021-07-09T13:08:02.000-05:00"
356
+ },
357
+ "user_metadata": {}
358
+ }
359
+ }
@@ -0,0 +1 @@
1
+ {"results":[[{"field":"@message","value":"{\"version\":\"0\",\"id\":\"c150d09f-8bad-3db6-6406-c69b30c5c69f\",\"detail-type\":\"MediaConvert Job State Change\",\"source\":\"aws.mediaconvert\",\"account\":\"123456789012\",\"time\":\"2021-07-09T18:18:56Z\",\"region\":\"us-east-1\",\"resources\":[\"arn:aws:mediaconvert:us-east-1:123456789012:jobs/1625859001514-vvqfwj\"],\"detail\":{\"timestamp\":1625854736495,\"accountId\":\"123456789012\",\"queue\":\"arn:aws:mediaconvert:us-east-1:123456789012:queues/Default\",\"jobId\":\"1625859001514-vvqfwj\",\"status\":\"COMPLETE\",\"userMetadata\":{},\"outputGroupDetails\":[{\"outputDetails\":[{\"outputFilePaths\":[\"s3://output-bucket/active-encode-test/output-1080.m3u8\"],\"durationInMs\":888020,\"videoDetails\":{\"widthInPx\":1920,\"heightInPx\":1080}},{\"outputFilePaths\":[\"s3://output-bucket/active-encode-test/output-720.m3u8\"],\"durationInMs\":888020,\"videoDetails\":{\"widthInPx\":1280,\"heightInPx\":720}},{\"outputFilePaths\":[\"s3://output-bucket/active-encode-test/output-540.m3u8\"],\"durationInMs\":888020,\"videoDetails\":{\"widthInPx\":960,\"heightInPx\":540}}],\"playlistFilePaths\":[\"s3://output-bucket/active-encode-test/output.m3u8\"],\"type\":\"HLS_GROUP\"}]}}"},{"field":"@ptr","value":"CngKPwo7NjI1MDQ2NjgyNzQ2Oi9hd3MvZXZlbnRzL2FjdGl2ZS1lbmNvZGUvbWVkaWFjb252ZXJ0L0RlZmF1bHQQBRI1GhgCBezNGlcAAAAFMrrO2QAGDokwMAAAB3IgASiA7fnjqC8wgO3546gvOAFA8ghIwB5Qkg4QABgB"}]],"statistics":{"records_matched":1.0,"records_scanned":13.0,"bytes_scanned":10750.0},"status":"Complete"}
@@ -0,0 +1 @@
1
+ {"query_id":"ad46d783-9a0d-4caa-b2d5-fd2ab0af00df"}
@@ -0,0 +1 @@
1
+ {"results":[],"statistics":{"records_matched":1.0,"records_scanned":13.0,"bytes_scanned":10750.0},"status":"Complete"}
@@ -0,0 +1,408 @@
1
+ {
2
+ "job": {
3
+ "acceleration_settings": {
4
+ "mode": "DISABLED"
5
+ },
6
+ "acceleration_status": "NOT_APPLICABLE",
7
+ "arn": "arn:aws:mediaconvert:us-east-1:123456789012:jobs/1625859001514-vvqfwj",
8
+ "created_at": "2021-07-09T14:30:01.000-05:00",
9
+ "id": "1625859001514-vvqfwj",
10
+ "messages": {
11
+ "info": [
12
+
13
+ ],
14
+ "warning": [
15
+
16
+ ]
17
+ },
18
+ "priority": 0,
19
+ "queue": "arn:aws:mediaconvert:us-east-1:123456789012:queues/Default",
20
+ "role": "arn:aws:iam::123456789012:role/service-role/MediaConvert_Default_Role",
21
+ "settings": {
22
+ "inputs": [
23
+ {
24
+ "audio_selectors": {
25
+ "Audio Selector 1": {
26
+ "default_selection": "DEFAULT"
27
+ }
28
+ },
29
+ "file_input": "s3://input-bucket/test_files/source_file.mp4",
30
+ "timecode_source": "ZEROBASED",
31
+ "video_selector": {
32
+ }
33
+ }
34
+ ],
35
+ "output_groups": [
36
+ {
37
+ "output_group_settings": {
38
+ "hls_group_settings": {
39
+ "destination": "s3://output-bucket/active-encode-test/output",
40
+ "min_segment_length": 0,
41
+ "segment_control": "SEGMENTED_FILES",
42
+ "segment_length": 10
43
+ },
44
+ "type": "HLS_GROUP_SETTINGS"
45
+ },
46
+ "outputs": [
47
+ {
48
+ "audio_descriptions": [
49
+ {
50
+ "audio_type": 0,
51
+ "audio_type_control": "FOLLOW_INPUT",
52
+ "codec_settings": {
53
+ "aac_settings": {
54
+ "audio_description_broadcaster_mix": "NORMAL",
55
+ "bitrate": 128000,
56
+ "codec_profile": "LC",
57
+ "coding_mode": "CODING_MODE_2_0",
58
+ "rate_control_mode": "CBR",
59
+ "raw_format": "NONE",
60
+ "sample_rate": 48000,
61
+ "specification": "MPEG4"
62
+ },
63
+ "codec": "AAC"
64
+ },
65
+ "language_code_control": "FOLLOW_INPUT"
66
+ }
67
+ ],
68
+ "container_settings": {
69
+ "container": "M3U8",
70
+ "m3u_8_settings": {
71
+ "audio_frames_per_pes": 4,
72
+ "audio_pids": [
73
+ 482,
74
+ 483,
75
+ 484,
76
+ 485,
77
+ 486,
78
+ 487,
79
+ 488,
80
+ 489,
81
+ 490,
82
+ 491,
83
+ 492,
84
+ 493,
85
+ 494,
86
+ 495,
87
+ 496,
88
+ 497,
89
+ 498
90
+ ],
91
+ "pat_interval": 0,
92
+ "pcr_control": "PCR_EVERY_PES_PACKET",
93
+ "pmt_interval": 0,
94
+ "pmt_pid": 480,
95
+ "private_metadata_pid": 503,
96
+ "program_number": 1,
97
+ "scte_35_pid": 500,
98
+ "timed_metadata_pid": 502,
99
+ "video_pid": 481
100
+ }
101
+ },
102
+ "name_modifier": "-1080",
103
+ "preset": "System-Avc_16x9_1080p_29_97fps_8500kbps",
104
+ "video_description": {
105
+ "afd_signaling": "NONE",
106
+ "anti_alias": "ENABLED",
107
+ "codec_settings": {
108
+ "codec": "H_264",
109
+ "h264_settings": {
110
+ "adaptive_quantization": "HIGH",
111
+ "bitrate": 8500000,
112
+ "codec_level": "LEVEL_4",
113
+ "codec_profile": "HIGH",
114
+ "entropy_encoding": "CABAC",
115
+ "field_encoding": "PAFF",
116
+ "flicker_adaptive_quantization": "DISABLED",
117
+ "framerate_control": "SPECIFIED",
118
+ "framerate_conversion_algorithm": "DUPLICATE_DROP",
119
+ "framerate_denominator": 1001,
120
+ "framerate_numerator": 30000,
121
+ "gop_b_reference": "DISABLED",
122
+ "gop_closed_cadence": 1,
123
+ "gop_size": 90.0,
124
+ "gop_size_units": "FRAMES",
125
+ "hrd_buffer_initial_fill_percentage": 90,
126
+ "hrd_buffer_size": 12750000,
127
+ "interlace_mode": "PROGRESSIVE",
128
+ "min_i_interval": 0,
129
+ "number_b_frames_between_reference_frames": 1,
130
+ "number_reference_frames": 3,
131
+ "par_control": "SPECIFIED",
132
+ "par_denominator": 1,
133
+ "par_numerator": 1,
134
+ "quality_tuning_level": "MULTI_PASS_HQ",
135
+ "rate_control_mode": "CBR",
136
+ "repeat_pps": "DISABLED",
137
+ "scene_change_detect": "ENABLED",
138
+ "slices": 1,
139
+ "slow_pal": "DISABLED",
140
+ "spatial_adaptive_quantization": "ENABLED",
141
+ "syntax": "DEFAULT",
142
+ "telecine": "NONE",
143
+ "temporal_adaptive_quantization": "ENABLED",
144
+ "unregistered_sei_timecode": "DISABLED"
145
+ }
146
+ },
147
+ "color_metadata": "INSERT",
148
+ "drop_frame_timecode": "ENABLED",
149
+ "height": 1080,
150
+ "respond_to_afd": "NONE",
151
+ "scaling_behavior": "DEFAULT",
152
+ "sharpness": 50,
153
+ "timecode_insertion": "DISABLED",
154
+ "video_preprocessors": {
155
+ "deinterlacer": {
156
+ "algorithm": "INTERPOLATE",
157
+ "control": "NORMAL",
158
+ "mode": "DEINTERLACE"
159
+ }
160
+ },
161
+ "width": 1920
162
+ }
163
+ },
164
+ {
165
+ "audio_descriptions": [
166
+ {
167
+ "audio_type": 0,
168
+ "audio_type_control": "FOLLOW_INPUT",
169
+ "codec_settings": {
170
+ "aac_settings": {
171
+ "audio_description_broadcaster_mix": "NORMAL",
172
+ "bitrate": 96000,
173
+ "codec_profile": "HEV1",
174
+ "coding_mode": "CODING_MODE_2_0",
175
+ "rate_control_mode": "CBR",
176
+ "raw_format": "NONE",
177
+ "sample_rate": 48000,
178
+ "specification": "MPEG4"
179
+ },
180
+ "codec": "AAC"
181
+ },
182
+ "language_code_control": "FOLLOW_INPUT"
183
+ }
184
+ ],
185
+ "container_settings": {
186
+ "container": "M3U8",
187
+ "m3u_8_settings": {
188
+ "audio_frames_per_pes": 4,
189
+ "audio_pids": [
190
+ 482,
191
+ 483,
192
+ 484,
193
+ 485,
194
+ 486,
195
+ 487,
196
+ 488,
197
+ 489,
198
+ 490,
199
+ 491,
200
+ 492,
201
+ 493,
202
+ 494,
203
+ 495,
204
+ 496,
205
+ 497,
206
+ 498
207
+ ],
208
+ "pat_interval": 0,
209
+ "pcr_control": "PCR_EVERY_PES_PACKET",
210
+ "pmt_interval": 0,
211
+ "pmt_pid": 480,
212
+ "private_metadata_pid": 503,
213
+ "program_number": 1,
214
+ "scte_35_pid": 500,
215
+ "timed_metadata_pid": 502,
216
+ "video_pid": 481
217
+ }
218
+ },
219
+ "name_modifier": "-720",
220
+ "preset": "System-Avc_16x9_720p_29_97fps_5000kbps",
221
+ "video_description": {
222
+ "afd_signaling": "NONE",
223
+ "anti_alias": "ENABLED",
224
+ "codec_settings": {
225
+ "codec": "H_264",
226
+ "h264_settings": {
227
+ "adaptive_quantization": "HIGH",
228
+ "bitrate": 5000000,
229
+ "codec_level": "LEVEL_3_1",
230
+ "codec_profile": "MAIN",
231
+ "entropy_encoding": "CABAC",
232
+ "field_encoding": "PAFF",
233
+ "flicker_adaptive_quantization": "DISABLED",
234
+ "framerate_control": "SPECIFIED",
235
+ "framerate_conversion_algorithm": "DUPLICATE_DROP",
236
+ "framerate_denominator": 1001,
237
+ "framerate_numerator": 30000,
238
+ "gop_b_reference": "DISABLED",
239
+ "gop_closed_cadence": 1,
240
+ "gop_size": 90.0,
241
+ "gop_size_units": "FRAMES",
242
+ "hrd_buffer_initial_fill_percentage": 90,
243
+ "hrd_buffer_size": 7500000,
244
+ "interlace_mode": "PROGRESSIVE",
245
+ "min_i_interval": 0,
246
+ "number_b_frames_between_reference_frames": 1,
247
+ "number_reference_frames": 3,
248
+ "par_control": "SPECIFIED",
249
+ "par_denominator": 1,
250
+ "par_numerator": 1,
251
+ "quality_tuning_level": "MULTI_PASS_HQ",
252
+ "rate_control_mode": "CBR",
253
+ "repeat_pps": "DISABLED",
254
+ "scene_change_detect": "ENABLED",
255
+ "slices": 1,
256
+ "slow_pal": "DISABLED",
257
+ "spatial_adaptive_quantization": "ENABLED",
258
+ "syntax": "DEFAULT",
259
+ "telecine": "NONE",
260
+ "temporal_adaptive_quantization": "ENABLED",
261
+ "unregistered_sei_timecode": "DISABLED"
262
+ }
263
+ },
264
+ "color_metadata": "INSERT",
265
+ "drop_frame_timecode": "ENABLED",
266
+ "height": 720,
267
+ "respond_to_afd": "NONE",
268
+ "scaling_behavior": "DEFAULT",
269
+ "sharpness": 50,
270
+ "timecode_insertion": "DISABLED",
271
+ "video_preprocessors": {
272
+ "deinterlacer": {
273
+ "algorithm": "INTERPOLATE",
274
+ "control": "NORMAL",
275
+ "mode": "DEINTERLACE"
276
+ }
277
+ },
278
+ "width": 1280
279
+ }
280
+ },
281
+ {
282
+ "audio_descriptions": [
283
+ {
284
+ "audio_type": 0,
285
+ "audio_type_control": "FOLLOW_INPUT",
286
+ "codec_settings": {
287
+ "aac_settings": {
288
+ "audio_description_broadcaster_mix": "NORMAL",
289
+ "bitrate": 96000,
290
+ "codec_profile": "HEV1",
291
+ "coding_mode": "CODING_MODE_2_0",
292
+ "rate_control_mode": "CBR",
293
+ "raw_format": "NONE",
294
+ "sample_rate": 48000,
295
+ "specification": "MPEG4"
296
+ },
297
+ "codec": "AAC"
298
+ },
299
+ "language_code_control": "FOLLOW_INPUT"
300
+ }
301
+ ],
302
+ "container_settings": {
303
+ "container": "M3U8",
304
+ "m3u_8_settings": {
305
+ "audio_frames_per_pes": 4,
306
+ "audio_pids": [
307
+ 482,
308
+ 483,
309
+ 484,
310
+ 485,
311
+ 486,
312
+ 487,
313
+ 488,
314
+ 489,
315
+ 490,
316
+ 491,
317
+ 492,
318
+ 493,
319
+ 494,
320
+ 495,
321
+ 496,
322
+ 497,
323
+ 498
324
+ ],
325
+ "pat_interval": 0,
326
+ "pcr_control": "PCR_EVERY_PES_PACKET",
327
+ "pmt_interval": 0,
328
+ "pmt_pid": 480,
329
+ "private_metadata_pid": 503,
330
+ "program_number": 1,
331
+ "scte_35_pid": 500,
332
+ "timed_metadata_pid": 502,
333
+ "video_pid": 481
334
+ }
335
+ },
336
+ "name_modifier": "-540",
337
+ "preset": "System-Avc_16x9_540p_29_97fps_3500kbps",
338
+ "video_description": {
339
+ "afd_signaling": "NONE",
340
+ "anti_alias": "ENABLED",
341
+ "codec_settings": {
342
+ "codec": "H_264",
343
+ "h264_settings": {
344
+ "adaptive_quantization": "HIGH",
345
+ "bitrate": 3500000,
346
+ "codec_level": "LEVEL_3_1",
347
+ "codec_profile": "MAIN",
348
+ "entropy_encoding": "CABAC",
349
+ "field_encoding": "PAFF",
350
+ "flicker_adaptive_quantization": "DISABLED",
351
+ "framerate_control": "SPECIFIED",
352
+ "framerate_conversion_algorithm": "DUPLICATE_DROP",
353
+ "framerate_denominator": 1001,
354
+ "framerate_numerator": 30000,
355
+ "gop_b_reference": "DISABLED",
356
+ "gop_closed_cadence": 1,
357
+ "gop_size": 90.0,
358
+ "gop_size_units": "FRAMES",
359
+ "hrd_buffer_initial_fill_percentage": 90,
360
+ "hrd_buffer_size": 5250000,
361
+ "interlace_mode": "PROGRESSIVE",
362
+ "min_i_interval": 0,
363
+ "number_b_frames_between_reference_frames": 3,
364
+ "number_reference_frames": 3,
365
+ "par_control": "SPECIFIED",
366
+ "par_denominator": 1,
367
+ "par_numerator": 1,
368
+ "quality_tuning_level": "MULTI_PASS_HQ",
369
+ "rate_control_mode": "CBR",
370
+ "repeat_pps": "DISABLED",
371
+ "scene_change_detect": "ENABLED",
372
+ "slices": 1,
373
+ "slow_pal": "DISABLED",
374
+ "spatial_adaptive_quantization": "ENABLED",
375
+ "syntax": "DEFAULT",
376
+ "telecine": "NONE",
377
+ "temporal_adaptive_quantization": "ENABLED",
378
+ "unregistered_sei_timecode": "DISABLED"
379
+ }
380
+ },
381
+ "color_metadata": "INSERT",
382
+ "drop_frame_timecode": "ENABLED",
383
+ "height": 540,
384
+ "respond_to_afd": "NONE",
385
+ "scaling_behavior": "DEFAULT",
386
+ "sharpness": 50,
387
+ "timecode_insertion": "DISABLED",
388
+ "video_preprocessors": {
389
+ "deinterlacer": {
390
+ "algorithm": "INTERPOLATE",
391
+ "control": "NORMAL",
392
+ "mode": "DEINTERLACE"
393
+ }
394
+ },
395
+ "width": 960
396
+ }
397
+ }
398
+ ]
399
+ }
400
+ ]
401
+ },
402
+ "status": "SUBMITTED",
403
+ "status_update_interval": "SECONDS_60",
404
+ "timing": {
405
+ "submit_time": "2021-07-09T14:30:01.000-05:00"
406
+ }
407
+ }
408
+ }