π₯ Make videos programmatically with React
3.1 blog, pnpm
Jonny Burger0e117836285b
diff --git a/packages/docs/blog/2022-07-14-remotion-3-1.md b/packages/docs/blog/2022-07-14-remotion-3-1.mdnew file mode 100644index 0000000000..d66a6c5ecc--- /dev/null+++ b/packages/docs/blog/2022-07-14-remotion-3-1.md@@ -0,0 +1,87 @@+---+slug: 3-1+title: Remotion 3.1+author: Jonny Burger+author_title: Chief Hacker @ Remotion+author_url: https://github.com/JonnyBurger+author_image_url: https://avatars2.githubusercontent.com/u/1629785?s=460&u=12eb94da6070d00fc924761ce06e3a428d01b7e9&v=4+image: https://remotion-still.herokuapp.com/PreviewCard.png?title=Remotion%203.0&description=@remotion/lambda,%20faster%20rendering,%20renderMedia()%20and%20React%2018+---++import Tabs from '@theme/Tabs';+import TabItem from '@theme/TabItem';++This relase brings support for GIF as an output format, official support for Tailwind and makes springs and sequences easier! Plus we recap the best features from v3.0.1 until v3.0.31! π++## Render as GIF++[To render a GIF instead of a video](/docs/render-as-gif), pass the `--codec=gif` flag during a render. We tweaked Remotion's rendering process to adapt for the speciality that are GIFs:++- Commonly, a GIF has a framerate in the range of 10-15, and so that you don't have to refactor your video, you can use the [`--every-nth-frame`](/docs/cli/render#--every-nth-frame) flag.++- GIFs are loopable - using the [`--number-of-gif-loops`](/docs/cli/render#--number-of-gif-loops) flag you have control over the GIFs looping behavior!++- You can even render your GIF distributed across many small VMs using Remotion Lambda!++## TailwindCSS support++After being broken for a while, [TailwindCSS support](/docs/tailwind) is now stable, and we even made a starter template for it! To get started, [visit our homepage](https://remotion.dev), generate a [GitHub repo from a template](https://github.com/remotion-dev/template-tailwind/generate), try it out [online via StackBlitz](https://stackblitz.com/github/remotion-dev/template-tailwind), or type the following into your terminal:++<Tabs+defaultValue="npm"+values={[+{ label: 'npm', value: 'npm', },+{ label: 'yarn', value: 'yarn', },+{ label: 'pnpm', value: 'pnpm', },+]+}>+<TabItem value="npm">++```bash+npx create-video --tailwind+```++ </TabItem>++ <TabItem value="pnpm">++```bash+pnpm create video -- --tailwind+```++ </TabItem>+ <TabItem value="yarn">++```bash+yarn create video --tailwind+```++ </TabItem>++</Tabs>++## Springs with durations++You can now do this:++```tsx twoslash+import { spring } from "remotion";+const frame = 10;+// ---cut---+const fps = 30;++const value = spring({+ fps,+ frame,+ config: {+ damping: 200,+ },+ durationInFrames: 300,+});+```++The result will be a spring animation that will take 10 seconds!++Why is this such a game changer? Normally, a spring animation curve is not defined by timing, but by physical parameters. It allows for super smooth animations, but complicate planning quite a bit, as the duration of a spring is not well-defined. Theoretically, a spring animation is never finished, it keeps on going forever (even though after some time the movement is barely noticeable).++We introduced [measureSpring()](/docs/measure-spring) which allows you to calculate the duration of a spring by allowing you to set a threshold.diff --git a/packages/docs/docs/brownfield-installation.md b/packages/docs/docs/brownfield-installation.mdindex 6128bfbdb4..d4bd73f671 100644--- a/packages/docs/docs/brownfield-installation.md+++ b/packages/docs/docs/brownfield-installation.md@@ -24,22 +24,22 @@ npm i @remotion/cli remotion```</TabItem>-- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-yarn add @remotion/cli remotion+pnpm i @remotion/cli remotion```</TabItem>- <TabItem value="pnpm">+ <TabItem value="yarn">```bash-pnpm i @remotion/cli remotion+yarn add @remotion/cli remotion```</TabItem>+</Tabs>- If you'd like to embed a Remotion video in your existing React app, install [`@remotion/player`](/docs/player/installation) as well.diff --git a/packages/docs/docs/getting-started.md b/packages/docs/docs/getting-started.mdindex 2501c3247d..5d8846b97b 100644--- a/packages/docs/docs/getting-started.md+++ b/packages/docs/docs/getting-started.md@@ -36,18 +36,18 @@ npm init video```</TabItem>-- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-yarn create video+pnpm create video```</TabItem>- <TabItem value="pnpm">++ <TabItem value="yarn">```bash-pnpm create video+yarn create video```</TabItem>diff --git a/packages/docs/docs/lambda/setup.md b/packages/docs/docs/lambda/setup.mdindex 0fe9748d88..92c34e6821 100644--- a/packages/docs/docs/lambda/setup.md+++ b/packages/docs/docs/lambda/setup.md@@ -25,21 +25,21 @@ npm i @remotion/lambda</TabItem>- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-yarn add @remotion/lambda+pnpm i @remotion/lambda```</TabItem>-- <TabItem value="pnpm">+ <TabItem value="yarn">```bash-pnpm i @remotion/lambda+yarn add @remotion/lambda```</TabItem>+</Tabs>Also update **all the other Remotion packages** to have the same version: `remotion`, `@remotion/cli` and others.diff --git a/packages/docs/docs/overwriting-webpack-config.md b/packages/docs/docs/overwriting-webpack-config.mdindex 414bad62c8..f9b14db63d 100644--- a/packages/docs/docs/overwriting-webpack-config.md+++ b/packages/docs/docs/overwriting-webpack-config.md@@ -110,18 +110,18 @@ npm i sass sass-loader```</TabItem>-- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-yarn add sass sass-loader+pnpm i sass sass-loader```</TabItem>- <TabItem value="pnpm">++ <TabItem value="yarn">```bash-pnpm i sass sass-loader+yarn add sass sass-loader```</TabItem>diff --git a/packages/docs/docs/player/installation.md b/packages/docs/docs/player/installation.mdindex 9a549fe4bf..89db27c6f5 100644--- a/packages/docs/docs/player/installation.md+++ b/packages/docs/docs/player/installation.md@@ -25,21 +25,21 @@ npm i remotion @remotion/player</TabItem>- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-yarn add remotion @remotion/player+pnpm i remotion @remotion/player```</TabItem>-- <TabItem value="pnpm">+ <TabItem value="yarn">```bash-pnpm i remotion @remotion/player+yarn add remotion @remotion/player```</TabItem>+</Tabs>Read the [examples](/docs/player/examples) and [API reference](/docs/player/api) next.diff --git a/packages/docs/docs/player/player-integration.md b/packages/docs/docs/player/player-integration.mdindex f8b45db416..5af2115c74 100644--- a/packages/docs/docs/player/player-integration.md+++ b/packages/docs/docs/player/player-integration.md@@ -33,17 +33,17 @@ npm i remotion @remotion/cli @remotion/player</TabItem>- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-yarn add remotion @remotion/cli @remotion/player+pnpm i remotion @remotion/cli @remotion/player```</TabItem>- <TabItem value="pnpm">+ <TabItem value="yarn">```bash-pnpm i remotion @remotion/cli @remotion/player+yarn add remotion @remotion/cli @remotion/player```</TabItem>diff --git a/packages/docs/docs/preload/preload.md b/packages/docs/docs/preload/preload.mdindex 866354c51a..31c10843c5 100644--- a/packages/docs/docs/preload/preload.md+++ b/packages/docs/docs/preload/preload.md@@ -31,21 +31,21 @@ npm i @remotion/preload</TabItem>- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-yarn add @remotion/preload+pnpm i @remotion/preload```</TabItem>-- <TabItem value="pnpm">+ <TabItem value="yarn">```bash-pnpm i @remotion/preload+yarn add @remotion/preload```</TabItem>+</Tabs>Also update **all the other Remotion packages** to have the same version: `remotion`, `@remotion/cli` and others.diff --git a/packages/docs/docs/renderer.md b/packages/docs/docs/renderer.mdindex d6310e8a6e..22096f49f5 100644--- a/packages/docs/docs/renderer.md+++ b/packages/docs/docs/renderer.md@@ -32,18 +32,18 @@ npm i @remotion/renderer</TabItem>- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-yarn add @remotion/renderer+pnpm i @remotion/renderer```</TabItem>- <TabItem value="pnpm">+ <TabItem value="yarn">```bash-pnpm i @remotion/renderer+yarn add @remotion/renderer```</TabItem>diff --git a/packages/docs/docs/tailwind-2.md b/packages/docs/docs/tailwind-2.mdindex 0fb03e7d98..bd9a37092e 100644--- a/packages/docs/docs/tailwind-2.md+++ b/packages/docs/docs/tailwind-2.md@@ -26,18 +26,18 @@ npm i postcss-loader postcss postcss-preset-env tailwindcss@2 autoprefixer```</TabItem>-- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-yarn add postcss-loader postcss postcss-preset-env tailwindcss@2 autoprefixer+pnpm i postcss-loader postcss postcss-preset-env tailwindcss@2 autoprefixer```</TabItem>- <TabItem value="pnpm">++ <TabItem value="yarn">```bash-pnpm i postcss-loader postcss postcss-preset-env tailwindcss@2 autoprefixer+yarn add postcss-loader postcss postcss-preset-env tailwindcss@2 autoprefixer```</TabItem>diff --git a/packages/docs/docs/tailwind.md b/packages/docs/docs/tailwind.mdindex c98a5245a0..4daf0a74dd 100644--- a/packages/docs/docs/tailwind.md+++ b/packages/docs/docs/tailwind.md@@ -24,22 +24,22 @@ npx create-video --tailwind```</TabItem>-- <TabItem value="yarn">+ <TabItem value="pnpm">```bash-pnpm create video -- --tailwind+yarn create video --tailwind```</TabItem>- <TabItem value="pnpm">+ <TabItem value="yarn">```bash-yarn create video --tailwind+pnpm create video -- --tailwind```</TabItem>+</Tabs>## Install in existing project