Manual, version V1.3-Windows
What does this program do?
It searches a source folder and all its subfolders for audio files (mp3, wav, flac, m4a, ogg, wma). For every file you can choose from five functions: detect corruption, compare the length with the AcoustID database, trim silence, normalise the volume, and convert to MP3 (CBR or VBR) or keep the original format. You operate everything through a web page that runs on your own computer. Nothing is sent to the internet, except for the optional AcoustID check.
Installing, with the required programs
The program needs three helper programs:
| Program | Used for | Needed? |
|---|---|---|
| Python 3.8 or newer | Runs the web page and the processing. | Required |
| ffmpeg (with ffprobe) | Checks and converts the audio. | Required |
| fpcalc | Creates a fingerprint for the AcoustID check. | Only for AcoustID |
The installer arranges this automatically as far as possible:
- Extract the whole zip file. Tip: first right-click the zip file, choose Properties and tick Unblock if it is shown.
- Double-click
install.bat. You do not need to be an administrator. If Windows shows a permission window anyway, confirm it. - The installer shows for each program whether it is present. What is missing is installed with
winget, the Windows package installer (Python and ffmpeg). If that fails, ffmpeg is downloaded directly from gyan.dev. - It copies the program to
%LOCALAPPDATA%\Programs\AudioTool, creates Start menu shortcuts and asks a few questions: whether to install fpcalc as well, whether the page should also be reachable from other devices, and whether the program should start when you sign in.
With install.bat -Check you only see what is missing, without installing anything. Installing over an existing installation updates the program and keeps your settings. The installer uses the language of your Windows; choose your own with install.bat -Language en or -Language nl.
If automatic installation of a required program does not succeed, the installer stops with instructions. Then follow the next chapter.
Downloading and installing programs yourself
Python
- Go to
https://www.python.org/downloads/windows/and download the Windows installer (64-bit). - Run the file and tick Add python.exe to PATH. Then choose Install Now.
- Run
install.batagain.
If the python command opens the Microsoft Store instead of Python, Windows only has a shortcut. Install Python as described above.
ffmpeg
- Go to
https://www.gyan.dev/ffmpeg/builds/and download ffmpeg-release-essentials.zip. - Extract the zip file into the
toolsfolder inside the installation folder, usually%LOCALAPPDATA%\Programs\AudioTool\tools. Paste that path into the File Explorer address bar to open the folder. You do not have to change the Windows search path (PATH): the program findsffmpeg.exeandffprobe.exein that folder by itself, also in a subfolder. - Check with
install.bat -Check.
You can also install it yourself from the command line: winget install --id Gyan.FFmpeg -e. Then sign in to Windows again, or restart the program.
fpcalc (only for the AcoustID check)
- Go to
https://acoustid.org/chromaprintand download the Windows zip file (x86_64). - Extract it into the same
toolsfolder.fpcalc.exeis found there automatically. - For the AcoustID check you also need a free key. Request one on the AcoustID website (
https://acoustid.org) by registering an application.
No winget? On an older Windows 10, install App Installer from the Microsoft Store. Windows 11 already has winget.
Starting, opening and stopping
- Start: choose Audio-verwerker in the Start menu. The browser opens by itself at
http://localhost:9090. No black window appears: the program runs in the background. - Open again: start it again from the Start menu, or go to
http://localhost:9090in the browser. - Stop: choose Audio-verwerker stoppen in the Start menu. A running job simply keeps running; only the page is unreachable until you start the program again.
- Start when you sign in: choose that during installation. The program then starts in the background without opening the browser.
Use from other devices
By default the page can only be reached on this computer itself. If you also want to use it from a phone or another computer on your network, choose that during installation, or set "host": "0.0.0.0" in config.json (see Settings and security). Then open http://IP-ADDRESS:9090. You can see the IP address with the command ipconfig.
Windows Firewall asks for access for Python at the first start. Choose Private networks. Only use this on a network you trust, and set a password in config.json if you share the network with others.
Choosing the language
At the top of every page is a list called Taal / Language with Nederlands and English. The language of the form changes immediately and is remembered. The messages in the log also follow the language you chose when you started the processing. This manual exists in two languages: choose Nederlands in the menu for the Dutch version.
Choosing folders
The form has three folder fields: the source folder, the folder for the result and the folder for corrupt and failed files. Next to each field is a Browse button. You can also type the path directly, for example D:\Music.
The button opens a window that works like File Explorer:
- At the top the path is shown as a row of buttons. Choose a part to go back.
- Up one folder goes to the parent folder.
- Under Quick access are your drives (such as
C:\andD:\, including USB drives and network drives) and the folders Music, Documents, Downloads and Desktop. - Under Folders are the subfolders. Choose a folder to open it. Use the up and down arrow keys to move through the list.
- Create new folder creates a folder in the current folder, handy for a result folder.
- Choose this folder puts the current folder in the form. The free space is shown in the message below the list.
Hidden and system folders are not shown.
The functions
| Function | What happens | Needs |
|---|---|---|
| Detect corrupt files | Every file is fully decoded. Errors, a broken header or an unreadable length mean corrupt. The file is copied to the corrupt folder and logged with the reason. | Corrupt folder |
| Compare length with AcoustID | Creates a fingerprint and asks for the official length. If it differs by more than the tolerance, the file counts as corrupt. At most about three requests per second are made, so this is slow. | Internet, free key, fpcalc |
| Trim silence | Cuts silence at the start and end. The threshold (default -50dB) and minimum duration (default 0.3 seconds) can be set. | Result folder |
| Normalise volume | Makes tracks equally loud. You set the level in dB relative to the standard (0 dB, which is -16 LUFS). With the up and down arrow keys you change it in steps of 1 dB, from -20 to +10. Higher is louder: +3 dB gives -13 LUFS. | Result folder |
| Converting | You choose one of three options. CBR: MP3 with constant bitrate (128, 192, 256, 320 or the original bitrate, rounded to the nearest valid MP3 value, at most 320). VBR: MP3 with variable bitrate, quality 0 (best) to 6 (compact). Do not convert: the file keeps its format, codec and bitrate. | Result folder for CBR and VBR, and for do not convert if silence or normalising is on |
If you only turn on the corruption check, or choose Do not convert without silence trimming and normalising, no files are processed. Under File types you choose which extensions are included. With Skip existing result files a track that is already in the result folder is not made again.
What happens to your files?
- The source is never modified. The result always goes into the result folder.
- The folder structure of the source is kept. With CBR or VBR,
Pop\a.flacbecomes the MP3Pop\a.mp3. With Do not convert the name and extension stay the same. - The sample rate of the original is kept. Only for MP3 it is lowered to at most 48 kHz if necessary.
- Every processed file is first written with the extension
.partand only renamed after success, so you never get half-finished tracks. - Corrupt or failed files are copied to the corrupt folder, with the same folder structure. The reason is in the log.
- Album art and tags are kept. If that fails, the program tries again without the cover.
- The program stops with a message if the target disk is almost full.
Folders must not be nested: the result folder and the corrupt folder must not be inside the source folder, and they must not be the same folder.
Progress, stopping and resuming
Below the form is the heading Progress with a progress bar, the current file, counters and the estimated remaining time. Screen readers hear a short message at the start, at the end and every 30 seconds. The processing runs as its own process in the background: you can close the page or the browser and look at the progress again later.
The Stop processing button appears as long as a job is running. The file being processed at that moment is discarded; everything else stays. Then start again with Skip existing result files ticked to continue. Only one job can run at a time. If the computer is shut down or restarted during a job, the page later reports that the job was interrupted.
Closing the screen
Below the progress is the Close screen button:
- Nothing is running: the screen is closed immediately.
- A job is running: a window with three choices appears. Let processing continue and close lets the work finish in the background. Stop processing and close stops the work. Cancel leaves everything as it is. The option to let it continue is preselected.
Many browsers do not allow a page to close itself. The page tries, and otherwise shows the message Screen closed with what happened to the job. You then close the tab yourself. Windows has no screen like the Raspberry Pi version; it is not needed here, because the processing always runs as a separate background process.
Logs
Below the progress are two links. Full log shows all output of the last run. List of corrupt files shows the reason per file. The files are in %LOCALAPPDATA%\AudioTool\jobs, one folder per run. The last 20 runs are kept. The settings you used last are stored there too, without the AcoustID key.
Use without the website
The processing also works on its own. Open Command Prompt or PowerShell in the installation folder and run, for example:
py -3 audio_tool.py --source D:\Music --target D:\Result --corrupt D:\Corrupt --bitrate 192 --lang en
| Option | Meaning |
|---|---|
--source, --target, --corrupt | The three folders. |
--check or --no-check | Corruption check on or off (default on). |
--acoustid or --no-acoustid | Length check. Put the key in the environment variable ACOUSTID_API_KEY. |
--silence, --silence-threshold, --silence-duration | Trim silence and its settings. |
--normalize, --norm-db | Normalise volume and the level in dB (-20 to 10, default 0). |
--convert | cbr, vbr or original. |
--bitrate, --vbr-quality | For CBR: original or 32 to 320. For VBR: 0 (best) to 9. |
--extensions | Comma-separated list, for example mp3,flac. |
--skip-existing or --overwrite | Skip or overwrite existing result files. |
--lang | nl or en: language of the messages. |
--log, --runlog | Log files. |
--check-tools, --version | Shows which helper programs were found, or the version number. |
Settings and security
The settings are in the file config.json in the installation folder. Open it with Notepad. After a change, stop and start the program again from the Start menu.
| Setting | Meaning |
|---|---|
host | 127.0.0.1: this computer only (default). 0.0.0.0: other devices on the network too. |
port | The port, default 9090. |
language | Default language: nl or en. |
user and password | Turn on a user name and password. The connection is not encrypted, so the password only keeps curious people out. |
roots | List of folders that can be reached, for example ["D:\\Music", "E:\\"]. Empty means all drives. |
Use double backslashes in config.json. The AcoustID key is not stored anywhere; you enter it for each run.
Troubleshooting
| Problem | Solution |
|---|---|
| Nothing happens after starting | Wait a few seconds and go to http://localhost:9090. Otherwise run install.bat -Check and see whether Python is present. The file %LOCALAPPDATA%\AudioTool\server.log contains any error messages. |
| Windows SmartScreen or antivirus blocks install.bat | Choose More info and then Run anyway, or unblock the zip file via Properties and extract it again. |
| Python is not found | See Downloading programs yourself. Do not forget to tick Add python.exe to PATH. |
| ffmpeg is not found after installing with winget | Sign in to Windows again or restart the program. Or extract ffmpeg into the tools folder as described under installing manually. |
| winget does not exist | Install App Installer from the Microsoft Store, or follow the manual steps. |
| A network drive (for example Z:) is not in the list | Mapped network drives belong to a user and are sometimes not visible to a background program. Type the full path or map the drive again. |
| Everything is called corrupt | Check that the disk can be read properly and test a file with ffmpeg -v error -i file.mp3 -f null - in a command prompt. |
| The processing is very slow | Trimming silence and normalising take computing power. Turn off functions you do not need. AcoustID deliberately waits between requests. |
| Path is too long | Windows has a limit of about 260 characters per path. Use a shorter result folder, for example D:\Out. |
Accessibility and keyboard
The page is built to WCAG 2.2 level AA: all fields have a label, groups have a heading, error messages appear in a summary with links to the fields, contrast is high, focus is clearly visible, and the page works up to 200% zoom and on narrow screens. There is a Skip to main content link at the start of every page. The page language is passed correctly to screen readers and changes along with the language choice.
- Tab and Shift+Tab move the focus. Space turns a checkbox on or off and Enter activates a button.
- With the Converting radio buttons you choose between CBR, VBR and do not convert using the arrow keys.
- In the Level in dB field, the up and down arrow keys raise or lower the level by 1 dB.
- In the folder window, the up and down arrows, Home and End work in the list of folders. Escape closes the window, after which focus returns to the button you used.
- Progress messages are read aloud without you having to move the focus.
If you notice an accessibility problem, please report it so that it can be fixed.
Differences from the Raspberry Pi version
- The processing is written in Python instead of a bash script, so it works on Windows. The functions and settings are the same.
- Instead of
screen, the processing runs as a separate background process. Stopping works through a stop file, after which the program cleans up by itself. - By default the page can only be reached on this computer (port 9090); on the Raspberry Pi it was the whole network.
- The AcoustID check only uses
fpcalc;curlandjqare not needed. - The page and the manual are bilingual (Dutch and English).
Version and uninstalling
This is version V1.3-Windows, with the same functions as version 1.2 of the Raspberry Pi edition. The version number is at the top of the page and in the footer, and with py -3 audio_tool.py --version.
You can uninstall with install.bat -Uninstall. That removes the program and the shortcuts. Your settings and logs in %LOCALAPPDATA%\AudioTool remain; delete that folder yourself if you no longer need them. Python and ffmpeg stay installed; remove them via Settings, Apps.