Skip to main content

CLI

CS:DM comes with a CLI (Command Line Interface) with multiple commands, allowing you to do tasks without running the GUI.

Installation

The CLI is automatically installed when you install the application with the installer.

Usage

Open a Windows terminal and type csdm, it will diplay all available commands.

caution

If you have a message csdm not found, it means that the folder where the CLI executable csdm.exe is located is not in your PATH environment variable.
The default path is C:\Users\Username\AppData\Programs\CS Demo Manager and you can follow this guide to add it to your PATH variable.

Download Valve demos

Download the last MM demos of the current Steam account or from share codes.

csdm dl-valve [shareCodes...] [--output]
warning

You must be connected to your Steam account to use this command.

NameDefaultMandatoryDescription
[shareCodes]NoShare codes to download.
--output1. Folder specified in the CS:DM settings
2. CS folder replays
3. Current directory
NoDirectory where demos will be downloaded.

Examples

To download last MM demos of the current Steam account:

csdm dl-valve

To download demos from share codes:

csdm dl-valve CSGO-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX CSGO-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

To change the directory where demos will be downloaded:

csdm dl-valve --output "C:\Users\username\Downloads"

Download FACEIT demos

danger

This command is currrently disabled, see here for details.

Download the last 8 demos of the current FACEIT account set in the application or from its nickname.

csdm dl-faceit [shareCodes...] [--output]
NameDefaultMandatoryDescription
--nicknameAccount's nickname set in the applicationNoAccount's nickname to download demos.
--output1. Folder specified in the CS:DM settings
2. CS folder replays
3. Current directory
NoDirectory where demos will be downloaded.

Examples

To download last FACEIT demos of the current FACEIT account:

csdm dl-faceit

To download demos of a specific account identified by its nickname:

csdm dl-faceit --nickname "PlayerNickname"

To change the directory where demos will be downloaded:

csdm dl-faceit --output "C:\Users\username\Downloads"

Analyze demos

Analyze demos and persist them in the database.

csdm analyze [demoPaths...] [--source] [--force]
NameDefaultMandatoryDescription
demoPathsYesDemos paths, can be either a .dem files path or a directory. It can be relative or absolute.
--sourceNoForce the analysis logic of the demo analyzer. Available values: challengermode,ebot,esea,esl,esportal,faceit,fastcup,5eplay,perfectworld,popflash,valve
--forcefalseNoForce demos analyzes even if they are already in the database.

Examples

Analyze 1 demo:

csdm analyze "C:\Users\username\Desktop\demo.dem"

Analyze multiple demos:

csdm analyze "C:\Users\username\Desktop\demo.dem" "C:\Users\username\Desktop\demo2.dem"

Analyze all demos in a directory using the ESL analyzer and re-analyze demos that have already been analyzed:

csdm analyze "C:\Users\username\Desktop\MyFolder" --source esl --force

Export demos to XLSX

Analyze and export demos to either a single or multiple XLSX files.

csdm xlsx demoPaths... [--output-folder] [--source] [--single] [--sheets] [--force-analyze]
NameDefaultMandatoryDescription
demoPathsYesDemos paths, can be either a .dem files path or a directory. It can be relative or absolute.
--sourceNoForce the analysis logic of the demo analyzer. Available values: challengermode,ebot,esea,esl,esportal,faceit,fastcup,5eplay,perfectworld,popflash,valve
--output-folderCurrent directoryNoDirectory where output files will be saved.
--singlefalseNoGenerates a single XLSX file instead of one per demo.
--sheetsAll sheetsNoIncludes only sheets identified by its name. Available values: [general,players,rounds,kills].
--force-analyzefalseNoForce demos analyzes even if they are already in the database.

Examples

Export 1 demo:

csdm xlsx "C:\Users\username\Desktop\demo.dem"

Export multiple demos with only the "Rounds" and "Kills" sheets:

csdm xlsx "C:\Users\username\Desktop\demo.dem" "C:\Users\username\Desktop\demo2.dem" --sheets rounds,kills

Export all demos in a directory using the ESL analyzer and save it in a custom directory:

csdm xlsx "C:\Users\username\Desktop\MyFolder" --output-folder "C:\Users\username\Documents" --source esl

Export demos to JSON

Analyze and export demos into JSON files.

