@remotion/renderer 4.0.127 → 4.0.128
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.
|
@@ -12,7 +12,8 @@ const getExtraFramesToCapture = ({ compositionStart, realFrameRange, fps, forSea
|
|
|
12
12
|
// If the feature is disabled, don't capture extra frames.
|
|
13
13
|
if (!forSeamlessAacConcatenation) {
|
|
14
14
|
return {
|
|
15
|
-
|
|
15
|
+
extraFramesToCaptureAssetsBackend: [],
|
|
16
|
+
extraFramesToCaptureAssetsFrontend: [],
|
|
16
17
|
chunkLengthInSeconds: (realFrameRange[1] - realFrameRange[0] + 1) / fps,
|
|
17
18
|
trimLeftOffset: 0,
|
|
18
19
|
trimRightOffset: 0,
|
|
@@ -51,10 +52,8 @@ const getExtraFramesToCapture = ({ compositionStart, realFrameRange, fps, forSea
|
|
|
51
52
|
const trimRightOffset = (aacAdjustedRightEnd * fps - Math.ceil(aacAdjustedRightEnd * fps)) / fps;
|
|
52
53
|
const chunkLengthInSeconds = aacAdjustedRightEnd - aacAdjustedLeftEnd;
|
|
53
54
|
return {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
...extraFramesToCaptureAudioOnlyBackend,
|
|
57
|
-
],
|
|
55
|
+
extraFramesToCaptureAssetsFrontend: extraFramesToCaptureAudioOnlyFrontend,
|
|
56
|
+
extraFramesToCaptureAssetsBackend: extraFramesToCaptureAudioOnlyBackend,
|
|
58
57
|
chunkLengthInSeconds,
|
|
59
58
|
trimLeftOffset,
|
|
60
59
|
trimRightOffset,
|
package/dist/index.d.ts
CHANGED
package/dist/port-config.d.ts
CHANGED
package/dist/render-frames.js
CHANGED
|
@@ -48,7 +48,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
48
48
|
}
|
|
49
49
|
const downloadPromises = [];
|
|
50
50
|
const realFrameRange = (0, get_frame_to_render_1.getRealFrameRange)(composition.durationInFrames, frameRange);
|
|
51
|
-
const {
|
|
51
|
+
const { extraFramesToCaptureAssetsBackend, extraFramesToCaptureAssetsFrontend, chunkLengthInSeconds, trimLeftOffset, trimRightOffset, } = (0, get_extra_frames_to_capture_1.getExtraFramesToCapture)({
|
|
52
52
|
fps: composition.fps,
|
|
53
53
|
compositionStart,
|
|
54
54
|
realFrameRange,
|
|
@@ -306,7 +306,12 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
|
-
|
|
309
|
+
// Render the extra frames at the beginning of the video first,
|
|
310
|
+
// then the regular frames, then the extra frames at the end of the video.
|
|
311
|
+
// While the order technically doesn't matter, components such as <Video> are
|
|
312
|
+
// not always frame perfect and give a flicker.
|
|
313
|
+
// We reduce the chance of flicker by rendering the frames in order.
|
|
314
|
+
await Promise.all(extraFramesToCaptureAssetsFrontend.map((frame) => {
|
|
310
315
|
return renderFrameAndRetryTargetClose({
|
|
311
316
|
frame,
|
|
312
317
|
index: null,
|
|
@@ -315,7 +320,7 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
315
320
|
assetsOnly: true,
|
|
316
321
|
});
|
|
317
322
|
}));
|
|
318
|
-
|
|
323
|
+
await Promise.all(framesToRender.map((frame, index) => {
|
|
319
324
|
return renderFrameAndRetryTargetClose({
|
|
320
325
|
frame,
|
|
321
326
|
index,
|
|
@@ -324,28 +329,32 @@ const innerRenderFrames = async ({ onFrameUpdate, outputDir, onStart, serialized
|
|
|
324
329
|
assetsOnly: false,
|
|
325
330
|
});
|
|
326
331
|
}));
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
trimLeftOffset,
|
|
338
|
-
trimRightOffset,
|
|
339
|
-
chunkLengthInSeconds,
|
|
340
|
-
forSeamlessAacConcatenation,
|
|
341
|
-
},
|
|
342
|
-
frameCount: framesToRender.length,
|
|
343
|
-
};
|
|
344
|
-
return returnValue;
|
|
345
|
-
});
|
|
346
|
-
const result = await happyPath;
|
|
332
|
+
await Promise.all(extraFramesToCaptureAssetsBackend.map((frame) => {
|
|
333
|
+
return renderFrameAndRetryTargetClose({
|
|
334
|
+
frame,
|
|
335
|
+
index: null,
|
|
336
|
+
retriesLeft: MAX_RETRIES_PER_FRAME,
|
|
337
|
+
attempt: 1,
|
|
338
|
+
assetsOnly: true,
|
|
339
|
+
});
|
|
340
|
+
}));
|
|
341
|
+
const firstFrameIndex = countType === 'from-zero' ? 0 : framesToRender[0];
|
|
347
342
|
await Promise.all(downloadPromises);
|
|
348
|
-
return
|
|
343
|
+
return {
|
|
344
|
+
assetsInfo: {
|
|
345
|
+
assets: assets.sort((a, b) => {
|
|
346
|
+
return a.frame - b.frame;
|
|
347
|
+
}),
|
|
348
|
+
imageSequenceName: node_path_1.default.join(frameDir, `element-%0${filePadLength}d.${imageFormat}`),
|
|
349
|
+
firstFrameIndex,
|
|
350
|
+
downloadMap,
|
|
351
|
+
trimLeftOffset,
|
|
352
|
+
trimRightOffset,
|
|
353
|
+
chunkLengthInSeconds,
|
|
354
|
+
forSeamlessAacConcatenation,
|
|
355
|
+
},
|
|
356
|
+
frameCount: framesToRender.length,
|
|
357
|
+
};
|
|
349
358
|
};
|
|
350
359
|
const internalRenderFramesRaw = ({ browserExecutable, cancelSignal, chromiumOptions, composition, concurrency, envVariables, everyNthFrame, frameRange, imageFormat, indent, jpegQuality, muted, onBrowserLog, onDownload, onFrameBuffer, onFrameUpdate, onStart, outputDir, port, puppeteerInstance, scale, server, timeoutInMilliseconds, logLevel, webpackBundleOrServeUrl, serializedInputPropsWithCustomSchema, serializedResolvedPropsWithCustomSchema, offthreadVideoCacheSizeInBytes, parallelEncodingEnabled, binariesDirectory, forSeamlessAacConcatenation, compositionStart, }) => {
|
|
351
360
|
(0, validate_1.validateDimension)(composition.height, 'height', 'in the `config` object passed to `renderFrames()`');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.128",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"extract-zip": "2.0.1",
|
|
19
19
|
"source-map": "^0.8.0-beta.0",
|
|
20
20
|
"ws": "8.7.0",
|
|
21
|
-
"remotion": "4.0.
|
|
21
|
+
"remotion": "4.0.128"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"vitest": "0.31.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@remotion/compositor-darwin-
|
|
44
|
-
"@remotion/compositor-darwin-
|
|
45
|
-
"@remotion/compositor-linux-arm64-
|
|
46
|
-
"@remotion/compositor-linux-
|
|
47
|
-
"@remotion/compositor-linux-
|
|
48
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
49
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
43
|
+
"@remotion/compositor-darwin-x64": "4.0.128",
|
|
44
|
+
"@remotion/compositor-darwin-arm64": "4.0.128",
|
|
45
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.128",
|
|
46
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.128",
|
|
47
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.128",
|
|
48
|
+
"@remotion/compositor-linux-x64-musl": "4.0.128",
|
|
49
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.128"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"remotion",
|