🎥 Make videos programmatically with React
remove bundleDir, don't need to save there necessarily
Jonny Burgercc623297e39d
diff --git a/packages/core/src/CompositionManager.tsx b/packages/core/src/CompositionManager.tsxindex 2bac51f8f8..fd287e12f4 100644--- a/packages/core/src/CompositionManager.tsx+++ b/packages/core/src/CompositionManager.tsx@@ -64,7 +64,6 @@ export type TAsset = {export type RenderAssetInfo = {assets: TAsset[][];- bundleDir: string;};export type CompositionManagerContext = {diff --git a/packages/renderer/src/render.ts b/packages/renderer/src/render.tsindex e3fd64a8cc..1a715872d9 100644--- a/packages/renderer/src/render.ts+++ b/packages/renderer/src/render.ts@@ -189,8 +189,6 @@ export const renderFrames = async ({return {assetsInfo: {assets,- // TODO: Will break stuff- bundleDir: '',},frameCount,};diff --git a/packages/renderer/src/stitcher.ts b/packages/renderer/src/stitcher.tsindex 1b77aa2d8c..449cc09a48 100644--- a/packages/renderer/src/stitcher.ts+++ b/packages/renderer/src/stitcher.ts@@ -1,4 +1,7 @@import execa from 'execa';+import fs from 'fs';+import os from 'os';+import path from 'path';import {Codec,ImageFormat,@@ -22,6 +25,10 @@ import {parseFfmpegProgress} from './parse-ffmpeg-progress';import {resolveAssetSrc} from './resolve-asset-src';import {validateFfmpeg} from './validate-ffmpeg';+const makeAssetsDownloadTmpDir = (): Promise<string> => {+ return fs.promises.mkdtemp(path.join(os.tmpdir(), 'remotion-complex-filter'));+};+// eslint-disable-next-line complexityexport const stitchFramesToVideo = async (options: {dir: string;@@ -96,7 +103,7 @@ export const stitchFramesToVideo = async (options: {}),convertAssetsToFileUrls({assets: options.assetsInfo.assets,- downloadDir: options.downloadDir ?? options.assetsInfo.bundleDir,+ downloadDir: options.downloadDir ?? (await makeAssetsDownloadTmpDir()),onDownload: options.onDownload ?? (() => undefined),}),]);