@remotion/renderer 4.0.352 → 4.0.354
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.
- package/dist/assets/inline-audio-mixing.js +6 -7
- package/dist/browser/BrowserPage.js +45 -19
- package/dist/browser/ConsoleMessage.d.ts +6 -2
- package/dist/browser/ConsoleMessage.js +3 -5
- package/dist/esm/error-handling.mjs +1 -1
- package/dist/esm/index.mjs +52 -29
- package/dist/format-logs.js +2 -2
- package/dist/print-useful-error-message.js +4 -3
- package/package.json +12 -12
|
@@ -121,12 +121,12 @@ const makeInlineAudioMixing = (dir) => {
|
|
|
121
121
|
const samplesToShaveFromStart = trimLeftOffset * sample_rate_1.DEFAULT_SAMPLE_RATE;
|
|
122
122
|
const samplesToShaveFromEnd = trimRightOffset * sample_rate_1.DEFAULT_SAMPLE_RATE;
|
|
123
123
|
if (Math.abs(Math.round(samplesToShaveFromEnd) - samplesToShaveFromEnd) >
|
|
124
|
-
0.
|
|
125
|
-
throw new Error(
|
|
124
|
+
0.0000001) {
|
|
125
|
+
throw new Error(`samplesToShaveFromEnd should be approximately an integer, is${samplesToShaveFromEnd}`);
|
|
126
126
|
}
|
|
127
127
|
if (Math.abs(Math.round(samplesToShaveFromStart) - samplesToShaveFromStart) >
|
|
128
|
-
0.
|
|
129
|
-
throw new Error(
|
|
128
|
+
0.0000001) {
|
|
129
|
+
throw new Error(`samplesToShaveFromStart should be approximately an integer, is ${samplesToShaveFromStart}`);
|
|
130
130
|
}
|
|
131
131
|
if (isFirst) {
|
|
132
132
|
arr = arr.slice(Math.round(samplesToShaveFromStart) * asset.numberOfChannels);
|
|
@@ -135,10 +135,9 @@ const makeInlineAudioMixing = (dir) => {
|
|
|
135
135
|
arr = arr.slice(0, arr.length + Math.round(samplesToShaveFromEnd) * asset.numberOfChannels);
|
|
136
136
|
}
|
|
137
137
|
const positionInSeconds = (asset.frame - firstFrame) / fps - (isFirst ? 0 : trimLeftOffset);
|
|
138
|
-
const position = Math.round(positionInSeconds *
|
|
138
|
+
const position = Math.round(positionInSeconds * sample_rate_1.DEFAULT_SAMPLE_RATE) *
|
|
139
139
|
asset.numberOfChannels *
|
|
140
|
-
|
|
141
|
-
BYTES_PER_SAMPLE);
|
|
140
|
+
BYTES_PER_SAMPLE;
|
|
142
141
|
(0, node_fs_1.writeSync)(
|
|
143
142
|
// fs
|
|
144
143
|
fileDescriptor,
|
|
@@ -48,6 +48,32 @@ const shouldHideWarning = (log) => {
|
|
|
48
48
|
}
|
|
49
49
|
return false;
|
|
50
50
|
};
|
|
51
|
+
const format = (eventType, args) => {
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
53
|
+
const previewString = args
|
|
54
|
+
.filter((a) => { var _a; return !(a.type === 'symbol' && ((_a = a.description) === null || _a === void 0 ? void 0 : _a.includes(`__remotion_`))); })
|
|
55
|
+
.map((a) => (0, format_logs_1.formatRemoteObject)(a))
|
|
56
|
+
.filter(Boolean)
|
|
57
|
+
.join(' ');
|
|
58
|
+
let logLevelFromRemotionLog = null;
|
|
59
|
+
let tag = null;
|
|
60
|
+
for (const a of args) {
|
|
61
|
+
if (a.type === 'symbol' && ((_a = a.description) === null || _a === void 0 ? void 0 : _a.includes(`__remotion_level_`))) {
|
|
62
|
+
logLevelFromRemotionLog = (_d = (_c = (_b = a.description) === null || _b === void 0 ? void 0 : _b.split('__remotion_level_')) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.replace(')', '');
|
|
63
|
+
}
|
|
64
|
+
if (a.type === 'symbol' && ((_e = a.description) === null || _e === void 0 ? void 0 : _e.includes(`__remotion_tag_`))) {
|
|
65
|
+
tag = (_h = (_g = (_f = a.description) === null || _f === void 0 ? void 0 : _f.split('__remotion_tag_')) === null || _g === void 0 ? void 0 : _g[1]) === null || _h === void 0 ? void 0 : _h.replace(')', '');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const logLevelFromEvent = eventType === 'debug'
|
|
69
|
+
? 'verbose'
|
|
70
|
+
: eventType === 'error'
|
|
71
|
+
? 'error'
|
|
72
|
+
: eventType === 'warning'
|
|
73
|
+
? 'warn'
|
|
74
|
+
: 'verbose';
|
|
75
|
+
return { previewString, logLevelFromRemotionLog, logLevelFromEvent, tag };
|
|
76
|
+
};
|
|
51
77
|
class Page extends EventEmitter_1.EventEmitter {
|
|
52
78
|
static async _create({ client, target, defaultViewport, browser, sourceMapGetter, logLevel, indent, pageIndex, onBrowserLog, }) {
|
|
53
79
|
const page = new Page({
|
|
@@ -74,22 +100,23 @@ class Page extends EventEmitter_1.EventEmitter {
|
|
|
74
100
|
_Page_frameManager.set(this, void 0);
|
|
75
101
|
_Page_pageBindings.set(this, new Map());
|
|
76
102
|
_Page_onConsole.set(this, (log) => {
|
|
77
|
-
var _a, _b;
|
|
78
|
-
const
|
|
103
|
+
var _a, _b, _c;
|
|
104
|
+
const stackTrace = log.stackTrace();
|
|
105
|
+
const { url, columnNumber, lineNumber } = (_a = stackTrace[0]) !== null && _a !== void 0 ? _a : {};
|
|
79
106
|
const logLevel = this.logLevel;
|
|
80
107
|
const indent = this.indent;
|
|
81
108
|
if (shouldHideWarning(log)) {
|
|
82
109
|
return;
|
|
83
110
|
}
|
|
84
|
-
(
|
|
85
|
-
stackTrace
|
|
111
|
+
(_b = this.onBrowserLog) === null || _b === void 0 ? void 0 : _b.call(this, {
|
|
112
|
+
stackTrace,
|
|
86
113
|
text: log.text,
|
|
87
114
|
type: log.type,
|
|
88
115
|
});
|
|
89
116
|
if ((url === null || url === void 0 ? void 0 : url.endsWith(no_react_1.NoReactInternals.bundleName)) &&
|
|
90
117
|
lineNumber &&
|
|
91
118
|
this.sourceMapGetter()) {
|
|
92
|
-
const origPosition = (
|
|
119
|
+
const origPosition = (_c = this.sourceMapGetter()) === null || _c === void 0 ? void 0 : _c.originalPositionFor({
|
|
93
120
|
column: columnNumber !== null && columnNumber !== void 0 ? columnNumber : 0,
|
|
94
121
|
line: lineNumber,
|
|
95
122
|
});
|
|
@@ -105,7 +132,9 @@ class Page extends EventEmitter_1.EventEmitter {
|
|
|
105
132
|
const tagInfo = [origPosition === null || origPosition === void 0 ? void 0 : origPosition.name, isDelayRenderClear ? null : file]
|
|
106
133
|
.filter(truthy_1.truthy)
|
|
107
134
|
.join('@');
|
|
108
|
-
const tag = [tabInfo,
|
|
135
|
+
const tag = [tabInfo, log.tag, log.tag ? null : tagInfo]
|
|
136
|
+
.filter(truthy_1.truthy)
|
|
137
|
+
.join(', ');
|
|
109
138
|
if (log.type === 'error') {
|
|
110
139
|
logger_1.Log.error({
|
|
111
140
|
logLevel,
|
|
@@ -114,11 +143,11 @@ class Page extends EventEmitter_1.EventEmitter {
|
|
|
114
143
|
}, log.previewString);
|
|
115
144
|
}
|
|
116
145
|
else {
|
|
117
|
-
logger_1.Log
|
|
146
|
+
logger_1.Log[logLevel]({
|
|
118
147
|
logLevel,
|
|
119
148
|
tag,
|
|
120
149
|
indent,
|
|
121
|
-
},
|
|
150
|
+
}, log.previewString);
|
|
122
151
|
}
|
|
123
152
|
}
|
|
124
153
|
else if (log.type === 'error') {
|
|
@@ -317,13 +346,7 @@ _Page_client = new WeakMap(), _Page_target = new WeakMap(), _Page_timeoutSetting
|
|
|
317
346
|
return (0, util_1.releaseObject)(__classPrivateFieldGet(this, _Page_client, "f"), arg);
|
|
318
347
|
});
|
|
319
348
|
}
|
|
320
|
-
const previewString = args
|
|
321
|
-
? args
|
|
322
|
-
.map((arg) => {
|
|
323
|
-
return (0, format_logs_1.formatRemoteObject)(arg);
|
|
324
|
-
})
|
|
325
|
-
.join(', ')
|
|
326
|
-
: '';
|
|
349
|
+
const { previewString, logLevelFromRemotionLog, logLevelFromEvent, tag } = format(level, args !== null && args !== void 0 ? args : []);
|
|
327
350
|
if (source !== 'worker') {
|
|
328
351
|
const message = new ConsoleMessage_1.ConsoleMessage({
|
|
329
352
|
type: level,
|
|
@@ -331,6 +354,8 @@ _Page_client = new WeakMap(), _Page_target = new WeakMap(), _Page_timeoutSetting
|
|
|
331
354
|
args: [],
|
|
332
355
|
stackTraceLocations: [{ url, lineNumber }],
|
|
333
356
|
previewString,
|
|
357
|
+
logLevel: logLevelFromRemotionLog !== null && logLevelFromRemotionLog !== void 0 ? logLevelFromRemotionLog : logLevelFromEvent,
|
|
358
|
+
tag,
|
|
334
359
|
});
|
|
335
360
|
(_a = this.onBrowserLog) === null || _a === void 0 ? void 0 : _a.call(this, {
|
|
336
361
|
stackTrace: message.stackTrace(),
|
|
@@ -382,6 +407,7 @@ _Page_client = new WeakMap(), _Page_target = new WeakMap(), _Page_timeoutSetting
|
|
|
382
407
|
contextId: event.executionContextId,
|
|
383
408
|
});
|
|
384
409
|
}, _Page_addConsoleMessage = function _Page_addConsoleMessage(eventType, args, stackTrace) {
|
|
410
|
+
var _a, _b;
|
|
385
411
|
const textTokens = [];
|
|
386
412
|
for (const arg of args) {
|
|
387
413
|
const remoteObject = arg._remoteObject;
|
|
@@ -402,16 +428,16 @@ _Page_client = new WeakMap(), _Page_target = new WeakMap(), _Page_timeoutSetting
|
|
|
402
428
|
});
|
|
403
429
|
}
|
|
404
430
|
}
|
|
405
|
-
const previewString = args
|
|
406
|
-
|
|
407
|
-
.filter(Boolean)
|
|
408
|
-
.join(' ');
|
|
431
|
+
const { previewString, logLevelFromRemotionLog, logLevelFromEvent, tag } = format(eventType, (_a = args.map((a) => a._remoteObject)) !== null && _a !== void 0 ? _a : []);
|
|
432
|
+
const logLevel = (_b = logLevelFromRemotionLog) !== null && _b !== void 0 ? _b : logLevelFromEvent;
|
|
409
433
|
const message = new ConsoleMessage_1.ConsoleMessage({
|
|
410
434
|
type: eventType,
|
|
411
435
|
text: textTokens.join(' '),
|
|
412
436
|
args,
|
|
413
437
|
stackTraceLocations,
|
|
414
438
|
previewString,
|
|
439
|
+
logLevel,
|
|
440
|
+
tag,
|
|
415
441
|
});
|
|
416
442
|
__classPrivateFieldGet(this, _Page_onConsole, "f").call(this, message);
|
|
417
443
|
};
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { LogLevel } from 'remotion';
|
|
16
17
|
import type { JSHandle } from './JSHandle';
|
|
17
18
|
export interface ConsoleMessageLocation {
|
|
18
19
|
url?: string;
|
|
@@ -26,13 +27,16 @@ export declare class ConsoleMessage {
|
|
|
26
27
|
text: string;
|
|
27
28
|
args: JSHandle[];
|
|
28
29
|
previewString: string;
|
|
29
|
-
|
|
30
|
+
logLevel: LogLevel;
|
|
31
|
+
tag: string | null;
|
|
32
|
+
constructor({ type, text, args, stackTraceLocations, previewString, logLevel, tag, }: {
|
|
30
33
|
type: ConsoleMessageType;
|
|
31
34
|
text: string;
|
|
32
35
|
args: JSHandle[];
|
|
33
36
|
stackTraceLocations: ConsoleMessageLocation[];
|
|
34
37
|
previewString: string;
|
|
38
|
+
logLevel: LogLevel;
|
|
39
|
+
tag: string | null;
|
|
35
40
|
});
|
|
36
|
-
location(): ConsoleMessageLocation;
|
|
37
41
|
stackTrace(): ConsoleMessageLocation[];
|
|
38
42
|
}
|
|
@@ -29,17 +29,15 @@ var _ConsoleMessage_stackTraceLocations;
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
exports.ConsoleMessage = void 0;
|
|
31
31
|
class ConsoleMessage {
|
|
32
|
-
constructor({ type, text, args, stackTraceLocations, previewString, }) {
|
|
32
|
+
constructor({ type, text, args, stackTraceLocations, previewString, logLevel, tag, }) {
|
|
33
33
|
_ConsoleMessage_stackTraceLocations.set(this, void 0);
|
|
34
34
|
this.type = type;
|
|
35
35
|
this.text = text;
|
|
36
36
|
this.args = args;
|
|
37
37
|
this.previewString = previewString;
|
|
38
38
|
__classPrivateFieldSet(this, _ConsoleMessage_stackTraceLocations, stackTraceLocations, "f");
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var _a;
|
|
42
|
-
return (_a = __classPrivateFieldGet(this, _ConsoleMessage_stackTraceLocations, "f")[0]) !== null && _a !== void 0 ? _a : {};
|
|
39
|
+
this.logLevel = logLevel;
|
|
40
|
+
this.tag = tag;
|
|
43
41
|
}
|
|
44
42
|
stackTrace() {
|
|
45
43
|
return __classPrivateFieldGet(this, _ConsoleMessage_stackTraceLocations, "f");
|
|
@@ -280,7 +280,7 @@ var printUsefulErrorMessage = (err, logLevel, indent) => {
|
|
|
280
280
|
}, "Alternatively, you can decrease the memory size of your Lambda function to a value below 3008 MB. See: https://www.remotion.dev/docs/lambda/runtime#core-count--vcpus");
|
|
281
281
|
Log.warn({ indent, logLevel }, "See also: https://repost.aws/questions/QUKruWYNDYTSmP17jCnIz6IQ/questions/QUKruWYNDYTSmP17jCnIz6IQ/unable-to-set-lambda-memory-over-3008mb");
|
|
282
282
|
}
|
|
283
|
-
if (err.stack?.includes("TooManyRequestsException: Rate Exceeded.")) {
|
|
283
|
+
if (err.stack?.includes("TooManyRequestsException: Rate Exceeded.") || err.message?.includes("ConcurrentInvocationLimitExceeded")) {
|
|
284
284
|
Log.info({ indent, logLevel });
|
|
285
285
|
Log.info({ indent, logLevel }, "\uD83D\uDCA1 This error indicates that your Lambda concurrency limit is too low. See: https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit");
|
|
286
286
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -674,7 +674,7 @@ var formatRemoteObject = (remoteObject) => {
|
|
|
674
674
|
if (isDelayRenderClear) {
|
|
675
675
|
return chalk.gray(`${remoteObject.value}`);
|
|
676
676
|
}
|
|
677
|
-
return
|
|
677
|
+
return `${remoteObject.value}`;
|
|
678
678
|
}
|
|
679
679
|
if (remoteObject.type === "number") {
|
|
680
680
|
return chalk.yellow(`${remoteObject.value}`);
|
|
@@ -690,7 +690,7 @@ var formatRemoteObject = (remoteObject) => {
|
|
|
690
690
|
}
|
|
691
691
|
if (remoteObject.type === "object") {
|
|
692
692
|
if (remoteObject.subtype === "null") {
|
|
693
|
-
return
|
|
693
|
+
return `null`;
|
|
694
694
|
}
|
|
695
695
|
return chalk.reset(`Object`);
|
|
696
696
|
}
|
|
@@ -878,21 +878,24 @@ class ConsoleMessage {
|
|
|
878
878
|
args;
|
|
879
879
|
previewString;
|
|
880
880
|
#stackTraceLocations;
|
|
881
|
+
logLevel;
|
|
882
|
+
tag;
|
|
881
883
|
constructor({
|
|
882
884
|
type,
|
|
883
885
|
text,
|
|
884
886
|
args,
|
|
885
887
|
stackTraceLocations,
|
|
886
|
-
previewString
|
|
888
|
+
previewString,
|
|
889
|
+
logLevel,
|
|
890
|
+
tag
|
|
887
891
|
}) {
|
|
888
892
|
this.type = type;
|
|
889
893
|
this.text = text;
|
|
890
894
|
this.args = args;
|
|
891
895
|
this.previewString = previewString;
|
|
892
896
|
this.#stackTraceLocations = stackTraceLocations;
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
return this.#stackTraceLocations[0] ?? {};
|
|
897
|
+
this.logLevel = logLevel;
|
|
898
|
+
this.tag = tag;
|
|
896
899
|
}
|
|
897
900
|
stackTrace() {
|
|
898
901
|
return this.#stackTraceLocations;
|
|
@@ -2706,6 +2709,22 @@ var shouldHideWarning = (log) => {
|
|
|
2706
2709
|
}
|
|
2707
2710
|
return false;
|
|
2708
2711
|
};
|
|
2712
|
+
var format = (eventType, args) => {
|
|
2713
|
+
const previewString = args.filter((a) => !(a.type === "symbol" && a.description?.includes(`__remotion_`))).map((a) => formatRemoteObject(a)).filter(Boolean).join(" ");
|
|
2714
|
+
let logLevelFromRemotionLog = null;
|
|
2715
|
+
let tag = null;
|
|
2716
|
+
for (const a of args) {
|
|
2717
|
+
if (a.type === "symbol" && a.description?.includes(`__remotion_level_`)) {
|
|
2718
|
+
logLevelFromRemotionLog = a.description?.split("__remotion_level_")?.[1]?.replace(")", "");
|
|
2719
|
+
}
|
|
2720
|
+
if (a.type === "symbol" && a.description?.includes(`__remotion_tag_`)) {
|
|
2721
|
+
tag = a.description?.split("__remotion_tag_")?.[1]?.replace(")", "");
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
const logLevelFromEvent = eventType === "debug" ? "verbose" : eventType === "error" ? "error" : eventType === "warning" ? "warn" : "verbose";
|
|
2725
|
+
return { previewString, logLevelFromRemotionLog, logLevelFromEvent, tag };
|
|
2726
|
+
};
|
|
2727
|
+
|
|
2709
2728
|
class Page extends EventEmitter {
|
|
2710
2729
|
id;
|
|
2711
2730
|
static async _create({
|
|
@@ -2794,14 +2813,15 @@ class Page extends EventEmitter {
|
|
|
2794
2813
|
});
|
|
2795
2814
|
}
|
|
2796
2815
|
#onConsole = (log) => {
|
|
2797
|
-
const
|
|
2816
|
+
const stackTrace = log.stackTrace();
|
|
2817
|
+
const { url, columnNumber, lineNumber } = stackTrace[0] ?? {};
|
|
2798
2818
|
const logLevel = this.logLevel;
|
|
2799
2819
|
const indent = this.indent;
|
|
2800
2820
|
if (shouldHideWarning(log)) {
|
|
2801
2821
|
return;
|
|
2802
2822
|
}
|
|
2803
2823
|
this.onBrowserLog?.({
|
|
2804
|
-
stackTrace
|
|
2824
|
+
stackTrace,
|
|
2805
2825
|
text: log.text,
|
|
2806
2826
|
type: log.type
|
|
2807
2827
|
});
|
|
@@ -2818,7 +2838,7 @@ class Page extends EventEmitter {
|
|
|
2818
2838
|
const isDelayRenderClear = log.previewString.includes(NoReactInternals2.DELAY_RENDER_CLEAR_TOKEN);
|
|
2819
2839
|
const tabInfo = `Tab ${this.pageIndex}`;
|
|
2820
2840
|
const tagInfo = [origPosition?.name, isDelayRenderClear ? null : file].filter(truthy).join("@");
|
|
2821
|
-
const tag = [tabInfo, tagInfo].filter(truthy).join(", ");
|
|
2841
|
+
const tag = [tabInfo, log.tag, log.tag ? null : tagInfo].filter(truthy).join(", ");
|
|
2822
2842
|
if (log.type === "error") {
|
|
2823
2843
|
Log.error({
|
|
2824
2844
|
logLevel,
|
|
@@ -2826,11 +2846,11 @@ class Page extends EventEmitter {
|
|
|
2826
2846
|
indent
|
|
2827
2847
|
}, log.previewString);
|
|
2828
2848
|
} else {
|
|
2829
|
-
Log
|
|
2849
|
+
Log[logLevel]({
|
|
2830
2850
|
logLevel,
|
|
2831
2851
|
tag,
|
|
2832
2852
|
indent
|
|
2833
|
-
},
|
|
2853
|
+
}, log.previewString);
|
|
2834
2854
|
}
|
|
2835
2855
|
} else if (log.type === "error") {
|
|
2836
2856
|
if (log.text.includes("Failed to load resource:")) {
|
|
@@ -2879,16 +2899,16 @@ class Page extends EventEmitter {
|
|
|
2879
2899
|
return releaseObject(this.#client, arg);
|
|
2880
2900
|
});
|
|
2881
2901
|
}
|
|
2882
|
-
const previewString = args
|
|
2883
|
-
return formatRemoteObject(arg);
|
|
2884
|
-
}).join(", ") : "";
|
|
2902
|
+
const { previewString, logLevelFromRemotionLog, logLevelFromEvent, tag } = format(level, args ?? []);
|
|
2885
2903
|
if (source !== "worker") {
|
|
2886
2904
|
const message = new ConsoleMessage({
|
|
2887
2905
|
type: level,
|
|
2888
2906
|
text,
|
|
2889
2907
|
args: [],
|
|
2890
2908
|
stackTraceLocations: [{ url, lineNumber }],
|
|
2891
|
-
previewString
|
|
2909
|
+
previewString,
|
|
2910
|
+
logLevel: logLevelFromRemotionLog ?? logLevelFromEvent,
|
|
2911
|
+
tag
|
|
2892
2912
|
});
|
|
2893
2913
|
this.onBrowserLog?.({
|
|
2894
2914
|
stackTrace: message.stackTrace(),
|
|
@@ -3000,13 +3020,16 @@ class Page extends EventEmitter {
|
|
|
3000
3020
|
});
|
|
3001
3021
|
}
|
|
3002
3022
|
}
|
|
3003
|
-
const previewString = args.map((a) =>
|
|
3023
|
+
const { previewString, logLevelFromRemotionLog, logLevelFromEvent, tag } = format(eventType, args.map((a) => a._remoteObject) ?? []);
|
|
3024
|
+
const logLevel = logLevelFromRemotionLog ?? logLevelFromEvent;
|
|
3004
3025
|
const message = new ConsoleMessage({
|
|
3005
3026
|
type: eventType,
|
|
3006
3027
|
text: textTokens.join(" "),
|
|
3007
3028
|
args,
|
|
3008
3029
|
stackTraceLocations,
|
|
3009
|
-
previewString
|
|
3030
|
+
previewString,
|
|
3031
|
+
logLevel,
|
|
3032
|
+
tag
|
|
3010
3033
|
});
|
|
3011
3034
|
this.#onConsole(message);
|
|
3012
3035
|
}
|
|
@@ -3187,8 +3210,8 @@ var shouldLogBrowserMessage = (message) => {
|
|
|
3187
3210
|
return true;
|
|
3188
3211
|
};
|
|
3189
3212
|
var parseBrowserLogMessage = (input) => {
|
|
3190
|
-
const
|
|
3191
|
-
const match = input.match(
|
|
3213
|
+
const format2 = /^\[([0-9]{4})\/([0-9]{6})\.([0-9]{6}):([A-Z]+):(.*)\(([0-9]+)\)\](.*)/;
|
|
3214
|
+
const match = input.match(format2);
|
|
3192
3215
|
if (!match) {
|
|
3193
3216
|
return null;
|
|
3194
3217
|
}
|
|
@@ -15144,11 +15167,11 @@ var makeInlineAudioMixing = (dir) => {
|
|
|
15144
15167
|
const isLast = asset.frame === totalNumberOfFrames + firstFrame - 1;
|
|
15145
15168
|
const samplesToShaveFromStart = trimLeftOffset * DEFAULT_SAMPLE_RATE;
|
|
15146
15169
|
const samplesToShaveFromEnd = trimRightOffset * DEFAULT_SAMPLE_RATE;
|
|
15147
|
-
if (Math.abs(Math.round(samplesToShaveFromEnd) - samplesToShaveFromEnd) > 0.
|
|
15148
|
-
throw new Error(
|
|
15170
|
+
if (Math.abs(Math.round(samplesToShaveFromEnd) - samplesToShaveFromEnd) > 0.0000001) {
|
|
15171
|
+
throw new Error(`samplesToShaveFromEnd should be approximately an integer, is${samplesToShaveFromEnd}`);
|
|
15149
15172
|
}
|
|
15150
|
-
if (Math.abs(Math.round(samplesToShaveFromStart) - samplesToShaveFromStart) > 0.
|
|
15151
|
-
throw new Error(
|
|
15173
|
+
if (Math.abs(Math.round(samplesToShaveFromStart) - samplesToShaveFromStart) > 0.0000001) {
|
|
15174
|
+
throw new Error(`samplesToShaveFromStart should be approximately an integer, is ${samplesToShaveFromStart}`);
|
|
15152
15175
|
}
|
|
15153
15176
|
if (isFirst) {
|
|
15154
15177
|
arr = arr.slice(Math.round(samplesToShaveFromStart) * asset.numberOfChannels);
|
|
@@ -15157,7 +15180,7 @@ var makeInlineAudioMixing = (dir) => {
|
|
|
15157
15180
|
arr = arr.slice(0, arr.length + Math.round(samplesToShaveFromEnd) * asset.numberOfChannels);
|
|
15158
15181
|
}
|
|
15159
15182
|
const positionInSeconds = (asset.frame - firstFrame) / fps - (isFirst ? 0 : trimLeftOffset);
|
|
15160
|
-
const position = Math.round(positionInSeconds * asset.numberOfChannels *
|
|
15183
|
+
const position = Math.round(positionInSeconds * DEFAULT_SAMPLE_RATE) * asset.numberOfChannels * BYTES_PER_SAMPLE;
|
|
15161
15184
|
writeSync(fileDescriptor, arr, 0, arr.byteLength, 44 + position);
|
|
15162
15185
|
};
|
|
15163
15186
|
return {
|
|
@@ -16524,7 +16547,7 @@ var printUsefulErrorMessage = (err, logLevel, indent) => {
|
|
|
16524
16547
|
}, "Alternatively, you can decrease the memory size of your Lambda function to a value below 3008 MB. See: https://www.remotion.dev/docs/lambda/runtime#core-count--vcpus");
|
|
16525
16548
|
Log.warn({ indent, logLevel }, "See also: https://repost.aws/questions/QUKruWYNDYTSmP17jCnIz6IQ/questions/QUKruWYNDYTSmP17jCnIz6IQ/unable-to-set-lambda-memory-over-3008mb");
|
|
16526
16549
|
}
|
|
16527
|
-
if (err.stack?.includes("TooManyRequestsException: Rate Exceeded.")) {
|
|
16550
|
+
if (err.stack?.includes("TooManyRequestsException: Rate Exceeded.") || err.message?.includes("ConcurrentInvocationLimitExceeded")) {
|
|
16528
16551
|
Log.info({ indent, logLevel });
|
|
16529
16552
|
Log.info({ indent, logLevel }, "\uD83D\uDCA1 This error indicates that your Lambda concurrency limit is too low. See: https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit");
|
|
16530
16553
|
}
|
|
@@ -17148,7 +17171,7 @@ var validPixelFormatsForCodec = (codec) => {
|
|
|
17148
17171
|
if (codec === "vp8" || codec === "vp9") {
|
|
17149
17172
|
return validPixelFormats;
|
|
17150
17173
|
}
|
|
17151
|
-
return validPixelFormats.filter((
|
|
17174
|
+
return validPixelFormats.filter((format2) => format2 !== "yuva420p");
|
|
17152
17175
|
};
|
|
17153
17176
|
var validateSelectedPixelFormatAndCodecCombination = (pixelFormat, codec) => {
|
|
17154
17177
|
if (typeof pixelFormat === "undefined") {
|
|
@@ -18075,7 +18098,7 @@ import * as assert2 from "node:assert";
|
|
|
18075
18098
|
// src/screenshot-task.ts
|
|
18076
18099
|
import fs13 from "node:fs";
|
|
18077
18100
|
var screenshotTask = async ({
|
|
18078
|
-
format,
|
|
18101
|
+
format: format2,
|
|
18079
18102
|
height,
|
|
18080
18103
|
omitBackground,
|
|
18081
18104
|
page,
|
|
@@ -18097,7 +18120,7 @@ var screenshotTask = async ({
|
|
|
18097
18120
|
const cap = startPerfMeasure("capture");
|
|
18098
18121
|
try {
|
|
18099
18122
|
let result;
|
|
18100
|
-
if (
|
|
18123
|
+
if (format2 === "pdf") {
|
|
18101
18124
|
const res = await client.send("Page.printToPDF", {
|
|
18102
18125
|
paperWidth: width / 96,
|
|
18103
18126
|
paperHeight: height / 96,
|
|
@@ -18113,7 +18136,7 @@ var screenshotTask = async ({
|
|
|
18113
18136
|
const fromSurface = !process.env.DISABLE_FROM_SURFACE || height > 8192 || width > 8192;
|
|
18114
18137
|
const scaleFactor = fromSurface ? 1 : scale;
|
|
18115
18138
|
const { value } = await client.send("Page.captureScreenshot", {
|
|
18116
|
-
format,
|
|
18139
|
+
format: format2,
|
|
18117
18140
|
quality: jpegQuality,
|
|
18118
18141
|
clip: {
|
|
18119
18142
|
x: 0,
|
package/dist/format-logs.js
CHANGED
|
@@ -12,7 +12,7 @@ const formatRemoteObject = (remoteObject) => {
|
|
|
12
12
|
if (isDelayRenderClear) {
|
|
13
13
|
return chalk_1.chalk.gray(`${remoteObject.value}`);
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return `${remoteObject.value}`;
|
|
16
16
|
}
|
|
17
17
|
if (remoteObject.type === 'number') {
|
|
18
18
|
return chalk_1.chalk.yellow(`${remoteObject.value}`);
|
|
@@ -28,7 +28,7 @@ const formatRemoteObject = (remoteObject) => {
|
|
|
28
28
|
}
|
|
29
29
|
if (remoteObject.type === 'object') {
|
|
30
30
|
if (remoteObject.subtype === 'null') {
|
|
31
|
-
return
|
|
31
|
+
return `null`;
|
|
32
32
|
}
|
|
33
33
|
return chalk_1.chalk.reset(`Object`);
|
|
34
34
|
}
|
|
@@ -5,7 +5,7 @@ const logger_1 = require("./logger");
|
|
|
5
5
|
const truthy_1 = require("./truthy");
|
|
6
6
|
let alreadyPrintedCache = [];
|
|
7
7
|
const printUsefulErrorMessage = (err, logLevel, indent) => {
|
|
8
|
-
var _a, _b;
|
|
8
|
+
var _a, _b, _c;
|
|
9
9
|
const errorStack = err.stack;
|
|
10
10
|
if (errorStack && alreadyPrintedCache.includes(errorStack)) {
|
|
11
11
|
return;
|
|
@@ -48,7 +48,8 @@ const printUsefulErrorMessage = (err, logLevel, indent) => {
|
|
|
48
48
|
}, 'Alternatively, you can decrease the memory size of your Lambda function to a value below 3008 MB. See: https://www.remotion.dev/docs/lambda/runtime#core-count--vcpus');
|
|
49
49
|
logger_1.Log.warn({ indent, logLevel }, 'See also: https://repost.aws/questions/QUKruWYNDYTSmP17jCnIz6IQ/questions/QUKruWYNDYTSmP17jCnIz6IQ/unable-to-set-lambda-memory-over-3008mb');
|
|
50
50
|
}
|
|
51
|
-
if ((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('TooManyRequestsException: Rate Exceeded.'))
|
|
51
|
+
if (((_a = err.stack) === null || _a === void 0 ? void 0 : _a.includes('TooManyRequestsException: Rate Exceeded.')) ||
|
|
52
|
+
((_b = err.message) === null || _b === void 0 ? void 0 : _b.includes('ConcurrentInvocationLimitExceeded'))) {
|
|
52
53
|
logger_1.Log.info({ indent, logLevel });
|
|
53
54
|
logger_1.Log.info({ indent, logLevel }, '💡 This error indicates that your Lambda concurrency limit is too low. See: https://www.remotion.dev/docs/lambda/troubleshooting/rate-limit');
|
|
54
55
|
}
|
|
@@ -68,7 +69,7 @@ const printUsefulErrorMessage = (err, logLevel, indent) => {
|
|
|
68
69
|
logger_1.Log.info({ indent, logLevel }, '💡 Fix for this issue: https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl');
|
|
69
70
|
}
|
|
70
71
|
if (err.message.includes('Minified React error #306')) {
|
|
71
|
-
const componentName = (
|
|
72
|
+
const componentName = (_c = err.message.match(/<\w+>/)) === null || _c === void 0 ? void 0 : _c[0];
|
|
72
73
|
logger_1.Log.info({ indent, logLevel }, [
|
|
73
74
|
'💡 This error indicates that the component',
|
|
74
75
|
componentName ? `(${componentName})` : null,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.354",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.17.1",
|
|
21
|
-
"remotion": "4.0.
|
|
22
|
-
"@remotion/streaming": "4.0.
|
|
21
|
+
"remotion": "4.0.354",
|
|
22
|
+
"@remotion/streaming": "4.0.354"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"react-dom": "19.0.0",
|
|
34
34
|
"@types/ws": "8.5.10",
|
|
35
35
|
"eslint": "9.19.0",
|
|
36
|
-
"@remotion/example-videos": "4.0.
|
|
37
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
36
|
+
"@remotion/example-videos": "4.0.354",
|
|
37
|
+
"@remotion/eslint-config-internal": "4.0.354"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@remotion/compositor-darwin-
|
|
41
|
-
"@remotion/compositor-darwin-
|
|
42
|
-
"@remotion/compositor-linux-arm64-
|
|
43
|
-
"@remotion/compositor-linux-
|
|
44
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
45
|
-
"@remotion/compositor-
|
|
46
|
-
"@remotion/compositor-
|
|
40
|
+
"@remotion/compositor-darwin-x64": "4.0.354",
|
|
41
|
+
"@remotion/compositor-darwin-arm64": "4.0.354",
|
|
42
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.354",
|
|
43
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.354",
|
|
44
|
+
"@remotion/compositor-linux-x64-musl": "4.0.354",
|
|
45
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.354",
|
|
46
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.354"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"remotion",
|