Skip to content

🎥 Make videos programmatically with React

change temp dir article

Jonny Burger88a5e694411e
diff --git a/packages/docs/docs/miscellaneous/changing-temp-dir.md b/packages/docs/docs/miscellaneous/changing-temp-dir.md
new file mode 100644
index 0000000000..0053dd59b2
--- /dev/null
+++ b/packages/docs/docs/miscellaneous/changing-temp-dir.md
@@ -0,0 +1,18 @@
+---
+image: /generated/articles-docs-miscellaneous-changing-temp-dir.png
+sidebar_label: Temporary directory
+title: Changing the temporary directory
+crumb: "Advanced configuration"
+---
+
+During rendering, Remotion will write items into the temporary directory of the system. This includes rendered frames, uncompressed audio and other artifacts.
+
+If you want to customize the directory that Remotion uses, you can set the `TEMP` environment variable to specify a directory to your liking.
+
+```bash
+TEMP=/var/tmp npx remotion render
+```
+
+Remotion will make a new temporary directory in the path that you have specified. This is because the Node.JS API [`os.tmpdir()`](https://github.com/nodejs/node/blob/58431c0e6bb1829b6ccafc5cf6340226c15da790/lib/os.js#L181) is called by Remotion which is checking for environment variables.
+
+Changing the temporary directory may be useful if the default temporary directory is on a disk that has limited space available.
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index 06148f54ff..0432894831 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -458,6 +458,7 @@ module.exports = {
"legacy-babel",
"miscellaneous/typescript-aliases",
"miscellaneous/render-in-browser",
+ "miscellaneous/changing-temp-dir",
],
},
"license",
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index 6117dc0019..f014e3edd8 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -909,6 +909,13 @@ export const articles = [
compId: "articles-docs-media-utils-index",
crumb: null,
},
+ {
+ id: "miscellaneous/changing-temp-dir",
+ title: "Changing the temporary directory",
+ relativePath: "docs/miscellaneous/changing-temp-dir.md",
+ compId: "articles-docs-miscellaneous-changing-temp-dir",
+ crumb: "Advanced configuration",
+ },
{
id: "miscellaneous/render-in-browser",
title: "Can I render videos in the browser?",
diff --git a/packages/docs/static/generated/articles-docs-miscellaneous-changing-temp-dir.png b/packages/docs/static/generated/articles-docs-miscellaneous-changing-temp-dir.png
new file mode 100644
index 0000000000..0cda31aa59
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-miscellaneous-changing-temp-dir.png differ