@pixwel/pixwel-sdk 1.1.7 → 1.1.9

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.
@@ -1,67 +1,90 @@
1
1
  module.exports = {
2
- "File": {
3
- "track": [
4
- {
5
- "Format": "MPEG-4",
6
- "Format_profile": "QuickTime",
7
- "Codec_ID": "qt 0000.02 (qt )",
8
- "File_size": "1.11 MiB",
9
- "Duration": "10s 55ms",
10
- "Overall_bit_rate": "924 Kbps",
11
- "Encoded_date": "UTC 1904-01-01 00:00:00",
12
- "Tagged_date": "UTC 1904-01-01 00:00:00",
13
- "Writing_application": "Lavf57.83.100",
14
- "_type": "General"
15
- },
16
- {
17
- "ID": "1",
18
- "Format": "AVC",
19
- "Format_Info": "Advanced Video Codec",
20
- "Format_profile": "High@L3",
21
- "Format_settings__CABAC": "Yes",
22
- "Format_settings__ReFrames": "4 frames",
23
- "Codec_ID": "avc1",
24
- "Codec_ID_Info": "Advanced Video Coding",
25
- "Duration": "10s 10ms",
26
- "Bit_rate": "791 Kbps",
27
- "Width": "640 pixels",
28
- "Height": "360 pixels",
29
- "Display_aspect_ratio": "16:9",
30
- "Frame_rate_mode": "Constant",
31
- "Frame_rate": "23.976 (24000/1001) fps",
32
- "Color_space": "YUV",
33
- "Chroma_subsampling": "4:2:0",
34
- "Bit_depth": "8 bits",
35
- "Scan_type": "Progressive",
36
- "Bits__Pixel_Frame_": "0.143",
37
- "Stream_size": "967 KiB (85%)",
38
- "Language": "English",
39
- "Encoded_date": "UTC 1904-01-01 00:00:00",
40
- "Tagged_date": "UTC 1904-01-01 00:00:00",
41
- "_type": "Video"
42
- },
43
- {
44
- "ID": "2",
45
- "Format": "AAC",
46
- "Format_Info": "Advanced Audio Codec",
47
- "Format_profile": "LC",
48
- "Codec_ID": "40",
49
- "Duration": "10s 55ms",
50
- "Bit_rate_mode": "Constant",
51
- "Bit_rate": "129 Kbps",
52
- "Channel_s_": "2 channels",
53
- "Channel_positions": "Front: L R",
54
- "Sampling_rate": "44.1 KHz",
55
- "Frame_rate": "43.066 fps (1024 spf)",
56
- "Compression_mode": "Lossy",
57
- "Stream_size": "158 KiB (14%)",
58
- "Language": "English",
59
- "Default": "Yes",
60
- "Alternate_group": "1",
61
- "Encoded_date": "UTC 1904-01-01 00:00:00",
62
- "Tagged_date": "UTC 1904-01-01 00:00:00",
63
- "_type": "Audio"
64
- }
65
- ]
66
- }
67
- }
2
+ File: {
3
+ track: [
4
+ {
5
+ VideoCount: "1",
6
+ AudioCount: "1",
7
+ FileExtension: "mp4",
8
+ Format: "MPEG-4",
9
+ Format_Profile: "QuickTime",
10
+ CodecID: "qt",
11
+ FileSize: "1161190",
12
+ Duration: "10.055",
13
+ OverallBitRate: "923871",
14
+ FrameRate: "23.976",
15
+ FrameCount: "240",
16
+ StreamSize: "8911",
17
+ HeaderSize: "28",
18
+ DataSize: "1152287",
19
+ FooterSize: "8875",
20
+ IsStreamable: "No",
21
+ Encoded_Application: "Lavf57.83.100",
22
+ _type: "General"
23
+ },
24
+ {
25
+ StreamOrder: "0",
26
+ ID: "1",
27
+ Format: "AVC",
28
+ Format_Profile: "High",
29
+ Format_Level: "3",
30
+ Format_Settings_CABAC: "Yes",
31
+ Format_Settings_RefFrames: "4",
32
+ CodecID: "avc1",
33
+ Duration: "10.010",
34
+ BitRate: "791333",
35
+ Width: "640",
36
+ Height: "360",
37
+ Stored_Height: "368",
38
+ Sampled_Width: "640",
39
+ Sampled_Height: "360",
40
+ PixelAspectRatio: "1.000",
41
+ DisplayAspectRatio: "1.778",
42
+ Rotation: "0.000",
43
+ FrameRate_Mode: "CFR",
44
+ FrameRate_Mode_Original: "VFR",
45
+ FrameRate: "23.976",
46
+ FrameCount: "240",
47
+ ColorSpace: "YUV",
48
+ ChromaSubsampling: "4:2:0",
49
+ BitDepth: "8",
50
+ ScanType: "Progressive",
51
+ StreamSize: "990157",
52
+ Encoded_Library: "x264 - core 148 r2795 aaa9aa8",
53
+ Encoded_Library_Name: "x264",
54
+ Encoded_Library_Version: "core 148 r2795 aaa9aa8",
55
+ Encoded_Library_Settings:
56
+ "cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00",
57
+ Language: "en",
58
+ _type: "Video"
59
+ },
60
+ {
61
+ StreamOrder: "1",
62
+ ID: "2",
63
+ Format: "AAC",
64
+ Format_Profile: "LC",
65
+ Format_Settings_SBR: "No (Explicit)",
66
+ CodecID: "mp4a-40-2",
67
+ Duration: "10.055",
68
+ BitRate_Mode: "CBR",
69
+ BitRate: "128997",
70
+ Channels: "2",
71
+ ChannelPositions: "Front: L R",
72
+ ChannelLayout: "L R",
73
+ SamplesPerFrame: "1024",
74
+ SamplingRate: "44100",
75
+ SamplingCount: "443426",
76
+ FrameRate: "43.066",
77
+ FrameCount: "433",
78
+ Compression_Mode: "Lossy",
79
+ StreamSize: "162122",
80
+ StreamSize_Proportion: "0.13962",
81
+ Language: "en",
82
+ Default: "Yes",
83
+ AlternateGroup: "1",
84
+ _type: "Audio"
85
+ }
86
+ ],
87
+ _ref:
88
+ "https://pixwel-slurpee2-input-dev-west.s3.amazonaws.com/5b52055b22a1a925008b456c/MI6_TV-SPOT-INTL_TECH-INTL-20_ENG-IE_TXTD_JULY25_H264_1080p.mp4"
89
+ }
90
+ };
@@ -13,10 +13,14 @@ module.exports = {
13
13
  { name: 'txtl2', type: 'Text' },
14
14
  { name: 'h264', type: 'Codec'},
15
15
  { name: '1920x1080', type: 'Resolution'},
16
- { name: '1080p', set: ['h264', '1920x1080', 'online']}
16
+ { name: '1080p', set: ['h264', '1920x1080', 'online']},
17
+ { name: 'sub', type: 'SubDub'},
18
+ { name: 'dub', type: 'SubDub'}
17
19
  ],
