AudioRip is a highly optimized command-line utility for bit-perfect audio capture, with WAV output written directly to disk.
I am just an amateur audio enthusiast. Starting from a personal need to capture audio generated on my computer, I use this project as a playground for experimenting with audio processing techniques.
A professional audio engineer might find some of the architectural decisions unusual for something so mundane. However, beyond the playground aspect, I am using AudioRip as a foundation for future "toys" that are already in the oven.
The Linux audio ecosystem has great tools, but AudioRip proposes an unorthodox — yet highly efficient — architectural approach, built on three pillars:
- The
nih_plugStandalone "Hack": Instead of depending on complex ALSA or pure PipeWire bindings, AudioRip hijacks the JACK backend of thenih_plugframework (running viapw-jack). This forces PipeWire to spin up the binary under strict low-latency rules, inheriting all the stability of a professional DSP plugin. - Zero-Blocking I/O with
io_uring: WAV file writing (disk) is delegated totokio-uring. This ensures the recording thread never chokes on traditional blocking POSIX syscalls, allowing massive throughput without interrupting capture. - Optimizations for Low Latency on Modern Hardware: The compilation baseline is x86-64-v3 (processors from 2018 onwards). The goal is to leverage SIMD capabilities of modern processors, enabling more operations per clock cycle. Communication between the DSP thread (critical) and the disk thread is done via lock-free SPSC (Single-Producer Single-Consumer) Ring Buffers. Additionally, manual memory alignment (
#[repr(align(128))]) is applied to severely mitigate False Sharing in the CPU's L1/L2 caches.
As I mentioned, I am not a professional DSP audio engineer. There are certainly better approaches. This was simply the path I found. Ideas are welcome!
- Modern Linux environment with
io_uringsupport. - PipeWire configured with JACK support (
pw-jack). - Rust toolchain installed (
rustup + cargo).
Clone the repository and compile in release mode to ensure real-time performance:
git clone https://github.com/fabiohl/audiorip.git
cd audiorip
cargo build --releaseTo start capturing (basic example):
pw-jack target/release/audiorip --backend jackBy default, AudioRip does not "capture" any audio source currently playing. You can use a utility like qpwgraph to "connect" an audio source to AudioRip's audio inputs.
AudioRip has a mechanism to ignore the inevitable silence during PipeWire connection processes, playback pauses, etc. Only the actual audio will be saved.
This README is just the tip of the iceberg. To deeply understand the design decisions, data flows, lock-free patterns, and the WAV file graceful shutdown, read the full documentation in the docs/ folder.
docs/architecture.md— Topology and design decisions.docs/dependencies.md— System requirements and dependencies.
Contributions are extremely welcome! If you are passionate about DSP, Rust, and low-level systems, there is plenty of room to evolve AudioRip.
At the moment there is nothing in particular I would like to implement — although I can envision some areas of interest people might have:
- On-the-fly FLAC encoding support (asynchronous, post-ring buffer).
- CLI expansion based on professional audio industry standards.
- Extracting the WAV graceful shutdown logic into an independent micro-crate.
Feel free to open Issues or submit Pull Requests.
This project is dual-licensed under MIT or Apache License, Version 2.0, at your choice. See the LICENSE-MIT.txt and LICENSE-APACHE.txt files for details.
AI Transparency Notice: The architecture, the rigorous engineering decisions (such as the DSP vs. io_uring topology), the documentation, and the curation of this project are the intellectual work of the maintainer. This was actually a piece of work I am very proud of and consider very well done. However, the source code itself was iterated and generated entirely with the help of Artificial Intelligence (Vibe Coding). More specifically, using the Google Antigravity IDE. The use of the Apache 2.0 license is specifically intended to provide greater legal security to contributors and users regarding patents, given this modern software development model. The structure is open for the community to freely refactor, audit, and expand.