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. - Screen
Capture Options - Voiceover
Options
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_devicesoutput (both the modern"name" (audio)layout and the olderDirectShow audio devicessection headers). - s 🔒
- screen_
args 🔒 - ffmpeg arguments for a screen recording.
loopbackis 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
argsand 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).