@remotion/cli 4.0.122 → 4.0.123

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/benchmark.js CHANGED
@@ -21,7 +21,7 @@ const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-
21
21
  const show_compositions_picker_1 = require("./show-compositions-picker");
22
22
  const truthy_1 = require("./truthy");
23
23
  const DEFAULT_RUNS = 3;
24
- const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, } = client_1.BrowserSafeApis.options;
24
+ const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, } = client_1.BrowserSafeApis.options;
25
25
  const getValidConcurrency = (cliConcurrency) => {
26
26
  const { concurrencies } = parse_command_line_1.parsedCli;
27
27
  if (!concurrencies) {
@@ -143,7 +143,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
143
143
  // Not needed for benchmark
144
144
  gitSource: null,
145
145
  bufferStateDelayInMilliseconds: null,
146
- maxTimlineTracks: null,
146
+ maxTimelineTracks: null,
147
147
  });
148
148
  (0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
149
149
  const puppeteerInstance = await browserInstance;
@@ -309,6 +309,10 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
309
309
  commandLine: parse_command_line_1.parsedCli,
310
310
  }).value,
311
311
  finishRenderProgress: () => undefined,
312
+ separateAudioTo: null,
313
+ forSeamlessAacConcatenation: forSeamlessAacConcatenationOption.getValue({
314
+ commandLine: parse_command_line_1.parsedCli,
315
+ }).value,
312
316
  }, (run, progress) => {
313
317
  benchmarkProgress.update(makeBenchmarkProgressBar({
314
318
  totalRuns: runs,
package/dist/bundle.js CHANGED
@@ -82,7 +82,7 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
82
82
  outDir: outputPath,
83
83
  gitSource,
84
84
  bufferStateDelayInMilliseconds: null,
85
- maxTimlineTracks: null,
85
+ maxTimelineTracks: null,
86
86
  });
87
87
  log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue(`${existed ? '○' : '+'} ${output}`));
88
88
  if (!gitignoreFolder) {
@@ -54,7 +54,7 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
54
54
  // Not needed for compositions
55
55
  gitSource: null,
56
56
  bufferStateDelayInMilliseconds: null,
57
- maxTimlineTracks: null,
57
+ maxTimelineTracks: null,
58
58
  });
