CS2 screenshots from the console: the screenshot and jpeg commands, the size and quality settings, and demo playback

Focused on discussions specifically about CS 1.6, including gameplay strategies, nostalgic content, and server recommendations.
Post Reply
ice
Site Admin
Posts: 143
Joined: Tue Aug 27, 2024 5:17 am

CS2 screenshots from the console: the screenshot and jpeg commands, the size and quality settings, and demo playback

Post by ice »

Quick summary
CS2 has screenshot commands in the console, with their own size, quality, directory and naming settings. screenshot takes a capture and jpeg_screenshot takes a JPEG with a quality you choose. Valve's help text for the first is "Take a screenshot: screenshot [filename]" and for the second "Take a jpeg screenshot: jpeg_screenshot [filename] [quality 1-100]".

Taking one
1. Open the console.
2. Type screenshot for a plain capture, or jpeg_screenshot for a JPEG.
3. You can pass a file name to either command. Without one, the file gets the auto naming prefix.

Valve describes cl_playback_screenshots as "Allows the client to playback screenshot and jpeg commands in demos." That is the setting to turn on when you want captures from a demo instead of from live play.

Size and format settings
  • screenshot_width: "Screenshot width. -1 for screen width."
  • screenshot_height: "Screenshot height. -1 for screen height."
  • jpeg_quality: "Set jpeg screenshot quality. [1..100]"
  • screenshot_subdir: "Set the screenshot directory."
  • screenshot_prefix: "Set the screenshot auto naming prefix."
The -1 values are the part that makes the commands easy to use. Leave both dimensions at -1 and the capture comes out at your screen resolution, so you do not have to remember a size every time.

Where the files go
screenshot_subdir decides the directory and screenshot_prefix decides what the auto named files start with. Set both once and every capture after that lands in the same place under names you can tell apart, which matters when you take twenty of them in one sitting.

FAQ

Which command gives me a JPEG?
jpeg_screenshot. Valve's text for it takes an optional file name and an optional quality from 1 to 100.

Can I capture while watching a demo?
Yes, with cl_playback_screenshots turned on. Valve's description for it is about exactly that.

Why is my capture the wrong size?
screenshot_width and screenshot_height hold the dimensions. -1 on either one means use the screen dimension for that axis.

How do I keep the files organised?
Point screenshot_subdir at the folder and give screenshot_prefix a name you will recognise later.

Does the quality setting affect the plain screenshot?
jpeg_quality is listed for jpeg screenshots specifically, so it applies to jpeg_screenshot rather than to screenshot.

Do I have to name every file?
No. The auto naming prefix handles names when you leave the file name argument out.

Sources
CS2 console commands and convars, transcribed from Valve's own dump (build 11162119)
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests