@editframe/assets 0.6.0-beta.1

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.
Files changed (35) hide show
  1. package/dist/lib/av/MP4File.cjs +182 -0
  2. package/dist/lib/av/MP4File.js +165 -0
  3. package/dist/lib/util/execPromise.cjs +6 -0
  4. package/dist/lib/util/execPromise.js +6 -0
  5. package/dist/packages/assets/src/Probe.cjs +193 -0
  6. package/dist/packages/assets/src/Probe.d.ts +627 -0
  7. package/dist/packages/assets/src/Probe.js +176 -0
  8. package/dist/packages/assets/src/VideoRenderOptions.cjs +36 -0
  9. package/dist/packages/assets/src/VideoRenderOptions.d.ts +169 -0
  10. package/dist/packages/assets/src/VideoRenderOptions.js +36 -0
  11. package/dist/packages/assets/src/idempotentTask.cjs +57 -0
  12. package/dist/packages/assets/src/idempotentTask.d.ts +13 -0
  13. package/dist/packages/assets/src/idempotentTask.js +57 -0
  14. package/dist/packages/assets/src/index.cjs +20 -0
  15. package/dist/packages/assets/src/index.d.ts +9 -0
  16. package/dist/packages/assets/src/index.js +20 -0
  17. package/dist/packages/assets/src/md5.cjs +60 -0
  18. package/dist/packages/assets/src/md5.d.ts +6 -0
  19. package/dist/packages/assets/src/md5.js +60 -0
  20. package/dist/packages/assets/src/mp4FileWritable.cjs +21 -0
  21. package/dist/packages/assets/src/mp4FileWritable.d.ts +4 -0
  22. package/dist/packages/assets/src/mp4FileWritable.js +21 -0
  23. package/dist/packages/assets/src/tasks/cacheImage.cjs +22 -0
  24. package/dist/packages/assets/src/tasks/cacheImage.d.ts +1 -0
  25. package/dist/packages/assets/src/tasks/cacheImage.js +22 -0
  26. package/dist/packages/assets/src/tasks/findOrCreateCaptions.cjs +26 -0
  27. package/dist/packages/assets/src/tasks/findOrCreateCaptions.d.ts +1 -0
  28. package/dist/packages/assets/src/tasks/findOrCreateCaptions.js +26 -0
  29. package/dist/packages/assets/src/tasks/generateTrack.cjs +52 -0
  30. package/dist/packages/assets/src/tasks/generateTrack.d.ts +1 -0
  31. package/dist/packages/assets/src/tasks/generateTrack.js +52 -0
  32. package/dist/packages/assets/src/tasks/generateTrackFragmentIndex.cjs +75 -0
  33. package/dist/packages/assets/src/tasks/generateTrackFragmentIndex.d.ts +1 -0
  34. package/dist/packages/assets/src/tasks/generateTrackFragmentIndex.js +75 -0
  35. package/package.json +31 -0
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const MP4Box = require("mp4box");
4
+ function _interopNamespaceDefault(e) {
5
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
6
+ if (e) {
7
+ for (const k in e) {
8
+ if (k !== "default") {
9
+ const d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: () => e[k]
13
+ });
14
+ }
15
+ }
16
+ }
17
+ n.default = e;
18
+ return Object.freeze(n);
19
+ }
20
+ const MP4Box__namespace = /* @__PURE__ */ _interopNamespaceDefault(MP4Box);
21
+ class MP4File extends MP4Box__namespace.ISOFile {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.readyPromise = new Promise((resolve, reject) => {
25
+ this.onReady = () => resolve();
26
+ this.onError = reject;
27
+ });
28
+ this.waitingForSamples = [];
29
+ this._hasSeenLastSamples = false;
30
+ this._arrayBufferFileStart = 0;
31
+ }
32
+ setSegmentOptions(id, user, options) {
33
+ const trak = this.getTrackById(id);
34
+ if (trak) {
35
+ trak.nextSample = 0;
36
+ this.fragmentedTracks.push({
37
+ id,
38
+ user,
39
+ trak,
40
+ segmentStream: null,
41
+ nb_samples: "nbSamples" in options && options.nbSamples || 1e3,
42
+ rapAlignement: ("rapAlignement" in options && options.rapAlignement) ?? true
43
+ });
44
+ }
45
+ }
46
+ /**
47
+ * Fragments all tracks in a file into separate array buffers.
48
+ */
49
+ async fragmentAllTracks() {
50
+ const trackBuffers = {};
51
+ for await (const segment of this.fragmentIterator()) {
52
+ (trackBuffers[segment.track] ??= []).push(segment.data);
53
+ }
54
+ return trackBuffers;
55
+ }
56
+ async *fragmentIterator() {
57
+ await this.readyPromise;
58
+ const trackInfo = {};
59
+ for (const videoTrack of this.getInfo().videoTracks) {
60
+ trackInfo[videoTrack.id] = { index: 0, complete: false };
61
+ this.setSegmentOptions(videoTrack.id, null, {
62
+ rapAlignement: true
63
+ });
64
+ }
65
+ for (const audioTrack of this.getInfo().audioTracks) {
66
+ trackInfo[audioTrack.id] = { index: 0, complete: false };
67
+ const sampleRate = audioTrack.audio.sample_rate;
68
+ const probablePacketSize = 1024;
69
+ const probableFourSecondsOfSamples = Math.ceil(
70
+ sampleRate / probablePacketSize * 4
71
+ );
72
+ this.setSegmentOptions(audioTrack.id, null, {
73
+ nbSamples: probableFourSecondsOfSamples
74
+ });
75
+ }
76
+ const initSegments = this.initializeSegmentation();
77
+ for (const initSegment of initSegments) {
78
+ yield {
79
+ track: initSegment.id,
80
+ segment: "init",
81
+ data: initSegment.buffer,
82
+ complete: false
83
+ };
84
+ }
85
+ const fragmentStartSamples = {};
86
+ let finishedReading = false;
87
+ const allTracksFinished = () => {
88
+ for (const fragmentedTrack of this.fragmentedTracks) {
89
+ if (!trackInfo[fragmentedTrack.id]?.complete) {
90
+ return false;
91
+ }
92
+ }
93
+ return true;
94
+ };
95
+ while (!(finishedReading && allTracksFinished())) {
96
+ for (const fragTrak of this.fragmentedTracks) {
97
+ const trak = fragTrak.trak;
98
+ if (trak.nextSample === void 0) {
99
+ throw new Error("trak.nextSample is undefined");
100
+ }
101
+ if (trak.samples === void 0) {
102
+ throw new Error("trak.samples is undefined");
103
+ }
104
+ while (trak.nextSample < trak.samples.length) {
105
+ let result = void 0;
106
+ const fragTrakNextSample = trak.samples[trak.nextSample];
107
+ if (fragTrakNextSample) {
108
+ fragmentStartSamples[fragTrak.id] ||= fragTrakNextSample;
109
+ }
110
+ try {
111
+ result = this.createFragment(
112
+ fragTrak.id,
113
+ trak.nextSample,
114
+ fragTrak.segmentStream
115
+ );
116
+ } catch (error) {
117
+ console.log("Failed to createFragment", error);
118
+ }
119
+ if (result) {
120
+ fragTrak.segmentStream = result;
121
+ trak.nextSample++;
122
+ } else {
123
+ finishedReading = await this.waitForMoreSamples();
124
+ break;
125
+ }
126
+ const nextSample = trak.samples[trak.nextSample];
127
+ const emitSegment = (
128
+ // if rapAlignement is true, we emit a fragment when we have a rap sample coming up next
129
+ fragTrak.rapAlignement === true && nextSample?.is_sync || // if rapAlignement is false, we emit a fragment when we have the required number of samples
130
+ !fragTrak.rapAlignement && trak.nextSample % fragTrak.nb_samples === 0 || // // if this is the last sample, we emit the fragment
131
+ // finished ||
132
+ // if we have more samples than the number of samples requested, we emit the fragment
133
+ trak.nextSample >= trak.samples.length
134
+ );
135
+ if (emitSegment) {
136
+ const trackInfoForFrag = trackInfo[fragTrak.id];
137
+ if (!trackInfoForFrag) {
138
+ throw new Error("trackInfoForFrag is undefined");
139
+ }
140
+ if (trak.nextSample >= trak.samples.length) {
141
+ trackInfoForFrag.complete = true;
142
+ }
143
+ const startSample = fragmentStartSamples[fragTrak.id];
144
+ const endSample = trak.samples[trak.nextSample - 1];
145
+ if (!startSample || !endSample) {
146
+ throw new Error("startSample or endSample is undefined");
147
+ }
148
+ yield {
149
+ track: fragTrak.id,
150
+ segment: trackInfoForFrag.index,
151
+ data: fragTrak.segmentStream.buffer,
152
+ complete: trackInfoForFrag.complete,
153
+ cts: startSample.cts,
154
+ dts: startSample.dts,
155
+ duration: endSample.dts - startSample.dts + endSample.duration
156
+ };
157
+ trackInfoForFrag.index += 1;
158
+ fragTrak.segmentStream = null;
159
+ delete fragmentStartSamples[fragTrak.id];
160
+ }
161
+ }
162
+ }
163
+ finishedReading = await this.waitForMoreSamples();
164
+ }
165
+ }
166
+ waitForMoreSamples() {
167
+ if (this._hasSeenLastSamples) {
168
+ return Promise.resolve(true);
169
+ }
170
+ return new Promise((resolve) => {
171
+ this.waitingForSamples.push(resolve);
172
+ });
173
+ }
174
+ processSamples(last) {
175
+ this._hasSeenLastSamples = last;
176
+ for (const observer of this.waitingForSamples) {
177
+ observer(last);
178
+ }
179
+ this.waitingForSamples = [];
180
+ }
181
+ }
182
+ exports.MP4File = MP4File;
@@ -0,0 +1,165 @@
1
+ import * as MP4Box from "mp4box";
2
+ class MP4File extends MP4Box.ISOFile {
3
+ constructor() {
4
+ super(...arguments);
5
+ this.readyPromise = new Promise((resolve, reject) => {
6
+ this.onReady = () => resolve();
7
+ this.onError = reject;
8
+ });
9
+ this.waitingForSamples = [];
10
+ this._hasSeenLastSamples = false;
11
+ this._arrayBufferFileStart = 0;
12
+ }
13
+ setSegmentOptions(id, user, options) {
14
+ const trak = this.getTrackById(id);
15
+ if (trak) {
16
+ trak.nextSample = 0;
17
+ this.fragmentedTracks.push({
18
+ id,
19
+ user,
20
+ trak,
21
+ segmentStream: null,
22
+ nb_samples: "nbSamples" in options && options.nbSamples || 1e3,
23
+ rapAlignement: ("rapAlignement" in options && options.rapAlignement) ?? true
24
+ });
25
+ }
26
+ }
27
+ /**
28
+ * Fragments all tracks in a file into separate array buffers.
29
+ */
30
+ async fragmentAllTracks() {
31
+ const trackBuffers = {};
32
+ for await (const segment of this.fragmentIterator()) {
33
+ (trackBuffers[segment.track] ??= []).push(segment.data);
34
+ }
35
+ return trackBuffers;
36
+ }
37
+ async *fragmentIterator() {
38
+ await this.readyPromise;
39
+ const trackInfo = {};
40
+ for (const videoTrack of this.getInfo().videoTracks) {
41
+ trackInfo[videoTrack.id] = { index: 0, complete: false };
42
+ this.setSegmentOptions(videoTrack.id, null, {
43
+ rapAlignement: true
44
+ });
45
+ }
46
+ for (const audioTrack of this.getInfo().audioTracks) {
47
+ trackInfo[audioTrack.id] = { index: 0, complete: false };
48
+ const sampleRate = audioTrack.audio.sample_rate;
49
+ const probablePacketSize = 1024;
50
+ const probableFourSecondsOfSamples = Math.ceil(
51
+ sampleRate / probablePacketSize * 4
52
+ );
53
+ this.setSegmentOptions(audioTrack.id, null, {
54
+ nbSamples: probableFourSecondsOfSamples
55
+ });
56
+ }
57
+ const initSegments = this.initializeSegmentation();
58
+ for (const initSegment of initSegments) {
59
+ yield {
60
+ track: initSegment.id,
61
+ segment: "init",
62
+ data: initSegment.buffer,
63
+ complete: false
64
+ };
65
+ }
66
+ const fragmentStartSamples = {};
67
+ let finishedReading = false;
68
+ const allTracksFinished = () => {
69
+ for (const fragmentedTrack of this.fragmentedTracks) {
70
+ if (!trackInfo[fragmentedTrack.id]?.complete) {
71
+ return false;
72
+ }
73
+ }
74
+ return true;
75
+ };
76
+ while (!(finishedReading && allTracksFinished())) {
77
+ for (const fragTrak of this.fragmentedTracks) {
78
+ const trak = fragTrak.trak;
79
+ if (trak.nextSample === void 0) {
80
+ throw new Error("trak.nextSample is undefined");
81
+ }
82
+ if (trak.samples === void 0) {
83
+ throw new Error("trak.samples is undefined");
84
+ }
85
+ while (trak.nextSample < trak.samples.length) {
86
+ let result = void 0;
87
+ const fragTrakNextSample = trak.samples[trak.nextSample];
88
+ if (fragTrakNextSample) {
89
+ fragmentStartSamples[fragTrak.id] ||= fragTrakNextSample;
90
+ }
91
+ try {
92
+ result = this.createFragment(
93
+ fragTrak.id,
94
+ trak.nextSample,
95
+ fragTrak.segmentStream
96
+ );
97
+ } catch (error) {
98
+ console.log("Failed to createFragment", error);
99
+ }
100
+ if (result) {
101
+ fragTrak.segmentStream = result;
102
+ trak.nextSample++;
103
+ } else {
104
+ finishedReading = await this.waitForMoreSamples();
105
+ break;
106
+ }
107
+ const nextSample = trak.samples[trak.nextSample];
108
+ const emitSegment = (
109
+ // if rapAlignement is true, we emit a fragment when we have a rap sample coming up next
110
+ fragTrak.rapAlignement === true && nextSample?.is_sync || // if rapAlignement is false, we emit a fragment when we have the required number of samples
111
+ !fragTrak.rapAlignement && trak.nextSample % fragTrak.nb_samples === 0 || // // if this is the last sample, we emit the fragment
112
+ // finished ||
113
+ // if we have more samples than the number of samples requested, we emit the fragment
114
+ trak.nextSample >= trak.samples.length
115
+ );
116
+ if (emitSegment) {
117
+ const trackInfoForFrag = trackInfo[fragTrak.id];
118
+ if (!trackInfoForFrag) {
119
+ throw new Error("trackInfoForFrag is undefined");
120
+ }
121
+ if (trak.nextSample >= trak.samples.length) {
122
+ trackInfoForFrag.complete = true;
123
+ }
124
+ const startSample = fragmentStartSamples[fragTrak.id];
125
+ const endSample = trak.samples[trak.nextSample - 1];
126
+ if (!startSample || !endSample) {
127
+ throw new Error("startSample or endSample is undefined");
128
+ }
129
+ yield {
130
+ track: fragTrak.id,
131
+ segment: trackInfoForFrag.index,
132
+ data: fragTrak.segmentStream.buffer,
133
+ complete: trackInfoForFrag.complete,
134
+ cts: startSample.cts,
135
+ dts: startSample.dts,
136
+ duration: endSample.dts - startSample.dts + endSample.duration
137
+ };
138
+ trackInfoForFrag.index += 1;
139
+ fragTrak.segmentStream = null;
140
+ delete fragmentStartSamples[fragTrak.id];
141
+ }
142
+ }
143
+ }
144
+ finishedReading = await this.waitForMoreSamples();
145
+ }
146
+ }
147
+ waitForMoreSamples() {
148
+ if (this._hasSeenLastSamples) {
149
+ return Promise.resolve(true);
150
+ }
151
+ return new Promise((resolve) => {
152
+ this.waitingForSamples.push(resolve);
153
+ });
154
+ }
155
+ processSamples(last) {
156
+ this._hasSeenLastSamples = last;
157
+ for (const observer of this.waitingForSamples) {
158
+ observer(last);
159
+ }
160
+ this.waitingForSamples = [];
161
+ }
162
+ }
163
+ export {
164
+ MP4File
165
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const node_child_process = require("node:child_process");
4
+ const node_util = require("node:util");
5
+ const execPromise = node_util.promisify(node_child_process.exec);
6
+ exports.execPromise = execPromise;
@@ -0,0 +1,6 @@
1
+ import { exec } from "node:child_process";
2
+ import { promisify } from "node:util";
3
+ const execPromise = promisify(exec);
4
+ export {
5
+ execPromise
6
+ };
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const node_child_process = require("node:child_process");
4
+ const execPromise = require("../../../lib/util/execPromise.cjs");
5
+ const z = require("zod");
6
+ const node_fs = require("node:fs");
7
+ function _interopNamespaceDefault(e) {
8
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
+ if (e) {
10
+ for (const k in e) {
11
+ if (k !== "default") {
12
+ const d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: () => e[k]
16
+ });
17
+ }
18
+ }
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+ const z__namespace = /* @__PURE__ */ _interopNamespaceDefault(z);
24
+ const AudioStreamSchema = z__namespace.object({
25
+ index: z__namespace.number(),
26
+ codec_name: z__namespace.string(),
27
+ codec_long_name: z__namespace.string(),
28
+ codec_type: z__namespace.literal("audio"),
29
+ codec_tag_string: z__namespace.string(),
30
+ codec_tag: z__namespace.string(),
31
+ sample_fmt: z__namespace.string(),
32
+ sample_rate: z__namespace.string(),
33
+ channels: z__namespace.number(),
34
+ channel_layout: z__namespace.string(),
35
+ bits_per_sample: z__namespace.number(),
36
+ initial_padding: z__namespace.number().optional(),
37
+ r_frame_rate: z__namespace.string(),
38
+ avg_frame_rate: z__namespace.string(),
39
+ time_base: z__namespace.string(),
40
+ start_pts: z__namespace.number(),
41
+ start_time: z__namespace.coerce.number(),
42
+ duration_ts: z__namespace.number(),
43
+ duration: z__namespace.coerce.number(),
44
+ bit_rate: z__namespace.string(),
45
+ disposition: z__namespace.record(z__namespace.unknown())
46
+ });
47
+ const VideoStreamSchema = z__namespace.object({
48
+ index: z__namespace.number(),
49
+ codec_name: z__namespace.string(),
50
+ codec_long_name: z__namespace.string(),
51
+ codec_type: z__namespace.literal("video"),
52
+ codec_tag_string: z__namespace.string(),
53
+ codec_tag: z__namespace.string(),
54
+ width: z__namespace.number(),
55
+ height: z__namespace.number(),
56
+ coded_width: z__namespace.number(),
57
+ coded_height: z__namespace.number(),
58
+ r_frame_rate: z__namespace.string(),
59
+ avg_frame_rate: z__namespace.string(),
60
+ time_base: z__namespace.string(),
61
+ start_pts: z__namespace.number().optional(),
62
+ start_time: z__namespace.coerce.number().optional(),
63
+ duration_ts: z__namespace.number().optional(),
64
+ duration: z__namespace.coerce.number().optional(),
65
+ bit_rate: z__namespace.string().optional(),
66
+ disposition: z__namespace.record(z__namespace.unknown())
67
+ });
68
+ const ProbeFormatSchema = z__namespace.object({
69
+ filename: z__namespace.string(),
70
+ nb_streams: z__namespace.number(),
71
+ nb_programs: z__namespace.number(),
72
+ format_name: z__namespace.string(),
73
+ format_long_name: z__namespace.string(),
74
+ start_time: z__namespace.string().optional(),
75
+ duration: z__namespace.string().optional(),
76
+ size: z__namespace.string(),
77
+ bit_rate: z__namespace.string().optional(),
78
+ probe_score: z__namespace.number()
79
+ });
80
+ const StreamSchema = z__namespace.discriminatedUnion("codec_type", [
81
+ AudioStreamSchema,
82
+ VideoStreamSchema
83
+ ]);
84
+ const ProbeSchema = z__namespace.object({
85
+ streams: z__namespace.array(StreamSchema),
86
+ format: ProbeFormatSchema
87
+ });
88
+ class Probe {
89
+ constructor(absolutePath, rawData) {
90
+ this.absolutePath = absolutePath;
91
+ this.data = ProbeSchema.parse(rawData);
92
+ }
93
+ static async probePath(absolutePath) {
94
+ const probeResult = await execPromise.execPromise(
95
+ `ffprobe -v error -show_format -show_streams -of json ${absolutePath}`
96
+ );
97
+ const json = JSON.parse(probeResult.stdout);
98
+ return new Probe(absolutePath, json);
99
+ }
100
+ get audioStreams() {
101
+ return this.data.streams.filter(
102
+ (stream) => stream.codec_type === "audio"
103
+ );
104
+ }
105
+ get videoStreams() {
106
+ return this.data.streams.filter(
107
+ (stream) => stream.codec_type === "video"
108
+ );
109
+ }
110
+ get streams() {
111
+ return this.data.streams;
112
+ }
113
+ get format() {
114
+ return this.data.format;
115
+ }
116
+ get mustReencodeAudio() {
117
+ return this.audioStreams.some((stream) => stream.codec_name !== "aac");
118
+ }
119
+ get mustReencodeVideo() {
120
+ return false;
121
+ }
122
+ get mustRemux() {
123
+ return this.format.format_name !== "mp4";
124
+ }
125
+ get hasAudio() {
126
+ return this.audioStreams.length > 0;
127
+ }
128
+ get hasVideo() {
129
+ return this.videoStreams.length > 0;
130
+ }
131
+ get isAudioOnly() {
132
+ return this.audioStreams.length > 0 && this.videoStreams.length === 0;
133
+ }
134
+ get isVideoOnly() {
135
+ return this.audioStreams.length === 0 && this.videoStreams.length > 0;
136
+ }
137
+ get mustProcess() {
138
+ return this.mustReencodeAudio || this.mustReencodeVideo || this.mustRemux;
139
+ }
140
+ get ffmpegAudioOptions() {
141
+ if (!this.hasAudio) {
142
+ return [];
143
+ }
144
+ if (this.mustReencodeAudio) {
145
+ return [
146
+ "-c:a",
147
+ "aac",
148
+ "-b:a",
149
+ "192k",
150
+ "-ar",
151
+ "48000"
152
+ ];
153
+ }
154
+ return ["-c:a", "copy"];
155
+ }
156
+ get ffmpegVideoOptions() {
157
+ if (!this.hasVideo) {
158
+ return [];
159
+ }
160
+ if (this.mustReencodeVideo) {
161
+ return [
162
+ "-c:v",
163
+ "h264",
164
+ "-pix_fmt",
165
+ "yuv420p"
166
+ ];
167
+ }
168
+ return ["-c:v", "copy"];
169
+ }
170
+ createConformingReadstream() {
171
+ if (!this.mustProcess) {
172
+ return node_fs.createReadStream(this.absolutePath);
173
+ }
174
+ return node_child_process.spawn("ffmpeg", [
175
+ "-i",
176
+ this.absolutePath,
177
+ ...this.ffmpegAudioOptions,
178
+ ...this.ffmpegVideoOptions,
179
+ "-f",
180
+ "mp4",
181
+ "-frag_duration",
182
+ "8000000",
183
+ "-movflags",
184
+ "frag_keyframe+empty_moov",
185
+ "pipe:1"
186
+ ], {
187
+ stdio: ["ignore", "pipe", "inherit"]
188
+ }).stdout;
189
+ }
190
+ }
191
+ exports.AudioStreamSchema = AudioStreamSchema;
192
+ exports.Probe = Probe;
193
+ exports.VideoStreamSchema = VideoStreamSchema;