CS2-insight-agent  by DrEAmSs59

CS2 esports analysis and automated video clip generation

Created 1 month ago
425 stars

Top 68.9% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project provides an automated desktop application for Counter-Strike 2 (CS2) players to analyze demo recordings. It extracts key gameplay moments like highlights, fails, and meme deaths, generates AI-driven commentary, and automates the recording and editing process using OBS, streamlining content creation from gameplay. The target audience is CS2 players seeking an effortless way to produce highlight reels or funny moments from their matches.

How It Works

The application features a React frontend and a FastAPI backend. It leverages demoparser2 and pandas for demo analysis, OpenAI-compatible SDKs for AI-driven "toxic" reviews, and obs-websocket-py for OBS control. Core processes like demo parsing run in isolated subprocesses to prevent crashes. Game State Integration (GSI) acts as a readiness gate for recording, while Windows console injection controls CS2 gameplay.

Quick Start & Requirements

  • Installation: Clone the repository. Install backend dependencies (pip install -r requirements.txt) and run the FastAPI server (uvicorn app.main:app --port 8000). Install frontend dependencies (npm install) and run the development server (npm run dev).
  • Prerequisites: Python 3.10, Node.js, OBS Studio with obs-websocket plugin, an OpenAI-compatible LLM API key or local setup, CS2 installed, and CS2 Game State Integration enabled.
  • Links: Frontend accessible at http://localhost:5173.

Highlighted Details

  • Automated Clip Extraction: Identifies and categorizes highlights (multi-kills, clutches), fails (specific death types), and meme deaths ("研发局").
  • AI Commentary: Generates humorous, "toxic" reviews for clips and overall matches using various LLMs (OpenAI, DeepSeek, Qwen, etc.).
  • OBS Automation: Manages CS2 replay recording, smart jump-cuts, POV inclusion, and batch processing with automatic file naming.
  • Demo Library: Stores parsed demo metadata in a local SQLite database and monitors specified directories for new demos via watchdog.
  • Player Tracking: Supports identifying and focusing on specific players within demos using multiple identification methods.

Maintenance & Community

No specific details on contributors, sponsorships, or community channels were found in the provided README.

Licensing & Compatibility

  • License: PolyForm Noncommercial 1.0.0.
  • Restrictions: Strictly prohibited for commercial use (software, services, sales). Requires written authorization for any commercial application. Permitted for personal learning, research, and hobbyist use.

Limitations & Caveats

The project is strictly for non-commercial use. Users are warned against using it with official CS2 matchmaking servers due to potential anti-cheat triggers. Enabling POV mode requires running CS2 with -insecure, making it incompatible with VAC-secured servers. Temporary modifications to CS2's configuration and keybinds occur during recording, with automatic backups and rollbacks implemented.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
25
Issues (30d)
27
Star History
426 stars in the last 30 days

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(SVP at GitHub; Founder of Turborepo; Author of Formik, TSDX) and Travis Fischer Travis Fischer(Founder of Agentic).

stream.new by muxinc

0.2%
594
Video upload and AI content analysis application
Created 5 years ago
Updated 3 weeks ago
Feedback? Help us improve.