🎥 Make videos programmatically with React
update docs
Jonny Burger8de823d0d5a2
diff --git a/packages/docs/docs/importing-assets.md b/packages/docs/docs/importing-assets.mdindex 449b56f9f9..1a653b4333 100644--- a/packages/docs/docs/importing-assets.md+++ b/packages/docs/docs/importing-assets.md@@ -74,29 +74,29 @@ const MyComp: React.FC = () => {## Using videos-Use the [`<Video />`](/docs/video) component to keep the timeline and your video in sync.+Use the [`<OffthreadVideo />`](/docs/offthreadvideo) or [`<Video />`](/docs/video) component to keep the timeline and your video in sync.```tsx twoslash-import { staticFile, Video } from "remotion";+import { OffthreadVideo, staticFile } from "remotion";export const MyComp: React.FC = () => {- return <Video src={staticFile("vid.webm")} />;+ return <OffthreadVideo src={staticFile("vid.webm")} />;};```Loading videos via URL is also possible:```tsx twoslash-import { Video } from "remotion";+import { OffthreadVideo } from "remotion";export const MyComp: React.FC = () => {return (- <Video src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" />+ <OffthreadVideo src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" />);};```-Be aware that if you are rendering using Chromium (as opposed to Chrome), the codec for MP4 videos is not included. Read the section on the [`<Video/ >`](/docs/video#codec-support) page for more information.+See also: [Which video formats does Remotion support?](/docs/miscellaneous/video-formats)## Using Audiodiff --git a/packages/docs/docs/media-playback-error.md b/packages/docs/docs/media-playback-error.mdindex 5eae901c32..2ad3fb4600 100644--- a/packages/docs/docs/media-playback-error.md+++ b/packages/docs/docs/media-playback-error.md@@ -24,10 +24,12 @@ This error happens when you are trying to embed a `<Video/>` or `<Audio/>` tag iUnlike Google Chrome, the Chromium Browser does not include proprietary codecs. This means you cannot play MP4/H.264 videos and some audio codecs (more codecs may not be supported).-**Workaround**: Convert videos to WebM, [use Chrome instead of Chromium](/docs/config#setbrowserexecutable), or use [`<OffthreadVideo>`](/docs/offthreadvideo).+**Workaround 1**: Use Chrome, not Chromium.++**Workaround 2**: Convert videos to WebM, [use Chrome instead of Chromium](/docs/config#setbrowserexecutable), or use [`<OffthreadVideo>`](/docs/offthreadvideo).:::note-> The Chromium browser included in Remotion Lambda and Cloud Run already supports the H.264 codec.+Until `v4.0.17`, Remotion would download Chromium if no local browser was found. Starting from `v4.0.18`, Remotion will download [Thorium](https://thorium.rocks/) instead, which includes the codecs needed to render videos.:::## Invalid sourcediff --git a/packages/docs/docs/miscellaneous/thorium-browser.md b/packages/docs/docs/miscellaneous/thorium-browser.mdnew file mode 100644index 0000000000..7286e47f99--- /dev/null+++ b/packages/docs/docs/miscellaneous/thorium-browser.md@@ -0,0 +1,28 @@+---+image: /generated/articles-docs-miscellaneous-thorium-browser.png+sidebar_label: Thorium browser+title: Thorium browser+crumb: "FAQ"+---++Starting from `v4.0.18`, if no local browser can be found, an instance of [Thorium](https://thorium.rocks/) will be downloaded.+In previous versions, Remotion would download the free version of Chromium, which would not include codecs for the proprietary H.264 and H.265 codecs.+This would often lead to problems when using the [`<Video>`](/docs/video) tag.++Thorium is a free and open-source browser forked off Chromium, which includes the codecs needed to render videos.+The following platforms are supported:++- Linux (x64)+- Windows (x64)+- macOS (x64 and arm64)++If you don't want Thorium to get downloaded or your platform is not supported, you need to specify your own Chromium-based browser:++- Using the [`setBrowserExecutable()`](/docs/config#setbrowserexecutable) option in the config file (for the CLI)+- Using the [`browserExecutable`](/docs/renderer/render-media) option in [`renderMedia()`](/docs/renderer/render-media) and other SSR APIs++In [Lambda](/docs/lambda) and [Cloud Run](/docs/cloudrun), a version of Chrome is already installed, so you don't need to do anything.++## See also++- [Media playback error](/docs/media-playback-error)diff --git a/packages/docs/docs/miscellaneous/video-formats.md b/packages/docs/docs/miscellaneous/video-formats.mdindex e553cdbc0d..eb373d5344 100644--- a/packages/docs/docs/miscellaneous/video-formats.md+++ b/packages/docs/docs/miscellaneous/video-formats.md@@ -13,4 +13,8 @@ Remotion supports a variety of video codecs.During rendering this means that the Chrome codecs are supported. In the [Remotion Studio](/docs/terminology#remotion-studio) and in the [Player](/docs/terminology#remotion-player), the codec support from the browser in which the webpage is hosted in applies.Codec support varies between browsers and changes from time to time. Refer to this [MDN article](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs) for browser support.+:::note+Prior to v4.0.18, if you did not have a local copy of Chrome, Remotion would download a copy of [Chromium]() which [would not support the proprietary H.264 and H.265 codecs](/docs/miscellaneous/thorium-browser).+:::+**Codecs supported for [`<OffthreadVideo>`](/docs/offthreadvideo)**: The same support that applies to `<Video>` applies to `<OffthreadVideo>` as well, however, more codecs can be supported during rendering since FFmpeg is used under the hood to read the video file. We however don't maintain an exact list of supported video codecs.