junkpile

wgpu AV Recorder

Focused native Tauri 2 + wgpu recorder with selectable audio source.

Audio modes

The video stream is finalized first. When audio is enabled, FFmpeg then muxes audio into the completed video without re-encoding the video stream.

Video formats

The recorder uses the reusable-buffer/readback pipeline developed for the high-resolution Junkpile wgpu examples and exposes GPU/readback/worker drop diagnostics.

Requirements

macOS includes NSMicrophoneUsageDescription in src-tauri/Info.plist.

Run

npm install
npm run dev

Suggested validation

Video only

  1. Leave Audio Source on None.
  2. Record 1080p30 H.264 for 5–10 seconds.
  3. Stop + finalize.
  4. Confirm the output plays normally.

Microphone

  1. Choose Microphone.
  2. Select the desired input.
  3. Start recording and speak/clap while the native animation runs.
  4. Stop + finalize.
  5. Confirm the final file contains both video and microphone audio.
  6. Check Callback chunks dropped; zero is ideal.

Audio file

  1. Choose Audio file.
  2. Select WAV, AIFF, MP3, AAC/M4A, FLAC, or another file with an FFmpeg-readable audio stream.
  3. The app validates the first audio stream with ffprobe.
  4. Record longer than the selected audio file to confirm looping.
  5. Stop + finalize and verify sync/playback.

High resolution

Validate 4K before 5K/8K. Watch:

Playback stutter by itself does not prove capture loss; use the diagnostics and another capable player when testing 5K/8K.

Architecture

wgpu authoritative texture
        |
        +--> native preview
        |
        +--> GPU readback --> reusable CPU buffers --> FFmpeg video encoder

Audio source:
  None
  Microphone --> CPAL --> temporary float WAV
  File ------> ffprobe validation

After video finalizes:
  video + audio --> FFmpeg mux --> final AV file

The post-mux design intentionally avoids a fragile live multi-pipe FFmpeg setup and keeps video capture diagnostics independent from audio capture diagnostics.