mirror of
https://github.com/microsoft/playwright-cli.git
synced 2026-09-14 19:59:39 +08:00
fix: force output fps=25 when generating video tiles (#119)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user