Skip to content

πŸŽ₯ Make videos programmatically with React

add docs for ENAMETOOLONG

Jonny Burger708a1842aa68
diff --git a/packages/cli/src/handle-common-errors.ts b/packages/cli/src/handle-common-errors.ts
index 044111d7fe..86bbe08fec 100644
--- a/packages/cli/src/handle-common-errors.ts
+++ b/packages/cli/src/handle-common-errors.ts
@@ -20,4 +20,11 @@ export const handleCommonError = (err: Error) => {
'πŸ’‘ Get help for this issue at https://remotion.dev/docs/target-closed'
);
}
+
+ if (err.message.includes('ENAMETOOLONG')) {
+ Log.info();
+ Log.info(
+ 'πŸ’‘ Get help for this issue at https://remotion.dev/docs/enametoolong'
+ );
+ }
};
diff --git a/packages/docs/docs/enametoolong.md b/packages/docs/docs/enametoolong.md
new file mode 100644
index 0000000000..eecd7f2777
--- /dev/null
+++ b/packages/docs/docs/enametoolong.md
@@ -0,0 +1,25 @@
+---
+id: enametoolong
+title: "ENAMETOOLONG"
+sidebar_label: Target closed
+---
+
+```
+Command failed with ENAMETOOLONG: ffmpeg ...
+```
+
+This error occurs if Remotion is used on Windows and too many audio layers are in the video so that an FFMPEG command gets generated that is longer than the maximum allowed Windows command length (8192 characters)
+
+Unfortunately, FFMPEG does not have any other alternative way to specify a massive amount of inputs, so Remotion can not fix this issue. Here are some recommendations instead:
+
+## Mute videos that have no sound
+
+If you have videos without sound, add the `muted` property, so they won't be added to the mix.
+
+## Use a different operating system
+
+macOS and Linux have a much longer maximum command length. Render the same video on a different operating system or use Linux for Windows Subsystem.
+
+## Render the video partially
+
+Render only a portion of a video using the [`--frames`](/docs/cli#--frames) property, and add portions together using an [FFMPEG concat command](https://stackoverflow.com/a/11175851)
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index dea3f2610e..936867acb9 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -138,6 +138,7 @@ module.exports = {
"webpack-dynamic-imports",
"non-seekable-media",
"flickering",
+ "enametoolong",
],
},
{