59
59
  (0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
60
60
  const compositions = await renderer_1.RenderInternals.internalGetCompositions({
@@ -185,6 +185,11 @@ declare global {
185
185
  * Default: true
186
186
  */
187
187
  readonly setEnforceAudioTrack: (enforceAudioTrack: boolean) => void;
188
+ /**
189
+ * Prepare a video for later seamless audio concatenation.
190
+ * Default: false
191
+ */
192
+ readonly setForSeamlessAacConcatenation: (forSeamlessAacConcatenation: boolean) => void;
188
193
  /**
189
194
  * Set the output file location string. Default: `out/{composition}.{codec}`
190
195
  */
@@ -280,6 +285,10 @@ declare global {
280
285
  for Remotion are located.
281
286
  */
282
287
  readonly setBinariesDirectory: (directory: string | null) => void;
288
+ /**
289
+ * Prefer lossless audio encoding. Default: false
290
+ */
291
+ readonly setPreferLosslessAudio: (lossless: boolean) => void;
283
292
  }
284
293
  }
285
294
  type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
@@ -341,7 +350,6 @@ export declare const ConfigInternals: {
341
350
  getIgnoreCertificateErrors: () => boolean;
342
351
  getEveryNthFrame: () => number;
343
352
  getConcurrency: () => string | number | null;
344
- getAudioCodec: () => "mp3" | "aac" | "pcm-16" | "opus" | null;
345
353
  getStillFrame: () => number;
346
354
  getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
347
355
  getDotEnvLocation: () => string | null;
@@ -18,7 +18,6 @@ const still_frame_1 = require("./still-frame");
18
18
  const webpack_caching_1 = require("./webpack-caching");
19
19
  const client_1 = require("@remotion/renderer/client");
20
20
  const studio_server_1 = require("@remotion/studio-server");
21
- const audio_codec_1 = require("./audio-codec");
22
21
  const browser_executable_2 = require("./browser-executable");
23
22
  const buffer_state_delay_in_milliseconds_1 = require("./buffer-state-delay-in-milliseconds");
24
23
  const chromium_flags_2 = require("./chromium-flags");
@@ -43,7 +42,7 @@ const user_agent_1 = require("./user-agent");
43
42
  const webpack_caching_2 = require("./webpack-caching");
44
43
  const webpack_poll_1 = require("./webpack-poll");
45
44
  const width_1 = require("./width");
46
- const { offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, mutedOption, videoCodecOption, colorSpaceOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, } = client_1.BrowserSafeApis.options;
45
+ const { offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, mutedOption, videoCodecOption, colorSpaceOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, preferLosslessOption, forSeamlessAacConcatenationOption, audioCodecOption, } = client_1.BrowserSafeApis.options;
47
46
  exports.Config = {
48
47
  get Bundling() {
49
48
  throw new Error('The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.');
@@ -115,10 +114,11 @@ exports.Config = {
115
114
  setX264Preset: x264Option.setConfig,
116
115
  setAudioBitrate: audioBitrateOption.setConfig,
117
116
  setVideoBitrate: videoBitrateOption.setConfig,
117
+ setForSeamlessAacConcatenation: forSeamlessAacConcatenationOption.setConfig,
118
118
  overrideHeight: height_1.overrideHeight,
119
119
  overrideWidth: width_1.overrideWidth,
120
120
  overrideFfmpegCommand: ffmpeg_override_1.setFfmpegOverrideFunction,
121
- setAudioCodec: audio_codec_1.setAudioCodec,
121
+ setAudioCodec: audioCodecOption.setConfig,
122
122
  setOffthreadVideoCacheSizeInBytes: (size) => {
123
123
  offthreadVideoCacheSizeInBytesOption.setConfig(size);
124
124
  },
@@ -129,6 +129,7 @@ exports.Config = {
129
129
  setRepro: reproOption.setConfig,
130
130
  setLambdaInsights: enableLambdaInsights.setConfig,
131
131
  setBinariesDirectory: binariesDirectoryOption.setConfig,
132
+ setPreferLosslessAudio: preferLosslessOption.setConfig,
132
133
  };
133
134
  exports.ConfigInternals = {
134
135
  getRange: frame_range_1.getRange,
@@ -143,7 +144,6 @@ exports.ConfigInternals = {
143
144
  getIgnoreCertificateErrors: chromium_flags_1.getIgnoreCertificateErrors,
144
145
  getEveryNthFrame: every_nth_frame_1.getEveryNthFrame,
145
146
  getConcurrency: concurrency_1.getConcurrency,
146
- getAudioCodec: audio_codec_1.getAudioCodec,
147
147
  getStillFrame: still_frame_1.getStillFrame,
148
148
  getShouldOutputImageSequence: image_sequence_1.getShouldOutputImageSequence,
149
149
  getDotEnvLocation: env_file_1.getDotEnvLocation,
@@ -5,7 +5,7 @@ const renderer_1 = require("@remotion/renderer");
5
5
  const client_1 = require("@remotion/renderer/client");
6
6
  const config_1 = require("./config");
7
7
  const parse_command_line_1 = require("./parse-command-line");
8
- const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, logLevelOption, delayRenderTimeoutInMillisecondsOption, headlessOption, } = client_1.BrowserSafeApis.options;
8
+ const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, logLevelOption, delayRenderTimeoutInMillisecondsOption, headlessOption, forSeamlessAacConcatenationOption, audioCodecOption, } = client_1.BrowserSafeApis.options;
9
9
  const getRenderDefaults = () => {
10
10
  var _a;
11
11
  const defaultJpegQuality = jpegQualityOption.getValue({
@@ -67,8 +67,13 @@ const getRenderDefaults = () => {
67
67
  const headless = headlessOption.getValue({
68
68
  commandLine: parse_command_line_1.parsedCli,
69
69
  }).value;
70
+ const forSeamlessAacConcatenation = forSeamlessAacConcatenationOption.getValue({
71
+ commandLine: parse_command_line_1.parsedCli,
72
+ }).value;
73
+ const audioCodec = audioCodecOption.getValue({
74
+ commandLine: parse_command_line_1.parsedCli,
75
+ }).value;
70
76
  const everyNthFrame = config_1.ConfigInternals.getEveryNthFrame();
71
- const audioCodec = config_1.ConfigInternals.getAudioCodec();
72
77
  const stillImageFormat = config_1.ConfigInternals.getUserPreferredStillImageFormat();
73
78
  const videoImageFormat = config_1.ConfigInternals.getUserPreferredVideoImageFormat();
74
79
  const disableWebSecurity = config_1.ConfigInternals.getChromiumDisableWebSecurity();
@@ -109,6 +114,7 @@ const getRenderDefaults = () => {
109
114
  repro,
110
115
  numberOfGifLoops,
111
116
  beepOnFinish,
117
+ forSeamlessAacConcatenation,
112
118
  };
113
119
  };
114
120
  exports.getRenderDefaults = getRenderDefaults;
@@ -23,6 +23,7 @@ const getVideoImageFormat = ({ codec, uiImageFormat, }) => {
23
23
  }
24
24
  if (codec === 'h264' ||
25
25
  codec === 'h264-mkv' ||
26
+ codec === 'h264-ts' ||
26
27
  codec === 'h265' ||
27
28
  codec === 'vp8' ||
28
29
  codec === 'vp9' ||
package/dist/index.d.ts CHANGED
@@ -104,7 +104,7 @@ export declare const CliInternals: {
104
104
  parsedCli: {
105
105
  "browser-executable": import("@remotion/renderer").BrowserExecutable;
106
106
  "pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
107
- "image-format": "png" | "jpeg" | "none" | "pdf" | "webp";
107
+ "image-format": "png" | "jpeg" | "pdf" | "webp" | "none";
108
108
  "prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
109
109
  "bundle-cache": string;
110
110
  "env-file": string;
@@ -113,12 +113,11 @@ export declare const CliInternals: {
113
113
  "every-nth-frame": number;
114
114
  "number-of-shared-audio-tags": number;
115
115
  version: string;
116
- codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
116
+ codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "h264-ts" | "gif";
117
117
  concurrency: number;
118
118
  timeout: number;
119
119
  config: string;
120
120
  "public-dir": string;
121
- "audio-codec": "mp3" | "aac" | "pcm-16" | "opus";
122
121
  crf: number;
123
122
  force: boolean;
124
123
  output: string;
@@ -160,6 +159,7 @@ export declare const CliInternals: {
160
159
  "video-bitrate": string | null;
161
160
  "buffer-size": string | null;
162
161
  "max-rate": string | null;
162
+ "audio-codec": "mp3" | "aac" | "pcm-16" | "opus";
163
163
  "jpeg-quality": number;
164
164
  "enforce-audio-track": boolean;
165
165
  "delete-after": import("@remotion/renderer").DeleteAfter | null;
@@ -174,7 +174,7 @@ export declare const CliInternals: {
174
174
  downloadName: string | null;
175
175
  outName: string | null;
176
176
  configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
177
- cliFlag: "png" | "jpeg" | "none" | "pdf" | "webp" | null;
177
+ cliFlag: "png" | "jpeg" | "pdf" | "webp" | "none" | null;
178
178
  isLambda: boolean;
179
179
  fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
180
180
  }) => {
@@ -169,7 +169,10 @@ declare const beepOnFinishOption: {
169
169
  commandLine: Record<string, unknown>;
170
170
  }) => {
171
171
  source: string;
172
- value: boolean;
172
+ value: true;
173
+ } | {
174
+ source: string;
175
+ value: false;
173
176
  };
174
177
  setConfig: (value: boolean) => void;
175
178
  }, jpegQualityOption: {
@@ -217,6 +220,23 @@ declare const beepOnFinishOption: {
217
220
  value: string | null;
218
221
  };
219
222
  setConfig: (bitrate: string | null) => void;
223
+ }, audioCodecOption: {
224
+ cliFlag: "audio-codec";
225
+ setConfig: (audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null) => void;
226
+ getValue: ({ commandLine }: {
227
+ commandLine: Record<string, unknown>;
228
+ }) => {
229
+ source: string;
230
+ value: "mp3" | "aac" | "pcm-16" | "opus";
231
+ } | {
232
+ source: string;
233
+ value: null;
234
+ };
235
+ description: () => string;
236
+ docLink: string;
237
+ name: string;
238
+ ssrName: "audioCodec";
239
+ type: "mp3" | "aac" | "pcm-16" | "opus";
220
240
  };
221
241
  type CommandLineOptions = {
222
242
  ['browser-executable']: BrowserExecutable;
@@ -244,7 +264,7 @@ type CommandLineOptions = {
244
264
  [videoBitrateOption.cliFlag]: TypeOfOption<typeof videoBitrateOption>;
245
265
  [encodingBufferSizeOption.cliFlag]: TypeOfOption<typeof encodingBufferSizeOption>;
246
266
  [encodingMaxRateOption.cliFlag]: TypeOfOption<typeof encodingMaxRateOption>;
247
- ['audio-codec']: AudioCodec;
267
+ [audioCodecOption.cliFlag]: AudioCodec;
248
268
  crf: number;
249
269
  force: boolean;
250
270
  output: string;
@@ -8,7 +8,7 @@ const client_1 = require("@remotion/renderer/client");
8
8
  const minimist_1 = __importDefault(require("minimist"));
9
9
  const config_1 = require("./config");
10
10
  const log_1 = require("./log");
11
- const { beepOnFinishOption, colorSpaceOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, } = client_1.BrowserSafeApis.options;
11
+ const { beepOnFinishOption, colorSpaceOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, } = client_1.BrowserSafeApis.options;
12
12
  exports.BooleanFlags = [
13
13
  'overwrite',
14
14
  'force',
@@ -17,7 +17,7 @@ exports.BooleanFlags = [
17
17
  'quiet',
18
18
  'q',
19
19
  'muted',
20
- 'enforce-audio-track',
20
+ enforceAudioOption.cliFlag,
21
21
  // Lambda flags
22
22
  'force',
23
23
  'disable-chunk-optimization',
@@ -84,9 +84,6 @@ const parseCommandLine = () => {
84
84
  if (exports.parsedCli.sequence) {
85
85
  config_1.Config.setImageSequence(true);
86
86
  }
87
- if (typeof exports.parsedCli.crf !== 'undefined') {
88
- config_1.Config.setCrf(exports.parsedCli.crf);
89
- }
90
87
  if (exports.parsedCli['every-nth-frame']) {
91
88
  config_1.Config.setEveryNthFrame(exports.parsedCli['every-nth-frame']);
92
89
  }
@@ -97,15 +94,9 @@ const parseCommandLine = () => {
97
94
  log_1.Log.warn({ indent: false, logLevel: 'info' }, 'The --quality flag has been renamed to --jpeg-quality instead.');
98
95
  config_1.Config.setJpegQuality(exports.parsedCli.quality);
99
96
  }
100
- if (typeof exports.parsedCli['jpeg-quality'] !== 'undefined') {
101
- config_1.Config.setJpegQuality(exports.parsedCli['jpeg-quality']);
102
- }
103
97
  if (typeof exports.parsedCli.scale !== 'undefined') {
104
98
  config_1.Config.setScale(exports.parsedCli.scale);
105
99
  }
106
- if (typeof exports.parsedCli.muted !== 'undefined') {
107
- config_1.Config.setMuted(exports.parsedCli.muted);
108
- }
109
100
  if (typeof exports.parsedCli['disable-keyboard-shortcuts'] !== 'undefined') {
110
101
  config_1.Config.setKeyboardShortcutsEnabled(!exports.parsedCli['disable-keyboard-shortcuts']);
111
102
  }
@@ -1,6 +1,6 @@
1
1
  import type { AudioCodec, Browser, BrowserExecutable, CancelSignal, ChromiumOptions, Codec, ColorSpace, Crf, FfmpegOverrideFn, FrameRange, LogLevel, NumberOfGifLoops, PixelFormat, ProResProfile, VideoImageFormat, X264Preset } from '@remotion/renderer';
2
2
  import type { JobProgressCallback } from '@remotion/studio-server';
3
- export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, }: {
3
+ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, }: {
4
4
  remotionRoot: string;
5
5
  fullEntryPoint: string;
6
6
  entryPointReason: string;
@@ -50,4 +50,6 @@ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, l
50
50
  colorSpace: ColorSpace;
51
51
  repro: boolean;
52
52
  binariesDirectory: string | null;
53
+ forSeamlessAacConcatenation: boolean;
54
+ separateAudioTo: string | null;
53
55
  }) => Promise<void>;
@@ -47,7 +47,7 @@ const setup_cache_1 = require("../setup-cache");
47
47
  const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
48
48
  const truthy_1 = require("../truthy");
49
49
  const user_passed_output_location_1 = require("../user-passed-output-location");
50
- const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, }) => {
50
+ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, }) => {
51
51
  var _a;
52
52
  const downloads = [];
53
53
  const browserInstance = renderer_1.RenderInternals.internalOpenBrowser({
@@ -123,7 +123,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
123
123
  // Not needed for render
124
124
  gitSource: null,
125
125
  bufferStateDelayInMilliseconds: null,
126
- maxTimlineTracks: null,
126
+ maxTimelineTracks: null,
127
127
  });
128
128
  addCleanupCallback(() => cleanupBundle());
129
129
  const onDownload = (0, make_on_download_1.makeOnDownload)({
@@ -195,7 +195,11 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
195
195
  log_1.Log.verbose({ indent, logLevel }, chalk_1.chalk.gray(`Entry point = ${fullEntryPoint} (${entryPointReason})`));
196
196
  log_1.Log.info({ indent, logLevel }, chalk_1.chalk.gray(`Composition = ${compositionId} (${reason}), Codec = ${codec} (${codecReason}), Output = ${relativeOutputLocation}`));
197
197
  const absoluteOutputFile = (0, get_cli_options_1.getAndValidateAbsoluteOutputFile)(relativeOutputLocation, overwrite, logLevel);
198
+ const absoluteSeparateAudioTo = separateAudioTo === null ? null : node_path_1.default.resolve(separateAudioTo);
198
199
  const exists = (0, node_fs_1.existsSync)(absoluteOutputFile);
200
+ const audioExists = absoluteSeparateAudioTo
201
+ ? (0, node_fs_1.existsSync)(absoluteSeparateAudioTo)
202
+ : false;
199
203
  const realFrameRange = renderer_1.RenderInternals.getRealFrameRange(config.durationInFrames, frameRange);
200
204
  const totalFrames = renderer_1.RenderInternals.getFramesToRender(realFrameRange, everyNthFrame);
201
205
  renderingProgress = {
@@ -246,7 +250,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
246
250
  browserExecutable,
247
251
  port,
248
252
  composition: config,
249
- server: await server,
253
+ server,
250
254
  indent,
251
255
  muted,
252
256
  onBrowserLog: null,
@@ -322,7 +326,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
322
326
  onDownload,
323
327
  onCtrlCExit: addCleanupCallback,
324
328
  indent,
325
- server: await server,
329
+ server,
326
330
  cancelSignal: cancelSignal !== null && cancelSignal !== void 0 ? cancelSignal : undefined,
327
331
  audioCodec,
328
332
  preferLossless: false,
@@ -342,8 +346,13 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
342
346
  updateRenderProgress({ newline: true, printToConsole: true });
343
347
  },
344
348
  binariesDirectory,
349
+ separateAudioTo: absoluteSeparateAudioTo,
350
+ forSeamlessAacConcatenation,
345
351
  });
346
352
  log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${absoluteOutputFile}`));
353
+ if (absoluteSeparateAudioTo) {
354
+ log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`${audioExists ? '○' : '+'} ${absoluteSeparateAudioTo}`));
355
+ }
347
356
  log_1.Log.verbose({ indent, logLevel }, `Slowest frames:`);
348
357
  slowestFrames.forEach(({ frame, time }) => {
349
358
  log_1.Log.verbose({ indent, logLevel }, ` Frame ${frame} (${time.toFixed(3)}ms)`);
@@ -87,7 +87,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
87
87
  // Not needed for still
88
88
  gitSource: null,
89
89
  bufferStateDelayInMilliseconds: null,
90
- maxTimlineTracks: null,
90
+ maxTimelineTracks: null,
91
91
  });
92
92
  const server = await renderer_1.RenderInternals.prepareServer({
93
93
  concurrency: 1,
@@ -65,6 +65,8 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
65
65
  colorSpace: job.type === 'video' ? job.colorSpace : 'default',
66
66
  repro: job.repro,
67
67
  binariesDirectory: job.binariesDirectory,
68
+ forSeamlessAacConcatenation: job.type === 'video' ? job.forSeamlessAacConcatenation : false,
69
+ separateAudioTo: job.type === 'video' ? job.separateAudioTo : null,
68
70
  });
69
71
  };
70
72
  exports.processVideoJob = processVideoJob;
package/dist/render.js CHANGED
@@ -4,7 +4,6 @@ exports.render = void 0;
4
4
  const client_1 = require("@remotion/renderer/client");
5
5
  const no_react_1 = require("remotion/no-react");
6
6
  const cleanup_before_quit_1 = require("./cleanup-before-quit");
7
- const config_1 = require("./config");
8
7
  const preview_server_1 = require("./config/preview-server");
9
8
  const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
10
9
  const entry_point_1 = require("./entry-point");
@@ -12,9 +11,8 @@ const get_cli_options_1 = require("./get-cli-options");
12
11
  const log_1 = require("./log");
13
12
  const parse_command_line_1 = require("./parse-command-line");
14
13
  const render_1 = require("./render-flows/render");
15
- const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, } = client_1.BrowserSafeApis.options;
14
+ const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, colorSpaceOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, separateAudioOption, audioCodecOption, } = client_1.BrowserSafeApis.options;
16
15
  const render = async (remotionRoot, args, logLevel) => {
17
- var _a;
18
16
  const { file, remainingArgs, reason: entryPointReason, } = (0, entry_point_1.findEntryPoint)(args, remotionRoot, logLevel);
19
17
  if (!file) {
20
18
  log_1.Log.error({ indent: false, logLevel }, 'No entry point specified. Pass more arguments:');
@@ -81,6 +79,12 @@ const render = async (remotionRoot, args, logLevel) => {
81
79
  const binariesDirectory = binariesDirectoryOption.getValue({
82
80
  commandLine: parse_command_line_1.parsedCli,
83
81
  }).value;
82
+ const forSeamlessAacConcatenation = forSeamlessAacConcatenationOption.getValue({
83
+ commandLine: parse_command_line_1.parsedCli,
84
+ }).value;
85
+ const separateAudioTo = separateAudioOption.getValue({
86
+ commandLine: parse_command_line_1.parsedCli,
87
+ }).value;
84
88
  const chromiumOptions = {
85
89
  disableWebSecurity,
86
90
  enableMultiProcessOnLinux,
@@ -89,7 +93,7 @@ const render = async (remotionRoot, args, logLevel) => {
89
93
  ignoreCertificateErrors,
90
94
  userAgent,
91
95
  };
92
- const audioCodec = (_a = parse_command_line_1.parsedCli['audio-codec']) !== null && _a !== void 0 ? _a : config_1.ConfigInternals.getAudioCodec();
96
+ const audioCodec = audioCodecOption.getValue({ commandLine: parse_command_line_1.parsedCli }).value;
93
97
  await (0, render_1.renderVideoFlow)({
94
98
  fullEntryPoint,
95
99
  remotionRoot,
@@ -146,6 +150,8 @@ const render = async (remotionRoot, args, logLevel) => {
146
150
  colorSpace,
147
151
  repro,
148
152
  binariesDirectory,
153
+ forSeamlessAacConcatenation,
154
+ separateAudioTo,
149
155
  });
150
156
  };
151
157
  exports.render = render;
@@ -1,7 +1,7 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
2
  import type { GitSource } from '@remotion/studio';
3
3
  import type { BundlingState, CopyingState } from '@remotion/studio-server';
4
- export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimlineTracks, }: {
4
+ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimelineTracks, }: {
5
5
  fullPath: string;
6
6
  remotionRoot: string;
7
7
  publicDir: string | null;
@@ -19,12 +19,12 @@ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publi
19
19
  outDir: string | null;
20
20
  gitSource: GitSource | null;
21
21
  bufferStateDelayInMilliseconds: number | null;
22
- maxTimlineTracks: number | null;
22
+ maxTimelineTracks: number | null;
23
23
  }) => Promise<{
24
24
  urlOrBundle: string;
25
25
  cleanup: () => void;
26
26
  }>;
27
- export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimlineTracks, bufferStateDelayInMilliseconds, }: {
27
+ export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimelineTracks, bufferStateDelayInMilliseconds, }: {
28
28
  fullPath: string;
29
29
  remotionRoot: string;
30
30
  publicDir: string | null;
@@ -41,6 +41,6 @@ export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgre
41
41
  quietFlag: boolean;
42
42
  outDir: string | null;
43
43
  gitSource: GitSource | null;
44
- maxTimlineTracks: number | null;
44
+ maxTimelineTracks: number | null;
45
45
  bufferStateDelayInMilliseconds: number | null;
46
46
  }) => Promise<string>;
@@ -7,7 +7,7 @@ const config_1 = require("./config");
7
7
  const log_1 = require("./log");
8
8
  const progress_bar_1 = require("./progress-bar");
9
9
  const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
10
- const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimlineTracks, }) => {
10
+ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimelineTracks, }) => {
11
11
  if (renderer_1.RenderInternals.isServeUrl(fullPath)) {
12
12
  onProgress({
13
13
  bundling: {
@@ -39,7 +39,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
39
39
  outDir,
40
40
  gitSource,
41
41
  bufferStateDelayInMilliseconds,
42
- maxTimlineTracks,
42
+ maxTimelineTracks,
43
43
  });
44
44
  return {
45
45
  urlOrBundle: bundled,
@@ -47,7 +47,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
47
47
  };
48
48
  };
49
49
  exports.bundleOnCliOrTakeServeUrl = bundleOnCliOrTakeServeUrl;
50
- const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimlineTracks, bufferStateDelayInMilliseconds, }) => {
50
+ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimelineTracks, bufferStateDelayInMilliseconds, }) => {
51
51
  var _a;
52
52
  const shouldCache = config_1.ConfigInternals.getWebpackCaching();
53
53
  const symlinkState = {
@@ -105,7 +105,7 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
105
105
  options,
106
106
  resolvedRemotionRoot: remotionRoot,
107
107
  bufferStateDelayInMilliseconds,
108
- maxTimelineTracks: maxTimlineTracks,
108
+ maxTimelineTracks,
109
109
  });
110
110
  const cacheExistedBefore = bundler_1.BundlerInternals.cacheExists(remotionRoot, 'production', hash);
111
111
  if (cacheExistedBefore !== 'does-not-exist' && !shouldCache) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.122",
3
+ "version": "4.0.123",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -32,13 +32,13 @@
32
32
  "dotenv": "9.0.2",
33
33
  "minimist": "1.2.6",
34
34
  "prompts": "2.4.2",
35
- "@remotion/bundler": "4.0.122",
36
- "@remotion/media-utils": "4.0.122",
37
- "@remotion/player": "4.0.122",
38
- "@remotion/renderer": "4.0.122",
39
- "@remotion/studio": "4.0.122",
40
- "@remotion/studio-server": "4.0.122",
41
- "remotion": "4.0.122"
35
+ "@remotion/bundler": "4.0.123",
36
+ "@remotion/media-utils": "4.0.123",
37
+ "@remotion/renderer": "4.0.123",
38
+ "@remotion/player": "4.0.123",
39
+ "@remotion/studio-server": "4.0.123",
40
+ "remotion": "4.0.123",
41
+ "@remotion/studio": "4.0.123"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": ">=16.8.0",
@@ -63,8 +63,8 @@
63
63
  "react-dom": "18.2.0",
64
64
  "vitest": "0.31.1",
65
65
  "zod": "^3.22.3",
66
- "@remotion/zod-types": "4.0.122",
67
- "@remotion/tailwind": "4.0.122"
66
+ "@remotion/zod-types": "4.0.123",
67
+ "@remotion/tailwind": "4.0.123"
68
68
  },
69
69
  "keywords": [
70
70
  "remotion",