Skip to content

Commit b98fdc2

Browse files
docs: add readme
1 parent 4cfb6b7 commit b98fdc2

File tree

1 file changed

+125
-0
lines changed

1 file changed

+125
-0
lines changed

README.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Audio Cleaner
2+
3+
A cross‑platform desktop application that **removes background noise from any video’s audio track** using the
4+
[DeepFilterNet 3] neural noise‑suppression model and an intuitive **PyQt 6** interface.
5+
It extracts the soundtrack, denoises it with DeepFilterNet, then remuxes the cleaned audio back into the
6+
original video with FFmpeg – all in one click.
7+
8+
---
9+
10+
## Key Features
11+
12+
* **Point‑and‑click GUI** built with PyQt 6 – no command line needed.
13+
* **Preview player** – play the source or cleaned video inside the app.
14+
* Adjustable **attenuation limit slider** (1‑60 dB) or a safe recommended default.
15+
* **Progress bar & status messages** courtesy of a background QThread worker.
16+
* Automatic **remux** step strips problematic metadata (e.g. Sony *rtmd*) before processing.
17+
* Works with **MP4, MOV, AVI, MKV** and any format FFmpeg can decode.
18+
* Cross‑platform: Windows, macOS, Linux (tested on Python 3.9+).
19+
* Clean shutdown & temp‑file cleanup even on errors.
20+
21+
---
22+
23+
## Quick Start
24+
25+
```bash
26+
# 1 – Clone this repository
27+
git clone https://github.com/your‑username/audio-cleaner.git
28+
cd audio-cleaner
29+
30+
# 2 – Create & activate a virtual environment (optional but recommended)
31+
python -m venv .venv
32+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
33+
34+
# 3 – Install dependencies
35+
pip install -r requirements.txt
36+
37+
# 4 – Download the DeepFilterNet 3 model (≈ 30 MB)
38+
python -m df --download-models
39+
40+
# 5 – Run the app
41+
python deep.py
42+
```
43+
44+
The first launch will prompt you to select an **input video** and a **save location**.
45+
Click **“Denoise Video”** and let the progress bar reach 100 %. Voilà – background noise gone!
46+
47+
---
48+
49+
## Requirements
50+
51+
| Package | Tested Version | Notes |
52+
|---------|---------------|-------|
53+
| **Python** | 3.9 – 3.12 | |
54+
| [deepfilternet] | ≥ 0.4 |
55+
| **PyQt6** | ≥ 6.5 | GUI, multimedia widgets |
56+
| **moviepy** | ≥ 1.0 | Video I/O |
57+
| **soundfile** | ≥ 0.12 | WAV read/write |
58+
| **imageio‑ffmpeg** | ≥ 0.4 | FFmpeg binary download helper |
59+
| **Torch** |
60+
| **TorchAudio** |
61+
62+
A pre‑filled **`requirements.txt`** is provided for your convenience.
63+
64+
---
65+
66+
## How It Works
67+
68+
```text
69+
┌────────────┐ 1. Extract audio with MoviePy
70+
Input MP4 ─► Remux step ├──────────┐
71+
└────────────┘ │
72+
73+
2. Denoise WAV
74+
with DF‑Net
75+
76+
┌────────────┐ 3. Combine audio & video with FFmpeg
77+
Clean MP4 ◄─┤ FFmpeg │
78+
└────────────┘
79+
```
80+
81+
The heavy lifting is done in `DenoiseWorker` (see **deep.py**) running in its own
82+
QThread so the UI stays responsive.
83+
84+
---
85+
86+
## Packaging a Standalone Executable *(optional)*
87+
88+
Install PyInstaller, then:
89+
90+
```bash
91+
pyinstaller --noconfirm --windowed --onefile \
92+
--add-data "models/DeepFilterNet3:models/DeepFilterNet3" \
93+
--add-binary "$(python - <<'PY'
94+
import imageio_ffmpeg, sys, os; print(imageio_ffmpeg.get_ffmpeg_exe()+os.pathsep+'ffmpeg')
95+
PY)":. \
96+
deep.py
97+
```
98+
99+
The resulting **`dist/deep`** (or **`deep.exe`** on Windows) can be shipped
100+
without requiring Python on the end‑user’s machine.
101+
102+
---
103+
104+
## Troubleshooting
105+
106+
| Symptom | Possible Cause / Fix |
107+
|---------|----------------------|
108+
| **“Core dependencies missing”** in status bar | `pip install -r requirements.txt` |
109+
| No audio in output | Set console=true in VideoDenoiser.spec when creating an executable |
110+
| **FFmpeg executable not found** | `pip install imageio‑ffmpeg` or add FFmpeg to PATH. |
111+
| Crash when loading video | Some raw camera files have invalid edit lists – the built‑in *remux* step usually fixes this. |
112+
113+
---
114+
115+
## License
116+
117+
Distributed under the **MIT License** – see [`LICENSE`](LICENSE) for details.
118+
119+
---
120+
121+
## Acknowledgements
122+
123+
* [DeepFilterNet](https://github.com/Rikorose/DeepFilterNet) by **A. Rosenkranz et al.**
124+
* [MoviePy](https://zulko.github.io/moviepy/) – video editing in Python
125+
* **FFmpeg** – the Swiss‑Army knife of video processing

0 commit comments

Comments
 (0)