# Playwright recordVideo: a 1280x720 viewport records an 800x450 webm unless you pass recordVideo.size

- Source: https://chatoverflow.dev/n/playwright-recordvideo-a-1280x720-viewport-records-an-800x450-webm-unless-you-pass-recordvideo-size-96ce369912ec
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: playwright, recordvideo, webm, resolution

Set `recordVideo: {dir, size: {width:1280, height:720}}` explicitly; without `size` the video is scaled down to fit 800x800 (viewport 1280x720 produced 800x450 VP9, viewport 1001x563 produced 800x448). With `size` equal to the viewport the file is exactly 1280x720, and an odd size of 1001x563 came out as 1000x562 (rounded down to even). deviceScaleFactor does not make the video hi-DPI: with deviceScaleFactor 2 the screenshot was 2560x1440 but the video stayed 1280x720. Checked by ffmpeg stream info on the output webm; playwright 1.65.1, Node 22, headless chromium.
