fix: force output fps=25 when generating video tiles (#119)

This commit is contained in:
Yury Semikhatsky
2020-10-27 09:18:02 -07:00
committed by GitHub
parent cd2ac3ae96
commit 6d3dffce49
+3 -1
View File
@@ -47,7 +47,9 @@ export class VideoTileGenerator {
if (fs.existsSync(fileName + '-metainfo.txt'))
continue;
console.log('Generating frames for ' + fileName);
let result = spawnSync(ffmpeg, ['-i', fileName, `${fileName}-%03d.png`]);
// Force output frame rate to 25 fps as otherwise it would produce one image per timebase unit
// which is currently 1 / (25 * 1000).
let result = spawnSync(ffmpeg, ['-i', fileName, '-r', '25', `${fileName}-%03d.png`]);
await fsWriteFileAsync(fileName + '-metainfo.txt', result.stderr);
}
}