18
20
 
19
21
  types: [
22
+ { name: 'film-clip', category: 'av', group: 'av' },
23
+ { name: 'featurette', category: 'av', group: 'av' },
20
24
  { name: 'trailer.us', category: 'av', group: 'av' },
21
25
  { name: 'trailer.intl', category: 'av', group: 'av'},
22
26
  { name: 'tv-spot.us', category: 'av', group: 'av' },
@@ -1,71 +1,120 @@
1
1
  module.exports = {
2
- "File": {
3
- "track": [{
4
- "Format": "MPEG-4",
5
- "Format_profile": "QuickTime",
6
- "Codec_ID": "qt 2005.03 (qt )",
7
- "File_size": "64.3 MiB",
8
- "Duration": "5s 5ms",
9
- "Overall_bit_rate_mode": "Variable",
10
- "Overall_bit_rate": "108 Mbps",
11
- "Encoded_date": "UTC 2018-06-12 01:13:24",
12
- "Tagged_date": "UTC 2018-06-12 01:13:27",
13
- "Writing_library": "Apple QuickTime",
14
- "Media_UUID": "97BAE66D-352F-412A-BEE6-67C976369B60",
15
- "_type": "General"
16
- }, {
17
- "ID": "1",
18
- "Format": "ProRes",
19
- "Format_profile": "422",
20
- "Codec_ID": "apcn",
21
- "Duration": "5s 5ms",
22
- "Bit_rate_mode": "Variable",
23
- "Bit_rate": "106 Mbps",
24
- "Width": "1 920 pixels",
25
- "Height": "1 080 pixels",
26
- "Display_aspect_ratio": "16:9",
27
- "Frame_rate_mode": "Constant",
28
- "Frame_rate": "23.976 (24000/1001) fps",
29
- "Color_space": "YUV",
30
- "Chroma_subsampling": "4:2:2",
31
- "Scan_type": "Progressive",
32
- "Bits__Pixel_Frame_": "2.123",
33
- "Stream_size": "63.0 MiB (98%)",
34
- "Language": "English",
35
- "Encoded_date": "UTC 2018-06-12 01:13:24",
36
- "Tagged_date": "UTC 2018-06-12 01:13:27",
37
- "Color_primaries": "BT.709",
38
- "Transfer_characteristics": "BT.709",
39
- "Matrix_coefficients": "BT.709",
40
- "_type": "Video"
41
- }, {
42
- "ID": "2",
43
- "Format": "PCM",
44
- "Format_settings__Endianness": "Little",
45
- "Format_settings__Sign": "Signed",
46
- "Codec_ID": "lpcm",
47
- "Duration": "5s 5ms",
48
- "Bit_rate_mode": "Constant",
49
- "Bit_rate": "2 304 Kbps",
50
- "Channel_s_": "2 channels",
51
- "Channel_positions": "Front: L R",
52
- "Sampling_rate": "48.0 KHz",
53
- "Bit_depth": "24 bits",
54
- "Stream_size": "1.37 MiB (2%)",
55
- "Language": "English",
56
- "Encoded_date": "UTC 2018-06-12 01:13:27",
57
- "Tagged_date": "UTC 2018-06-12 01:13:27",
58
- "_type": "Audio"
59
- }, {
60
- "ID": "3",
61
- "Type": "Time code",
62
- "Format": "QuickTime TC",
63
- "Duration": "5s 5ms",
64
- "Title": "untitled",
65
- "Language": "English",
66
- "Encoded_date": "UTC 2018-06-12 01:13:27",
67
- "Tagged_date": "UTC 2018-06-12 01:13:27",
68
- "_type": "Other"
69
- }]
70
- }
71
- }
2
+ File: {
3
+ track: [
4
+ {
5
+ _type: "General",
6
+ VideoCount: "1",
7
+ AudioCount: "1",
8
+ OtherCount: "1",
9
+ FileExtension: "mp4",
10
+ Format: "MPEG-4",
11
+ Format_Profile: "QuickTime",
12
+ CodecID: "qt",
13
+ FileSize: "132980532",
14
+ Duration: "6.006",
15
+ OverallBitRate_Mode: "VBR",
16
+ OverallBitRate: "177130240",
17
+ FrameRate: "23.976",
18
+ FrameCount: "144",
19
+ StreamSize: "1048580",
20
+ HeaderSize: "1048568",
21
+ DataSize: "131931964",
22
+ FooterSize: "0",
23
+ IsStreamable: "Yes",
24
+ Encoded_Date: "UTC 2018-01-31 17:35:26",
25
+ Tagged_Date: "UTC 2018-01-31 17:36:10",
26
+ File_Modified_Date: "UTC 2018-07-02 23:18:18",
27
+ File_Modified_Date_Local: "2018-07-02 18:18:18",
28
+ Encoded_Library: "Apple QuickTime",
29
+ Encoded_Library_Name: "Apple QuickTime",
30
+ extra: {
31
+ TIM: "01:00:00:00",
32
+ TSC: "24000",
33
+ TSZ: "1001"
34
+ }
35
+ },
36
+ {
37
+ _type: "Video",
38
+ StreamOrder: "0",
39
+ ID: "1",
40
+ Format: "ProRes",
41
+ Format_Version: "0",
42
+ Format_Profile: "422 HQ",
43
+ CodecID: "apch",
44
+ Duration: "6.006",
45
+ BitRate_Mode: "VBR",
46
+ BitRate: "173429362",
47
+ Width: "1920",
48
+ Height: "1080",
49
+ PixelAspectRatio: "1.000",
50
+ DisplayAspectRatio: "1.778",
51
+ Rotation: "0.000",
52
+ FrameRate_Mode: "CFR",
53
+ FrameRate: "23.976",
54
+ FrameCount: "144",
55
+ ColorSpace: "YUV",
56
+ ChromaSubsampling: "4:2:2",
57
+ ScanType: "Progressive",
58
+ Delay: "3600.000",
59
+ StreamSize: "130202224",
60
+ Encoded_Library: "aut0",
61
+ Language: "en",
62
+ Encoded_Date: "UTC 2018-01-31 17:35:26",
63
+ Tagged_Date: "UTC 2018-01-31 17:35:26",
64
+ colour_description_present: "Yes",
65
+ colour_primaries: "BT.709",
66
+ transfer_characteristics: "BT.709",
67
+ matrix_coefficients: "BT.709",
68
+ colour_description_present_Original: "Yes",
69
+ matrix_coefficients_Original: "BT.709",
70
+ extra: {
71
+ Menus: "0"
72
+ }
73
+ },
74
+ {
75
+ _type: "Audio",
76
+ StreamOrder: "1",
77
+ ID: "2",
78
+ Format: "PCM",
79
+ Format_Settings_Endianness: "Little",
80
+ Format_Settings_Sign: "Signed",
81
+ CodecID: "in24",
82
+ Duration: "6.006",
83
+ BitRate_Mode: "CBR",
84
+ BitRate: "2304000",
85
+ Channels: "2",
86
+ ChannelPositions: "Front: L R",
87
+ ChannelLayout: "L R",
88
+ SamplingRate: "48000",
89
+ SamplingCount: "288288",
90
+ BitDepth: "24",
91
+ Delay: "3600.000",
92
+ Delay_DropFrame: "No",
93
+ Delay_Source: "Container",
94
+ StreamSize: "1729728",
95
+ StreamSize_Proportion: "0.01301",
96
+ Language: "en",
97
+ Encoded_Date: "UTC 2018-01-31 17:35:26",
98
+ Tagged_Date: "UTC 2018-01-31 17:35:26",
99
+ extra: {
100
+ Menus: "0"
101
+ }
102
+ },
103
+ {
104
+ _type: "Other",
105
+ StreamOrder: "2",
106
+ ID: "3",
107
+ Type: "Time code",
108
+ Format: "QuickTime TC",
109
+ Duration: "6.006",
110
+ TimeCode_FirstFrame: "01:00:00:00",
111
+ TimeCode_Striped: "Yes",
112
+ Language: "en",
113
+ extra: {
114
+ Encoded_Date: "UTC 2018-01-31 17:35:26",
115
+ Tagged_Date: "UTC 2018-01-31 17:35:26"
116
+ }
117
+ }
118
+ ]
119
+ }
120
+ };
File without changes
@@ -1,178 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
8
-
9
- var _pixwelSdk = require("@pixwel/pixwel-sdk");
10
-
11
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
-
13
- /**
14
- * Collects file handles from HTML5, full paths from Aspera, inspects
15
- * the dropped file using mediainfo, then renames the file according to
16
- * the data from Mediainfo and the Order and submits it for upload.
17
- * @type {Object}
18
- */
19
- var IngestFileDrop = function () {
20
- /**
21
- * Map that contains data from HTML5 file drop and Aspera file drop
22
- * @type {Object}
23
- */
24
- function IngestFileDrop(scope, Mediainfo, IngestUpload) {
25
- _classCallCheck(this, IngestFileDrop);
26
-
27
- this.map = {};
28
- this.scope = scope;
29
- this.IngestUpload = IngestUpload;
30
- this.Mediainfo = Mediainfo;
31
- this.asperaDropHandler = this.asperaDropHandler.bind(this);
32
- this.htmlDropHandler = this.htmlDropHandler.bind(this);
33
- }
34
- /**
35
- * HTML file drop handler
36
- * @param {[type]} e [description]
37
- * @return {[type]} [description]
38
- */
39
-
40
-
41
- _createClass(IngestFileDrop, [{
42
- key: "htmlDropHandler",
43
- value: function htmlDropHandler(e) {
44
- var files = e.dataTransfer.files;
45
- for (var i = 0; i < files.length; i++) {
46
- this.registerHtmlFile(files[i]);
47
- }
48
- }
49
- /**
50
- * Aspera drop handler
51
- * @param {[type]} data [description]
52
- * @return {[type]} [description]
53
- */
54
-
55
- }, {
56
- key: "asperaDropHandler",
57
- value: function asperaDropHandler(data) {
58
- var that = this;
59
- var files = data.files.dataTransfer.files;
60
- if (!files.length) {
61
- return;
62
- }
63
- for (var i = 0; i < files.length; i++) {
64
- this.registerAsperaFile(files[i]);
65
- }
66
- return Promise.all(this.export()).then(function (renamed) {
67
- that.IngestUpload.uploadFiles(renamed, {}).then(function () {
68
- that.map = {};
69
- });
70
- });
71
- }
72
- /**
73
- * Registers and HTML file drop
74
- * @param {[type]} file [description]
75
- * @return {[type]} [description]
76
- */
77
-
78
- }, {
79
- key: "registerHtmlFile",
80
- value: function registerHtmlFile(file) {
81
- this.map[file.name] = file;
82
- }
83
- /**
84
- * Registers and Aspera file drop
85
- * @param {[type]} file [description]
86
- * @return {[type]} [description]
87
- */
88
-
89
- }, {
90
- key: "registerAsperaFile",
91
- value: function registerAsperaFile(file) {
92
- var basename = this.getBasename(file);
93
- this.map[basename]["path"] = file.name;
94
- }
95
- /**
96
- * Gets correct basename for MacOS and Windows
97
- * @param {[type]} file [description]
98
- * @return {[type]} [description]
99
- */
100
-
101
- }, {
102
- key: "getBasename",
103
- value: function getBasename(file) {
104
- return file.name[0] === "/" ? file.name.split("/").pop() : file.name.split("\\").pop();
105
- }
106
- /**
107
- * Renames and generates ingest record for internal filemap
108
- * @return {[type]} [description]
109
- */
110
-
111
- }, {
112
- key: "export",
113
- value: function _export() {
114
- var that = this;
115
- return Object.values(this.map).map(function (file) {
116
- return that.rename(file);
117
- });
118
- }
119
- /**
120
- * Renames the file and decorates it with ingest data using data from
121
- * mediainfo and the Order
122
- * @param {[type]} file [description]
123
- * @return {[type]} [description]
124
- */
125
-
126
- }, {
127
- key: "rename",
128
- value: function rename(file) {
129
- var that = this;
130
- return this.Mediainfo.inform(file).then(function (meta) {
131
- var order = void 0;
132
- var asset = void 0;
133
- var mediaType = file.type.split("/")[0];
134
-
135
- var tags = _pixwelSdk.Ingest.mapMetaToTags(meta, mediaType);
136
-
137
- if (!that.scope.workRequest) {
138
- order = new _pixwelSdk.Order();
139
- asset = new _pixwelSdk.Asset();
140
- tags.Text = "txtd";
141
- file.ingest = _pixwelSdk.Ingest.mapFromKnownData(that.scope.context, order, tags, that.scope.watermarks);
142
- return file;
143
- }
144
-
145
- order = new _pixwelSdk.Order(that.scope.workRequest);
146
- asset = _pixwelSdk.Asset.mapFromOrder(order);
147
-
148
- var options = {
149
- tags: tags,
150
- country: order.country,
151
- language: order.language
152
- };
153
-
154
- if (that.scope.request && that.scope.request.tag) {
155
- options.tags.Extra = [that.scope.request.tag.replace(" ", "-")];
156
- }
157
-
158
- options.tags.SubDub = {
159
- sub: order.isSub(),
160
- dub: order.isDub()
161
- };
162
- if (!order.isSub() && !order.isDub()) {
163
- options.tags.Text = "txtd";
164
- }
165
-
166
- var basename = _pixwelSdk.Filename.render(that.scope.tags, that.scope.assetTypes, asset, options, mediaType);
167
- var extension = file.name.split(".").pop();
168
- file.renderedName = basename + "." + extension;
169
- file.ingest = _pixwelSdk.Ingest.mapFromKnownData(that.scope.context, order, tags, that.scope.watermarks);
170
- return file;
171
- });
172
- }
173
- }]);
174
-
175
- return IngestFileDrop;
176
- }();
177
-
178
- exports.default = IngestFileDrop;