Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Create mp3 torrents from FLACs
Branch: master

whatmp3 is a small script to create mp3 torrents out of FLACs.

Depends on flac, metaflac, mktorrent, and optionally oggenc, lame, neroAacEnc, neroAacTag, mp3gain, aacgain, vorbisgain, and sox.

Configuration is handled either at the top of the file in the configuration section, or via shell aliases.


Running whatmp3 on its own won't do too much. You need to specify the lame or oggenc flags you want to convert with, and the directories you want to convert.

Usage: whatmp3 [options] [--320 --V2 --Q8 --AAC ...] /path/to/FLAC

--V0 --V2 --320 --Q8 --AAC --FLAC --ALAC ...
    convert to V0, V2, &c - you can add your own by editing the file

--version               show program's version number and exit
-h, --help              show this help message and exit
-v, --verbose           increase verbosity (Default: False)
-n, --notorrent         do not create a torrent after conversion (Default: False)
-m, --copyother     copy additional files (Default: True)
-z, --zeropad           zeropad track numbers (Default: True)
-r, --replaygain        add ReplayGain to new files (Default: False)
-d, --dither            dither FLACs to 16/44 before encoding (Default: False)
-c, --original          create a torrent for the original FLAC
-p, --passkey PASSKEY   tracker PASSKEY
-t, --tracker URL   tracker URL (Default: "")
-o, --output PATH   set the output PATH
--threads THREADS       set number of threads THREADS (Default: 1)
--torrent-dir PATH  set independent torrent output directory
--skipgenre     do not insert a genre tag in MP3 files (Default: False)
--nodate        do not write the creation date to the .torrent file (Default: False)
--nolog         do not copy log files after conversion (Default: False)
--nocue         do not copy cue files after conversion (Default: False)

Minimally, you need a passkey, a tracker, and an encoding option to create a working torrent to upload. However, whatmp3 will work without tracker data with the --notorrent option.

You need to add your torrent passkey and output directory in order to make the .torrent file to upload to What.CD:



This will convert OSI - Office of Strategic Influence to V2 and V0:

whatmp3 --V2 --V0 OSI\ -\ Office\ of\ Strategic\ Influence\ \(FLAC\)

The transcoded files will go into "OSI - Office of Strategic Influence (V0)" (or "...") in your output directory, which is by default your current directory.

This will convert Porcupine Tree - Deadwing and Porcupine Tree - In Absentia to 320 CBR, V0, and V2 (the "perfect three"):

whatmp3 --320 --V2 --V0 "Porcupine Tree - Deadwing" "Porcupine Tree - In Absentia"

.torrent files will be created in torrent-dir directory, or by default your output directory.

Threading is supported by default. By default whatmp3 will use as many threads as you have CPU cores. To set manually, use the --threads NUM option (or set max_threads):

whatmp3 --threads 2 --V2 "Enslaved - Isa"

Transcode verbosely to V2 and Q8 in ~/high/seas, zeropad track numbers, dither, apply replaigain, and do not create a torrent:

whatmp3 -vzdrn --output ~/high/seas --Q8 --V2 Nightingale\ -\ I


Entomologists are welcome to submit reports and patches via email, github, or other nefarious methods.


Primary author and maintainer: Sam Baldwin / shardz

Initial python port by demonstar55

Patches contributed by:

  • Francis Drake - improved threading
  • Tim Ekl - Use os.path.join()
  • Etienne Perot - Add --skiggenre, --nodate
  • Michael Rodler - Fix lowcase flac/codec substring replacement
  • Justin Duplessis - Set default max thread count intelligently

Countless input and bug reports provided by unlisted and uncredited, but thanked, users.

Something went wrong with that request. Please try again.