The Linux MP3−HOWTO
The Linux MP3−HOWTO Table of Contents The Linux MP3−HOWTO ................................................................................................................................1 By Phil Kerr, phil@plus24.com...............................................................................................................1 1. Introduction..........................................................................................................................................1 2.
The Linux MP3−HOWTO Table of Contents 11.2 Fluid...............................................................................................................................................27 Update for RC1.........................................................................................................................29 11.3 Litestream......................................................................................................................................29 11.4 Apache::MP3 Module....
The Linux MP3−HOWTO By Phil Kerr, phil@plus24.com v1.61, 2001−12−16 This document describes the hardware, software and procedures needed to encode, play, mix and stream MP3 sound files under Linux. 1. Introduction. 2. Copyright of this document. 3. Where to get this document. • 3.1 Translations 4. Acknowledgments. 5. Disclaimer. 6. Hardware Requirements & Performance Issues. 7. Software Requirements. • 7.1 Rippers & WAV Recorders • 7.2 Encoders • 7.3 Players • 7.4 Streaming Servers • 7.5 Mixing • 7.
The Linux MP3−HOWTO 9. Encoding from Audio. 10. Encoding from CD−ROM. • 10.1 Command Line encoding • 10.2 GUI Based Encoders • 10.3 Encoder Performance 11. Streaming MP3's. • 11.1 Icecast • 11.2 Fluid • 11.3 Litestream • 11.4 Apache::MP3 Module • 11.5 Firewall Bypassing • 11.6 Bandwidth considerations • 11.7 Copyright Issues 12. Listening to MP3's. • 12.1 Playing from File • 12.2 Playing from MP3 Streams • 12.3 Capturing MP3 Streams • 12.4 Mixing 13. ID3 Editing. • 13.1 id3ed • 13.2 mp3info • 13.
The Linux MP3−HOWTO • Encoding MP3's from a live or external source • Encoding MP3's from audio CD's • Streaming MP3's over a network • Listening to MP3's • Recording MP3 streams • Mixing MP3's • Editing ID3 information 2. Copyright of this document. This HOWTO is copyrighted 1999, 2000 Phil Kerr. This document is distributed under the terms of the GNU Free Documentation License. You should have received a copy along with it. If not, it is available from http://www.fsf.org/licenses/fdl.html. 3.
The Linux MP3−HOWTO http://www.insflug.org/documentos/MP3−Como By Arielo Dutch http://nl.linux.org/doc/HOWTO/MP3−HOWTO−NL.html By Reggy Ekkebus Japanese http://www.linux.or.jp/JF/JFdocs/MP3−HOWTO.html By Saito Kan Slovene http://www.lugos.si/delo/slo/HOWTO−sl/MP3−HOWTO−sl.html By Jernej Kovacic Many thanks to the above translators. If you can translate this HOWTO, please drop the author an email.
The Linux MP3−HOWTO You are strongly recommended to take a backup of your system before major installation and backups at regular intervals. 6. Hardware Requirements & Performance Issues. Digital Audio processing is a resource intensive task that relies heavily on the processing and I/O capabilities of a system. I would strongly recommend a Pentium class machine as a minimum.
The Linux MP3−HOWTO For streaming MP3's the better the network card the better the throughput, naturally a 100Mb interface will give better throughput than a 10Mb interface :) While the hardware specifications above will give you a decent system to encode audio data, don't discount using older, lower spec kit if that's all you have access to. It'll be a good challenge for a sys−admin to tweak a low−spec system to give good results, and the end result will probably be a happier Linux box.
The Linux MP3−HOWTO CDDA2WAV http://metalab.unc.edu/pub/Linux/apps/sound/cdrom/ Cdparanoia Cdparanoia is a Compact Disc Digital Audio (CDDA) extraction tool, commonly known on the net as a 'ripper'. The application is built on top of the Paranoia library, which is doing the real work (the Paranoia source is included in the cdparanoia source distribution).
The Linux MP3−HOWTO Blade's MP3 Encoder BladeEnc is a freeware MP3 encoder. It is based on the same ISO compression routines as mpegEnc, so you can expect roughly the same, or better, quality . The main difference is the appearance and speed. BladeEnc doesn't have a nice, user−friendly interface like mpegEnc, but it is more than three times faster, and it works with several popular front−end graphical user interfaces. http://bladeenc.cjb.
The Linux MP3−HOWTO (pitch) control, positive *and* negative! First Linux− and only GPL player that does this!! MP3's and CD's do varispeed :) http://www.alsa−project.org/~andy/ mpg123 What is mpg123? It is a fast, free and portable MPEG audio player for Unix. It supports MPEG 1.0/2.0 layers 1, 2 and 3 (those famous "mp3" files), and it has been tested on a wide variety of platforms, including Linux, FreeBSD, NetBSD, SunOS, Solaris, IRIX, HP−UX and others.
The Linux MP3−HOWTO Apache::MP3 Module for streaming MP3's using the Apache WebServer. This module takes a hierarchy of directories containing MP3 files and presents it as a browsable song library for streaming over the web. [Available from CPAN] 7.5 Mixing LiveIce LiveIce is the source client for Icecast which encodes an mpeg stream for broadcast as it is created. Unlike clients such as Shout and IceDJ this permits the broadcast of live audio, rather than prerecorded mp3's.
The Linux MP3−HOWTO 7.6 ID3 Editors id3ed id3ed is an ID3 tag editor for mp3 files. You can set tags interactively or from the command line, or a combination of both. id3ed can set genre by name or number. You can also remove or view tags. http://www.azstarnet.com/~donut/programs/id3ed.html mp3info MP3info is a small utility for reading and writing MPEG Layer 3 (MP3) ID3 tags. Console (command−line and interactive ncurses) and GTK versions are included. http://metalab.unc.edu/mp3info/ 7.
The Linux MP3−HOWTO Sox is a very handy sound conversion utility which I'd recommend having, and you will need it if you wish to use wavnorm. ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/ You may also need a mixer program; Xmixer works well and is included with most distributions. 8. Setting up your system. This section will describe the basics of setting up your Linux system to record audio from either an analogue or CD−ROM source.
The Linux MP3−HOWTO damage your soundcard!! Turntable to Mike in. Many thanks to Mark Tranchant for the following. The raw output from a record deck cartridge is very low level. However, you cannot plug it directly into a microphone input and expect good results. The output requires equalization, as records are mastered with less bass and more treble to optimize the physics of the moving needle. This equalization is carefully defined and referred to as RIAA equalization.
The Linux MP3−HOWTO I normally record at DAT quality, which is 48 Khz 16 Bit stereo. Using wavrec I use the following syntax: [dj@megajukebox]$ /usr/local/bin/wavrec −t 60 −s 48000 −S /mp3/temp.wav The first part is an explicit path to wavrec. The '−t 60' specifies the length of time to record for, in seconds. The third option, −s 48000 refers to the sample rate in samples/sec. (48000 is the rate for DAT, 44100 is CD) The last option is the path to the output file.
The Linux MP3−HOWTO 10.1 Command Line encoding I've written a very simple Perl script that will rip and encode tracks from a CD. #!/usr/bin/perl if ($ARGV[0] ne "") { $count = 1; do { $cdcap = system("cdparanoia", $count, "/mp3/cdda.wav"); $track = "$ARGV[1]/track".$count.".mp3"; $enc = system("bladeenc /mp3/cdda.
The Linux MP3−HOWTO If you wanted to use Lame or Gogo, replace the encoder line with: $enc = system("lame /mp3/cdda.wav $track −b 256"); or $enc = system("gogo /mp3/cdda.wav $track −b 256"); Here is a dump of the available option for each of the encoders. Bladeenc BladeEnc 0.91 (c) Tord Jansson Homepage: http://bladeenc.mp3.no =============================================================================== BladeEnc is free software, distributed under the Lesser General Public License.
The Linux MP3−HOWTO Lame LAME version 3.50 (www.sulaco.org/mp3) GPSYCHO: GPL psycho−acoustic model version 0.74. USAGE : lame [options] [outfile] and/or can be "−", which means stdin/stdout. OPTIONS : −m mode −b −s sfreq −−resample sfreq −−mp3input −−voice −v −V n −t −−nohist −h −f −k −d −−athonly −r −x −a −e emp −p −c −o −S (s)tereo, (j)oint, (f)orce or (m)ono (default j) force = force ms_stereo on all frames.
The Linux MP3−HOWTO GOGO−no−coda ver. 2.24 (Feb 12 2000) Copyright (C) 1999 PEN@MarineCat and shigeo Special thanks to Keiichi SAKAI, URURI, Noisyu and Kei This is based on LAME3.29beta and distributed under the LGPL usage gogo inputPCM [outputPCM] [options] inputPCM is input wav file if input.wav is `stdin' then stdin−mode outputPCM is output mp3 file (omissible) options −b kbps −br bps −silent −off −v {0,..
The Linux MP3−HOWTO 10) 11) 12) 13) 14) 15) ? Please select your Cd−Rom device...........[/dev/cdrom] Set the Bitrate for the encoded MP3's......[256] List the files in your working directory Start About Exit CD2MP3 Cd2mp3 is a single pass cdda to MP3 encoder. It will convert a audio track to MP3 without producing an intermediate wav file. Here's how it looks in operation: [dj@megajukebox]$ cd2mp3 options ALL Using language: 1 − English. Translator: Gustavo Sverzut Barbieri(k−s)
The Linux MP3−HOWTO 10.2 GUI Based Encoders GUI based encoders offer all the functionality of console based encoding, but wrap it all up in a nice easy to use interface. Grip and RipperX are similar in operation, both offer you the ability to select one, several or all tracks on a CD and convert them. They also offer CDDB support which allows you to retrieve the album and track information from a server and saves you having to enter the information by hand. 10.
The Linux MP3−HOWTO output file `../test.mp3' { 10751/ 10755} 100.0% ( End of encoding time= 95.430sec 2.94x) re:[00:00:00.03] to:[00:01:35.42] It would appear that Gogo has a much optimised algorithm for encoding than Bladeenc and Lame. 11. Streaming MP3's. A streaming server allows you to transmit MP3 files over a TCP based network. This can be the Internet itself or your local network / intranet.
The Linux MP3−HOWTO Icecast comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of Icecast under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. [05/Jan/2000:18:36:30] Icecast Version 1.3.0 Starting.. [05/Jan/2000:18:36:30] Using stdin as icecast operator console [05/Jan/2000:18:36:30] Tailing file to icecast operator console [05/Jan/2000:18:36:30] Server started...
The Linux MP3−HOWTO Shout Shout provides Icecast with a static playlist of MP3's to stream and is included with Icecast. You create the playlist if the MP3 files you want to stream with the following: find [MP3 directory] −name '*.mp3' −print > playlist At it's most basic level, to start the shout service, issue the following: [dj@megajukebox bin]# ./shout megajukebox −P hackme −p playlist The −P option specifies the password needed to add a mount−point to Icecast, this is the aptly set as hackme.....
The Linux MP3−HOWTO LiveIce LiveIce can work in 2 modes, it can pass a playlist to Icecast or can pass live audio from the soundcard. After untaring and reading the README concerning building the package, make sure you have mpg123 installed and available as LiveIce requires it. There are two ways of configuring LiveIce editing the config file with vi/emacs/or whatever or by using the TK based configuration tool, which is a pretty way of editing it :) The best place for describing the internals of liveice.
The Linux MP3−HOWTO PLAYLIST /megajukebox/playlist # Location of the playlist (see details on the find command later TRACK_LOGFILE track.log # Filename and location to dump list of MP3's streamed Once you have your config file you start LiveIce like so: [dj@megajukebox liveice]$ ./liveice /megajukebox/playlist 1 opening connection to megajukebox 8000 Attempting to Contact Server connection successful: forking process opening pipe!...
The Linux MP3−HOWTO Reset channel Increase volume on channel Decrease volume on channel Increase speed on channel Decrease speed on channel Sticky mode On/Random/Off Preview channel Random Track w 3 e 4 r 5 t u x d c f v g b m The above liveice.cfg is for mixermode. To use LiveIce in audio mode change the line relating to MIXER to NOMIXER and set NO_SOUNDCARD to SOUNDCARD and restart LiveIce.
The Linux MP3−HOWTO 11.2 Fluid After untaring the bundle cd to the directory, then read the README :) Fluid has three basic modes of operation, transmit, relay and forward. I'll only focus on transmit. The config files associated for transmit are located in config/MP3TX.cfg. To test the server run with the following, at this point the default config settings should be ok: java Fluid TX Naturally enough you'll need Java of some form installed first.
The Linux MP3−HOWTO find [MP3 directory] −name "*.mp3" −print > playlist.m3u By default the server uses port 2711, which is where your listeners will connect to, if you need to change this this can be done in the config file. The server can be remotely administered by telneting to it's admin port, by default port 2710 like so: [dj@megajukebox Fluid−Beta2J]$ telnet localhost 2710 Trying 127.0.0.1..megajukebox Connected to localhost.localdomain. Escape character is '^]'.
The Linux MP3−HOWTO The reference to the playlist being in m3u format means that it is in the same format as produced by the find command mentioned earlier. Update for RC1 Fluid has been updated, and released under a GPL License (Way to go Lars!) Here are the main differences: • A new format fluid.config • A new default port 4711 • A new method of starting and stopping. Fluid now used the scripts fluid.start and fluid.stop • Source code is now part of the dist. Yippee! 11.
The Linux MP3−HOWTO [dj@megajukebox]$ litestream 5000 megajukebox 5555 1000 LitestreamServer Ok, so that's the server system. Once started it sit's there waiting for an input to be connected, which is done with the source command. The format is like so: source
The Linux MP3−HOWTO The module is dependant on MP3::Info and mod_perl, both of which are available on CPAN. After downloading the files needed a read of the README will help things! Firstly make the module, then make the config changes to Apache's config files (your changes may be made in either httpd.conf or srm.conf). You will also have to create directories for icons and a directory hierarchy for MP3's. Section 6 of the README details the editing (or creation) of a Perl config file.
The Linux MP3−HOWTO [dj@megajukebox bin]$ ./shout megajukebox −e 80 −P hackme −p ../playlist 11.6 Bandwidth considerations Streaming audio can consume vast quantities of bandwidth if the MP3 servers' bit−rate is set too high. Consider this scenario. A T1 link has a capacity of approx. 1.55 Mb/Sec. If you stream your MP3's at 128K/Bps stereo, each connecting player will use 256K/Bps, so only 6 users could connect to your MP3 server at any time without problems.
The Linux MP3−HOWTO 12.1 Playing from File Playing from file is reasonably straight−forward with all players. The only big difference is some are command−line based and some are X based. Playing an MP3 file from file requires you to pass the mp3 file as a parameter, like so: [dj@megajukebox]$ mpg123 /mp3_files/SampleFile.mp3 or [dj@megajukebox]$ xaudio /mp3_files/SampleFile.mp3 If you want to play a series of files, pass them in as a list: [dj@megajukebox]$ alsaplayer /mp3_files/SampleFile1.
The Linux MP3−HOWTO name: Megajukebox reponse: 200 genre: Megajukebox url: http://www.megajukebox.com/ bitrate: 128 This stream contains no meta data, ripping as one large ass track 1st track ripped socket error: : Success Here's a list of options.
The Linux MP3−HOWTO eMixer eMixer gives you the ability to mix MP3's in a similar manner to a DJ's mixing desk. Newer versions support 2 sound cards so you can output your mix on one card and monitor or cue the next track on another. As usual once untaring, read the readme on how to build the package. You will need to create a playlist of MP3 files, do this with the find command mentioned in the Streaming section. You will need mpg123 installed before you can run eMixer.
The Linux MP3−HOWTO Editors allow you to view and edit this information. 13.1 id3ed [dj@megajukebox]$ id3ed id3ed v1.10 − mpeg layer 3 file information editor Usage: id3ed [−s songname] [−n artist] [−a album] [−y year] [−c comment] [−k tracknum] [−g genre] [−q] [−SNAYCKG] [−l/−L] [−r] [−i] [−v] −q −SNAYCKG −l/−L −r −i −v no line interface; only set tags specified on command line. Use twice to suppress all output except errors.
The Linux MP3−HOWTO DESCRIPTION This is a small tool to get and set MP3 information. OPTIONS −T Do NOT get TAG Info. Use on slowseeking media, since TAG is at the very end of the file. −s <0/1> Print info. Pretty much obsolete, should be on. Defaults 1. as it always −f Format of printed string. See README for details. −F Predefined format of printed string. Try it out. −w −W Write TAG Info. Will write a TAG at the end of the file. Wipe TAG Info. Will wipe clean TAG Info.
The Linux MP3−HOWTO 1.Classic Rock 2.Country 3.Dance 4.Disco 5.Funk 6.Grunge 7.Hip−Hop 8.Jazz 9.Metal 10.New Age 11.Oldies 12.Other 13.Pop 14.R&B 15.Rap 16.Reggae 17.Rock 18.Techno 19.Industrial 20.Alternative 21.Ska 22.Death Metal 23.Pranks 24.Soundtrack 25.Euro−Techno 26.Ambient 27.Trip−Hop 28.Vocal 29.Jazz+Funk 30.Fusion 31.Trance 32.Classical 33.Instrumental 34.Acid 35.House 36.Game 37.Sound Clip 38.Gospel 39.Noise 40.AlternRock 41.Bass 42.Soul 43.Punk 44.Space 45.Meditative 46.Instrumental Pop 47.
The Linux MP3−HOWTO 63.Jungle 64.Native American 65.Cabaret 66.New Wave 67.Psychadelic 68.Rave 69.Showtunes 70.Trailer 71.Lo−Fi 72.Tribal 73.Acid Punk 74.Acid Jazz 75.Polka 76.Retro 77.Musical 78.Rock & Roll 79.Hard Rock The following genres are Winamp extensions 80.Folk 81.Folk−Rock 82.National Folk 83.Swing 84.Fast Fusion 85.Bebob 86.Latin 87.Revival 88.Celtic 89.Bluegrass 90.Avantgarde 91.Gothic Rock 92.Progressive Rock 93.Psychedelic Rock 94.Symphonic Rock 95.Slow Rock 96.Big Band 97.Chorus 98.
The Linux MP3−HOWTO 122.Drum Solo 123.A capella 124.Euro−House 125.Dance Hall 14. MP3 to Minidisc. By Afra To record MP3s from Linux to your minidisc, there are two methods: analog and digital. Each method is dependant on the type of soundcard your Linux box has. The main difference between analog and digital recordings is the sound quality you achieve during recording. With an analog recording you may hear some static noise/fuzz, although some analog soundcards try to minimize this.
The Linux MP3−HOWTO which you can download at http://www.prongs.org/minidisc/2sec.zip. You may use this file, which is an MP3 file containing 2 seconds of silence, to insert before each MP3 on your playlist, so the MD will know when to automark. 15. Feedback. New hardware and software is being released all the time.