gnu: r-dose: Update to 3.10.2.
[jackhill/guix/guix.git] / gnu / packages / mp3.scm
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>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
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.
16 ;;;
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.
21 ;;;
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/>.
24
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))
53
54 (define-public libmad
55 (package
56 (name "libmad")
57 (version "0.15.1b")
58 (source (origin
59 (method url-fetch)
60 (uri (string-append "mirror://sourceforge/mad/libmad/"
61 version "/libmad-"
62 version ".tar.gz"))
63 (sha256
64 (base32
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)
71 (arguments
72 `(#:phases
73 (modify-phases %standard-phases
74 (add-before 'configure 'remove-unsupported-gcc-flags
75 (lambda _
76 ;; remove option that is not supported by gcc any more
77 (substitute* "configure" ((" -fforce-mem") ""))
78 #t)))))
79 (synopsis "MPEG audio decoder")
80 (description
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
84 fully implemented.
85
86 This package contains the library.")
87 (license license:gpl2+)
88 (home-page "https://www.underbit.com/products/mad/")))
89
90 (define-public libid3tag
91 (package
92 (name "libid3tag")
93 (version "0.15.1b")
94 (source (origin
95 (method url-fetch)
96 (uri (string-append "mirror://sourceforge/mad/libid3tag/"
97 version "/libid3tag-"
98 version ".tar.gz"))
99 (sha256
100 (base32
101 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
102 (build-system gnu-build-system)
103 (inputs `(("zlib" ,zlib)))
104 (synopsis "Library for reading ID3 tags")
105 (description
106 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
107 versions of ID3v2.")
108 (license license:gpl2+)
109 (home-page "https://www.underbit.com/products/mad/")))
110
111 (define-public id3lib
112 (package
113 (name "id3lib")
114 (version "3.8.3")
115 (source (origin
116 (method url-fetch)
117 (uri (string-append "mirror://sourceforge/id3lib/id3lib/"
118 version "/id3lib-" version ".tar.gz"))
119 (sha256
120 (base32
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)))
128 (arguments
129 `(#:phases
130 (modify-phases %standard-phases
131 (add-before 'configure 'apply-patches
132 ;; TODO: create a patch for origin instead?
133 (lambda _
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;"))
143 #t)))))
144 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
145 (description
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/")))
153
154 (define-public taglib
155 (package
156 (name "taglib")
157 (version "1.11.1")
158 (source (origin
159 (method url-fetch)
160 (uri (string-append "http://taglib.github.io/releases/taglib-"
161 version ".tar.gz"))
162 (sha256
163 (base32
164 "0ssjcdjv4qf9liph5ry1kngam1y7zp8fzr9xv4wzzrma22kabldn"))))
165 (build-system cmake-build-system)
166 (arguments
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")
172 (description
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.")
177
178 ;; Dual-licensed: user may choose between LGPLv2.1 or MPLv1.1.
179 (license (list license:lgpl2.1 license:mpl1.1))))
180
181 (define-public mp3info
182 (package
183 (name "mp3info")
184 (version "0.8.5a")
185 (source (origin
186 (method url-fetch)
187 (uri (string-append
188 "https://ibiblio.org"
189 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
190 version ".tgz"))
191 (sha256
192 (base32
193 "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04"))
194 (modules '((guix build utils)))
195 (snippet
196 '(begin
197 (substitute* "Makefile"
198 (("/bin/rm") "rm")
199 (("/usr/bin/install") "install")
200 (("man/man1") "share/man/man1"))
201 #t))))
202 (build-system gnu-build-system)
203 (outputs '("out" "gui")) ;GTK+ interface in "gui"
204 (arguments
205 '(#:phases
206 (modify-phases %standard-phases
207 (replace 'configure
208 (lambda* (#:key outputs #:allow-other-keys)
209 (let ((out (assoc-ref outputs "out")))
210 (substitute* "Makefile"
211 (("prefix=.*")
212 (string-append "prefix := " out "\n"))))
213 #t))
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")))
219 #t))
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")))
228 #t)))
229 #:tests? #f))
230 (native-inputs
231 `(("pkg-config" ,pkg-config)))
232 (inputs
233 `(("gtk+" ,gtk+-2)
234 ("ncurses" ,ncurses)))
235 (home-page "https://www.ibiblio.org/mp3info/")
236 (synopsis "MP3 technical info viewer and ID3 1.x tag editor")
237 (description
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+)))
243
244 (define-public libmp3splt
245 (package
246 (name "libmp3splt")
247 (version "0.9.2")
248 (source (origin
249 (method url-fetch)
250 (uri (string-append "mirror://sourceforge/mp3splt/libmp3splt/"
251 version "/libmp3splt-"
252 version ".tar.gz"))
253 (sha256
254 (base32
255 "1p1mn2hsmj5cp40fnc8g1yfvk72p8pjxi866gjdkgjsqrr7xdvih"))))
256 (build-system gnu-build-system)
257 (inputs `(("libid3tag" ,libid3tag)
258 ("libmad" ,libmad)
259 ("libogg" ,libogg)
260 ("libltdl" ,libltdl)
261 ("libvorbis" ,libvorbis)
262 ("pcre" ,pcre)))
263 (native-inputs
264 `(("pkg-config" ,pkg-config)))
265 (synopsis "Library for splitting mp3 and ogg vorbis files")
266 (description
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.
272
273 This package contains the library.")
274 (license license:gpl2+)
275 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
276
277 (define-public mp3splt
278 (package
279 (name "mp3splt")
280 (version "2.6.2")
281 (source (origin
282 (method url-fetch)
283 (uri (string-append "mirror://sourceforge/mp3splt/mp3splt/"
284 version "/mp3splt-"
285 version ".tar.gz"))
286 (sha256
287 (base32
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")
293 (description
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.
299
300 This package contains the binary.")
301 (license license:gpl2+)
302 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
303
304 (define-public mpg123
305 (package
306 (name "mpg123")
307 (version "1.25.10")
308 (source (origin
309 (method url-fetch)
310 (uri (list (string-append "mirror://sourceforge/mpg123/mpg123/"
311 version "/mpg123-" version ".tar.bz2")
312 (string-append
313 "https://www.mpg123.org/download/mpg123-"
314 version ".tar.bz2")))
315 (sha256
316 (base32
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")
325 (description
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)))
330
331 (define-public mpg321
332 (package
333 (name "mpg321")
334 (version "0.3.2")
335 (source (origin
336 (method url-fetch)
337 (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
338 version "/mpg321-" version ".tar.gz"))
339 (sha256
340 (base32
341 "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))))
342 (build-system gnu-build-system)
343 (arguments '(#:configure-flags '("--disable-alsa")))
344 (inputs
345 `(("zlib" ,zlib)
346 ("libmad" ,libmad)
347 ("libid3tag" ,libid3tag)
348 ("libao" ,ao)))
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)))
355
356 (define-public lame
357 (package
358 (name "lame")
359 (version "3.100")
360 (source (origin
361 (method url-fetch)
362 (uri (string-append "mirror://sourceforge/lame/lame/"
363 (version-major+minor version) "/lame-"
364 version ".tar.gz"))
365 (sha256
366 (base32
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)))
373
374 (define-public ripperx
375 (package
376 (name "ripperx")
377 (version "2.8.0")
378 (source (origin
379 (method url-fetch)
380 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
381 version "/ripperx-"
382 version ".tar.bz2"))
383 (sha256
384 (base32
385 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
386 (patches (search-patches "ripperx-missing-file.patch"))))
387 (build-system gnu-build-system)
388 (propagated-inputs
389 `(("gs-fonts" ,gs-fonts)
390 ("cdparanoia" ,cdparanoia)
391 ("flac" ,flac)
392 ("lame" ,lame)
393 ("vorbis-tools" ,vorbis-tools)))
394 (inputs
395 `(("glib" ,glib)
396 ("gtk+" ,gtk+-2)
397 ("id3lib" ,id3lib)
398 ("taglib" ,taglib)))
399 (native-inputs
400 `(("pkg-config" ,pkg-config)))
401 (synopsis "GTK program to rip and encode CD audio tracks")
402 (description
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/")))
409
410 (define-public libmpcdec
411 (package
412 (name "libmpcdec")
413 (version "1.2.6")
414 (source (origin
415 (method url-fetch)
416 (uri (string-append
417 "https://files.musepack.net/source/libmpcdec-"
418 version ".tar.bz2"))
419 (sha256
420 (base32
421 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
422 (build-system gnu-build-system)
423 (synopsis "Decoding library for the Musepack audio format")
424 (description
425 "This library supports decoding of the Musepack (MPC) audio compression
426 format.")
427 (license license:bsd-3)
428 (home-page "https://musepack.net")))
429
430 (define-public mpc123
431 (package
432 (name "mpc123")
433 (version "0.2.4")
434 (source (origin
435 (method url-fetch)
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")))
440 (sha256
441 (base32
442 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
443 (patches (search-patches "mpc123-initialize-ao.patch"))))
444 (build-system gnu-build-system)
445 (arguments
446 '(#:phases
447 (modify-phases %standard-phases
448 (replace 'configure
449 (lambda _
450 (substitute* "Makefile"
451 (("CC[[:blank:]]*:=.*")
452 "CC := gcc\n"))))
453 (replace 'install
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)))))
458 #:tests? #f))
459 (native-inputs
460 `(("gettext" ,gettext-minimal)))
461 (inputs
462 `(("libao" ,ao)
463 ("libmpcdec" ,libmpcdec)))
464 (home-page "https://github.com/bucciarati/mpc123")
465 (synopsis "Audio player for Musepack-formatted files")
466 (description
467 "Mpc123 is a command-line player for files in the Musepack audio
468 compression format (.mpc files).")
469 (license license:gpl2+)))
470
471 (define-public eyed3
472 (package
473 (name "eyed3")
474 (version "0.8.10")
475 (source
476 (origin
477 (method url-fetch)
478 (uri (pypi-uri "eyeD3" version))
479 (sha256
480 (base32 "1jb22n1jczxgbpcnfiw12r8dcs74556g1d09mzms44f52kgs7lgc"))))
481 (build-system python-build-system)
482 (arguments
483 `(#:tests? #f)) ; the required test data contains copyrighted material
484 (propagated-inputs
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
494 command-line tool.")
495 (home-page "https://eyed3.readthedocs.io/en/latest/")
496 (license license:gpl2+)))
497
498 (define-public chromaprint
499 (package
500 (name "chromaprint")
501 (version "1.4.3")
502 (source (origin
503 (method url-fetch)
504 (uri (string-append
505 "https://github.com/acoustid/chromaprint/releases/download/v"
506 version "/chromaprint-" version ".tar.gz"))
507 (sha256
508 (base32
509 "10kz8lncal4s2rp2rqpgc6xyjp0jzcrihgkx7chf127vfs5n067a"))))
510 (build-system cmake-build-system)
511 (arguments
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"))
516 (inputs
517 ;; requires one of FFmpeg (prefered), FFTW3 or vDSP
518 ;; use the same ffmpeg version as for acoustid-fingerprinter
519 `(("ffmpeg" ,ffmpeg)
520 ("boost" ,boost)))
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+)))