Skip to content

πŸŽ₯ Make videos programmatically with React

finish 3.1 blog post

Jonny Burgerbe5e074bafaf
diff --git a/packages/docs/blog/2022-07-14-remotion-3-1.md b/packages/docs/blog/2022-07-14-remotion-3-1.md
index 4e8bdc69af..1dee26dcf1 100644
--- a/packages/docs/blog/2022-07-14-remotion-3-1.md
+++ b/packages/docs/blog/2022-07-14-remotion-3-1.md
@@ -5,11 +5,12 @@ 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
+image: https://remotion-still.herokuapp.com/PreviewCard.png?title=Remotion%203.1&description=GIFs,%20%3COffthreadVideo%3E,%20Springs%20with%20duration,%20TailwindCSS
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
+import {SpringsWithDurationDemo} from '../components/SpringsWithDurationDemo';
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! πŸŽ‰
@@ -23,6 +24,10 @@ This relase brings support for GIF as an output format, official support for Tai
- You can even render your GIF distributed across many small VMs using Remotion Lambda!
+<img style={{width: "100%"}} src="/img/render-as-gif.gif" />
+
+<p style={{textAlign: "center"}}><em>You can put <a href="/docs/gif">{"<Gif>"}</a>'s in your GIF!</em></p>
+
## 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:
@@ -60,6 +65,10 @@ yarn create video --tailwind
</Tabs>
+<img style={{width: "100%"}} src="/img/tailwind.gif" />
+
+<p style={{textAlign: "center"}}><em>Yes, you can write a GIF in Tailwind now.</em></p>
+
## Springs with durations
You can now do this:
@@ -90,12 +99,19 @@ But to change the duration of a spring, you had to change the physics parameters
Until now - if you pass a duration to a spring, we will detect the trajectory of the curve and stretch it so it fits your duration.
+<SpringsWithDurationDemo />
+
## `<OffthreadVideo>` component
[This component](/docs/offthreadvideo) is an alternative to the [`<Video>`](/docs/video) component that extracts frames using FFMPEG and renders them inside an [`<Img>`](/docs/img) tag.
We made the `<OffthreadVideo>` component in order to counteract problems with seeking and throttling that users were reporting with the `<Video>` tag. The new way improves reliability but has it's tradeoffs - read [`<OffthreadVideo> vs <Video>`](/docs/video-vs-offthreadvideo) or check out our [visual explanation on Instagram](https://www.instagram.com/p/CftaiHpMM-L/)!
+<a href="https://www.instagram.com/p/CftaiHpMM-L/">
+ <img src="/img/offthreadvideo-all.png" />
+ <p style={{textAlign: "center"}}><em>Follow us on Instagram where we explain concepts visually!</em></p>
+</a>
+
## `renderMedia()` returns a buffer
Previously you could only save your video to a file when using the [`renderMedia()`](/docs/renderer/render-media) and [`stitchFramesToVideo()`](/docs/renderer/stitch-frames-to-video) APIs. Now it can also return a Node.JS [`Buffer`](https://nodejs.org/api/buffer.html)!
@@ -105,17 +121,24 @@ Previously you could only save your video to a file when using the [`renderMedia
This [new package](/docs/preload) offers three APIs that are handy for preloading assets
before they appear in the [`<Player>`](/docs/player): [`resolveRedirect()`](/docs/preload/resolve-redirect), [`preloadAudio()`](/docs/preload/preload-audio) and [`preloadVideo()`](/docs/preload/preload-video).
-## Sidebar improvements
+<a href="https://twitter.com/remotion_dev/status/1538809909965357056">
+ <img src="/img/preload-all.png" />
+ <p style={{textAlign: "center"}}><em>We first announce and explain new features on Twitter!</em></p>
+</a>
-You can now put your [`<Composition>`](/docs/composition)'s inside [`<Folder>`](/docs/folder)'s now to organize your left sidebar neatly!
+## Sidebar improvements
If your screen real estate is tight, you may also hide the left sidebar now!
+<video src="/img/sidebar.mp4" autoPlay muted loop />
+
## Built-in color picker
In the preview, go to `Tools` -> `Color picker` to trigger an eye dropper that allows you to pick any color from the screen! Only Chrome has this feature enabled for now.
-## Poweruser tips
+<video src="/img/colorpicker.mp4" autoPlay muted loop />
+
+## For power users
- Previously you could not wrap your `<Composition>`'s in a React context (e.g. Redux), but this is supported now!
- If you add `--log=verbose` to a Lambda render, you'll see which frames took the longest to render.
@@ -130,7 +153,13 @@ In the preview, go to `Tools` -> `Color picker` to trigger an eye dropper that a
We welcome Patric as our intern! As you can see on our [new team page](/about), we are now a team of three and are in the preparations of our first fundraising round.
-Remotion won the "Most Exciting use of Technology Award" at React Summit - thanks to you, the users, for supporting us!
+<video src="/img/patric.mp4" autoPlay muted loop />
+
+<p style={{textAlign: "center"}}><em>Patric's first Remotion video!</em></p>
+
+Remotion won the "Most Exciting use of Technology Award" at React Summit - we owe it all to you!
+
+<img src="/img/award.jpeg" />
Going forward, we want to make Remotion even easier to use through new tools, templates and tips!
diff --git a/packages/docs/components/SpringsWithDurationDemo.tsx b/packages/docs/components/SpringsWithDurationDemo.tsx
new file mode 100644
index 0000000000..9502f8e38e
--- /dev/null
+++ b/packages/docs/components/SpringsWithDurationDemo.tsx
@@ -0,0 +1,14 @@
+import { useColorMode } from "@docusaurus/theme-common";
+import React from "react";
+
+export const SpringsWithDurationDemo: React.FC = () => {
+ const { isDarkTheme } = useColorMode();
+ return (
+ <video
+ src={isDarkTheme ? "/img/springs-dark.mp4" : "/img/springs-light.mp4"}
+ loop
+ muted
+ autoPlay
+ />
+ );
+};
diff --git a/packages/docs/static/img/award.jpeg b/packages/docs/static/img/award.jpeg
new file mode 100644
index 0000000000..60944a5a6c
Binary files /dev/null and b/packages/docs/static/img/award.jpeg differ
diff --git a/packages/docs/static/img/colorpicker.mp4 b/packages/docs/static/img/colorpicker.mp4
new file mode 100644
index 0000000000..d0e3641996
Binary files /dev/null and b/packages/docs/static/img/colorpicker.mp4 differ
diff --git a/packages/docs/static/img/offthreadvideo-all.png b/packages/docs/static/img/offthreadvideo-all.png
new file mode 100644
index 0000000000..721b4105a1
Binary files /dev/null and b/packages/docs/static/img/offthreadvideo-all.png differ
diff --git a/packages/docs/static/img/patric.mp4 b/packages/docs/static/img/patric.mp4
new file mode 100644
index 0000000000..d3de85ba9f
Binary files /dev/null and b/packages/docs/static/img/patric.mp4 differ
diff --git a/packages/docs/static/img/preload-all.png b/packages/docs/static/img/preload-all.png
new file mode 100644
index 0000000000..86f8c9a7d3
Binary files /dev/null and b/packages/docs/static/img/preload-all.png differ
diff --git a/packages/docs/static/img/render-as-gif.gif b/packages/docs/static/img/render-as-gif.gif
new file mode 100644
index 0000000000..d46df83d7e
Binary files /dev/null and b/packages/docs/static/img/render-as-gif.gif differ
diff --git a/packages/docs/static/img/sidebar.mp4 b/packages/docs/static/img/sidebar.mp4
new file mode 100644
index 0000000000..2e9831a7de
Binary files /dev/null and b/packages/docs/static/img/sidebar.mp4 differ
diff --git a/packages/docs/static/img/springs-dark.mp4 b/packages/docs/static/img/springs-dark.mp4
new file mode 100644
index 0000000000..28523ded42
Binary files /dev/null and b/packages/docs/static/img/springs-dark.mp4 differ
diff --git a/packages/docs/static/img/springs-light.mp4 b/packages/docs/static/img/springs-light.mp4
new file mode 100644
index 0000000000..7036f20f2c
Binary files /dev/null and b/packages/docs/static/img/springs-light.mp4 differ
diff --git a/packages/docs/static/img/tailwind.gif b/packages/docs/static/img/tailwind.gif
new file mode 100644
index 0000000000..d83901c509
Binary files /dev/null and b/packages/docs/static/img/tailwind.gif differ