Module capture

Source
Expand description

Screen recording and voiceover capture, both through ffmpeg child processes (no new deps).

Screen: ffmpeg -f gdigrab -framerate FPS [-offset_x X -offset_y Y -video_size WxH] -i desktop [-f dshow -i audio="<mic>"] -c:v libx264 -preset veryfast <rate args> out.mp4. Desktop audio needs a loopback dshow device (see audio_devices). auto_on_blur (settings) starts the recorder when the editor loses focus and stops when it regains focus, so another app can be recorded hands-free.

Voiceover: ffmpeg -f dshow -i audio="<device>" -ac N -ar 48000 out.wav, started/stopped from the voiceover panel while playback continues; the file is imported and placed at the record start time.

Both report through engine::export::Progress and stop cleanly (ffmpeg gets q on stdin, so the container is finalised).

Structs§

Capture
A running capture. stop() finalises the file; dropping it stops too.
ScreenCaptureOptions
VoiceoverOptions

Constants§

LOOPBACK_HINTS 🔒
Names that only ever belong to a loopback / “what you hear” input.

Functions§

audio_devices
dshow audio input devices (ffmpeg -list_devices true -f dshow -i dummy), cached. The bool marks devices that look like desktop/loopback capture.
loopback_device
The first device that looks like desktop audio, if any.
parse_devices 🔒
Audio device names out of ffmpeg’s -list_devices output (both the modern "name" (audio) layout and the older DirectShow audio devices section headers).
s 🔒
screen_args 🔒
ffmpeg arguments for a screen recording. loopback is the dshow device used for desktop audio (already resolved by the caller); mic and loopback are mixed when both are present.
spawn 🔒
Launch ffmpeg with args and watch it on a background thread.
start_screen
start_voiceover
voice_args 🔒
ffmpeg arguments for a voiceover take (WAV, so a cut-off take is still readable).