csdm json demoPaths... [--output-folder] [--source] [--minify] [--force-analyze]
NameDefaultMandatoryDescription
demoPathsYesDemos paths, can be either a .dem files path or a directory. It can be relative or absolute.
--sourceNoForce the analysis logic of the demo analyzer. Available values: challengermode,ebot,esea,esl,esportal,faceit,fastcup,5eplay,perfectworld,popflash,valve
--output-folderCurrent directoryNoDirectory where output files will be saved.
--minifyfalseNoMinify the JSON files.
--force-analyzefalseNoForce demos analyzes even if they are already in the database.

Examples

Export 1 demo:

csdm json "C:\Users\username\Desktop\demo.dem"

Export multiple demos in a custom directory and minify the JSON files:

csdm json "C:\Users\username\Desktop\demo.dem" "C:\Users\username\Desktop\demo2.dem" --output-folder "C:\Users\username\Documents" --minify

Generate videos

Generate videos from demos.

csdm video demoPath startTick endTick [options]
warning

See the video documentation for more information about options.
Third-party software will be downloaded automatically if not present!

NameDefaultMandatoryDescription
demoPathYesPath to the .dem file to record from.
startTickYesStart tick of the sequence to record.
endTickYesEnd tick of the sequence to record.
--framerate <number>CS:DM settingsNoOutput frame rate.
--width <number>CS:DM settingsNoOutput width in pixels.
--height <number>CS:DM settingsNoOutput height in pixels.
--close-game-after-recordingCS:DM settingsNoClose the game when recording finishes.
--no-close-game-after-recordingCS:DM settingsNoDo not close the game after recording.
--concatenate-sequencesCS:DM settingsNoConcatenate recorded sequences into a single video.
--no-concatenate-sequencesCS:DM settingsNoExport each recorded sequence separately.
--encoder-software <string>CS:DM settingsNoEncoding backend. Allowed values: FFmpeg, VirtualDub.
--recording-system <string>CS:DM settingsNoRecording system. Allowed values: HLAE, CS.
--recording-output <string>CS:DM settingsNoOutput type. Allowed values: video, images, images-and-video.
--ffmpeg-crf <number>CS:DM settingsNoFFmpeg CRF (quality). Lower = higher quality (between 0 and 51).
--ffmpeg-audio-bitrate <number>CS:DM settingsNoFFmpeg audio bitrate in kbps.
--ffmpeg-video-codec <string>CS:DM settingsNoFFmpeg video codec (e.g., libx264, libx265).
--ffmpeg-audio-codec <string>CS:DM settingsNoFFmpeg audio codec (e.g., aac, libopus).
--ffmpeg-video-container <string>CS:DM settingsNoOutput container. Allowed values: mp4, avi, mkv.
--ffmpeg-input-parameters <string>CS:DM settingsNoExtra FFmpeg input parameters.
--ffmpeg-output-parameters <string>CS:DM settingsNoExtra FFmpeg output parameters.
--show-x-rayCS:DM settingsNoEnable X-Ray during recording.
--no-show-x-rayCS:DM settingsNoDisable X-Ray during recording.
--show-only-death-noticesCS:DM settingsNoShow only death notices HUD.
--no-show-only-death-noticesCS:DM settingsNoShow full HUD (not only death notices).
--player-voicesCS:DM settingsNoEnable in-game player voices.
--no-player-voicesCS:DM settingsNoDisable in-game player voices.
--death-notices-duration <number>CS:DM settingsNoDuration in seconds of death notices.
--cfg <string>CS:DM settingsNoPlain text config executed before recording.
--focus-player <steamID64>-NoFocus on a specific player by their SteamID64.

Examples

Record a video from tick 1200 to 4000 and use latest CS:DM settings:

csdm video "E:\cs\demo.dem" 1200 4000

Record a 1080p60 MP4 using FFmpeg:

csdm video "E:\cs\demo.dem" 1200 4000 --framerate 60 --width 1920 --height 1080 --encoder-software FFmpeg --ffmpeg-video-container mp4

Use HLAE + FFmpeg, disable X-Ray and focus on a specific player:

csdm video "E:\cs\demo.dem" 1200 4000 --recording-system HLAE --encoder-software FFmpeg --no-show-x-ray --focus-player 76561198000697560