🎥 Make videos programmatically with React
rename file names to match function names
Jonny Burger788dd63c798e
diff --git a/packages/renderer/src/index.ts b/packages/renderer/src/index.tsindex 32e1172d34..326e5910bc 100644--- a/packages/renderer/src/index.ts+++ b/packages/renderer/src/index.ts@@ -20,7 +20,7 @@ import {killAllBrowsers} from './open-browser';import {parseStack} from './parse-browser-error-stack';import {prepareServer} from './prepare-server';import {serveStatic} from './serve-static';-import {spawnFfmpeg} from './stitcher';+import {spawnFfmpeg} from './stitch-frames-to-video';import {tmpDir} from './tmp-dir';import {validateEvenDimensionsWithCodec} from './validate-even-dimensions-with-codec';import {binaryExists, validateFfmpeg} from './validate-ffmpeg';@@ -34,7 +34,7 @@ export {FfmpegVersion} from './ffmpeg-flags';export {getCompositions} from './get-compositions';export {openBrowser} from './open-browser';export type {ChromiumOptions} from './open-browser';-export {renderFrames} from './render';+export {renderFrames} from './render-frames';export {renderMedia,RenderMediaOnProgress,@@ -42,7 +42,7 @@ export {StitchingState,} from './render-media';export {renderStill} from './render-still';-export {StitcherOptions, stitchFramesToVideo} from './stitcher';+export {StitcherOptions, stitchFramesToVideo} from './stitch-frames-to-video';export {SymbolicatedStackFrame} from './symbolicate-stacktrace';export {OnStartData, RenderFramesOutput} from './types';diff --git a/packages/renderer/src/render.ts b/packages/renderer/src/render-frames.tssimilarity index 100%rename from packages/renderer/src/render.tsrename to packages/renderer/src/render-frames.tsdiff --git a/packages/renderer/src/render-media.ts b/packages/renderer/src/render-media.tsindex 6338fc92fb..8557b0ad6a 100644--- a/packages/renderer/src/render-media.ts+++ b/packages/renderer/src/render-media.ts@@ -24,8 +24,8 @@ import {ServeUrlOrWebpackBundle,} from './legacy-webpack-config';import {ChromiumOptions} from './open-browser';-import {renderFrames} from './render';-import {spawnFfmpeg, stitchFramesToVideo} from './stitcher';+import {renderFrames} from './render-frames';+import {spawnFfmpeg, stitchFramesToVideo} from './stitch-frames-to-video';import {tmpDir} from './tmp-dir';import {OnStartData} from './types';import {validateEvenDimensionsWithCodec} from './validate-even-dimensions-with-codec';diff --git a/packages/renderer/src/stitcher.ts b/packages/renderer/src/stitch-frames-to-video.tssimilarity index 100%rename from packages/renderer/src/stitcher.tsrename to packages/renderer/src/stitch-frames-to-video.tsdiff --git a/packages/renderer/src/test/validate-config-stitcher.test.ts b/packages/renderer/src/test/validate-config-stitcher.test.tsindex d7247588e6..09f0c0ba6d 100644--- a/packages/renderer/src/test/validate-config-stitcher.test.ts+++ b/packages/renderer/src/test/validate-config-stitcher.test.ts@@ -1,4 +1,4 @@-import {stitchFramesToVideo} from '../stitcher';+import {stitchFramesToVideo} from '../stitch-frames-to-video';describe('Should validate invalid data passed to stitchFramesToVideo', () => {test('Invalid FPS', () => {diff --git a/packages/renderer/src/test/validate-config.test.ts b/packages/renderer/src/test/validate-config.test.tsindex 512554738a..c155af2f35 100644--- a/packages/renderer/src/test/validate-config.test.ts+++ b/packages/renderer/src/test/validate-config.test.ts@@ -1,4 +1,4 @@-import {renderFrames} from '../render';+import {renderFrames} from '../render-frames';describe('Should validate invalid data passed to renderFrames', () => {test('Invalid FPS', () => {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 106635ef0e..704d740024 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -26,7 +26,7 @@ importers:babel-loader: 8.2.2eslint: 8.13.0prettier: ^2.0.5- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4react-refresh: 0.9.0remotion: 3.0.0typescript: ^4.5.5@@ -46,7 +46,7 @@ importers:'@types/node': 16.10.2eslint: 8.13.0prettier: 2.4.1- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]remotion: link:../coretypescript: 4.5.5@@ -75,7 +75,7 @@ importers:memfs: 3.4.0mime-types: 2.1.34prettier: ^2.0.5- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4react: ^18.0.0react-dom: ^18.0.0react-refresh: 0.9.0@@ -119,7 +119,7 @@ importers:eslint-plugin-react-hooks: [email protected]jest: 27.2.4prettier: 2.4.1- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]react: 18.0.0react-dom: [email protected]ts-jest: 27.0.5_c7c6851c09cd607ef678ccb9c9b11e0f@@ -150,7 +150,7 @@ importers:jest: ^27.2.4minimist: 1.2.6prettier: ^2.0.5- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4react: ^18.0.0react-dom: ^18.0.0remotion: 3.0.0@@ -186,7 +186,7 @@ importers:eslint-plugin-react-hooks: [email protected]jest: 27.2.4prettier: 2.4.1- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]react: 18.0.0react-dom: [email protected]ts-jest: 27.0.5_c7c6851c09cd607ef678ccb9c9b11e0f@@ -204,7 +204,7 @@ importers:eslint: 8.13.0jest: ^27.2.4prettier: ^2.0.5- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4react: ^18.0.0react-dom: ^18.0.0react-test-renderer: ^18.0.0@@ -223,7 +223,7 @@ importers:eslint: 8.13.0jest: 27.2.4prettier: 2.4.1- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]react: 18.0.0react-dom: [email protected]react-test-renderer: [email protected]@@ -243,7 +243,7 @@ importers:eslint: 8.13.0execa: 5.1.1prettier: 2.6.2- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4prompts: 2.4.1tar: 6.1.11ts-node: ^9.1.1@@ -261,7 +261,7 @@ importers:'@types/tar': 6.1.1eslint: 8.13.0prettier: 2.6.2- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]ts-node: [email protected]typescript: 4.5.5@@ -423,7 +423,7 @@ importers:mdx-loader: 3.0.2polished: ^4.0.5prettier: ^2.0.5- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4remotion: 3.0.0styled-components: ^5.1.1svg-path-properties: ^1.0.4@@ -474,7 +474,7 @@ importers:eslint-plugin-react: [email protected]eslint-plugin-react-hooks: [email protected]jest: [email protected]- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]ts-jest: 27.0.5_c7c6851c09cd607ef678ccb9c9b11e0fpackages/gif:@@ -488,7 +488,7 @@ importers:jest: ^27.2.4lru_map: 0.4.1prettier: 2.6.2- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4react: 18.0.0react-dom: 18.0.0remotion: 3.0.0@@ -506,7 +506,7 @@ importers:eslint: 8.13.0jest: 27.2.4prettier: 2.6.2- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]react: 18.0.0react-dom: [email protected]typescript: 4.5.5@@ -610,7 +610,7 @@ importers:'@types/react': 18.0.1eslint: 8.13.0prettier: ^2.0.5- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4remotion: 3.0.0typescript: ^4.5.5dependencies:@@ -621,7 +621,7 @@ importers:'@types/react': 18.0.1eslint: 8.13.0prettier: 2.4.1- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]typescript: 4.5.5packages/player:@@ -636,7 +636,7 @@ importers:eslint: 8.13.0jest: ^27.2.4prettier: ^2.0.5- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4react: ^18.0.0react-dom: ^18.0.0remotion: 3.0.0@@ -656,7 +656,7 @@ importers:eslint: 8.13.0jest: 27.2.4prettier: 2.4.1- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]react: 18.0.0react-dom: [email protected]ts-jest: 27.0.5_c7c6851c09cd607ef678ccb9c9b11e0f@@ -725,7 +725,7 @@ importers:jest: ^27.2.4p-limit: 3.1.0prettier: ^2.0.5- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4puppeteer-core: 13.5.1react: 18.0.0react-dom: 18.0.0@@ -754,7 +754,7 @@ importers:eslint: 8.13.0jest: 27.2.4prettier: 2.4.1- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]react: 18.0.0react-dom: [email protected]ts-jest: 27.0.5_c7c6851c09cd607ef678ccb9c9b11e0f@@ -770,7 +770,7 @@ importers:'@types/three': ^0.134.0eslint: 8.13.0prettier: ^2.0.5- prettier-plugin-organize-imports: ^1.1.1+ prettier-plugin-organize-imports: ^2.3.4react: 18.0.0react-dom: 18.0.0remotion: 3.0.0@@ -787,7 +787,7 @@ importers:'@types/three': 0.134.0eslint: 8.13.0prettier: 2.4.1- prettier-plugin-organize-imports: [email protected][email protected]+ prettier-plugin-organize-imports: [email protected][email protected]react: 18.0.0react-dom: [email protected]three: 0.134.0@@ -16381,33 +16381,23 @@ packages:engines: {node: '>=4'}dev: false- /prettier-plugin-organize-imports/[email protected][email protected]:- resolution: {integrity: sha512-rFA1lnek1FYkMGthm4xBKME41qUKItTovuo24bCGZu/Vu1n3gW71UPLAkIdwewwkZCe29gRVweSOPXvAdckFuw==}+ /prettier-plugin-organize-imports/[email protected][email protected]:+ resolution: {integrity: sha512-R8o23sf5iVL/U71h9SFUdhdOEPsi3nm42FD/oDYIZ2PQa4TNWWuWecxln6jlIQzpZTDMUeO1NicJP6lLn2TtRw==}peerDependencies:- prettier: '>=1.10'- typescript: '>=2.8.2'+ prettier: '>=2.0'+ typescript: '>=2.9'dependencies:prettier: 2.4.1typescript: 4.5.5dev: true- /prettier-plugin-organize-imports/[email protected][email protected]:- resolution: {integrity: sha512-rFA1lnek1FYkMGthm4xBKME41qUKItTovuo24bCGZu/Vu1n3gW71UPLAkIdwewwkZCe29gRVweSOPXvAdckFuw==}- peerDependencies:- prettier: '>=1.10'- typescript: '>=2.8.2'- dependencies:- prettier: 2.6.2- typescript: 4.5.5- dev: true-- /prettier-plugin-organize-imports/[email protected][email protected]:+ /prettier-plugin-organize-imports/[email protected][email protected]:resolution: {integrity: sha512-R8o23sf5iVL/U71h9SFUdhdOEPsi3nm42FD/oDYIZ2PQa4TNWWuWecxln6jlIQzpZTDMUeO1NicJP6lLn2TtRw==}peerDependencies:prettier: '>=2.0'typescript: '>=2.9'dependencies:- prettier: 2.4.1+ prettier: 2.6.2typescript: 4.5.5dev: true