@lumen5/beamcoder 0.0.21 → 0.0.22

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,343 +0,0 @@
1
- /*
2
- Aerostat Beam Coder - Node.js native bindings for FFmpeg.
3
- Copyright (C) 2019 Streampunk Media Ltd.
4
-
5
- This program is free software: you can redistribute it and/or modify
6
- it under the terms of the GNU General Public License as published by
7
- the Free Software Foundation, either version 3 of the License, or
8
- (at your option) any later version.
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU General Public License for more details.
14
-
15
- You should have received a copy of the GNU General Public License
16
- along with this program. If not, see <https://www.gnu.org/licenses/>.
17
-
18
- https://www.streampunk.media/ mailto:furnace@streampunk.media
19
- 14 Ormiscaig, Aultbea, Achnasheen, IV22 2JJ U.K.
20
- */
21
-
22
- const test = require('tape');
23
- const beamcoder = require('../index.js');
24
-
25
- const isExternal = o => Object.toString(o).indexOf('native code') >= 0;
26
-
27
- test('Creating a format', t => {
28
- let fmt = beamcoder.format();
29
- t.ok(fmt, 'is truthy.');
30
- t.equal(fmt.type, 'format', 'calls itself type format.');
31
- t.equal(fmt.iformat, null, 'has no input format.');
32
- t.equal(fmt.oformat, null, 'has no output format.');
33
- t.equal(fmt.streams.length, 0, 'has no streams.');
34
- fmt = beamcoder.format({ url: 'file:fred.wav', flags: { NONBLOCK: true }});
35
- t.ok(fmt, 'with parameters is truthy.');
36
- t.equal(fmt.url, 'file:fred.wav', 'has url property set as expected.');
37
- t.ok(fmt.flags.NONBLOCK, 'NONBLOCK flag has been set OK.');
38
- t.ok(fmt.flags.AUTO_BSF, 'AUTOBSF flag is still set.');
39
- t.end();
40
- });
41
-
42
- const stripNewStream = ({ newStream, ...others }) => ({ ...others }); // eslint-disable-line no-unused-vars
43
-
44
- test('Minimal JSON serialization', t => {
45
- let fmt = beamcoder.format();
46
- let fmts = JSON.stringify(fmt);
47
- t.equal(typeof fmts, 'string', 'stringify creates a string.');
48
- let fmtj = JSON.parse(fmts);
49
- t.deepEqual(fmtj, { type: 'format', streams: [], interleaved: true },
50
- 'is minimal.');
51
- let rfmt = beamcoder.format(fmts);
52
- t.ok(rfmt, 'roundtrip format is truthy.');
53
- console.log(stripNewStream(rfmt));
54
- t.deepEqual(stripNewStream(rfmt), {
55
- type: 'format',
56
- oformat: null,
57
- iformat: null,
58
- priv_data: null,
59
- ctx_flags: { NOHEADER: false, UNSEEKABLE: false },
60
- streams: [],
61
- url: '',
62
- start_time: 0,
63
- duration: 0,
64
- bit_rate: 0,
65
- packet_size: 0,
66
- max_delay: -1,
67
- flags:
68
- { GENPTS: false,
69
- IGNIDX: false,
70
- NONBLOCK: false,
71
- IGNDTS: false,
72
- NOFILLIN: false,
73
- NOPARSE: false,
74
- NOBUFFER: false,
75
- CUSTOM_IO: false,
76
- DISCARD_CORRUPT: false,
77
- FLUSH_PACKETS: false,
78
- BITEXACT: false,
79
- SORT_DTS: false,
80
- PRIV_OPT: false,
81
- FAST_SEEK: false,
82
- SHORTEST: false,
83
- AUTO_BSF: true },
84
- probesize: 5000000,
85
- max_analyze_duration: 0,
86
- key: null,
87
- programs: [],
88
- max_index_size: 1048576,
89
- max_picture_buffer: 3041280,
90
- metadata: {},
91
- start_time_realtime: null,
92
- fps_probe_size: -1,
93
- error_recognition: 1,
94
- debug: { TS: false },
95
- max_interleave_delta: 10000000,
96
- strict_std_compliance: 'normal',
97
- event_flags: { METADATA_UPDATED: false },
98
- max_ts_probe: 50,
99
- avoid_negative_ts: 'auto',
100
- audio_preload: 0,
101
- max_chunk_duration: 0,
102
- max_chunk_size: 0,
103
- use_wallclock_as_timestamps: false,
104
- avio_flags:
105
- { READ: false, WRITE: false, NONBLOCK: false, DIRECT: false },
106
- duration_estimation_method: 'from_pts',
107
- skip_initial_bytes: 0,
108
- correct_ts_overflow: true,
109
- seek2any: false,
110
- flush_packets: -1,
111
- probe_score: 0,
112
- format_probesize: 1048576,
113
- codec_whitelist: null,
114
- format_whitelist: null,
115
- io_repositioned: false,
116
- metadata_header_padding: -1,
117
- output_ts_offset: 0,
118
- dump_separator: ', ',
119
- protocol_whitelist: null,
120
- protocol_blacklist: null,
121
- max_streams: 1000,
122
- skip_estimate_duration_from_pts: false,
123
- interleaved: true }, 'has expected value.');
124
- t.end();
125
- });
126
-
127
- test('Maximal JSON serialization', t => {
128
- let fmt = beamcoder.format({
129
- type: 'format',
130
- oformat: null,
131
- iformat: null,
132
- priv_data: null,
133
- ctx_flags: { NOHEADER: true, UNSEEKABLE: false },
134
- streams: [],
135
- url: 'file:test.wav',
136
- start_time: 42,
137
- duration: 43,
138
- bit_rate: 44,
139
- packet_size: 45,
140
- max_delay: 46,
141
- flags:
142
- { GENPTS: true,
143
- IGNIDX: false,
144
- NONBLOCK: true,
145
- IGNDTS: false,
146
- NOFILLIN: true,
147
- NOPARSE: false,
148
- NOBUFFER: true,
149
- CUSTOM_IO: false,
150
- DISCARD_CORRUPT: true,
151
- FLUSH_PACKETS: false,
152
- BITEXACT: true,
153
- SORT_DTS: false,
154
- PRIV_OPT: true,
155
- FAST_SEEK: false,
156
- SHORTEST: true,
157
- AUTO_BSF: true },
158
- probesize: 6000000,
159
- max_analyze_duration: 47,
160
- key: Buffer.from('Unlocker'),
161
- programs: [],
162
- max_index_size: 48,
163
- max_picture_buffer: 49,
164
- metadata: { wibble: 'wobble', otherwise: 50 },
165
- start_time_realtime: 50,
166
- fps_probe_size: 51,
167
- error_recognition: 2,
168
- debug: { TS: true },
169
- max_interleave_delta: 52,
170
- strict_std_compliance: 'strict',
171
- event_flags: { METADATA_UPDATED: true },
172
- max_ts_probe: 53,
173
- avoid_negative_ts: 'make_zero',
174
- audio_preload: 54,
175
- max_chunk_duration: 55,
176
- max_chunk_size: 56,
177
- use_wallclock_as_timestamps: true,
178
- avio_flags:
179
- { READ: true, WRITE: false, NONBLOCK: true, DIRECT: false },
180
- duration_estimation_method: 'from_stream',
181
- skip_initial_bytes: 57,
182
- correct_ts_overflow: false,
183
- seek2any: true,
184
- flush_packets: 58,
185
- probe_score: 59,
186
- format_probesize: 60,
187
- codec_whitelist: 'h264,hevc',
188
- format_whitelist: 'mxf,avi',
189
- io_repositioned: true,
190
- metadata_header_padding: 61,
191
- output_ts_offset: 62,
192
- dump_separator: '::',
193
- protocol_whitelist: 'http,rtp',
194
- protocol_blacklist: 'rtmp',
195
- max_streams: 53,
196
- skip_estimate_duration_from_pts: true,
197
- interleaved: false });
198
- let fmts = JSON.stringify(fmt, null, 2);
199
- t.equal(typeof fmts, 'string', 'stringify creates a string.');
200
- let fmtj = JSON.parse(fmts);
201
- t.ok(fmtj, 'parsed JSON is truthy.');
202
- let rfmt = beamcoder.format(fmts);
203
- t.ok(rfmt, 'roundtrip format is truthy.');
204
- t.deepEqual(stripNewStream(rfmt), {
205
- type: 'format',
206
- oformat: null,
207
- iformat: null,
208
- priv_data: null,
209
- ctx_flags: { NOHEADER: false, UNSEEKABLE: false }, // set by libav
210
- streams: [],
211
- url: 'file:test.wav',
212
- start_time: 0, // Always set by libav
213
- duration: 43,
214
- bit_rate: 44,
215
- packet_size: 45,
216
- max_delay: 46,
217
- flags:
218
- { GENPTS: true,
219
- IGNIDX: false,
220
- NONBLOCK: true,
221
- IGNDTS: false,
222
- NOFILLIN: true,
223
- NOPARSE: false,
224
- NOBUFFER: true,
225
- CUSTOM_IO: false,
226
- DISCARD_CORRUPT: true,
227
- FLUSH_PACKETS: false,
228
- BITEXACT: true,
229
- SORT_DTS: false,
230
- PRIV_OPT: true,
231
- FAST_SEEK: false,
232
- SHORTEST: true,
233
- AUTO_BSF: true },
234
- probesize: 6000000,
235
- max_analyze_duration: 47,
236
- key: Buffer.from('Unlocker'),
237
- programs: [],
238
- max_index_size: 48,
239
- max_picture_buffer: 49,
240
- metadata: { wibble: 'wobble', otherwise: '50' }, // numbers become strings
241
- start_time_realtime: 50,
242
- fps_probe_size: 51,
243
- error_recognition: 2,
244
- debug: { TS: true },
245
- max_interleave_delta: 52,
246
- strict_std_compliance: 'strict',
247
- event_flags: { METADATA_UPDATED: true },
248
- max_ts_probe: 53,
249
- avoid_negative_ts: 'make_zero',
250
- audio_preload: 54,
251
- max_chunk_duration: 55,
252
- max_chunk_size: 56,
253
- use_wallclock_as_timestamps: true,
254
- avio_flags:
255
- { READ: true, WRITE: false, NONBLOCK: true, DIRECT: false },
256
- duration_estimation_method: 'from_pts', // Read only, set by libav
257
- skip_initial_bytes: 57,
258
- correct_ts_overflow: false,
259
- seek2any: true,
260
- flush_packets: 58,
261
- probe_score: 0, // Read only, set by libav
262
- format_probesize: 60,
263
- codec_whitelist: 'h264,hevc',
264
- format_whitelist: 'mxf,avi',
265
- io_repositioned: false, // Set by libav
266
- metadata_header_padding: 61,
267
- output_ts_offset: 62,
268
- dump_separator: '::',
269
- protocol_whitelist: 'http,rtp',
270
- protocol_blacklist: 'rtmp',
271
- max_streams: 53,
272
- skip_estimate_duration_from_pts: true,
273
- interleaved: false }, 'has expected value.');
274
- t.end();
275
- });
276
-
277
- test('Test minimal JSON stream', t => {
278
- let fmt = beamcoder.format();
279
- let s1 = fmt.newStream('h264');
280
- let ss = JSON.stringify(s1, null, 2);
281
- t.equal(typeof ss, 'string', 'stringify creates a string.');
282
- console.log(ss);
283
- t.deepEqual(JSON.parse(ss), {
284
- type: 'Stream', index: 0, id: 0, time_base: [0,0],
285
- codecpar: { type: 'CodecParameters', codec_type: 'video', codec_id: 27, name: 'h264' } });
286
-
287
- let s2 = fmt.newStream(ss);
288
- t.ok(s2, 'creation of new stream from string is truthy.');
289
- console.log(s2.toJSON());
290
- t.deepEqual(JSON.parse(JSON.stringify(s2)), {
291
- type: 'Stream', index: 1, id: 0, time_base: [0,0],
292
- codecpar: { type: 'CodecParameters', codec_type: 'video', codec_id: 27, name: 'h264' } });
293
- t.ok(s2.codecpar && s2.codecpar._codecPar && isExternal(s2.codecpar._codecPar),
294
- 's2 has external codec parameters.');
295
- t.ok(isExternal(s2._stream), 's2 has external _stream.');
296
-
297
- let s3 = fmt.newStream(JSON.parse(ss));
298
- t.ok(s3, 'creation of new stream from parsed object is truthy.');
299
- t.deepEqual(JSON.parse(JSON.stringify(s3)), {
300
- type: 'Stream', index: 2, id: 0, time_base: [0,0],
301
- codecpar: { type: 'CodecParameters', codec_type: 'video', codec_id: 27, name: 'h264' } });
302
- t.ok(s3.codecpar && s3.codecpar._codecPar && isExternal(s3.codecpar._codecPar),
303
- 's3 has external codec parameters.');
304
- t.ok(isExternal(s3._stream), 's3 has external _stream.');
305
-
306
- let fmt2 = beamcoder.format(JSON.stringify(fmt));
307
- t.ok(fmt2, 'construction of new format form JSON is truthy.');
308
- t.equal(fmt2.streams.length, 3, 'has expected number of streams.');
309
- t.deepEqual(fmt2.streams.map(JSON.stringify).map(JSON.parse),
310
- [s1, s2, s3].map(JSON.stringify).map(JSON.parse), 'has expected streams.');
311
-
312
- t.throws(() => fmt2.streams = [], /construction/,
313
- 'cannot set streams after construction.');
314
- t.end();
315
- });
316
-
317
- test('Can set IO formats on construction', t => {
318
- let ifmt = beamcoder.format({ iformat: 'wav' });
319
- t.ok(ifmt.iformat, 'iformat has become truthy.');
320
- t.ok(ifmt.priv_data, 'private data has been created.');
321
- t.equal(ifmt.type, 'demuxer', 'has turned into a demuxer.');
322
- t.equal(ifmt.iformat.name, 'wav', 'iformat has the expected name.');
323
-
324
- ifmt.iformat = null;
325
- t.equal(ifmt.iformat, null, 'can be set back to null.');
326
- t.equal(ifmt.type, 'format', 'changing the name back to format.');
327
- t.equal(ifmt.priv_data, null, 'resetting the priv_data.');
328
-
329
- let ofmt = beamcoder.format({ oformat: 'hevc' });
330
- t.ok(ofmt.oformat, 'oformat has become truthy.');
331
- t.equal(ofmt.priv_data, null, 'private data is not set.');
332
- t.equal(ofmt.type, 'muxer', 'has turned into a muxer.');
333
- t.equal(ofmt.oformat.name, 'hevc', 'oformat has the expected name.');
334
-
335
- ofmt.oformat = 'wav';
336
- t.equal(ofmt.oformat.name, 'wav', 'oformat has the expected name.');
337
- t.ok(ofmt.priv_data, 'has private data.');
338
- t.equal(typeof ofmt.priv_data.write_bext, 'boolean', 'private data appears as expected.');
339
-
340
- t.throws(() => { ifmt.iformat = 'wibble'; }, /Unable/, 'bad iformat name throws.');
341
- t.throws(() => { ofmt.oformat = 'wibble'; }, /Unable/, 'bad oformat name throws.');
342
- t.end();
343
- });
package/test/frameSpec.js DELETED
@@ -1,145 +0,0 @@
1
- /*
2
- Aerostat Beam Coder - Node.js native bindings for FFmpeg.
3
- Copyright (C) 2019 Streampunk Media Ltd.
4
-
5
- This program is free software: you can redistribute it and/or modify
6
- it under the terms of the GNU General Public License as published by
7
- the Free Software Foundation, either version 3 of the License, or
8
- (at your option) any later version.
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU General Public License for more details.
14
-
15
- You should have received a copy of the GNU General Public License
16
- along with this program. If not, see <https://www.gnu.org/licenses/>.
17
-
18
- https://www.streampunk.media/ mailto:furnace@streampunk.media
19
- 14 Ormiscaig, Aultbea, Achnasheen, IV22 2JJ U.K.
20
- */
21
-
22
- const test = require('tape');
23
- const beamcoder = require('../index.js');
24
- const util = require('util');
25
-
26
- test('Create a frame', t => {
27
- let fr = beamcoder.frame();
28
- t.ok(fr, 'is truthy.');
29
- t.end();
30
- });
31
-
32
- test('Minimal JSON serialization', t => {
33
- let fr = beamcoder.frame({});
34
- let fp = JSON.stringify(fr);
35
- t.ok(fp, 'JSON serialization is truthy.');
36
- let pfp = JSON.parse(fp);
37
- t.deepEqual(pfp, { type: 'Frame', linesize: [], reordered_opaque: 0 }, 'makes minimal JSON.');
38
- let rf = beamcoder.frame(fp);
39
- t.ok(rf, 'roundtrip is truthy.');
40
- t.equal(util.inspect(rf), util.inspect(beamcoder.frame()), 'same as a new frame.');
41
- t.end();
42
- });
43
-
44
- test('Maximal JSON serialization', t => {
45
- let fr = beamcoder.frame({ type: 'Frame',
46
- linesize: [42],
47
- width: 43,
48
- height: 44,
49
- nb_samples: 45,
50
- format: 'fltp',
51
- key_frame: false,
52
- pict_type: 'I',
53
- sample_aspect_ratio: [ 16, 9 ],
54
- pts: 46,
55
- pkt_dts: 47,
56
- coded_picture_number: 48,
57
- display_picture_number: 49,
58
- quality: 50,
59
- repeat_pict: 51,
60
- interlaced_frame: true,
61
- top_field_first: true,
62
- palette_has_changed: true,
63
- reordered_opaque: 52,
64
- sample_rate: 48000,
65
- channel_layout: 'stereo',
66
- data: [ Buffer.from('wibble wobble wibble wobble jelly on a place at least 42 chars and some more')],
67
- side_data: { replaygain: Buffer.from('wibble') },
68
- flags: { CORRUPT: true, DISCARD: false },
69
- color_range: 'tv',
70
- color_primaries: 'bt709',
71
- color_trc: 'bt709',
72
- colorspace: 'bt709',
73
- chroma_location: 'top',
74
- best_effort_timestamp: 53,
75
- pkt_pos: 54,
76
- pkt_duration: 55,
77
- metadata: { fred: 'ginger' },
78
- decode_error_flags: { INVALID_BITSTREAM: true, MISSING_REFERENCE: false },
79
- channels: 2,
80
- pkt_size: 56,
81
- crop_top: 57,
82
- crop_bottom: 58,
83
- crop_left: 59,
84
- crop_right: 60 });
85
- t.ok(fr, 'frame is truthy.');
86
- let fs = JSON.stringify(fr);
87
- t.equal(typeof fs, 'string', 'stringify created a string.');
88
- let rfr = beamcoder.frame(fs);
89
- t.ok(rfr, 'roundtrip packet is truthy.');
90
- t.deepEqual(util.inspect(rfr), util.inspect(beamcoder.frame({
91
- linesize: [42],
92
- width: 43,
93
- height: 44,
94
- nb_samples: 45,
95
- format: 'fltp',
96
- key_frame: false,
97
- pict_type: 'I',
98
- sample_aspect_ratio: [ 16, 9 ],
99
- pts: 46,
100
- pkt_dts: 47,
101
- coded_picture_number: 48,
102
- display_picture_number: 49,
103
- quality: 50,
104
- repeat_pict: 51,
105
- interlaced_frame: true,
106
- top_field_first: true,
107
- palette_has_changed: true,
108
- reordered_opaque: 52,
109
- sample_rate: 48000,
110
- channel_layout: 'stereo',
111
- data: [], // Data does not roundtrip
112
- side_data: { replaygain: Buffer.from('wibble') },
113
- flags: { CORRUPT: true, DISCARD: false },
114
- color_range: 'tv',
115
- color_primaries: 'bt709',
116
- color_trc: 'bt709',
117
- colorspace: 'bt709',
118
- chroma_location: 'top',
119
- best_effort_timestamp: 53,
120
- pkt_pos: 54,
121
- pkt_duration: 55,
122
- metadata: { fred: 'ginger' },
123
- decode_error_flags: { INVALID_BITSTREAM: true, MISSING_REFERENCE: false },
124
- channels: 2,
125
- pkt_size: 56,
126
- crop_top: 57,
127
- crop_bottom: 58,
128
- crop_left: 59,
129
- crop_right: 60 })), 'roundtrips expected value.');
130
- t.end();
131
- });
132
-
133
- test('Can delete data', t => {
134
- let f = beamcoder.frame({ width: 1920, height: 1080, format: 'yuv420p' }).alloc();
135
- t.ok(Array.isArray(f.data), 'data is an array ...');
136
- t.ok(f.data.every(x => Buffer.isBuffer(x)), '... of buffers.');
137
- t.equal(f.data.length, 3, 'data buffer has length 3.');
138
- t.deepEqual(f.data.map(x => x.length),
139
- f.linesize.map(x => x * f.height),
140
- 'buffer sizes as expected.');
141
- f.data = null;
142
- t.ok(Array.isArray(f.data), 'After reset, data is an array ...');
143
- t.equal(f.data.length, 0, 'of length zero.');
144
- t.end();
145
- });
@@ -1,73 +0,0 @@
1
- /*
2
- Aerostat Beam Coder - Node.js native bindings for FFmpeg.
3
- Copyright (C) 2019 Streampunk Media Ltd.
4
-
5
- This program is free software: you can redistribute it and/or modify
6
- it under the terms of the GNU General Public License as published by
7
- the Free Software Foundation, either version 3 of the License, or
8
- (at your option) any later version.
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU General Public License for more details.
14
-
15
- You should have received a copy of the GNU General Public License
16
- along with this program. If not, see <https://www.gnu.org/licenses/>.
17
-
18
- https://www.streampunk.media/ mailto:furnace@streampunk.media
19
- 14 Ormiscaig, Aultbea, Achnasheen, IV22 2JJ U.K.
20
- */
21
-
22
- const test = require('tape');
23
- const beamcoder = require('../index.js');
24
-
25
- test('Version information', t => {
26
- const verPos = beamcoder.avVersionInfo().indexOf('5.');
27
- t.ok(verPos === 0 || verPos === 1, 'has expected version number.');
28
- t.equals(typeof beamcoder.versions(), 'object', 'versions is an object.');
29
- t.equals(Object.keys(beamcoder.versions()).length, 8, 'versions has 8 entries.');
30
- t.ok(Object.values(beamcoder.versions()).every(x => typeof x === 'number' && x > 0),
31
- 'versions values are numbers.');
32
- t.equals(typeof beamcoder.versionStrings(), 'object',
33
- 'versionStrings is an object.');
34
- t.equals(Object.keys(beamcoder.versions()).length, 8,
35
- 'versionStrings is an object.');
36
- t.ok(Object.values(beamcoder.versionStrings()).every(x =>
37
- typeof x === 'string' && x.match(/\d+\.\d+\.\d+/)),
38
- 'versionStrings match expected pattern.');
39
- t.equals(typeof beamcoder.configurations(), 'object',
40
- 'configurations is an object.');
41
- t.equals(Object.keys(beamcoder.configurations()).length, 8,
42
- 'configurations has 8 entries.');
43
- t.ok(Object.values(beamcoder.configurations()).every(x => typeof x === 'string'),
44
- 'configurations entry are strings.');
45
- t.end();
46
- });
47
-
48
- test('Muxer information', t => {
49
- let muxers = beamcoder.muxers();
50
- t.ok(muxers, 'muxers is truthy.');
51
- t.equal(typeof muxers, 'object', 'muxers is an object.');
52
- t.ok(JSON.stringify(muxers), 'can be converted to JSON.');
53
- t.end();
54
- });
55
-
56
- test('Custom Logging', async t => {
57
- let n = 0;
58
- const cb = () => {
59
- n++;
60
- };
61
- beamcoder.setLoggingCallback(cb);
62
-
63
- await beamcoder.demuxer('https://www.elecard.com/storage/video/bbb_1080p_c.ts');
64
- // Expected logs are :
65
- // [hevc @ 0x7f1978017180] Unknown HEVC profile: 0
66
- // [hevc @ 0x7f1978017180] Unknown HEVC profile: 0
67
- // [hevc @ 0x7f1978017180] Unknown HEVC profile: 0
68
- // [hevc @ 0x7f1978017180] Unknown HEVC profile: 0
69
- // [hevc @ 0x7f1978017180] Unknown HEVC profile: 0
70
- // [mpegts @ 0x7f1978000900] PES packet size mismatch
71
- // [mpegts @ 0x7f1978000900] Packet corrupt (stream = 1, dts = 53647096)
72
- t.ok(n > 5);
73
- });
package/test/muxerSpec.js DELETED
@@ -1,34 +0,0 @@
1
- /*
2
- Aerostat Beam Coder - Node.js native bindings for FFmpeg.
3
- Copyright (C) 2019 Streampunk Media Ltd.
4
-
5
- This program is free software: you can redistribute it and/or modify
6
- it under the terms of the GNU General Public License as published by
7
- the Free Software Foundation, either version 3 of the License, or
8
- (at your option) any later version.
9
-
10
- This program is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- GNU General Public License for more details.
14
-
15
- You should have received a copy of the GNU General Public License
16
- along with this program. If not, see <https://www.gnu.org/licenses/>.
17
-
18
- https://www.streampunk.media/ mailto:furnace@streampunk.media
19
- 14 Ormiscaig, Aultbea, Achnasheen, IV22 2JJ U.K.
20
- */
21
-
22
- const test = require('tape');
23
- const beamcoder = require('../index.js');
24
-
25
- test('Creating a muxer', t => {
26
- let mx = beamcoder.muxer({ name: 'mpegts' });
27
- t.ok(mx, 'is truthy.');
28
- t.equal(typeof mx.iformat, 'undefined', 'input format is undefined.');
29
- t.ok(mx.oformat, 'has output format.');
30
- t.equal(mx.oformat.name, 'mpegts', 'output format is mpegts.');
31
- t.equal(mx.type, 'muxer', 'type name is set to muxer.');
32
- t.throws(() => beamcoder.muxer({ name: 'wibble' }), 'throws when unknown name.');
33
- t.end();
34
- });