Audio processor version V1.3-Windows

Manual, version V1.3-Windows

Back to the form

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:

Required programs
ProgramUsed forNeeded?
Python 3.8 or newerRuns the web page and the processing.Required
ffmpeg (with ffprobe)Checks and converts the audio.Required
fpcalcCreates a fingerprint for the AcoustID check.Only for AcoustID

The installer arranges this automatically as far as possible:

  1. Extract the whole zip file. Tip: first right-click the zip file, choose Properties and tick Unblock if it is shown.
  2. Double-click install.bat. You do not need to be an administrator. If Windows shows a permission window anyway, confirm it.
  3. 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.
  4. 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

  1. Go to https://www.python.org/downloads/windows/ and download the Windows installer (64-bit).
  2. Run the file and tick Add python.exe to PATH. Then choose Install Now.
  3. Run install.bat again.

If the python command opens the Microsoft Store instead of Python, Windows only has a shortcut. Install Python as described above.

ffmpeg

  1. Go to https://www.gyan.dev/ffmpeg/builds/ and download ffmpeg-release-essentials.zip.
  2. Extract the zip file into the tools folder 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 finds ffmpeg.exe and ffprobe.exe in that folder by itself, also in a subfolder.
  3. 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)

  1. Go to https://acoustid.org/chromaprint and download the Windows zip file (x86_64).
  2. Extract it into the same tools folder. fpcalc.exe is found there automatically.
  3. 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

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:

Hidden and system folders are not shown.

The functions

Functions in the form
FunctionWhat happensNeeds
Detect corrupt filesEvery 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 AcoustIDCreates 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 silenceCuts silence at the start and end. The threshold (default -50dB) and minimum duration (default 0.3 seconds) can be set.Result folder
Normalise volumeMakes 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
ConvertingYou 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?

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:

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
Options of audio_tool.py (Dutch names work too, for example --bron and --doel)
OptionMeaning
--source, --target, --corruptThe three folders.
--check or --no-checkCorruption check on or off (default on).
--acoustid or --no-acoustidLength check. Put the key in the environment variable ACOUSTID_API_KEY.
--silence, --silence-threshold, --silence-durationTrim silence and its settings.
--normalize, --norm-dbNormalise volume and the level in dB (-20 to 10, default 0).
--convertcbr, vbr or original.
--bitrate, --vbr-qualityFor CBR: original or 32 to 320. For VBR: 0 (best) to 9.
--extensionsComma-separated list, for example mp3,flac.
--skip-existing or --overwriteSkip or overwrite existing result files.
--langnl or en: language of the messages.
--log, --runlogLog files.
--check-tools, --versionShows 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.

Settings in config.json
SettingMeaning
host127.0.0.1: this computer only (default). 0.0.0.0: other devices on the network too.
portThe port, default 9090.
languageDefault language: nl or en.
user and passwordTurn on a user name and password. The connection is not encrypted, so the password only keeps curious people out.
rootsList 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

Common problems
ProblemSolution
Nothing happens after startingWait 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.batChoose More info and then Run anyway, or unblock the zip file via Properties and extract it again.
Python is not foundSee Downloading programs yourself. Do not forget to tick Add python.exe to PATH.
ffmpeg is not found after installing with wingetSign in to Windows again or restart the program. Or extract ffmpeg into the tools folder as described under installing manually.
winget does not existInstall App Installer from the Microsoft Store, or follow the manual steps.
A network drive (for example Z:) is not in the listMapped 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 corruptCheck 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 slowTrimming silence and normalising take computing power. Turn off functions you do not need. AcoustID deliberately waits between requests.
Path is too longWindows 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.

If you notice an accessibility problem, please report it so that it can be fixed.

Differences from the Raspberry Pi version

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.

Back to the form