MP3CD(1p)
πΏ MP3CD(1p) πΏ
okay bestie, listen UP, because this one is so good. This is mp3cd, and it's a Perl script (user-contributed Perl documentation, hence the 1p vibe) that burns normalized audio CDs from your lil lists of MP3s/WAVs/Oggs/FLACs. She's a whole pipeline and she's iconic for it. π
β¨ SYNOPSIS β¨
mp3cd [OPTIONS] [playlist|files...]
-s, --stage STAGE Start at a certain stage of processing:
clean Start fresh (default, requires playlist)
build Does not clean (requires playlist)
decode Turns MP3s/Oggs/FLACs into WAVs
correct Fix up any WAV formats
norm Normalizes WAV volumes
toc Builds a Table of Contents from WAVs
toc_ok Checks TOC validity
cdr_ok Checks for a CDR
burn Burns from the TOC
-q Quits after one stage of processing
-t, --tempdir DIR Set working dir (default "/tmp/mp3cd-$USER")
-d, --device PATH Look for CDR at "PATH" (default "/dev/cdrecorder")
-r, --driver TYPE Use CDR driver TYPE (default up to cdrdao)
-n, --simulate Don't actually burn a disc but do everything else.
-E, --no-eject Don't eject drive after the burn.
-L, --no-log Don't redirect output to "tool-output.txt"
-T, --no-cd-text Don't attempt to write CD-TEXT tags to the audio CD
-c, --cdrdao ARGS Pass the option string ARGS to cdrdao.
-S, --skip STAGES Skip the comma-separated list of stages in STAGES.
-V, --version Report which version of the script this is.
-v, --verbose Shows commands as they are executed.
-h, --usage Shows brief usage summary.
--help Shows detailed help summary.
--longhelp Shows complete help.
πΈ OPTIONS πΈ
the way that every single one of these matters, I fear. read them all, bestie, no skipping π«Ά
-s STAGE,--stage STAGEβ starts processing at a given stage. Use this when you had to stop midway, or a file went missing, or things generally blew up π. It's especially clutch when a burn fails, because then you don't have to start totally over and re-WAV everything. Want just one single step? Pair it with--quitto abort right after the stage you asked for with--stage. Also peep--skip.cleanβ the default starting stage. The temp directory gets cleared out. A playlist is required, because we're expecting to move on to the build stage next, and that one needs it.buildβ examines the playlist from the command line and tries to create a list of symlinks from that playlist. As of right now,mp3cdunderstands.m3ufiles, XMLPlaylist files, and plain lists of files.decodeβ all the files get converted into WAVs. So farmp3cdknows how to decode MP3, Ogg, and FLAC files. (WAVs just get left as they are during this stage, they're already perfect π .)correctβ the WAV files get corrected so they have the right bitrate and number of channels, as required for an audio CD.normβ the WAV files' volumes get normalized so that big volume differences between records are less noticeable. no more jumpscare loud songs β¨tocβ generates a Table of Contents for the audio CD.toc_okβ validates the TOC, just in case something went really wrong with the WAV files.cdr_okβ verifies there's a CDR ready for burning.burnβ actually performs the burn of all the WAV files onto the waiting CDR. this is the main character moment π
-q,--quitβ aborts after one stage of processing. See--stage.-t DIR,--tempdir DIRβ use a working directory other than"/tmp/mp3cd-username". This is where all the file processing happens. You'll generally need at least 650M free in here (or more, depending on how long your destination CD's recording is).-d PATH,--device PATHβ use a device path other than"/dev/cdrecorder".-r TYPE,--driver TYPEβ use a CDRDAO driver other than whatevercdrdaoauto-detects. Heads up: some drivers may not support CD-TEXT mode. If that's your situation, trygeneric-mmc-raw.-c ARGS,--cdrdao ARGSβ pass the given option string ofARGStocdrdaoduring each command.-n,--simulateβ don't actually write to the disc, but do everything else. pretend-burn, real vibes π-E,--no-ejectβ don't eject the drive after the burn.-L,--no-logβ don't redirect output to"tool-output.txt". All that info gets redirected to the terminal via standard output (STDOUT) instead. This will display a LOT of low-level detail. like, a LOT π-T,--no-cd-textβ don't attempt to write CD-TEXT tags to the audio CD. Some devices and drivers don't support this mode. See--driverfor more details.-S STAGES,--skip STAGESβ while processing, skips the stages listed in the comma-separated list of stages given inSTAGES. Only use this if you really know what you're doing. For example, if the audio is already normalized and you didn't want to burn a CD, you could skip the normalizing and burning stages by passing"--skip norm,burn". See--stageand--quit.-V,--versionβ reports which version ofmp3cdthis is.-v,--verboseβ shows commands as they're executed.-h,--usageβ shows a brief usage summary.--helpβ shows a detailed help summary.--longhelpβ shows the full command line instructions.
π¦ DESCRIPTION π¦
This script implements the suggested methods outlined in the Linux MP3 CD Burning mini-HOWTO:
<http://tldp.org/HOWTO/MP3-CD-Burning/>
It'll burn a playlist (.m3u, XMLPlaylist, or a command line list) of MP3s, Oggs, FLACs, and/or WAVs onto an audio CD. The .m3u format is genuinely nothing more than a list of fully qualified filenames, that's it, that's the whole format. The script handles making the WAVs sane by resampling if needed, and normalizing the volume across all tracks. so the whole album hits the same, no cap π
If a failure happens, earlier stages can be skipped with the '-s' flag. The file "tool-output.txt" in the temp directory can be examined to see what went wrong during the stage. Some things are time-consuming (like decoding the audio into WAVs), so if the CD burn fails, it's much nicer not to have to start over from scratch. When you're doing the skip-stages thing, you won't need the m3u file anymore, since the files have already been built. See the list of stages using '-h'.
π§ PREREQUISITES π§
- Requires
cdrdao, and that/dev/cdrecorderis a valid symlink to the/dev/sgdevice thatcdrdaowill use. Use.cdrdaoto edit driver options. (See"man cdrdao"for details.) - Requires
soxto decode MP3 and check/correct WAV formats. <http://www.spies.com/Sox/> - Requires
normalizeto process the audio. <http://www.cs.columbia.edu/~cvaill/normalize/> - Optionally requires
oggdecto decode Ogg to WAV files. <http://www.gnu.org/directory/audio/ogg/OggEnc.html/> - Optionally requires
flacto decode flac to WAV files. <http://flac.sourceforge.net/> - Optionally requires the
Config::SimplePerl module if you want to use the.mp3cdrcfile. <http://search.cpan.org/~sherzodr/Config-Simple/>
π FILES π
~/.mp3cdrcβ default options can be recorded in this file. The option names are the same as their command line long-name. Command line options will override these values. All options are run through perl's eval. For example:
tempdir: /scratch/mp3cd/$ENV{'USER'}
device: /dev/burner
π AUTHOR π
Kees Cook <kees@outflux.net>
Contributors:
- J. Katz (Ogg support)
- Alex Rhomberg (XMLPlaylist support)
- Kevin C. Krinke (filelist inspiration, and countless many patches)
- James Greenhalgh (flac support)
β SEE ALSO β
perl(1), cdrdao(1), sox(1), oggdec(1), flac(1), sox(1), normalize(1).
π COPYRIGHT π
Copyright (C) 2003-2011 Kees Cook kees@outflux.net, <http://outflux.net/>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. <http://www.gnu.org/copyleft/gpl.html>
and that's the whole page, bestie π«Ά this one's running on perl v5.30.0, dated 2020-03-07, and it lives in the manual as MP3CD(1p). go burn something iconic πβ¨
π¦ where this page comes from
- debian bookworm: mp3cd 1.27.0-5
- debian trixie: mp3cd 1.27.0-5
- ubuntu jammy: mp3cd 1.27.0-5
- ubuntu noble: mp3cd 1.27.0-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms