DefaultMediaConvertJobSettings   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 168
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 125
dl 0
loc 168
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
B get() 0 166 1
1
<?php
2
3
namespace Meema\MediaConverter\Support;
4
5
class DefaultMediaConvertJobSettings
6
{
7
    public static function get(): array
8
    {
9
        return [
10
            'OutputGroups' => [
11
                [
12
                    'CustomName' => 'Thumbnails',
13
                    'Name' => 'File Group',
14
                    'Outputs' => [
15
                        [
16
                            'ContainerSettings' => [
17
                                'Container' => 'RAW',
18
                            ],
19
                            'VideoDescription' => [
20
                                'ScalingBehavior' => 'DEFAULT',
21
                                'TimecodeInsertion' => 'DISABLED',
22
                                'AntiAlias' => 'ENABLED',
23
                                'Sharpness' => 50,
24
                                'CodecSettings' => [
25
                                    'Codec' => 'FRAME_CAPTURE',
26
                                    'FrameCaptureSettings' => [
27
                                        'FramerateNumerator' => null, // to be set dynamically
28
                                        'FramerateDenominator' => null, // to be set dynamically
29
                                        'MaxCaptures' => null, // to be set dynamically
30
                                        'Quality' => null, // to be set dynamically
31
                                    ],
32
                                ],
33
                                'AfdSignaling' => 'NONE',
34
                                'DropFrameTimecode' => 'ENABLED',
35
                                'RespondToAfd' => 'NONE',
36
                                'ColorMetadata' => 'INSERT',
37
                                'Width' => null, // to be set dynamically
38
                            ],
39
                        ],
40
                    ],
41
                    'OutputGroupSettings' => [
42
                        'Type' => 'FILE_GROUP_SETTINGS',
43
                        'FileGroupSettings' => [
44
                            'Destination' => null, // to be set dynamically
45
                            'DestinationSettings' => [
46
                                'S3Settings' => [
47
                                    'AccessControl' => [
48
                                        'CannedAcl' => 'PUBLIC_READ',
49
                                    ],
50
                                ],
51
                            ],
52
                        ],
53
                    ],
54
                ],
55
                [
56
                    'CustomName' => 'MP4',
57
                    'Name' => 'File Group',
58
                    'Outputs' => [
59
                        [
60
                            'ContainerSettings' => [
61
                                'Container' => 'MP4',
62
                                'Mp4Settings' => [
63
                                    'CslgAtom' => 'INCLUDE',
64
                                    'FreeSpaceBox' => 'EXCLUDE',
65
                                    'MoovPlacement' => 'PROGRESSIVE_DOWNLOAD',
66
                                ],
67
                            ],
68
                            'VideoDescription' => [
69
                                'ScalingBehavior' => 'DEFAULT',
70
                                'TimecodeInsertion' => 'DISABLED',
71
                                'AntiAlias' => 'ENABLED',
72
                                'Sharpness' => 50,
73
                                'CodecSettings' => [
74
                                    'Codec' => 'H_264',
75
                                    'H264Settings' => [
76
                                        'InterlaceMode' => 'PROGRESSIVE',
77
                                        'NumberReferenceFrames' => 3,
78
                                        'Syntax' => 'DEFAULT',
79
                                        'Softness' => 0,
80
                                        'GopClosedCadence' => 1,
81
                                        'GopSize' => 90,
82
                                        'Slices' => 1,
83
                                        'GopBReference' => 'DISABLED',
84
                                        'MaxBitrate' => 8000000,
85
                                        'SlowPal' => 'DISABLED',
86
                                        'SpatialAdaptiveQuantization' => 'ENABLED',
87
                                        'TemporalAdaptiveQuantization' => 'ENABLED',
88
                                        'FlickerAdaptiveQuantization' => 'DISABLED',
89
                                        'EntropyEncoding' => 'CABAC',
90
                                        'FramerateControl' => 'INITIALIZE_FROM_SOURCE',
91
                                        'RateControlMode' => 'QVBR',
92
                                        'QvbrSettings' => [
93
                                            'QvbrQualityLevel' => 7,
94
                                            'QvbrQualityLevelFineTune' => 0,
95
                                        ],
96
                                        'CodecProfile' => 'MAIN',
97
                                        'Telecine' => 'NONE',
98
                                        'MinIInterval' => 0,
99
                                        'AdaptiveQuantization' => 'HIGH',
100
                                        'CodecLevel' => 'AUTO',
101
                                        'FieldEncoding' => 'PAFF',
102
                                        'SceneChangeDetect' => 'ENABLED',
103
                                        'QualityTuningLevel' => 'SINGLE_PASS',
104
                                        'FramerateConversionAlgorithm' => 'DUPLICATE_DROP',
105
                                        'UnregisteredSeiTimecode' => 'DISABLED',
106
                                        'GopSizeUnits' => 'FRAMES',
107
                                        'ParControl' => 'INITIALIZE_FROM_SOURCE',
108
                                        'NumberBFramesBetweenReferenceFrames' => 2,
109
                                        'RepeatPps' => 'DISABLED',
110
                                    ],
111
                                ],
112
                                'AfdSignaling' => 'NONE',
113
                                'DropFrameTimecode' => 'ENABLED',
114
                                'RespondToAfd' => 'NONE',
115
                                'ColorMetadata' => 'INSERT',
116
                            ],
117
                            'AudioDescriptions' => [
118
                                [
119
                                    'AudioTypeControl' => 'FOLLOW_INPUT',
120
                                    'CodecSettings' => [
121
                                        'Codec' => 'AAC',
122
                                        'AacSettings' => [
123
                                            'AudioDescriptionBroadcasterMix' => 'NORMAL',
124
                                            'Bitrate' => 96000,
125
                                            'RateControlMode' => 'CBR',
126
                                            'CodecProfile' => 'LC',
127
                                            'CodingMode' => 'CODING_MODE_2_0',
128
                                            'RawFormat' => 'NONE',
129
                                            'SampleRate' => 48000,
130
                                            'Specification' => 'MPEG4',
131
                                        ],
132
                                    ],
133
                                    'LanguageCodeControl' => 'FOLLOW_INPUT',
134
                                ],
135
                            ],
136
                        ],
137
                    ],
138
                    'OutputGroupSettings' => [
139
                        'Type' => 'FILE_GROUP_SETTINGS',
140
                        'FileGroupSettings' => [
141
                            'Destination' => null, // to be set dynamically
142
                            'DestinationSettings' => [
143
                                'S3Settings' => [
144
                                    'AccessControl' => [
145
                                        'CannedAcl' => 'PUBLIC_READ',
146
                                    ],
147
                                ],
148
                            ],
149
                        ],
150
                    ],
151
                ],
152
            ],
153
            'AdAvailOffset' => 0,
154
            'Inputs' => [
155
                [
156
                    'AudioSelectors' => [
157
                        'Audio Selector 1' => [
158
                            'Offset' => 0,
159
                            'DefaultSelection' => 'DEFAULT',
160
                            'ProgramSelection' => 1,
161
                        ],
162
                    ],
163
                    'VideoSelector' => [
164
                        'ColorSpace' => 'FOLLOW',
165
                    ],
166
                    'FilterEnable' => 'AUTO',
167
                    'PsiControl' => 'USE_PSI',
168
                    'FilterStrength' => 0,
169
                    'DeblockFilter' => 'DISABLED',
170
                    'DenoiseFilter' => 'DISABLED',
171
                    'TimecodeSource' => 'EMBEDDED',
172
                    'FileInput' => null, // to be set dynamically
173
                ],
174
            ],
175
        ];
176
    }
177
}
178