Spaces:
Running
Running
Update index.js
Browse files
index.js
CHANGED
@@ -1066,7 +1066,9 @@ async function createVideoFromExtractedImages(pixivData, frameDir) {
|
|
1066 |
const outputVideoPath = path.join(frameDir, `${pixivId}.mp4`);
|
1067 |
|
1068 |
if (fs.existsSync(frameListFile)) {
|
1069 |
-
await execAsync(`ffmpeg -f concat -safe 0 -i "${frameListFile}" -vsync vfr -pix_fmt yuv420p "${outputVideoPath}"`);
|
|
|
|
|
1070 |
console.log(`Video berhasil dibuat: ${outputVideoPath}`);
|
1071 |
return outputVideoPath;
|
1072 |
} else {
|
|
|
1066 |
const outputVideoPath = path.join(frameDir, `${pixivId}.mp4`);
|
1067 |
|
1068 |
if (fs.existsSync(frameListFile)) {
|
1069 |
+
//await execAsync(`ffmpeg -f concat -safe 0 -i "${frameListFile}" -vsync vfr -pix_fmt yuv420p "${outputVideoPath}"`);
|
1070 |
+
await execAsync(`ffmpeg -f concat -safe 0 -i "${frameListFile}" -vf "format=yuv420p,scale=trunc(iw/2)*2:trunc(ih/2)*2" -fps_mode vfr -pix_fmt yuv420p "${outputVideoPath}"`);
|
1071 |
+
|
1072 |
console.log(`Video berhasil dibuat: ${outputVideoPath}`);
|
1073 |
return outputVideoPath;
|
1074 |
} else {
|