1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages mp3)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages autotools)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages gcc)
28 #:use-module (gnu packages boost)
29 #:use-module (gnu packages cdrom)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages gettext)
32 #:use-module (gnu packages ghostscript)
33 #:use-module (gnu packages ncurses)
34 #:use-module (gnu packages glib)
35 #:use-module (gnu packages gtk)
36 #:use-module (gnu packages pcre)
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages xiph)
40 #:use-module (gnu packages pulseaudio)
41 #:use-module (gnu packages linux) ;alsa-lib
42 #:use-module (gnu packages video) ;ffmpeg
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix build-system gnu)
46 #:use-module (guix build-system python)
47 #:use-module (guix build-system cmake))
55 (uri (string-append "mirror://sourceforge/mad/libmad/"
60 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv"))
61 (patches (search-patches "libmad-armv7-thumb-pt1.patch"
62 "libmad-armv7-thumb-pt2.patch"
63 "libmad-frame-length.patch"
64 "libmad-mips-newgcc.patch"))))
65 (build-system gnu-build-system)
69 'configure 'remove-unsupported-gcc-flags
71 ;; remove option that is not supported by gcc any more
72 (substitute* "configure" ((" -fforce-mem") "")))
74 (synopsis "MPEG audio decoder")
76 "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to
77 lower sampling frequencies, as well as the de facto MPEG 2.5 format.
78 All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are
81 This package contains the library.")
82 (license license:gpl2+)
83 (home-page "http://www.underbit.com/products/mad/")))
85 (define-public libid3tag
91 (uri (string-append "mirror://sourceforge/mad/libid3tag/"
96 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
97 (build-system gnu-build-system)
98 (inputs `(("zlib" ,zlib)))
99 (synopsis "Library for reading ID3 tags")
101 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
103 (license license:gpl2+)
104 (home-page "http://www.underbit.com/products/mad/")))
106 (define-public id3lib
112 (uri (string-append "mirror://sourceforge/id3lib/id3lib/"
113 version "/id3lib-" version ".tar.gz"))
116 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97"))
117 (patches (search-patches "id3lib-CVE-2007-4460.patch"))))
118 (build-system gnu-build-system)
122 'configure 'apply-patches
123 ;; TODO: create a patch for origin instead?
125 (substitute* "configure"
126 (("iomanip.h") "")) ; drop check for unused header
127 ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
128 (substitute* "include/id3/id3lib_strings.h"
129 (("include <string>") "include <cstring>\n#include <string>"))
130 (substitute* "include/id3/writers.h"
131 (("//\\#include <string.h>") "#include <cstring>"))
132 (substitute* "examples/test_io.cpp"
133 (("dami;") "dami;\nusing namespace std;")))
135 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
137 "Id3lib is a cross-platform software development library for reading,
138 writing, and manipulating ID3v1 and ID3v2 tags. It is an on-going project
139 whose primary goals are full compliance with the ID3v2 standard, portability
140 across several platforms, and providing a powerful and feature-rich API with
141 a highly stable and efficient implementation.")
142 (license license:lgpl2.0+)
143 (home-page "http://id3lib.sourceforge.net/")))
145 (define-public taglib
151 (uri (string-append "http://taglib.github.io/releases/taglib-"
155 "1alv6vp72p0x9i9yscmz2a71anjwqy53y9pbcbqxvc1c0i82vhr4"))))
156 (build-system cmake-build-system)
157 (arguments '(#:tests? #f)) ;no 'test' target
158 (inputs `(("zlib" ,zlib)))
159 (home-page "http://developer.kde.org/~wheeler/taglib.html")
160 (synopsis "Library to access audio file meta-data")
162 "TagLib is a C++ library for reading and editing the meta-data of several
163 popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
164 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
165 Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.")
167 ;; Dual-licensed: user may choose between LGPLv2.1 or MPLv1.1.
168 (license (list license:lgpl2.1 license:mpl1.1))))
170 (define-public mp3info
178 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
182 "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04"))
183 (modules '((guix build utils)))
185 '(substitute* "Makefile"
187 (("/usr/bin/install") "install")
188 (("man/man1") "share/man/man1")))))
189 (build-system gnu-build-system)
190 (outputs '("out" "gui")) ;GTK+ interface in "gui"
192 '(#:phases (alist-replace
194 (lambda* (#:key outputs #:allow-other-keys)
195 (let ((out (assoc-ref outputs "out")))
196 (substitute* "Makefile"
198 (string-append "prefix := " out "\n")))))
200 'install 'pre-install
201 (lambda* (#:key outputs #:allow-other-keys)
202 (let ((out (assoc-ref outputs "out")))
203 (mkdir-p (string-append out "/bin"))
204 (mkdir-p (string-append out "/share/man/man1"))))
206 'install 'post-install
207 (lambda* (#:key outputs #:allow-other-keys)
208 ;; Move the GTK+ interface to "gui".
209 (let ((out (assoc-ref outputs "out"))
210 (gui (assoc-ref outputs "gui")))
211 (mkdir-p (string-append gui "/bin"))
212 (rename-file (string-append out "/bin/gmp3info")
213 (string-append gui "/bin/gmp3info"))))
217 `(("pkg-config" ,pkg-config)))
220 ("ncurses" ,ncurses)))
221 (home-page "http://www.ibiblio.org/mp3info/")
222 (synopsis "MP3 technical info viewer and ID3 1.x tag editor")
224 "MP3Info is a little utility used to read and modify the ID3 tags of MP3
225 files. MP3Info can also display various technical aspects of an MP3 file
226 including playing time, bit-rate, sampling frequency and other attributes in a
227 pre-defined or user-specifiable output format.")
228 (license license:gpl2+)))
230 (define-public libmp3splt
236 (uri (string-append "mirror://sourceforge/mp3splt/libmp3splt/"
237 version "/libmp3splt-"
241 "0d20r1bd4fgp9kp7w3qixjgll34czck9dgw59mx2kbhb0mhh00d8"))))
242 (build-system gnu-build-system)
243 (inputs `(("libid3tag" ,libid3tag)
247 ("libvorbis" ,libvorbis)
250 `(("pkg-config" ,pkg-config)))
251 (synopsis "Library for splitting mp3 and ogg vorbis files")
253 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
254 and an end time position, without decoding. For splitting an album, one may
255 select split points and file names manually or obtain them automatically from
256 CDDB (internet or a local file) or from .cue files. The tool also supports
257 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
259 This package contains the library.")
260 (license license:gpl2+)
261 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
263 (define-public mp3splt
269 (uri (string-append "mirror://sourceforge/mp3splt/mp3splt/"
274 "106dnka56prlc9nsfh300f8841am2lmkwlzgl9lkr25mgnc35wwh"))))
275 (build-system gnu-build-system)
276 (inputs `(("libmp3splt" ,libmp3splt)))
277 (synopsis "Utility for splitting mp3 and ogg vorbis files")
279 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
280 and an end time position, without decoding. For splitting an album, one may
281 select split points and file names manually or obtain them automatically from
282 CDDB (internet or a local file) or from .cue files. The tool also supports
283 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
285 This package contains the binary.")
286 (license license:gpl2+)
287 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
289 (define-public mpg123
295 (uri (string-append "mirror://sourceforge/mpg123/mpg123/" version
296 "/mpg123-" version ".tar.bz2"))
299 "13ngfzk84k4ks7ymanmq8f6707yrybra5h0mk3ir6mdnxk4068yy"))))
300 (build-system gnu-build-system)
301 (arguments '(#:configure-flags '("--with-default-audio=pulse")))
302 (native-inputs `(("pkg-config" ,pkg-config)))
303 (inputs `(("pulseaudio" ,pulseaudio)
304 ("alsa-lib" ,alsa-lib)))
305 (home-page "http://www.mpg123.org/")
306 (synopsis "Console MP3 player and decoder library")
308 "Mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
309 1,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). It comes with a
310 command-line tool as well as a C library, libmpg123.")
311 (license license:lgpl2.1)))
313 (define-public mpg321
319 (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
320 version "/mpg321-" version ".tar.gz"))
323 "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))))
324 (build-system gnu-build-system)
325 (arguments '(#:configure-flags '("--disable-alsa")))
329 ("libid3tag" ,libid3tag)
331 (home-page "http://mpg321.sourceforge.net/")
332 (synopsis "Command-line MP3 player")
333 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
334 frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
335 use with CD-recording software).")
336 (license license:gpl2)))
344 (uri (string-append "mirror://sourceforge/lame/lame/3.99/lame-"
348 "1zr3kadv35ii6liia0bpfgxpag27xcivp571ybckpbz4b10nnd14"))))
349 (build-system gnu-build-system)
350 ;; XXX FIXME: Use gcc-4.8 on i686 to work around
351 ;; <http://bugs.gnu.org/20856>.
352 (native-inputs (if (and (not (%current-target-system))
353 (string-prefix? "i686-" (%current-system)))
354 `(("gcc" ,(canonical-package gcc-4.8)))
356 (home-page "http://lame.sourceforge.net/")
357 (synopsis "MPEG Audio Layer III (MP3) encoder")
358 (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
359 (license license:lgpl2.0)))
361 (define-public ripperx
367 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
372 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
373 (patches (search-patches "ripperx-missing-file.patch"))))
374 (build-system gnu-build-system)
376 `(("gs-fonts" ,gs-fonts)
377 ("cdparanoia" ,cdparanoia)
380 ("vorbis-tools" ,vorbis-tools)))
387 `(("pkg-config" ,pkg-config)))
388 (synopsis "GTK program to rip and encode CD audio tracks")
390 "RipperX is a GTK program to rip CD audio tracks and encode them to the
391 Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
392 a few mouse clicks to convert an entire album. It supports CDDB lookups
393 for album and track information.")
394 (license license:gpl2)
395 (home-page "https://sourceforge.net/projects/ripperx/")))
397 (define-public libmpcdec
404 "http://files.musepack.net/source/libmpcdec-"
408 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
409 (build-system gnu-build-system)
410 (synopsis "Decoding library for the Musepack audio format")
412 "This library supports decoding of the Musepack (MPC) audio compression
414 (license license:bsd-3)
415 (home-page "http://musepack.net")))
417 (define-public mpc123
423 (uri (list (string-append "mirror://sourceforge/mpc123/version%20"
424 version "/mpc123-" version ".tar.gz")
425 (string-append "mirror://debian/pool/main/m/" name
426 "/" name "_" version ".orig.tar.gz")))
429 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
430 (patches (search-patches "mpc123-initialize-ao.patch"))))
431 (build-system gnu-build-system)
434 (modify-phases %standard-phases
437 (substitute* "Makefile"
438 (("CC[[:blank:]]*:=.*")
441 (lambda* (#:key outputs #:allow-other-keys)
442 (let* ((out (assoc-ref outputs "out"))
443 (bin (string-append out "/bin")))
444 (install-file "mpc123" bin)))))
447 `(("gettext" ,gettext-minimal)))
450 ("libmpcdec" ,libmpcdec)))
451 (home-page "https://github.com/bucciarati/mpc123")
452 (synopsis "Audio player for Musepack-formatted files")
454 "Mpc123 is a command-line player for files in the Musepack audio
455 compression format (.mpc files).")
456 (license license:gpl2+)))
465 "http://eyed3.nicfit.net/releases/eyeD3-"
469 "08mzhqg3k63d244cgwd0y1xrb8x9m6b99ykyskpnwyxl4wxrgrzp"))))
470 (build-system python-build-system)
472 `(#:python ,python-2))
474 `(("python2-nose" ,python2-nose)
475 ("python2-sphinx" ,python2-sphinx)
476 ("python2-coverage" ,python2-coverage)))
477 (synopsis "MP3 tag ID3 metadata editor")
478 (description "eyeD3 is a Python tool for working with audio files,
479 specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
480 command-line tool (eyeD3) and a Python library (import eyed3) that can be used
481 to write your own applications or plugins that are callable from the
483 (home-page "http://eyed3.nicfit.net/")
484 (license license:gpl2+)))
486 (define-public chromaprint
493 "https://bitbucket.org/acoustid/chromaprint/downloads/"
494 "chromaprint-" version ".tar.gz"))
496 (base32 "0lln8dh33gslb9cbmd1hcv33pr6jxdwipd8m8gbsyhksiq6r1by3"))))
497 (build-system cmake-build-system)
499 `(#:tests? #f ; tests require googletest *sources*
500 ;;#:configure-flags '("-DBUILD_TESTS=ON") ; for building the tests
501 #:test-target "check"))
503 ;; requires one of FFmpeg (prefered), FFTW3 or vDSP
504 ;; use the same ffmpeg version as for acoustid-fingerprinter
507 (home-page "https://acoustid.org/chromaprint")
508 (synopsis "Audio fingerprinting library")
509 (description "Chromaprint is a library for calculating audio
510 fingerprints which are used by the Acoustid service. Its main purpose
511 is to provide an accurate identifier for record tracks.")
512 (license license:lgpl2.1+)))