1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
7 ;;; Copyright © 2017 Pierre Langlois <pierre.langlois@gmx.com>
8 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages mp3)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages gcc)
31 #:use-module (gnu packages boost)
32 #:use-module (gnu packages cdrom)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages gettext)
35 #:use-module (gnu packages ghostscript)
36 #:use-module (gnu packages ncurses)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages pcre)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages python)
42 #:use-module (gnu packages python-xyz)
43 #:use-module (gnu packages xiph)
44 #:use-module (gnu packages pulseaudio)
45 #:use-module (gnu packages linux) ;alsa-lib
46 #:use-module (gnu packages video) ;ffmpeg
47 #:use-module (guix packages)
48 #:use-module (guix download)
49 #:use-module (guix utils)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system python)
52 #:use-module (guix build-system cmake))
60 (uri (string-append "mirror://sourceforge/mad/libmad/"
65 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv"))
66 (patches (search-patches "libmad-armv7-thumb-pt1.patch"
67 "libmad-armv7-thumb-pt2.patch"
68 "libmad-frame-length.patch"
69 "libmad-mips-newgcc.patch"))))
70 (build-system gnu-build-system)
73 (modify-phases %standard-phases
74 (add-before 'configure 'remove-unsupported-gcc-flags
76 ;; remove option that is not supported by gcc any more
77 (substitute* "configure" ((" -fforce-mem") ""))
79 (synopsis "MPEG audio decoder")
81 "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to
82 lower sampling frequencies, as well as the de facto MPEG 2.5 format.
83 All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are
86 This package contains the library.")
87 (license license:gpl2+)
88 (home-page "https://www.underbit.com/products/mad/")))
90 (define-public libid3tag
96 (uri (string-append "mirror://sourceforge/mad/libid3tag/"
101 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
102 (build-system gnu-build-system)
103 (inputs `(("zlib" ,zlib)))
104 (synopsis "Library for reading ID3 tags")
106 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
108 (license license:gpl2+)
109 (home-page "https://www.underbit.com/products/mad/")))
111 (define-public id3lib
117 (uri (string-append "mirror://sourceforge/id3lib/id3lib/"
118 version "/id3lib-" version ".tar.gz"))
121 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97"))
122 (modules '((guix build utils)))
123 ;; Don't use bundled zlib
124 (snippet '(begin (delete-file-recursively "zlib") #t))
125 (patches (search-patches "id3lib-CVE-2007-4460.patch"))))
126 (build-system gnu-build-system)
127 (inputs `(("zlib" ,zlib)))
130 (modify-phases %standard-phases
131 (add-before 'configure 'apply-patches
132 ;; TODO: create a patch for origin instead?
134 (substitute* "configure"
135 (("iomanip.h") "")) ; drop check for unused header
136 ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
137 (substitute* "include/id3/id3lib_strings.h"
138 (("include <string>") "include <cstring>\n#include <string>"))
139 (substitute* "include/id3/writers.h"
140 (("//\\#include <string.h>") "#include <cstring>"))
141 (substitute* "examples/test_io.cpp"
142 (("dami;") "dami;\nusing namespace std;"))
144 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
146 "Id3lib is a cross-platform software development library for reading,
147 writing, and manipulating ID3v1 and ID3v2 tags. It is an on-going project
148 whose primary goals are full compliance with the ID3v2 standard, portability
149 across several platforms, and providing a powerful and feature-rich API with
150 a highly stable and efficient implementation.")
151 (license license:lgpl2.0+)
152 (home-page "http://id3lib.sourceforge.net/")))
154 (define-public taglib
160 (uri (string-append "http://taglib.github.io/releases/taglib-"
164 "0ssjcdjv4qf9liph5ry1kngam1y7zp8fzr9xv4wzzrma22kabldn"))))
165 (build-system cmake-build-system)
167 '(#:tests? #f ; Tests are not ran with BUILD_SHARED_LIBS on.
168 #:configure-flags (list "-DBUILD_SHARED_LIBS=ON")))
169 (inputs `(("zlib" ,zlib)))
170 (home-page "http://taglib.org")
171 (synopsis "Library to access audio file meta-data")
173 "TagLib is a C++ library for reading and editing the meta-data of several
174 popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
175 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
176 Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.")
178 ;; Dual-licensed: user may choose between LGPLv2.1 or MPLv1.1.
179 (license (list license:lgpl2.1 license:mpl1.1))))
181 (define-public mp3info
188 "https://ibiblio.org"
189 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
193 "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04"))
194 (modules '((guix build utils)))
197 (substitute* "Makefile"
199 (("/usr/bin/install") "install")
200 (("man/man1") "share/man/man1"))
202 (build-system gnu-build-system)
203 (outputs '("out" "gui")) ;GTK+ interface in "gui"
206 (modify-phases %standard-phases
208 (lambda* (#:key outputs #:allow-other-keys)
209 (let ((out (assoc-ref outputs "out")))
210 (substitute* "Makefile"
212 (string-append "prefix := " out "\n"))))
214 (add-before 'install 'pre-install
215 (lambda* (#:key outputs #:allow-other-keys)
216 (let ((out (assoc-ref outputs "out")))
217 (mkdir-p (string-append out "/bin"))
218 (mkdir-p (string-append out "/share/man/man1")))
220 (add-after 'install 'post-install
221 (lambda* (#:key outputs #:allow-other-keys)
222 ;; Move the GTK+ interface to "gui".
223 (let ((out (assoc-ref outputs "out"))
224 (gui (assoc-ref outputs "gui")))
225 (mkdir-p (string-append gui "/bin"))
226 (rename-file (string-append out "/bin/gmp3info")
227 (string-append gui "/bin/gmp3info")))
231 `(("pkg-config" ,pkg-config)))
234 ("ncurses" ,ncurses)))
235 (home-page "https://www.ibiblio.org/mp3info/")
236 (synopsis "MP3 technical info viewer and ID3 1.x tag editor")
238 "MP3Info is a little utility used to read and modify the ID3 tags of MP3
239 files. MP3Info can also display various technical aspects of an MP3 file
240 including playing time, bit-rate, sampling frequency and other attributes in a
241 pre-defined or user-specifiable output format.")
242 (license license:gpl2+)))
244 (define-public libmp3splt
250 (uri (string-append "mirror://sourceforge/mp3splt/libmp3splt/"
251 version "/libmp3splt-"
255 "1p1mn2hsmj5cp40fnc8g1yfvk72p8pjxi866gjdkgjsqrr7xdvih"))))
256 (build-system gnu-build-system)
257 (inputs `(("libid3tag" ,libid3tag)
261 ("libvorbis" ,libvorbis)
264 `(("pkg-config" ,pkg-config)))
265 (synopsis "Library for splitting mp3 and ogg vorbis files")
267 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
268 and an end time position, without decoding. For splitting an album, one may
269 select split points and file names manually or obtain them automatically from
270 CDDB (internet or a local file) or from .cue files. The tool also supports
271 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
273 This package contains the library.")
274 (license license:gpl2+)
275 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
277 (define-public mp3splt
283 (uri (string-append "mirror://sourceforge/mp3splt/mp3splt/"
288 "1aiv20gypb6r84qabz8gblk8vi42cg3x333vk2pi3fyqvl82phry"))))
289 (build-system gnu-build-system)
290 (native-inputs `(("pkg-config" ,pkg-config)))
291 (inputs `(("libmp3splt" ,libmp3splt)))
292 (synopsis "Utility for splitting mp3 and ogg vorbis files")
294 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
295 and an end time position, without decoding. For splitting an album, one may
296 select split points and file names manually or obtain them automatically from
297 CDDB (internet or a local file) or from .cue files. The tool also supports
298 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
300 This package contains the binary.")
301 (license license:gpl2+)
302 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
304 (define-public mpg123
310 (uri (list (string-append "mirror://sourceforge/mpg123/mpg123/"
311 version "/mpg123-" version ".tar.bz2")
313 "https://www.mpg123.org/download/mpg123-"
314 version ".tar.bz2")))
317 "08vhp8lz7d9ybhxcmkq3adwfryhivfvp0745k4r9kgz4wap3f4vc"))))
318 (build-system gnu-build-system)
319 (arguments '(#:configure-flags '("--with-default-audio=pulse")))
320 (native-inputs `(("pkg-config" ,pkg-config)))
321 (inputs `(("pulseaudio" ,pulseaudio)
322 ("alsa-lib" ,alsa-lib)))
323 (home-page "https://www.mpg123.org/")
324 (synopsis "Console MP3 player and decoder library")
326 "Mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
327 1,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). It comes with a
328 command-line tool as well as a C library, libmpg123.")
329 (license license:lgpl2.1)))
331 (define-public mpg321
337 (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
338 version "/mpg321-" version ".tar.gz"))
341 "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))))
342 (build-system gnu-build-system)
343 (arguments '(#:configure-flags '("--disable-alsa")))
347 ("libid3tag" ,libid3tag)
349 (home-page "http://mpg321.sourceforge.net/")
350 (synopsis "Command-line MP3 player")
351 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
352 frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
353 use with CD-recording software).")
354 (license license:gpl2)))
362 (uri (string-append "mirror://sourceforge/lame/lame/"
363 (version-major+minor version) "/lame-"
367 "07nsn5sy3a8xbmw1bidxnsj5fj6kg9ai04icmqw40ybkp353dznx"))))
368 (build-system gnu-build-system)
369 (home-page "http://lame.sourceforge.net/")
370 (synopsis "MPEG Audio Layer III (MP3) encoder")
371 (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
372 (license license:lgpl2.0)))
374 (define-public ripperx
380 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
385 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
386 (patches (search-patches "ripperx-missing-file.patch"))))
387 (build-system gnu-build-system)
389 `(("gs-fonts" ,gs-fonts)
390 ("cdparanoia" ,cdparanoia)
393 ("vorbis-tools" ,vorbis-tools)))
400 `(("pkg-config" ,pkg-config)))
401 (synopsis "GTK program to rip and encode CD audio tracks")
403 "RipperX is a GTK program to rip CD audio tracks and encode them to the
404 Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
405 a few mouse clicks to convert an entire album. It supports CDDB lookups
406 for album and track information.")
407 (license license:gpl2)
408 (home-page "https://sourceforge.net/projects/ripperx/")))
410 (define-public libmpcdec
417 "https://files.musepack.net/source/libmpcdec-"
421 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
422 (build-system gnu-build-system)
423 (synopsis "Decoding library for the Musepack audio format")
425 "This library supports decoding of the Musepack (MPC) audio compression
427 (license license:bsd-3)
428 (home-page "https://musepack.net")))
430 (define-public mpc123
436 (uri (list (string-append "mirror://sourceforge/mpc123/version%20"
437 version "/mpc123-" version ".tar.gz")
438 (string-append "mirror://debian/pool/main/m/" name
439 "/" name "_" version ".orig.tar.gz")))
442 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
443 (patches (search-patches "mpc123-initialize-ao.patch"))))
444 (build-system gnu-build-system)
447 (modify-phases %standard-phases
450 (substitute* "Makefile"
451 (("CC[[:blank:]]*:=.*")
454 (lambda* (#:key outputs #:allow-other-keys)
455 (let* ((out (assoc-ref outputs "out"))
456 (bin (string-append out "/bin")))
457 (install-file "mpc123" bin)))))
460 `(("gettext" ,gettext-minimal)))
463 ("libmpcdec" ,libmpcdec)))
464 (home-page "https://github.com/bucciarati/mpc123")
465 (synopsis "Audio player for Musepack-formatted files")
467 "Mpc123 is a command-line player for files in the Musepack audio
468 compression format (.mpc files).")
469 (license license:gpl2+)))
478 (uri (pypi-uri "eyeD3" version))
480 (base32 "1jb22n1jczxgbpcnfiw12r8dcs74556g1d09mzms44f52kgs7lgc"))))
481 (build-system python-build-system)
483 `(#:tests? #f)) ; the required test data contains copyrighted material
485 `(("python-grako" ,python-grako)
486 ("python-magic" ,python-magic)
487 ("python-pathlib" ,python-pathlib)
488 ("python-six" ,python-six)))
489 (synopsis "MP3 tag ID3 metadata editor")
490 (description "eyeD3 is a Python tool for working with audio files,
491 specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
492 command-line tool (eyeD3) and a Python library (import eyed3) that can be used
493 to write your own applications or plugins that are callable from the
495 (home-page "https://eyed3.readthedocs.io/en/latest/")
496 (license license:gpl2+)))
498 (define-public chromaprint
505 "https://github.com/acoustid/chromaprint/releases/download/v"
506 version "/chromaprint-" version ".tar.gz"))
509 "10kz8lncal4s2rp2rqpgc6xyjp0jzcrihgkx7chf127vfs5n067a"))))
510 (build-system cmake-build-system)
512 `(#:tests? #f ; tests require googletest *sources*
513 ;;#:configure-flags '("-DBUILD_TESTS=ON") ; for building the tests
514 #:configure-flags '("-DBUILD_TOOLS=ON") ; for fpcalc
515 #:test-target "check"))
517 ;; requires one of FFmpeg (prefered), FFTW3 or vDSP
518 ;; use the same ffmpeg version as for acoustid-fingerprinter
521 (home-page "https://acoustid.org/chromaprint")
522 (synopsis "Audio fingerprinting library")
523 (description "Chromaprint is a library for calculating audio
524 fingerprints which are used by the Acoustid service. Its main purpose
525 is to provide an accurate identifier for record tracks.")
526 (license license:lgpl2.1+)))