-
Notifications
You must be signed in to change notification settings - Fork 22
/
settings.py
223 lines (216 loc) · 8.58 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# Clairmeta - (C) YMAGIS S.A.
# See LICENSE for more information
import os
LOG_SETTINGS = {
"level": os.getenv("CLAIRMETA_LOG_LEVEL", "INFO"),
"enable_console": os.getenv("CLAIRMETA_LOG_CONSOLE", "ON"),
"enable_file": os.getenv("CLAIRMETA_LOG_FILE", "OFF"),
"file_name": os.getenv("CLAIRMETA_LOG_FILE_NAME", ""),
"file_size": os.getenv("CLAIRMETA_LOG_FILE_SIZE", 1e6),
"file_count": os.getenv("CLAIRMETA_LOG_FILE_COUNT", 10),
}
DCP_SETTINGS = {
# ISDCF Naming Convention enforced
"naming_convention": "9.6",
# Recognized XML namespaces
"xmlns": {
"xml": "http://www.w3.org/XML/1998/namespace",
"xmldsig": "http://www.w3.org/2000/09/xmldsig#",
"cpl_metadata_href": "http://isdcf.com/schemas/draft/2011/cpl-metadata",
"interop_pkl": "http://www.digicine.com/PROTO-ASDCP-PKL-20040311#",
"interop_cpl": "http://www.digicine.com/PROTO-ASDCP-CPL-20040511#",
"interop_am": "http://www.digicine.com/PROTO-ASDCP-AM-20040311#",
"interop_vl": "http://www.digicine.com/PROTO-ASDCP-VL-20040311#",
"interop_stereo": "http://www.digicine.com/schemas/437-Y/2007/Main-Stereo-Picture-CPL",
"interop_subtitle": "interop_subtitle",
"interop_cc_cpl": "http://www.digicine.com/PROTO-ASDCP-CC-CPL-20070926#",
"smpte_pkl_2006": "http://www.smpte-ra.org/schemas/429-8/2006/PKL",
"smpte_pkl_2007": "http://www.smpte-ra.org/schemas/429-8/2007/PKL",
"smpte_cpl": "http://www.smpte-ra.org/schemas/429-7/2006/CPL",
"smpte_cpl_metadata": "http://www.smpte-ra.org/schemas/429-16/2014/CPL-Metadata",
"smpte_am_2006": "http://www.smpte-ra.org/schemas/429-9/2006/AM",
"smpte_am_2007": "http://www.smpte-ra.org/schemas/429-9/2007/AM",
"smpte_stereo_2007": "http://www.smpte-ra.org/schemas/429-10/2007/Main-Stereo-Picture-CPL",
"smpte_stereo_2008": "http://www.smpte-ra.org/schemas/429-10/2008/Main-Stereo-Picture-CPL",
"smpte_subtitles_2007": "http://www.smpte-ra.org/schemas/428-7/2007/DCST",
"smpte_subtitles_2010": "http://www.smpte-ra.org/schemas/428-7/2010/DCST",
"smpte_subtitles_2014": "http://www.smpte-ra.org/schemas/428-7/2014/DCST",
"smpte_tt": "http://www.smpte-ra.org/schemas/429-12/2008/TT",
"smpte_etm": "http://www.smpte-ra.org/schemas/430-3/2006/ETM",
"smpte_kdm": "http://www.smpte-ra.org/schemas/430-1/2006/KDM",
"atmos": "http://www.dolby.com/schemas/2012/AD",
},
# Recognized XML identifiers
"xmluri": {
"interop_sig": "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
"smpte_sig": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
"enveloped_sig": "http://www.w3.org/2000/09/xmldsig#enveloped-signature",
"c14n": "http://www.w3.org/TR/2001/REC-xml-c14n-20010315",
"sha1": "http://www.w3.org/2000/09/xmldsig#sha1",
"dolby_edr": "http://www.dolby.com/schemas/2014/EDR-Metadata",
"eidr": "http://eidr.org/EIDR/2016",
},
"picture": {
# Standard resolutions
"resolutions": {
"2K": ["1998x1080", "2048x858", "2048x1080"],
"4K": ["3996x2160", "4096x1716", "4096x2160"],
"HD": ["1920x1080"],
"UHD": ["3840x2160"],
},
# Valid pixel array sizes according to SMPTE RDD 52:2020
"pixel_array_sizes": {
"2K": ["1998x1080", "2048x858"],
"4K": ["3996x2160", "4096x1716"],
},
# Standard editrate
"editrates": {
"2K": {"2D": [24, 25, 30, 48, 50, 60], "3D": [24, 25, 30, 48, 50, 60]},
"4K": {"2D": [24, 25, 30], "3D": []},
},
# Archival editrate
"editrates_archival": [16, 200.0 / 11, 20, 240.0 / 11],
# HFR capable quipements (projection servers)
"editrates_min_series2": {
"2D": 96,
"3D": 48,
},
# Standard aspect ratio
"aspect_ratio": {
"F": {"ratio": 1.85, "resolutions": ["1998x1080", "3996x2160"]},
"S": {"ratio": 2.39, "resolutions": ["2048x858", "4096x1716"]},
"C": {"ratio": 1.90, "resolutions": ["2048x1080", "4096x2160"]},
},
# For metadata tagging, decoupled from bitrate thresholds
"min_hfr_editrate": 48,
# As stated in http://www.dcimovies.com/Recommended_Practice/
# These are in Mb/s
# Note : asdcplib use a 400Mb/s threshold for HFR, why ?
"max_dci_bitrate": 250,
"max_hfr_bitrate": 500,
"max_dvi_bitrate": 400,
"min_editrate_hfr_bitrate": {
"2K": {"2D": 60, "3D": 48},
"4K": {"2D": 48, "3D": 0},
},
# We allow a small offset above DCI specification :
# asdcplib use a method of computation that can only give an
# approximation (worst case scenario) of the actual max bitrate.
# asdcplib basically find the biggest frame in the whole track and
# multiply it by the editrate.
# Note : DCI specification seems to limit individual j2c frame size,
# the method used by asdcplib should be valid is this regard, it seems
# that the observed bitrate between 250 and 250.05 are due to the
# encryption overhead in the KLV packaging.
"bitrate_tolerance": 0.05,
# This is a percentage below max_bitrate
"average_bitrate_margin": 2.0,
# As stated in SMPTE 429-2
"dwt_levels_2k": 5,
"dwt_levels_4k": 6,
},
"sound": {
"sampling_rate": [48000, 96000],
"max_channel_count": 16,
"quantization": 24,
# This maps SMPTE 429-2 AudioDescriptor.ChannelFormat to a label and
# a min / max number of allowed channels.
# See. Section A.1.2 'Channel Configuration Tables'
"configuration_channels": {
1: ("5.1 with optional HI/VI", 6, 8),
2: ("6.1 (5.1 + center surround) with optional HI/VI", 7, 10),
3: ("7.1 (SDDS) with optional HI/VI", 8, 10),
4: ("Wild Track Format", 1, 16),
5: ("7.1 DS with optional HI/VI", 8, 10),
},
"format_channels": {
"10": 1,
"20": 2,
"51": 6,
"61": 7,
"71": 8,
"11.1": 12,
},
},
"atmos": {
"max_channel_count": 64,
"max_object_count": 118,
"smpte_ul": "060e2b34.04010105.0e090604.00000000",
},
"subtitle": {
# In bytes
"font_max_size": 655360,
},
}
DCP_CHECK_SETTINGS = {
# List of check modules for DCP check, these modules will be imported
# dynamically during the check process.
"module_prefix": "dcp_check_",
"modules": {
"global": "Global checks",
"vol": "VolIndex checks",
"am": "AssetMap checks",
"pkl": "PackingList checks",
"cpl": "CompositionPlayList checks",
"sign": "Digital signature checks",
"isdcf_dcnc": "Naming Convention checks",
"picture": "Picture essence checks",
"sound": "Sound essence checks",
"subtitle": "Subtitle essence checks",
"atmos": "Atmos essence checks",
},
}
IMP_SETTINGS = {
"xmlns": {
"xmldsig": "http://www.w3.org/2000/09/xmldsig#",
"imp_am": "http://www.smpte-ra.org/schemas/429-9/2007/AM",
"imp_pkl": "http://www.smpte-ra.org/schemas/429-8/2007/PKL",
"imp_opl": "http://www.smpte-ra.org/schemas/2067-100/",
"imp_cpl": "http://www.smpte-ra.org/schemas/2067-3/",
}
}
SEQUENCE_SETTINGS = {
"ALL": {
# In percentage
"size_diff_tol": 2.5,
},
"SCAN": {
"allowed_extensions": {
".dpx": {
"Format": "DPX",
},
".cri": {},
},
"directory_white_list": [".thumbnails"],
"file_white_list": [".DS_Store"],
},
"DSM": {
"allowed_extensions": {
".dpx": {
"Format": "DPX",
},
".tiff": {"Format": "TIFF"},
".tif": {"Format": "TIFF"},
".exr": {"Format": "EXR"},
".cin": {},
},
"directory_white_list": [".thumbnails"],
"file_white_list": [".DS_Store"],
},
"DCDM": {
"allowed_extensions": {
".tiff": {
"Format": "TIFF",
"ProbeImage.ColorSpace": ["RGB", "XYZ"],
"ProbeImage.BitDepth": "16",
},
".tif": {
"Format": "TIFF",
"ProbeImage.ColorSpace": ["RGB", "XYZ"],
"ProbeImage.BitDepth": "16",
},
},
"directory_white_list": [".thumbnails"],
"file_white_list": [".DS_Store"],
},
}