@remotion/cli 4.0.508 → 4.0.510

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.
@@ -81,6 +81,12 @@ declare global {
81
81
  * @default 0
82
82
  */
83
83
  readonly setNumberOfSharedAudioTags: (numberOfAudioTags: number) => void;
84
+ /**
85
+ * Keep the shared AudioContext running while the Remotion Studio is paused.
86
+ * @param enabled Whether to keep the AudioContext alive.
87
+ * @default false
88
+ */
89
+ readonly setExperimentalKeepAudioContextAlive: (enabled: boolean) => void;
84
90
  /**
85
91
  * Enable Webpack polling instead of file system listeners for hot reloading in the Studio.
86
92
  * This is useful if you are using a remote directory or a virtual machine.
@@ -18,7 +18,7 @@ const preview_server_1 = require("./preview-server");
18
18
  const still_frame_1 = require("./still-frame");
19
19
  const webpack_caching_1 = require("./webpack-caching");
20
20
  const webpack_poll_1 = require("./webpack-poll");
21
- const { benchmarkConcurrenciesOption, concurrencyOption, offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, gopSizeOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, framesOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, askAIOption, publicLicenseKeyOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, stillImageFormatOption, videoImageFormatOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, rspackOption, outDirOption, webpackPollOption, imageSequenceOption, bundleCacheOption, envFileOption, runsOption, noOpenOption, sampleRateOption, previewSampleRateOption, } = client_1.BrowserSafeApis.options;
21
+ const { benchmarkConcurrenciesOption, concurrencyOption, offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, gopSizeOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, framesOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, askAIOption, publicLicenseKeyOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, experimentalKeepAudioContextAliveOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, stillImageFormatOption, videoImageFormatOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, rspackOption, outDirOption, webpackPollOption, imageSequenceOption, bundleCacheOption, envFileOption, runsOption, noOpenOption, sampleRateOption, previewSampleRateOption, } = client_1.BrowserSafeApis.options;
22
22
  const setAllowHtmlInCanvasEnabled = (_enabled) => {
23
23
  log_1.Log.warn({ indent: false, logLevel: 'info' }, 'Config.setAllowHtmlInCanvasEnabled() is now a no-op because HTML-in-canvas is enabled by default when supported. You can remove this option from your config file.');
24
24
  };
@@ -48,6 +48,7 @@ exports.Config = {
48
48
  setRspack: rspackOption.setConfig,
49
49
  setExperimentalRspackEnabled: rspackOption.setConfig,
50
50
  setNumberOfSharedAudioTags: numberOfSharedAudioTagsOption.setConfig,
51
+ setExperimentalKeepAudioContextAlive: experimentalKeepAudioContextAliveOption.setConfig,
51
52
  setWebpackPollingInMilliseconds: webpackPollOption.setConfig,
52
53
  setShouldOpenBrowser: noOpenOption.setConfig,
53
54
  setBufferStateDelayInMilliseconds: buffer_state_delay_in_milliseconds_1.setBufferStateDelayInMilliseconds,
@@ -10,7 +10,7 @@ export declare const getGitRemoteOrigin: (gitConfig: string) => {
10
10
  url: string | null;
11
11
  } | null;
12
12
  export declare const normalizeGitRemoteUrl: (url: string) => ParsedGitRemote | null;
13
- export declare const getGifRef: (logLevel: "error" | "info" | "trace" | "verbose" | "warn") => string | null;
13
+ export declare const getGifRef: (logLevel: "error" | "info" | "trace" | "verbose" | "warn", remotionRoot?: string) => string | null;
14
14
  export declare const getGitSource: ({ remotionRoot, disableGitSource, logLevel, }: {
15
15
  remotionRoot: string;
16
16
  disableGitSource: boolean;
@@ -34,12 +34,30 @@ const getGitRemotes = (lines) => {
34
34
  };
35
35
  });
36
36
  };
37
+ const getGitRoot = (remotionRoot) => {
38
+ return bundler_1.BundlerInternals.findClosestFolderWithItem(remotionRoot, '.git');
39
+ };
37
40
  const getGitConfig = (remotionRoot) => {
38
- const gitFolder = bundler_1.BundlerInternals.findClosestFolderWithItem(remotionRoot, '.git');
39
- if (!gitFolder) {
41
+ const gitRoot = getGitRoot(remotionRoot);
42
+ if (!gitRoot) {
40
43
  return null;
41
44
  }
42
- const gitConfig = path_1.default.join(gitFolder, '.git', 'config');
45
+ const dotGit = path_1.default.join(gitRoot, '.git');
46
+ let gitDirectory = dotGit;
47
+ if (!(0, fs_1.statSync)(dotGit).isDirectory()) {
48
+ const match = (0, fs_1.readFileSync)(dotGit, 'utf-8')
49
+ .trim()
50
+ .match(/^gitdir:\s*(.+)$/);
51
+ if (!(match === null || match === void 0 ? void 0 : match[1])) {
52
+ return null;
53
+ }
54
+ gitDirectory = path_1.default.resolve(gitRoot, match[1]);
55
+ const commonDirectoryFile = path_1.default.join(gitDirectory, 'commondir');
56
+ if ((0, fs_1.existsSync)(commonDirectoryFile)) {
57
+ gitDirectory = path_1.default.resolve(gitDirectory, (0, fs_1.readFileSync)(commonDirectoryFile, 'utf-8').trim());
58
+ }
59
+ }
60
+ const gitConfig = path_1.default.join(gitDirectory, 'config');
43
61
  if (!(0, fs_1.existsSync)(gitConfig)) {
44
62
  return null;
45
63
  }
@@ -84,14 +102,21 @@ const normalizeGitRemoteUrl = (url) => {
84
102
  return null;
85
103
  };
86
104
  exports.normalizeGitRemoteUrl = normalizeGitRemoteUrl;
87
- const getGifRef = (logLevel) => {
105
+ const getGifRef = (logLevel, remotionRoot = process.cwd()) => {
88
106
  try {
89
- const ret = (0, child_process_1.execSync)('git rev-parse --abbrev-ref HEAD', {
107
+ const branch = (0, child_process_1.execFileSync)('git', ['-C', remotionRoot, 'rev-parse', '--abbrev-ref', 'HEAD'], {
108
+ stdio: ['ignore', 'pipe', 'ignore'],
109
+ })
110
+ .toString('utf-8')
111
+ .trim();
112
+ if (branch !== 'HEAD') {
113
+ return branch;
114
+ }
115
+ return (0, child_process_1.execFileSync)('git', ['-C', remotionRoot, 'rev-parse', 'HEAD'], {
90
116
  stdio: ['ignore', 'pipe', 'ignore'],
91
117
  })
92
118
  .toString('utf-8')
93
119
  .trim();
94
- return ret;
95
120
  }
96
121
  catch (err) {
97
122
  log_1.Log.verbose({ logLevel, indent: false }, 'Could not get git ref', err);
@@ -106,9 +131,8 @@ const getFromEnvVariables = (remotionRoot) => {
106
131
  VERCEL_GIT_REPO_SLUG &&
107
132
  VERCEL_GIT_PROVIDER === 'github') {
108
133
  let relativeFromGitRoot = '';
109
- const gitConfig = (0, exports.getGitConfig)(remotionRoot);
110
- if (gitConfig) {
111
- const gitRoot = path_1.default.dirname(path_1.default.dirname(gitConfig));
134
+ const gitRoot = getGitRoot(remotionRoot);
135
+ if (gitRoot) {
112
136
  relativeFromGitRoot = path_1.default.relative(gitRoot, remotionRoot);
113
137
  }
114
138
  return {
@@ -129,7 +153,7 @@ const getGitSource = ({ remotionRoot, disableGitSource, logLevel, }) => {
129
153
  if (fromEnv) {
130
154
  return fromEnv;
131
155
  }
132
- const ref = (0, exports.getGifRef)(logLevel);
156
+ const ref = (0, exports.getGifRef)(logLevel, remotionRoot);
133
157
  if (!ref) {
134
158
  return null;
135
159
  }
@@ -145,7 +169,10 @@ const getGitSource = ({ remotionRoot, disableGitSource, logLevel, }) => {
145
169
  if (!parsed) {
146
170
  return null;
147
171
  }
148
- const gitRoot = path_1.default.dirname(path_1.default.dirname(gitConfig));
172
+ const gitRoot = getGitRoot(remotionRoot);
173
+ if (!gitRoot) {
174
+ return null;
175
+ }
149
176
  const relativeFromGitRoot = path_1.default.relative(gitRoot, remotionRoot);
150
177
  return {
151
178
  name: parsed.name,
@@ -411,6 +411,21 @@ declare const benchmarkConcurrenciesOption: {
411
411
  };
412
412
  setConfig(value: boolean): void;
413
413
  id: "force-new";
414
+ }, experimentalKeepAudioContextAliveOption: {
415
+ name: string;
416
+ cliFlag: "experimental-keep-audio-context-alive";
417
+ description: () => import("react/jsx-runtime").JSX.Element;
418
+ ssrName: null;
419
+ docLink: string;
420
+ type: boolean;
421
+ getValue: ({ commandLine }: {
422
+ commandLine: Record<string, unknown>;
423
+ }) => {
424
+ value: boolean;
425
+ source: string;
426
+ };
427
+ setConfig(value: boolean): void;
428
+ id: "experimental-keep-audio-context-alive";
414
429
  }, numberOfSharedAudioTagsOption: {
415
430
  name: string;
416
431
  cliFlag: "number-of-shared-audio-tags";
@@ -1211,6 +1226,7 @@ export type CommandLineOptions = {
1211
1226
  [everyNthFrameOption.cliFlag]: TypeOfOption<typeof everyNthFrameOption>;
1212
1227
  [numberOfGifLoopsOption.cliFlag]: TypeOfOption<typeof numberOfGifLoopsOption>;
1213
1228
  [numberOfSharedAudioTagsOption.cliFlag]: TypeOfOption<typeof numberOfSharedAudioTagsOption>;
1229
+ [experimentalKeepAudioContextAliveOption.cliFlag]: TypeOfOption<typeof experimentalKeepAudioContextAliveOption> | null;
1214
1230
  [offthreadVideoCacheSizeInBytesOption.cliFlag]: TypeOfOption<typeof offthreadVideoCacheSizeInBytesOption>;
1215
1231
  [colorSpaceOption.cliFlag]: TypeOfOption<typeof colorSpaceOption>;
1216
1232
  [disallowParallelEncodingOption.cliFlag]: TypeOfOption<typeof disallowParallelEncodingOption> | null;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.quietFlagProvided = exports.parsedCli = exports.BooleanFlags = void 0;
7
7
  const client_1 = require("@remotion/renderer/client");
8
8
  const minimist_1 = __importDefault(require("minimist"));
9
- const { benchmarkConcurrenciesOption, beepOnFinishOption, colorSpaceOption, concurrencyOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, outDirOption, packageManagerOption, webpackPollOption, keyboardShortcutsOption, interactivityOption, imageSequencePatternOption, scaleOption, overwriteOption, crfOption, logLevelOption, videoCodecOption, stillFrameOption, imageSequenceOption, versionFlagOption, bundleCacheOption, envFileOption, glOption, gopSizeOption, runsOption, reproOption, mutedOption, headlessOption, disableGitSourceOption, delayRenderTimeoutInMillisecondsOption, framesOption, forSeamlessAacConcatenationOption, isProductionOption, noOpenOption, portOption, propsOption, configOption, browserOption, sampleRateOption, previewSampleRateOption, rspackOption, skipSkillsOption, } = client_1.BrowserSafeApis.options;
9
+ const { benchmarkConcurrenciesOption, beepOnFinishOption, colorSpaceOption, concurrencyOption, disallowParallelEncodingOption, offthreadVideoCacheSizeInBytesOption, encodingBufferSizeOption, encodingMaxRateOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, numberOfGifLoopsOption, x264Option, enforceAudioOption, jpegQualityOption, audioBitrateOption, videoBitrateOption, audioCodecOption, publicPathOption, audioLatencyHintOption, darkModeOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, forceNewStudioOption, experimentalKeepAudioContextAliveOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, outDirOption, packageManagerOption, webpackPollOption, keyboardShortcutsOption, interactivityOption, imageSequencePatternOption, scaleOption, overwriteOption, crfOption, logLevelOption, videoCodecOption, stillFrameOption, imageSequenceOption, versionFlagOption, bundleCacheOption, envFileOption, glOption, gopSizeOption, runsOption, reproOption, mutedOption, headlessOption, disableGitSourceOption, delayRenderTimeoutInMillisecondsOption, framesOption, forSeamlessAacConcatenationOption, isProductionOption, noOpenOption, portOption, propsOption, configOption, browserOption, sampleRateOption, previewSampleRateOption, rspackOption, skipSkillsOption, } = client_1.BrowserSafeApis.options;
10
10
  exports.BooleanFlags = [
11
11
  overwriteOption.cliFlag,
12
12
  imageSequenceOption.cliFlag,
@@ -29,6 +29,7 @@ exports.BooleanFlags = [
29
29
  reproOption.cliFlag,
30
30
  isProductionOption.cliFlag,
31
31
  forceNewStudioOption.cliFlag,
32
+ experimentalKeepAudioContextAliveOption.cliFlag,
32
33
  bundleCacheOption.cliFlag,
33
34
  rspackOption.cliFlag,
34
35
  skipSkillsOption.cliFlag,
@@ -51,6 +52,7 @@ exports.parsedCli = (0, minimist_1.default)(process.argv.slice(2), {
51
52
  [reproOption.cliFlag]: null,
52
53
  [isProductionOption.cliFlag]: null,
53
54
  [forceNewStudioOption.cliFlag]: null,
55
+ [experimentalKeepAudioContextAliveOption.cliFlag]: null,
54
56
  [mutedOption.cliFlag]: null,
55
57
  [rspackOption.cliFlag]: null,
56
58
  },
package/dist/studio.js CHANGED
@@ -17,7 +17,7 @@ const get_render_defaults_1 = require("./get-render-defaults");
17
17
  const log_1 = require("./log");
18
18
  const parsed_cli_1 = require("./parsed-cli");
19
19
  const queue_1 = require("./render-queue/queue");
20
- const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, audioLatencyHintOption, ipv4Option, rspackOption, webpackPollOption, noOpenOption, portOption, browserOption, previewSampleRateOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, } = client_1.BrowserSafeApis.options;
20
+ const { binariesDirectoryOption, publicDirOption, disableGitSourceOption, enableCrossSiteIsolationOption, askAIOption, interactivityOption, keyboardShortcutsOption, forceNewStudioOption, experimentalKeepAudioContextAliveOption, numberOfSharedAudioTagsOption, audioLatencyHintOption, ipv4Option, rspackOption, webpackPollOption, noOpenOption, portOption, browserOption, previewSampleRateOption, defaultCodingAgentOption, defaultEditorOption, publicLicenseKeyOption, } = client_1.BrowserSafeApis.options;
21
21
  const studioCommand = async (remotionRoot, args, logLevel) => {
22
22
  var _a, _b, _c;
23
23
  const { file, reason } = (0, entry_point_1.findEntryPoint)({
@@ -101,6 +101,9 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
101
101
  };
102
102
  const getNumberOfAudioTags = () => numberOfSharedAudioTagsOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
103
103
  const getAudioLatencyHint = () => audioLatencyHintOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
104
+ const getExperimentalKeepAudioContextAlive = () => experimentalKeepAudioContextAliveOption.getValue({
105
+ commandLine: parsed_cli_1.parsedCli,
106
+ }).value;
104
107
  const getPreviewSampleRate = () => previewSampleRateOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
105
108
  const getDefaultCodingAgent = () => defaultCodingAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
106
109
  const getDefaultEditor = () => defaultEditorOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
@@ -217,6 +220,7 @@ const studioCommand = async (remotionRoot, args, logLevel) => {
217
220
  binariesDirectory,
218
221
  forceIPv4: ipv4Option.getValue({ commandLine: parsed_cli_1.parsedCli }).value,
219
222
  getAudioLatencyHint,
223
+ getExperimentalKeepAudioContextAlive,
220
224
  getPreviewSampleRate,
221
225
  getDefaultCodingAgent,
222
226
  getDefaultEditor,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cli"
4
4
  },
5
5
  "name": "@remotion/cli",
6
- "version": "4.0.508",
6
+ "version": "4.0.510",
7
7
  "description": "Control Remotion features using the `npx remotion` command",
8
8
  "main": "dist/index.js",
9
9
  "bin": {
@@ -37,18 +37,18 @@
37
37
  "license": "SEE LICENSE IN LICENSE.md",
38
38
  "dependencies": {
39
39
  "@babel/parser": "7.24.1",
40
- "@remotion/bundler": "4.0.508",
41
- "@remotion/media-utils": "4.0.508",
42
- "@remotion/player": "4.0.508",
43
- "@remotion/renderer": "4.0.508",
44
- "@remotion/studio-shared": "4.0.508",
45
- "@remotion/studio-server": "4.0.508",
46
- "@remotion/studio": "4.0.508",
40
+ "@remotion/bundler": "4.0.510",
41
+ "@remotion/media-utils": "4.0.510",
42
+ "@remotion/player": "4.0.510",
43
+ "@remotion/renderer": "4.0.510",
44
+ "@remotion/studio-shared": "4.0.510",
45
+ "@remotion/studio-server": "4.0.510",
46
+ "@remotion/studio": "4.0.510",
47
47
  "dotenv": "17.3.1",
48
48
  "minimist": "1.2.6",
49
49
  "prompts": "2.4.2",
50
50
  "semver": "7.5.3",
51
- "remotion": "4.0.508"
51
+ "remotion": "4.0.510"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": ">=16.8.0",
@@ -60,14 +60,14 @@
60
60
  "@types/prettier": "2.7.2",
61
61
  "@types/semver": "7.5.3",
62
62
  "@types/node": "20.12.14",
63
- "@remotion/zod-types": "4.0.508",
64
- "@remotion/tailwind-v4": "4.0.508",
65
- "@remotion/enable-scss": "4.0.508",
66
- "@remotion/skia": "4.0.508",
63
+ "@remotion/zod-types": "4.0.510",
64
+ "@remotion/tailwind-v4": "4.0.510",
65
+ "@remotion/enable-scss": "4.0.510",
66
+ "@remotion/skia": "4.0.510",
67
67
  "react": "19.2.3",
68
68
  "react-dom": "19.2.3",
69
69
  "zod": "4.4.3",
70
- "@remotion/eslint-config-internal": "4.0.508",
70
+ "@remotion/eslint-config-internal": "4.0.510",
71
71
  "eslint": "9.19.0",
72
72
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
73
73
  },