Skip to content

🎥 Make videos programmatically with React

only use rendered images as video

yuta08012bab21b58bb4
diff --git a/packages/renderer/src/stitcher.ts b/packages/renderer/src/stitcher.ts
index 3ba00f7628..5032cf5a4e 100644
--- a/packages/renderer/src/stitcher.ts
+++ b/packages/renderer/src/stitcher.ts
@@ -68,7 +68,7 @@ export const stitchFramesToVideo = async (options: {
cwd: options.dir,
parallelism: options.parallelism,
});
-
+
const ffmpegArgs = [
['-r', String(options.fps)],
['-f', 'image2'],
@@ -102,7 +102,7 @@ export const stitchFramesToVideo = async (options: {
1000
).toFixed(); // in milliseconds
const audioDetails = assetAudioDetails.get(url.fileURLToPath(asset.src));
-
+
return [
`[${i + 1}:a]`,
duration ? `atrim=${assetTrimLeft}:${assetTrimRight},` : '',
@@ -116,6 +116,7 @@ export const stitchFramesToVideo = async (options: {
].join(';'),
],
'-shortest',
+ ['-map', '0:v'],
options.force ? '-y' : null,
options.outputLocation,
]