π₯ Make videos programmatically with React
Remotion Recorder: How to vlog
Jonny Burger7bc6cdf01f70
diff --git a/packages/docs/docs/recorder/vlogging.mdx b/packages/docs/docs/recorder/vlogging.mdxnew file mode 100644index 0000000000..91f90a92ee--- /dev/null+++ b/packages/docs/docs/recorder/vlogging.mdx@@ -0,0 +1,82 @@+---+image: /generated/articles-docs-recorder-vlogging.png+title: Vlogging+crumb: Recorder+---++You can also include recordings that you recorded externally in your Recorder video.+For example, you may edit a vlog with it.++## Add files++Transfer the recordings from your camera to your computer and put them in the `public/<composition-id>` folder.+The file structure should look like this:++```bash title="Assuming the composition id is 'vlog'"+public+βββ vlog+β βββ camera10.mov+β βββ camera20.mov+β βββ camera30.mov++```++The prefix must be `"webcam"` for every video.+The suffixes must be ascending in the order you want to use the videos.++## Generate captions++Run++```bash+bun sub.ts+```++to generate captions for your recordings.++## Use the videos++Now you can add more scenes in the right sidebar to start including the recordings.++## iPhone recordings++iPhone recordings are HEVC videos, which during rendering Chrome cannot get the dimensions of the video.+You will get a render failure.++Here is a script to convert the recordings to MP4:++```ts title="convert.ts"+import { $ } from "bun";+import { renameSync, unlinkSync } from "fs";++const compositionId = "vlog";++const ls = (await $`ls public/${compositionId}`).stdout.toString("utf-8");+const files = ls.split("\n");++for (const file of files) {+ if (+ file.toLowerCase().endsWith(".mov") ||+ file.toLowerCase().endsWith(".mp4")+ ) {+ await $`bunx remotion ffmpeg -i public/${compositionId}/${file} public/${compositionId}/_${file}.mp4`;+ unlinkSync(`public/${compositionId}/${file}`);+ renameSync(+ `public/${compositionId}/_${file}.mp4`,+ `public/${compositionId}/${file.replace(/ /g, "_")}`,+ );+ }+}+```++Run it using++```sh+bun convert.ts+```++to fix the issue.++## Examples++In the [`our-recorder`](https://github.com/remotion-dev/our-recorder) repository, the compositions `marathon` and `airportrun` are using real-life footage.diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 3b97e66836..9814511c79 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -951,6 +951,7 @@ module.exports = {"recorder/exporting","recorder/lambda-rendering","recorder/source-control",+ "recorder/vlogging","recorder/upgrading","recorder/roadmap","recorder/gear",diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex 627707d493..02d7b961cc 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -2388,6 +2388,13 @@ export const articles = [compId: "articles-docs-recorder-upgrading",crumb: "Recorder",},+ {+ id: "recorder/vlogging",+ title: "Vlogging",+ relativePath: "docs/recorder/vlogging.mdx",+ compId: "articles-docs-recorder-vlogging",+ crumb: "Recorder",+ },{id: "register-root",title: "registerRoot()",diff --git a/packages/docs/static/generated/articles-docs-recorder-vlogging.png b/packages/docs/static/generated/articles-docs-recorder-vlogging.pngnew file mode 100644index 0000000000..fb7b2869f6Binary files /dev/null and b/packages/docs/static/generated/articles-docs-recorder-vlogging.png differ