Skip to content

Commit ba03bf1

Browse files
authored
fix: account for resolution scale (#3)
1 parent 150c7cf commit ba03bf1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/ffmpeg/server/FFmpegExporterServer.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ export class FFmpegExporterServer {
5050
}
5151

5252
// Output settings
53+
const size = {
54+
x: Math.round(settings.size.x * settings.resolutionScale),
55+
y: Math.round(settings.size.y * settings.resolutionScale),
56+
};
5357
this.command
5458
.output(path.join(this.config.output, `${settings.name}.mp4`))
5559
.outputOptions(['-pix_fmt yuv420p', '-shortest'])
5660
.outputFps(settings.fps)
57-
.size(`${settings.size.x}x${settings.size.y}`);
61+
.size(`${size.x}x${size.y}`);
5862
if (settings.fastStart) {
5963
this.command.outputOptions(['-movflags +faststart']);
6064
}

0 commit comments

Comments
 (0)