🎥 Make videos programmatically with React
remove some internals() calls
Jonny Burger1195785e28a0
diff --git a/packages/lambda/src/admin/bundle-lambda.ts b/packages/lambda/src/admin/bundle-lambda.tsindex 4c5c02432a..e31d1479e9 100644--- a/packages/lambda/src/admin/bundle-lambda.ts+++ b/packages/lambda/src/admin/bundle-lambda.ts@@ -24,6 +24,7 @@ const bundleLambda = async () => {bundle: true,outfile,entryPoints: [template],+ treeShaking: true,});await zl.archiveFolder(outdir, FUNCTION_ZIP);diff --git a/packages/renderer/src/combine-videos.ts b/packages/renderer/src/combine-videos.tsindex 4f1e5539bb..2cb0722502 100644--- a/packages/renderer/src/combine-videos.ts+++ b/packages/renderer/src/combine-videos.ts@@ -3,11 +3,11 @@import execa from 'execa';import {rmdirSync, rmSync, writeFileSync} from 'fs';import {join} from 'path';-import {Internals} from 'remotion';import type {Codec} from './codec';import {getAudioCodecName} from './get-audio-codec-name';import {isAudioCodec} from './is-audio-codec';import {parseFfmpegProgress} from './parse-ffmpeg-progress';+import {truthy} from './truthy';export const combineVideos = async ({files,@@ -63,7 +63,7 @@ export const combineVideos = async ({'-shortest','-y',output,- ].filter(Internals.truthy)+ ].filter(truthy));task.stderr?.on('data', (data: Buffer) => {if (onProgress) {diff --git a/packages/renderer/src/ensure-presentation-timestamp.ts b/packages/renderer/src/ensure-presentation-timestamp.tsindex b3e00e273a..cc66c9246e 100644--- a/packages/renderer/src/ensure-presentation-timestamp.ts+++ b/packages/renderer/src/ensure-presentation-timestamp.ts@@ -1,7 +1,7 @@import execa from 'execa';import path from 'path';-import {Internals} from 'remotion';import {guessExtensionForVideo} from './guess-extension-for-media';+import {truthy} from './truthy';type EncodingStatus =| {@@ -35,7 +35,7 @@ const getTemporaryOutputName = async (src: string) => {return parts.map((p, i) => {if (i === parts.length - 1) {- return [`pts-${p}`, extraExtension].filter(Internals.truthy).join('.');+ return [`pts-${p}`, extraExtension].filter(truthy).join('.');}return p;diff --git a/packages/renderer/src/extract-frame-from-video.ts b/packages/renderer/src/extract-frame-from-video.tsindex 2a4d4d3f09..9dcad0ad0c 100644--- a/packages/renderer/src/extract-frame-from-video.ts+++ b/packages/renderer/src/extract-frame-from-video.ts@@ -76,7 +76,7 @@ const getFrameOfVideoSlow = async ({'image2pipe',...determineResizeParams(needsResize),'-',- ].filter(Internals.truthy);+ ].filter(truthy);const {stdout, stderr} = execa(ffmpegExecutable ?? 'ffmpeg', command);@@ -164,7 +164,7 @@ const getLastFrameOfVideoFastUnlimited = async ('image2pipe',...determineResizeParams(options.needsResize),'-',- ].filter(Internals.truthy)+ ].filter(truthy));if (!stderr) {@@ -294,7 +294,7 @@ const extractFrameFromVideoFn = async ({imageFormat === 'jpeg' ? 'mjpeg' : 'png',...determineResizeParams(needsResize),'-',- ].filter(Internals.truthy),+ ].filter(truthy),{buffer: false,}