@remotion/renderer 3.2.27 → 3.2.29
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/check-apple-silicon.d.ts +1 -0
- package/dist/check-apple-silicon.js +51 -0
- package/dist/combine-videos.js +1 -1
- package/dist/ffmpeg-args-hook.d.ts +4 -0
- package/dist/ffmpeg-args-hook.js +2 -0
- package/dist/ffmpeg-flags.d.ts +1 -2
- package/dist/ffmpeg-flags.js +1 -5
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -1
- package/dist/make-assets-download-dir.d.ts +1 -0
- package/dist/make-assets-download-dir.js +13 -0
- package/dist/render-media.d.ts +1 -0
- package/dist/render-media.js +6 -3
- package/dist/render-still.d.ts +1 -1
- package/dist/validate-ffmpeg-args-hook.d.ts +2 -0
- package/dist/validate-ffmpeg-args-hook.js +12 -0
- package/dist/validate-ffmpeg-override-fn.d.ts +2 -0
- package/dist/validate-ffmpeg-override-fn.js +12 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const warnIfAppleSiliconIsNotUsingArm64Architecture: () => void;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.warnIfAppleSiliconIsNotUsingArm64Architecture = void 0;
|
|
27
|
+
const os = __importStar(require("os"));
|
|
28
|
+
const warnIfAppleSiliconIsNotUsingArm64Architecture = () => {
|
|
29
|
+
// see https://github.com/nodejs/node/issues/41900#issuecomment-1113511254
|
|
30
|
+
const cpus = os.cpus();
|
|
31
|
+
const isAppleSilicon = cpus[0].model.includes('Apple');
|
|
32
|
+
const isArm64 = os.arch() === 'arm64';
|
|
33
|
+
if (isAppleSilicon && !isArm64) {
|
|
34
|
+
const recommendedNodeVersion = 16;
|
|
35
|
+
const version = process.version.replace('v', '').split('.');
|
|
36
|
+
const majorVersion = Number(version[0]);
|
|
37
|
+
const recommendNodeUpgrade = majorVersion < recommendedNodeVersion;
|
|
38
|
+
console.warn([
|
|
39
|
+
`⚠️ Apple Silicon detected but Node.JS running under Rosetta. This will cause performance issues.\n`,
|
|
40
|
+
`Recommended actions:\n`,
|
|
41
|
+
recommendNodeUpgrade
|
|
42
|
+
? ` - Upgrade to Node ${recommendedNodeVersion} or later\n`
|
|
43
|
+
: ' - Run Node using `arch -arm64` architecture\n',
|
|
44
|
+
'See https://remotion.dev/docs/troubleshooting/rosetta for more information.',
|
|
45
|
+
'---',
|
|
46
|
+
]
|
|
47
|
+
.filter(Boolean)
|
|
48
|
+
.join('\n'));
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.warnIfAppleSiliconIsNotUsingArm64Architecture = warnIfAppleSiliconIsNotUsingArm64Architecture;
|
package/dist/combine-videos.js
CHANGED
|
@@ -37,7 +37,7 @@ const combineVideos = async ({ files, filelistDir, output, onProgress, numberOfF
|
|
|
37
37
|
(0, is_audio_codec_1.isAudioCodec)(codec) ? null : codec === 'gif' ? 'gif' : 'copy',
|
|
38
38
|
'-c:a',
|
|
39
39
|
(0, get_audio_codec_name_1.getAudioCodecName)(codec),
|
|
40
|
-
// Set max bitrate up to
|
|
40
|
+
// Set max bitrate up to 512kbps, will choose lower if that's too much
|
|
41
41
|
'-b:a',
|
|
42
42
|
'512K',
|
|
43
43
|
codec === 'h264' ? '-movflags' : null,
|
package/dist/ffmpeg-flags.d.ts
CHANGED
|
@@ -2,10 +2,9 @@ export declare type FfmpegVersion = [number, number, number] | null;
|
|
|
2
2
|
export declare const getFfmpegBuildInfo: (options: {
|
|
3
3
|
ffmpegExecutable: string | null;
|
|
4
4
|
}) => Promise<string>;
|
|
5
|
-
export declare const ffmpegHasFeature: ({ ffmpegExecutable, feature,
|
|
5
|
+
export declare const ffmpegHasFeature: ({ ffmpegExecutable, feature, }: {
|
|
6
6
|
ffmpegExecutable: string | null;
|
|
7
7
|
feature: 'enable-gpl' | 'enable-libx265' | 'enable-libvpx';
|
|
8
|
-
isLambda: boolean;
|
|
9
8
|
}) => Promise<boolean>;
|
|
10
9
|
export declare const parseFfmpegVersion: (buildconf: string) => FfmpegVersion;
|
|
11
10
|
export declare const getFfmpegVersion: (options: {
|
package/dist/ffmpeg-flags.js
CHANGED
|
@@ -19,11 +19,7 @@ const getFfmpegBuildInfo = async (options) => {
|
|
|
19
19
|
return buildConfig;
|
|
20
20
|
};
|
|
21
21
|
exports.getFfmpegBuildInfo = getFfmpegBuildInfo;
|
|
22
|
-
const ffmpegHasFeature = async ({ ffmpegExecutable, feature,
|
|
23
|
-
if (isLambda) {
|
|
24
|
-
// When rendering in the cloud, we don't need a local binary
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
22
|
+
const ffmpegHasFeature = async ({ ffmpegExecutable, feature, }) => {
|
|
27
23
|
if (!(await (0, validate_ffmpeg_1.binaryExists)('ffmpeg', ffmpegExecutable))) {
|
|
28
24
|
return false;
|
|
29
25
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -26,17 +26,17 @@ export { PixelFormat } from './pixel-format';
|
|
|
26
26
|
export { ProResProfile } from './prores-profile';
|
|
27
27
|
export { renderFrames } from './render-frames';
|
|
28
28
|
export { renderMedia, RenderMediaOnProgress, RenderMediaOptions, StitchingState, } from './render-media';
|
|
29
|
-
export { renderStill } from './render-still';
|
|
29
|
+
export { renderStill, RenderStillOptions } from './render-still';
|
|
30
30
|
export { StitcherOptions, stitchFramesToVideo } from './stitch-frames-to-video';
|
|
31
31
|
export { SymbolicatedStackFrame } from './symbolicate-stacktrace';
|
|
32
32
|
export { OnStartData, RenderFramesOutput } from './types';
|
|
33
33
|
export { OpenGlRenderer } from './validate-opengl-renderer';
|
|
34
|
+
export { validateOutputFilename } from './validate-output-filename';
|
|
34
35
|
export declare const RenderInternals: {
|
|
35
36
|
ensureLocalBrowser: (browser: import("./browser").Browser, preferredBrowserExecutable: import("./browser-executable").BrowserExecutable) => Promise<void>;
|
|
36
|
-
ffmpegHasFeature: ({ ffmpegExecutable, feature,
|
|
37
|
+
ffmpegHasFeature: ({ ffmpegExecutable, feature, }: {
|
|
37
38
|
ffmpegExecutable: string | null;
|
|
38
39
|
feature: "enable-gpl" | "enable-libx265" | "enable-libvpx";
|
|
39
|
-
isLambda: boolean;
|
|
40
40
|
}) => Promise<boolean>;
|
|
41
41
|
getActualConcurrency: (userPreference: number | null) => number;
|
|
42
42
|
getFfmpegVersion: (options: {
|
package/dist/index.js
CHANGED
|
@@ -26,13 +26,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.RenderInternals = exports.stitchFramesToVideo = exports.renderStill = exports.renderMedia = exports.renderFrames = exports.openBrowser = exports.makeCancelSignal = exports.validImageFormats = exports.validateSelectedPixelFormatAndImageFormatCombination = exports.getCompositions = exports.ErrorWithStackFrame = exports.combineVideos = void 0;
|
|
29
|
+
exports.RenderInternals = exports.validateOutputFilename = exports.stitchFramesToVideo = exports.renderStill = exports.renderMedia = exports.renderFrames = exports.openBrowser = exports.makeCancelSignal = exports.validImageFormats = exports.validateSelectedPixelFormatAndImageFormatCombination = exports.getCompositions = exports.ErrorWithStackFrame = exports.combineVideos = void 0;
|
|
30
30
|
const execa_1 = __importDefault(require("execa"));
|
|
31
31
|
const download_file_1 = require("./assets/download-file");
|
|
32
32
|
const download_map_1 = require("./assets/download-map");
|
|
33
33
|
const browser_1 = require("./browser");
|
|
34
34
|
const TimeoutSettings_1 = require("./browser/TimeoutSettings");
|
|
35
35
|
const can_use_parallel_encoding_1 = require("./can-use-parallel-encoding");
|
|
36
|
+
const check_apple_silicon_1 = require("./check-apple-silicon");
|
|
36
37
|
const codec_1 = require("./codec");
|
|
37
38
|
const convert_to_positive_frame_index_1 = require("./convert-to-positive-frame-index");
|
|
38
39
|
const crf_1 = require("./crf");
|
|
@@ -95,6 +96,8 @@ var render_still_1 = require("./render-still");
|
|
|
95
96
|
Object.defineProperty(exports, "renderStill", { enumerable: true, get: function () { return render_still_1.renderStill; } });
|
|
96
97
|
var stitch_frames_to_video_2 = require("./stitch-frames-to-video");
|
|
97
98
|
Object.defineProperty(exports, "stitchFramesToVideo", { enumerable: true, get: function () { return stitch_frames_to_video_2.stitchFramesToVideo; } });
|
|
99
|
+
var validate_output_filename_1 = require("./validate-output-filename");
|
|
100
|
+
Object.defineProperty(exports, "validateOutputFilename", { enumerable: true, get: function () { return validate_output_filename_1.validateOutputFilename; } });
|
|
98
101
|
exports.RenderInternals = {
|
|
99
102
|
ensureLocalBrowser: get_local_browser_executable_1.ensureLocalBrowser,
|
|
100
103
|
ffmpegHasFeature: ffmpeg_flags_1.ffmpegHasFeature,
|
|
@@ -159,3 +162,5 @@ exports.RenderInternals = {
|
|
|
159
162
|
cleanDownloadMap: download_map_1.cleanDownloadMap,
|
|
160
163
|
convertToPositiveFrameIndex: convert_to_positive_frame_index_1.convertToPositiveFrameIndex,
|
|
161
164
|
};
|
|
165
|
+
// Warn of potential performance issues with Apple Silicon (M1 chip under Rosetta)
|
|
166
|
+
(0, check_apple_silicon_1.warnIfAppleSiliconIsNotUsingArm64Architecture)();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const makeAssetsDownloadTmpDir: () => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeAssetsDownloadTmpDir = void 0;
|
|
4
|
+
const tmp_dir_1 = require("./tmp-dir");
|
|
5
|
+
let dir = null;
|
|
6
|
+
const makeAssetsDownloadTmpDir = () => {
|
|
7
|
+
if (dir) {
|
|
8
|
+
return dir;
|
|
9
|
+
}
|
|
10
|
+
dir = (0, tmp_dir_1.tmpDir)('remotion-assets-dir');
|
|
11
|
+
return dir;
|
|
12
|
+
};
|
|
13
|
+
exports.makeAssetsDownloadTmpDir = makeAssetsDownloadTmpDir;
|
package/dist/render-media.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export declare type RenderMediaOptions = {
|
|
|
61
61
|
muted?: boolean;
|
|
62
62
|
enforceAudioTrack?: boolean;
|
|
63
63
|
ffmpegOverride?: FfmpegOverrideFn;
|
|
64
|
+
disallowParallelEncoding?: boolean;
|
|
64
65
|
} & ServeUrlOrWebpackBundle & ConcurrencyOrParallelism;
|
|
65
66
|
declare type ConcurrencyOrParallelism = {
|
|
66
67
|
concurrency?: number | null;
|
package/dist/render-media.js
CHANGED
|
@@ -79,12 +79,15 @@ const renderMedia = ({ proResProfile, crf, composition, ffmpegExecutable, ffprob
|
|
|
79
79
|
height: composition.height,
|
|
80
80
|
width: composition.width,
|
|
81
81
|
});
|
|
82
|
-
const parallelEncoding =
|
|
82
|
+
const parallelEncoding = !options.disallowParallelEncoding &&
|
|
83
|
+
hasEnoughMemory &&
|
|
84
|
+
(0, can_use_parallel_encoding_1.canUseParallelEncoding)(codec);
|
|
83
85
|
if (options.verbose) {
|
|
84
86
|
console.log('[PRESTITCHER] Free memory:', freeMemory, 'Estimated usage parallel encoding', estimatedUsage);
|
|
85
|
-
console.log('[
|
|
87
|
+
console.log('[PRESTITCHER]: Codec supports parallel rendering:', (0, can_use_parallel_encoding_1.canUseParallelEncoding)(codec));
|
|
88
|
+
console.log('[PRESTITCHER]: User disallowed parallel encoding:', Boolean(options.disallowParallelEncoding));
|
|
86
89
|
if (parallelEncoding) {
|
|
87
|
-
console.log('[
|
|
90
|
+
console.log('[PRESTITCHER] Parallel encoding is enabled.');
|
|
88
91
|
}
|
|
89
92
|
else {
|
|
90
93
|
console.log('[PRESTITCHER] Parallel encoding is disabled.');
|
package/dist/render-still.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ declare type InnerStillOptions = {
|
|
|
32
32
|
*/
|
|
33
33
|
downloadMap?: DownloadMap;
|
|
34
34
|
};
|
|
35
|
-
declare type RenderStillOptions = InnerStillOptions & ServeUrlOrWebpackBundle & {
|
|
35
|
+
export declare type RenderStillOptions = InnerStillOptions & ServeUrlOrWebpackBundle & {
|
|
36
36
|
port?: number | null;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFfmpegArgsHook = void 0;
|
|
4
|
+
const validateFfmpegArgsHook = (ffmpegArgsHook) => {
|
|
5
|
+
if (typeof ffmpegArgsHook === 'undefined') {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (ffmpegArgsHook && typeof ffmpegArgsHook !== 'function') {
|
|
9
|
+
throw new TypeError(`Argument passed for "ffmpegArgsHook" is not a function: ${ffmpegArgsHook}`);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
exports.validateFfmpegArgsHook = validateFfmpegArgsHook;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFfmpegOverride = void 0;
|
|
4
|
+
const validateFfmpegOverride = (ffmpegArgsHook) => {
|
|
5
|
+
if (typeof ffmpegArgsHook === 'undefined') {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (ffmpegArgsHook && typeof ffmpegArgsHook !== 'function') {
|
|
9
|
+
throw new TypeError(`Argument passed for "ffmpegArgsHook" is not a function: ${ffmpegArgsHook}`);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
exports.validateFfmpegOverride = validateFfmpegOverride;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.29",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"execa": "5.1.1",
|
|
24
24
|
"extract-zip": "2.0.1",
|
|
25
|
-
"remotion": "3.2.
|
|
25
|
+
"remotion": "3.2.29",
|
|
26
26
|
"source-map": "^0.8.0-beta.0",
|
|
27
27
|
"ws": "8.7.0"
|
|
28
28
|
},
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "9a2ff4d68324af8d1fe55ebdf94bdadccf446a10"
|
|
61
61
|
}
|