Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug Report
about: Create a report to help us improve Ghost Replay
title: '[BUG] '
labels: bug
assignees: ''

---

**Describe the Bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Open the application.
2. Click on '...'
3. Trigger hotkey '...'
4. See error.

**Expected Behavior**
A clear and concise description of what you expected to happen.

**Diagnostics Info**
Please paste the text copied from **Overview > Diagnostics** in the UI:
```text
(Paste diagnostics report here)
```

**Environment (please complete the following information):**
- OS: [e.g. Windows 11 23H2]
- GPU: [e.g. Nvidia RTX 3070]
- Driver Version: [e.g. 555.85]
- FFmpeg Source: [e.g. Gyan.dev LGPL Shared vX.Y.Z]

**Additional Context**
Add any other context about the problem here (e.g. logs from `ghostreplay.log` with any sensitive file paths or usernames redacted).
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature Request
about: Suggest an idea or enhancement for Ghost Replay
title: '[FEAT] '
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. E.g. "I find it frustrating when..."

**Describe the Solution You'd Like**
A clear and concise description of what you want to happen.

**Describe Alternatives You've Considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional Context**
Add any other context or screenshots about the feature request here.
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Description
Provide a clear summary of the changes and the problem they solve.

## Linked Issues
Fixes #(issue number)

## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Code cleanup / Refactoring (no functional change)
- [ ] Documentation update

## Verification Performed
Describe the tests that you ran to verify your changes:
1. Local unit tests run: `.\build\Release\ghostreplay_tests.exe`
2. Manual verification steps performed:

## Checklist
- [ ] My code follows the code style and guidelines of this project.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] My changes generate no new warnings during build.
- [ ] I have verified that unit tests pass locally.
- [ ] I have run the `package_portable` target and verified that the package licensing audit passes.
23 changes: 23 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Ghost Replay Validation

