recap-capture 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: recap-capture
3
+ Version: 0.1.0
4
+ Summary: Headless screen and audio capture library and CLI for Windows
5
+ License: MIT
6
+ Keywords: screen-capture,audio-capture,windows,wgc,wasapi,ffmpeg
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Capture/Recording
18
+ Classifier: Topic :: Multimedia :: Video :: Capture
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: comtypes>=1.4
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest>=7.0; extra == "dev"
24
+ Requires-Dist: pytest-cov; extra == "dev"
25
+
26
+ # recap
27
+
28
+ Headless screen and audio capture library and CLI for Windows.
29
+
30
+ ## Features
31
+
32
+ - Record an entire monitor via Windows Graphics Capture (WGC)
33
+ - Record a single window via WGC (real window capture, not desktop crop)
34
+ - Record system audio via WASAPI loopback
35
+ - Video-only, audio-only, or audio+video modes
36
+ - CLI tool (`recap`) and importable Python library
37
+ - Uses FFmpeg for encoding/muxing only
38
+
39
+ ## Installation
40
+
41
+ ```bash
42
+ pip install -e .
43
+ ```
44
+
45
+ FFmpeg must be available on PATH or specified via `--ffmpeg`.
46
+
47
+ ## CLI Usage
48
+
49
+ ```bash
50
+ # Check environment
51
+ recap doctor
52
+
53
+ # List available capture targets
54
+ recap monitors
55
+ recap windows
56
+ recap devices
57
+
58
+ # Record primary monitor with audio
59
+ recap record --output recording.mp4
60
+
61
+ # Record a specific window
62
+ recap record --window-title "Notepad" --output notepad.mp4
63
+
64
+ # Record video only
65
+ recap record --video-only --output silent.mp4
66
+
67
+ # Record audio only
68
+ recap record --audio-only --output audio.wav
69
+
70
+ # Record for 30 seconds
71
+ recap record --duration 30 --output clip.mp4
72
+ ```
73
+
74
+ ## Library Usage
75
+
76
+ ```python
77
+ from recap import Recorder, RecordingConfig
78
+
79
+ config = RecordingConfig(output="recording.mp4")
80
+ recorder = Recorder(config)
81
+ recorder.start()
82
+ # ... do work ...
83
+ recorder.stop()
84
+ recorder.wait()
85
+ ```
86
+
87
+ ## License
88
+
89
+ MIT
@@ -0,0 +1,64 @@
1
+ # recap
2
+
3
+ Headless screen and audio capture library and CLI for Windows.
4
+
5
+ ## Features
6
+
7
+ - Record an entire monitor via Windows Graphics Capture (WGC)
8
+ - Record a single window via WGC (real window capture, not desktop crop)
9
+ - Record system audio via WASAPI loopback
10
+ - Video-only, audio-only, or audio+video modes
11
+ - CLI tool (`recap`) and importable Python library
12
+ - Uses FFmpeg for encoding/muxing only
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ pip install -e .
18
+ ```
19
+
20
+ FFmpeg must be available on PATH or specified via `--ffmpeg`.
21
+
22
+ ## CLI Usage
23
+
24
+ ```bash
25
+ # Check environment
26
+ recap doctor
27
+
28
+ # List available capture targets
29
+ recap monitors
30
+ recap windows
31
+ recap devices
32
+
33
+ # Record primary monitor with audio
34
+ recap record --output recording.mp4
35
+
36
+ # Record a specific window
37
+ recap record --window-title "Notepad" --output notepad.mp4
38
+
39
+ # Record video only
40
+ recap record --video-only --output silent.mp4
41
+
42
+ # Record audio only
43
+ recap record --audio-only --output audio.wav
44
+
45
+ # Record for 30 seconds
46
+ recap record --duration 30 --output clip.mp4
47
+ ```
48
+
49
+ ## Library Usage
50
+
51
+ ```python
52
+ from recap import Recorder, RecordingConfig
53
+
54
+ config = RecordingConfig(output="recording.mp4")
55
+ recorder = Recorder(config)
56
+ recorder.start()
57
+ # ... do work ...
58
+ recorder.stop()
59
+ recorder.wait()
60
+ ```
61
+
62
+ ## License
63
+
64
+ MIT
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "recap-capture"
7
+ version = "0.1.0"
8
+ description = "Headless screen and audio capture library and CLI for Windows"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ requires-python = ">=3.10"
12
+ keywords = ["screen-capture", "audio-capture", "windows", "wgc", "wasapi", "ffmpeg"]
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Environment :: Console",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Operating System :: Microsoft :: Windows",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Multimedia :: Sound/Audio :: Capture/Recording",
25
+ "Topic :: Multimedia :: Video :: Capture",
26
+ ]
27
+
28
+ dependencies = [
29
+ "comtypes>=1.4",
30
+ ]
31
+
32
+ [project.scripts]
33
+ recap = "recap.cli:main"
34
+
35
+ [project.optional-dependencies]
36
+ dev = ["pytest>=7.0", "pytest-cov"]
37
+
38
+ [tool.setuptools.packages.find]
39
+ include = ["recap*"]
@@ -0,0 +1,76 @@
1
+ """recap – headless screen and audio capture for Windows.
2
+
3
+ Public API
4
+ ----------
5
+ .. autoclass:: RecordingConfig
6
+ .. autoclass:: Recorder
7
+ .. autofunction:: list_monitors
8
+ .. autofunction:: list_windows
9
+ .. autofunction:: list_audio_devices
10
+ .. autofunction:: find_ffmpeg
11
+ .. autofunction:: validate_environment
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ import ctypes
17
+ import sys
18
+
19
+ __version__ = "0.1.0"
20
+
21
+ # Enable DPI awareness so Win32 APIs return physical pixel coordinates ------
22
+ if sys.platform == "win32":
23
+ try:
24
+ ctypes.windll.shcore.SetProcessDpiAwareness(2) # Per-Monitor v2
25
+ except (AttributeError, OSError):
26
+ ctypes.windll.user32.SetProcessDPIAware()
27
+
28
+ # Re-export public surface --------------------------------------------------
29
+ from recap.config import RecordingConfig
30
+ from recap.discovery import (
31
+ AudioDeviceInfo,
32
+ MonitorInfo,
33
+ WindowInfo,
34
+ list_audio_devices,
35
+ list_monitors,
36
+ list_windows,
37
+ )
38
+ from recap.exceptions import (
39
+ AudioCaptureError,
40
+ CaptureError,
41
+ ConfigError,
42
+ FFmpegError,
43
+ FFmpegNotFoundError,
44
+ RecapError,
45
+ VideoCaptureError,
46
+ )
47
+ from recap.ffmpeg import find_ffmpeg, validate_environment
48
+ from recap.recorder import Recorder, RecorderState
49
+
50
+ __all__ = [
51
+ # Version
52
+ "__version__",
53
+ # Config
54
+ "RecordingConfig",
55
+ # Recorder
56
+ "Recorder",
57
+ "RecorderState",
58
+ # Discovery
59
+ "list_monitors",
60
+ "list_windows",
61
+ "list_audio_devices",
62
+ "MonitorInfo",
63
+ "WindowInfo",
64
+ "AudioDeviceInfo",
65
+ # FFmpeg
66
+ "find_ffmpeg",
67
+ "validate_environment",
68
+ # Exceptions
69
+ "RecapError",
70
+ "FFmpegNotFoundError",
71
+ "FFmpegError",
72
+ "CaptureError",
73
+ "AudioCaptureError",
74
+ "VideoCaptureError",
75
+ "ConfigError",
76
+ ]