on:
push:
branches: [ master, main, release/** ]
pull_request:
branches: [ master, main ]

jobs:
validate:
runs-on: windows-latest

steps:
- name: Checkout Source Code
uses: actions/checkout@v4

- name: Setup CMake
uses: jasonacox/setup-cmake@v1.0.5

- name: Verify CMake Configuration
run: |
cmake --version
echo "Source checkout complete. Ghost Replay requires custom Qt6 and FFmpeg configurations for compilation."
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

All notable changes to the Ghost Replay project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0] - 2026-06-26

This is the first public preview/beta release of Ghost Replay, providing an efficient, low-overhead local replay buffer capture tool for Windows.

### Added
- **Rolling Replay Buffer**: Background video/audio recording held in memory/disk-backed ring buffer until hotkey triggers.
- **Hardware-Accelerated Video Encoding**: Integrated Nvidia NVENC, AMD AMF, Intel Quick Sync (QSV), and Windows Media Foundation (WMF) H.264 encoders.
- **Loopback Audio Capture**: WASAPI-based system audio loopback capture mapped to AAC audio.
- **Dynamic UI**: Refined Qt/QML client interface utilizing Inter and Space Grotesk typography, featuring a real-time status monitor and glassmorphic panels.
- **Clip Management**: Integrated browser supporting list/grid views, metadata previews, list-hover tooltips, and deletion confirmations.
- **Trim & Share Export**: In-app video trimming with target-size export presets (Discord, Email, etc.), progress indicators, and cancel options.
- **Diagnostics Dashboard**: Automatic start-up validation suite covering Windows OS compatibility, encoder accessibility, FFmpeg status, and directory permissions.
- **Single-Instance IPC**: Socket-based application listener preventing multiple concurrent capture instances, automatically focusing the active window on collision.
- **System Tray Integration**: Background running support allowing user to minimize to tray and control recording from the taskbar context menu.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ else()
endif()

# Qt 6 (optional for Phase 0, required for Phase 1+)
find_package(Qt6 QUIET COMPONENTS Core Widgets Quick QuickControls2 QuickDialogs2 Multimedia)
find_package(Qt6 QUIET COMPONENTS Core Widgets Quick QuickControls2 QuickDialogs2 Multimedia Network)
if(Qt6_FOUND)
message(STATUS "Qt 6 found — UI features enabled")
else()
Expand Down Expand Up @@ -136,6 +136,7 @@ set(SOURCES
# Qt UI sources (compiled only when HAS_QT6 is defined)
set(QT_UI_SOURCES
src/ui/GRApplication.cpp
src/ui/DisplayTopologyMonitor.cpp
src/ui/SettingsWindow.cpp
src/ui/Backend.cpp
src/ui/WindowChromeController.cpp
Expand All @@ -147,6 +148,7 @@ set(QT_UI_SOURCES

set(QT_UI_HEADERS
src/ui/GRApplication.h
src/ui/DisplayTopologyMonitor.h
src/ui/SettingsWindow.h
src/ui/Backend.h
src/ui/WindowChromeController.h
Expand Down Expand Up @@ -228,13 +230,16 @@ if(Qt6_FOUND)
Qt6::QuickControls2
Qt6::QuickDialogs2
Qt6::Multimedia
Qt6::Network
)
target_compile_definitions(ghostreplay PRIVATE HAS_QT6)

if(WIN32)
set_target_properties(ghostreplay PROPERTIES WIN32_EXECUTABLE TRUE)
if(MSVC)
target_link_options(ghostreplay PRIVATE /SUBSYSTEM:WINDOWS)
target_link_options(ghostreplay PRIVATE
"/MANIFESTINPUT:${CMAKE_SOURCE_DIR}/resources/windows/ghostreplay.exe.manifest")
endif()
endif()

Expand Down Expand Up @@ -347,6 +352,7 @@ if(BUILD_TESTS)
if(Qt6_FOUND)
target_sources(ghostreplay_tests PRIVATE src/util/FileActions.cpp)
target_sources(ghostreplay_tests PRIVATE src/util/ReleaseHealth.cpp src/util/ClipProbe.cpp)
target_sources(ghostreplay_tests PRIVATE src/ui/DisplayTopologyMonitor.cpp)
target_link_libraries(ghostreplay_tests PRIVATE Qt6::Core Qt6::Gui ${DXGI_LIB} ${SHELL32_LIB})
target_compile_definitions(ghostreplay_tests PRIVATE HAS_QT6 GHOST_REPLAY_VERSION="${PROJECT_VERSION}")
endif()
Expand Down
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing to Ghost Replay

Thank you for your interest in contributing to Ghost Replay! As an open-source, local-first capture client, we appreciate community fixes and features.

## Development Setup

To build and test the project locally, please follow these steps:

### Prerequisites
- **Operating System**: Windows 10 (1903 or newer) or Windows 11.
- **Compiler**: Visual Studio 2022 with MSVC C++20 compiler tools.
- **Build Tool**: CMake 3.25 or newer.
- **Libraries**:
- Qt 6 (Core, Widgets, Quick, QuickControls2, QuickDialogs2, Multimedia, Network).
- FFmpeg shared development libraries (must be LGPL-compatible for packaging).

### Building from Source

Run the configuration and build from a **Visual Studio Developer PowerShell** or **x64 Native Tools Command Prompt**:

```powershell
# Configure the project
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DBUILD_TESTS=ON `
-DQT6_DIR="C:\Qt\6.x.x\msvc2022_64" `
-DFFMPEG_DIR="C:\ffmpeg"

# Compile Release binary
cmake --build build --config Release
```

### Running Tests

We run unit tests to verify configuration parser, encoder selector logic, and file helpers:

```powershell
# Build the test executable
cmake --build build --config Release --target ghostreplay_tests

# Execute test suite
.\build\Release\ghostreplay_tests.exe
```

## Pull Request Guidelines

1. **Create a Topic Branch**: Build your changes on a descriptive branch name (e.g. `fix/hotkey-conflict`).
2. **Write Unit Tests**: If you are adding configuration options or utility logic, please add matching assertions in `tests/`.
3. **Verify Compliance**:
- Ensure the app builds from a clean directory.
- Run the unit tests and make sure they all pass.
- Run `cmake --build build --config Release --target package_portable` to check that the LGPL audit passes.
4. **Clean Code**: Keep formatting clean and preserve comments/licensing headers.

## Security Disclosures

If you discover a security vulnerability, please do **not** open a public issue. Review our [SECURITY.md](SECURITY.md) to report it privately.
114 changes: 79 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,122 @@
# Ghost Replay

Ghost Replay is a Windows instant-replay recorder for saving recent desktop, window, or foreground-game moments to MP4.
**Instant-replay recording for Windows.** Save the last few seconds of your desktop, window, or game the moment something worth keeping happens — no OBS, no always-on stream required.

## Status
[![Release](https://img.shields.io/badge/release-v0.1.0--beta-blue)](https://github.com/Confetti3/ghostreplay/releases/tag/v0.1.0)
[![Platform](https://img.shields.io/badge/platform-Windows%2010%2B-lightgrey)](https://github.com/Confetti3/ghostreplay)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)

This repository is in public beta shape. The release build uses H.264 capture, WASAPI loopback audio, a rolling replay buffer, a Qt/QML desktop UI, tray controls, clip browsing, trimming, and FFmpeg-based share exports.
---

## Screenshots

**Overview** — live capture status, replay buffer, and recent saves at a glance.

![Overview](docs/images/overview.png)

**Clips** — your full clip library with search, game filter, thumbnails, and one-click export.

![Clips](docs/images/clips.png)

**Settings** — configure capture source, codec, quality, hotkeys, and output folder.

![Settings](docs/images/settings.png)

---

## Features

- **Rolling replay buffer** — always recording the last N seconds (configurable); press a hotkey to keep the clip
- **Desktop, window, or game capture** — uses the Windows graphics stack with no hooks or drivers required
- **WASAPI loopback audio** — captures system audio alongside video automatically
- **H.264 encoding** — hardware-accelerated encoding via the best available encoder on your GPU
- **Clip browser** — browse, preview, search, and filter your library by game or date
- **Shareable exports** — FFmpeg-based trimming and re-encode for smaller share-ready files
- **System tray integration** — runs quietly in the background; show or exit from the tray menu
- **No telemetry** — records locally, never uploads anything, no accounts required

---

## Requirements

- Windows 10 1903 or newer.
- Visual Studio 2022 with MSVC C++20 tools.
- CMake 3.25 or newer.
- Qt 6 with Core, Widgets, Quick, QuickControls2, QuickDialogs2, and Multimedia.
- A shared, LGPL-compatible FFmpeg dev build with `include`, `lib`, and runtime DLLs. Do not ship GPL-enabled FFmpeg builds for public releases.
- Run CMake builds from a Visual Studio Developer PowerShell or x64 Native Tools Command Prompt so deployment tools can find the MSVC runtime.
| Component | Version |
|-----------|---------|
| Windows | 10 1903 or newer |
| Visual Studio | 2022 with MSVC C++20 |
| CMake | 3.25 or newer |
| Qt 6 | Core, Widgets, Quick, QuickControls2, QuickDialogs2, Multimedia |
| FFmpeg | Shared LGPL-compatible dev build (include, lib, runtime DLLs) |

## Security And Privacy
> **Note:** Run CMake builds from a **Visual Studio Developer PowerShell** or **x64 Native Tools Command Prompt** so deployment tools can locate the MSVC runtime.

Ghost Replay records and stores data locally. It does not include telemetry,
cloud upload, account features, or analytics. See [SECURITY.md](SECURITY.md) for
the vulnerability reporting process and release packaging expectations.
---

## Configure And Build
## Build

```powershell
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DBUILD_TESTS=ON `
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
-DQT6_DIR="C:\Qt\6.x.x\msvc2022_64" `
-DFFMPEG_DIR="C:\ffmpeg"

cmake --build build --config Release
```

If `nlohmann_json` or Catch2 are already installed with CMake package files,
Ghost Replay uses those packages. Otherwise CMake fetches the pinned versions
listed in [docs/THIRD_PARTY_NOTICES.md](docs/THIRD_PARTY_NOTICES.md).
If `nlohmann_json` or Catch2 are already installed with CMake package files, Ghost Replay uses those. Otherwise CMake fetches the pinned versions listed in [docs/THIRD_PARTY_NOTICES.md](docs/THIRD_PARTY_NOTICES.md).

Build tests with:
### Run Tests

```powershell
cmake -S . -B build -DBUILD_TESTS=ON
cmake --build build --config Release --target ghostreplay_tests
ctest --test-dir build -C Release --output-on-failure
```

---

## Run

```powershell
build\Release\ghostreplay.exe
```

The app writes settings to `ghostreplay.json`, logs to `ghostreplay.log`, and clips to `clips` by default. Closing the window hides the app to the tray; use the tray menu to show it again or exit.
The app writes settings to `ghostreplay.json`, logs to `ghostreplay.log`, and clips to the `clips` folder — all relative to the executable. Closing the window hides the app to the tray; use the tray menu to show it again or exit fully.

---

## Package
## Package a Portable Release

```powershell
cmake --build build --config Release --target package_portable
```

The package step stages `dist\GhostReplay-<version>-win64-portable` and checks packaged `ffmpeg.exe` for GPL/libx264/libx265 flags before completing.
Release packages use [config/ghostreplay.example.json](config/ghostreplay.example.json) for public defaults, not your local `ghostreplay.json`.
This stages `dist\GhostReplay-<version>-win64-portable` and validates the bundled `ffmpeg.exe` for LGPL compliance before completing. Release packages use [config/ghostreplay.example.json](config/ghostreplay.example.json) for clean public defaults.

See [docs/RELEASE_CHECKLIST.md](docs/RELEASE_CHECKLIST.md) before publishing a public release.

See [docs/RELEASE_CHECKLIST.md](docs/RELEASE_CHECKLIST.md) before publishing.
---

## Troubleshooting

- Use Overview > Diagnostics when capture is unavailable.
- Use Settings > Output to choose a writable clips folder.
- If the save hotkey is already taken, change it in Settings and save.
- Window capture opens the Windows picker when you retry capture.
- HEVC capture is intentionally disabled in this beta until replay-save muxing is validated end to end.
| Problem | Solution |
|---------|----------|
| Capture not starting | Check Overview for diagnostics; retry capture to open the Windows picker |
| Save hotkey conflicts | Reassign in Settings → Hotkeys and save |
| Clips folder not writable | Change the output path in Settings → Output |
| HEVC unavailable | Intentionally disabled in this beta until muxing is fully validated |

---

## Privacy & Security

Ghost Replay records and stores data **locally only**. It includes no telemetry, cloud upload, accounts, or analytics. See [SECURITY.md](SECURITY.md) for the vulnerability reporting process.

---

## UI Assets & Licenses

The Qt/QML interface bundles **Inter** and **Space Grotesk** from Google Fonts, both under the SIL Open Font License. See [docs/THIRD_PARTY_NOTICES.md](docs/THIRD_PARTY_NOTICES.md) and `resources/fonts` for full attribution.

---

## UI Assets
## Contributing

The Qt/QML interface bundles Inter and Space Grotesk from Google Fonts for a
consistent release appearance. Both fonts are distributed under the SIL Open
Font License; see [docs/THIRD_PARTY_NOTICES.md](docs/THIRD_PARTY_NOTICES.md)
and `resources/fonts`.
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on bug reports, pull requests, and the development workflow.
Binary file added docs/images/clips.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed resources/branding/ghost-loop.png
Binary file not shown.
Loading
Loading