gnu: ungoogled-chromium: Update to 78.0.3904.97-0.acaf163.
[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, 2019 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-md_size.patch"
69 "libmad-length-check.patch"
70 "libmad-mips-newgcc.patch"))))
71 (build-system gnu-build-system)
72 (arguments
73 `(#:phases
74 (modify-phases %standard-phases
75 (add-before 'configure 'remove-unsupported-gcc-flags
76 (lambda _
77 ;; remove option that is not supported by gcc any more
78 (substitute* "configure" ((" -fforce-mem") ""))
79 #t)))))
80 (synopsis "MPEG audio decoder")
81 (description
82 "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to
83 lower sampling frequencies, as well as the de facto MPEG 2.5 format.
84 All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are
85 fully implemented.
86
87 This package contains the library.")
88 (license license:gpl2+)
89 (home-page "https://www.underbit.com/products/mad/")))
90
91 (define-public libid3tag
92 (package
93 (name "libid3tag")
94 (version "0.15.1b")
95 (source (origin
96 (method url-fetch)
97 (uri (string-append "mirror://sourceforge/mad/libid3tag/"
98 version "/libid3tag-"
99 version ".tar.gz"))
100 (sha256
101 (base32
102 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
103 (build-system gnu-build-system)
104 (inputs `(("zlib" ,zlib)))
105 (synopsis "Library for reading ID3 tags")
106 (description
107 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
108 versions of ID3v2.")
109 (license license:gpl2+)
110 (home-page "https://www.underbit.com/products/mad/")))
111
112 (define-public id3lib
113 (package
114 (name "id3lib")
115 (version "3.8.3")
116 (source (origin
117 (method url-fetch)
118 (uri (string-append "mirror://sourceforge/id3lib/id3lib/"
119 version "/id3lib-" version ".tar.gz"))
120 (sha256
121 (base32
122 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97"))
123 (modules '((guix build utils)))
124 ;; Don't use bundled zlib
125 (snippet '(begin (delete-file-recursively "zlib") #t))
126 (patches (search-patches "id3lib-CVE-2007-4460.patch"
127 "id3lib-UTF16-writing-bug.patch"))))
128 (build-system gnu-build-system)
129 (inputs `(("zlib" ,zlib)))
130 (arguments
131 `(#:phases
132 (modify-phases %standard-phases
133 (add-before 'configure 'apply-patches
134 ;; TODO: create a patch for origin instead?
135 (lambda _
136 (substitute* "configure"
137 (("iomanip.h") "")) ; drop check for unused header
138 ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
139 (substitute* "include/id3/id3lib_strings.h"
140 (("include <string>") "include <cstring>\n#include <string>"))
141 (substitute* "include/id3/writers.h"
142 (("//\\#include <string.h>") "#include <cstring>"))
143 (substitute* "examples/test_io.cpp"
144 (("dami;") "dami;\nusing namespace std;"))
145 #t)))))
146 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
147 (description
148 "Id3lib is a cross-platform software development library for reading,
149 writing, and manipulating ID3v1 and ID3v2 tags. It is an on-going project
150 whose primary goals are full compliance with the ID3v2 standard, portability
151 across several platforms, and providing a powerful and feature-rich API with
152 a highly stable and efficient implementation.")
153 (license license:lgpl2.0+)
154 (home-page "http://id3lib.sourceforge.net/")))
155
156 (define-public taglib
157 (package
158 (name "taglib")
159 (version "1.11.1")
160 (source (origin
161 (method url-fetch)
162 (uri (string-append "http://taglib.github.io/releases/taglib-"
163 version ".tar.gz"))
164 (sha256
165 (base32
166 "0ssjcdjv4qf9liph5ry1kngam1y7zp8fzr9xv4wzzrma22kabldn"))))
167 (build-system cmake-build-system)
168 (arguments
169 '(#:tests? #f ; Tests are not ran with BUILD_SHARED_LIBS on.
170 #:configure-flags (list "-DBUILD_SHARED_LIBS=ON")))
171 (inputs `(("zlib" ,zlib)))
172 (home-page "http://taglib.org")
173 (synopsis "Library to access audio file meta-data")
174 (description
175 "TagLib is a C++ library for reading and editing the meta-data of several
176 popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
177 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
178 Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.")
179
180 ;; Dual-licensed: user may choose between LGPLv2.1 or MPLv1.1.
181 (license (list license:lgpl2.1 license:mpl1.1))))
182
183 (define-public mp3info
184 (package
185 (name "mp3info")
186 (version "0.8.5a")
187 (source (origin
188 (method url-fetch)
189 (uri (string-append
190 "https://ibiblio.org"
191 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
192 version ".tgz"))
193 (sha256
194 (base32
195 "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04"))
196 (modules '((guix build utils)))
197 (snippet
198 '(begin
199 (substitute* "Makefile"
200 (("/bin/rm") "rm")
201 (("/usr/bin/install") "install")
202 (("man/man1") "share/man/man1"))
203 #t))))
204 (build-system gnu-build-system)
205 (outputs '("out" "gui")) ;GTK+ interface in "gui"
206 (arguments
207 '(#:phases
208 (modify-phases %standard-phases
209 (replace 'configure
210 (lambda* (#:key outputs #:allow-other-keys)
211 (let ((out (assoc-ref outputs "out")))
212 (substitute* "Makefile"
213 (("prefix=.*")
214 (string-append "prefix := " out "\n"))))
215 #t))
216 (add-before 'install 'pre-install
217 (lambda* (#:key outputs #:allow-other-keys)
218 (let ((out (assoc-ref outputs "out")))
219 (mkdir-p (string-append out "/bin"))
220 (mkdir-p (string-append out "/share/man/man1")))
221 #t))
222 (add-after 'install 'post-install
223 (lambda* (#:key outputs #:allow-other-keys)
224 ;; Move the GTK+ interface to "gui".
225 (let ((out (assoc-ref outputs "out"))
226 (gui (assoc-ref outputs "gui")))
227 (mkdir-p (string-append gui "/bin"))
228 (rename-file (string-append out "/bin/gmp3info")
229 (string-append gui "/bin/gmp3info")))
230 #t)))
231 #:tests? #f))
232 (native-inputs
233 `(("pkg-config" ,pkg-config)))
234 (inputs
235 `(("gtk+" ,gtk+-2)
236 ("ncurses" ,ncurses)))
237 (home-page "https://www.ibiblio.org/mp3info/")
238 (synopsis "MP3 technical info viewer and ID3 1.x tag editor")
239 (description
240 "MP3Info is a little utility used to read and modify the ID3 tags of MP3
241 files. MP3Info can also display various technical aspects of an MP3 file
242 including playing time, bit-rate, sampling frequency and other attributes in a
243 pre-defined or user-specifiable output format.")
244 (license license:gpl2+)))
245
246 (define-public libmp3splt
247 (package
248 (name "libmp3splt")
249 (version "0.9.2")
250 (source (origin
251 (method url-fetch)
252 (uri (string-append "mirror://sourceforge/mp3splt/libmp3splt/"
253 version "/libmp3splt-"
254 version ".tar.gz"))
255 (sha256
256 (base32
257 "1p1mn2hsmj5cp40fnc8g1yfvk72p8pjxi866gjdkgjsqrr7xdvih"))))
258 (build-system gnu-build-system)
259 (inputs `(("libid3tag" ,libid3tag)
260 ("libmad" ,libmad)
261 ("libogg" ,libogg)
262 ("libltdl" ,libltdl)
263 ("libvorbis" ,libvorbis)
264 ("pcre" ,pcre)))
265 (native-inputs
266 `(("pkg-config" ,pkg-config)))
267 (synopsis "Library for splitting mp3 and ogg vorbis files")
268 (description
269 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
270 and an end time position, without decoding. For splitting an album, one may
271 select split points and file names manually or obtain them automatically from
272 CDDB (internet or a local file) or from .cue files. The tool also supports
273 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
274
275 This package contains the library.")
276 (license license:gpl2+)
277 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
278
279 (define-public mp3splt
280 (package
281 (name "mp3splt")
282 (version "2.6.2")
283 (source (origin
284 (method url-fetch)
285 (uri (string-append "mirror://sourceforge/mp3splt/mp3splt/"
286 version "/mp3splt-"
287 version ".tar.gz"))
288 (sha256
289 (base32
290 "1aiv20gypb6r84qabz8gblk8vi42cg3x333vk2pi3fyqvl82phry"))))
291 (build-system gnu-build-system)
292 (native-inputs `(("pkg-config" ,pkg-config)))
293 (inputs `(("libmp3splt" ,libmp3splt)))
294 (synopsis "Utility for splitting mp3 and ogg vorbis files")
295 (description
296 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
297 and an end time position, without decoding. For splitting an album, one may
298 select split points and file names manually or obtain them automatically from
299 CDDB (internet or a local file) or from .cue files. The tool also supports
300 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
301
302 This package contains the binary.")
303 (license license:gpl2+)
304 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
305
306 (define-public mpg123
307 (package
308 (name "mpg123")
309 (version "1.25.13")
310 (source (origin
311 (method url-fetch)
312 (uri (list (string-append "mirror://sourceforge/mpg123/mpg123/"
313 version "/mpg123-" version ".tar.bz2")
314 (string-append
315 "https://www.mpg123.org/download/mpg123-"
316 version ".tar.bz2")))
317 (sha256
318 (base32
319 "02l915jq0ymndb082g6w89bpf66z04ifa1lr7ga3yycw6m46hc4h"))))
320 (build-system gnu-build-system)
321 (arguments '(#:configure-flags '("--with-default-audio=pulse")))
322 (native-inputs `(("pkg-config" ,pkg-config)))
323 (inputs `(("pulseaudio" ,pulseaudio)
324 ("alsa-lib" ,alsa-lib)))
325 (home-page "https://www.mpg123.org/")
326 (synopsis "Console MP3 player and decoder library")
327 (description
328 "Mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
329 1,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). It comes with a
330 command-line tool as well as a C library, libmpg123.")
331 (license license:lgpl2.1)))
332
333 (define-public mpg321
334 (package
335 (name "mpg321")
336 (version "0.3.2")
337 (source (origin
338 (method url-fetch)
339 (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
340 version "/mpg321-" version ".tar.gz"))
341 (sha256
342 (base32
343 "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))))
344 (build-system gnu-build-system)
345 (arguments '(#:configure-flags '("--disable-alsa")))
346 (inputs
347 `(("zlib" ,zlib)
348 ("libmad" ,libmad)
349 ("libid3tag" ,libid3tag)
350 ("libao" ,ao)))
351 (home-page "http://mpg321.sourceforge.net/")
352 (synopsis "Command-line MP3 player")
353 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
354 frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
355 use with CD-recording software).")
356 (license license:gpl2)))
357
358 (define-public lame
359 (package
360 (name "lame")
361 (version "3.100")
362 (source (origin
363 (method url-fetch)
364 (uri (string-append "mirror://sourceforge/lame/lame/"
365 (version-major+minor version) "/lame-"
366 version ".tar.gz"))
367 (sha256
368 (base32
369 "07nsn5sy3a8xbmw1bidxnsj5fj6kg9ai04icmqw40ybkp353dznx"))))
370 (build-system gnu-build-system)
371 (home-page "http://lame.sourceforge.net/")
372 (synopsis "MPEG Audio Layer III (MP3) encoder")
373 (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
374 (license license:lgpl2.0)))
375
376 (define-public ripperx
377 (package
378 (name "ripperx")
379 (version "2.8.0")
380 (source (origin
381 (method url-fetch)
382 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
383 version "/ripperx-"
384 version ".tar.bz2"))
385 (sha256
386 (base32
387 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
388 (patches (search-patches "ripperx-missing-file.patch"))))
389 (build-system gnu-build-system)
390 (propagated-inputs
391 `(("gs-fonts" ,gs-fonts)
392 ("cdparanoia" ,cdparanoia)
393 ("flac" ,flac)
394 ("lame" ,lame)
395 ("vorbis-tools" ,vorbis-tools)))
396 (inputs
397 `(("glib" ,glib)
398 ("gtk+" ,gtk+-2)
399 ("id3lib" ,id3lib)
400 ("taglib" ,taglib)))
401 (native-inputs
402 `(("pkg-config" ,pkg-config)))
403 (synopsis "GTK program to rip and encode CD audio tracks")
404 (description
405 "RipperX is a GTK program to rip CD audio tracks and encode them to the
406 Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
407 a few mouse clicks to convert an entire album. It supports CDDB lookups
408 for album and track information.")
409 (license license:gpl2)
410 (home-page "https://sourceforge.net/projects/ripperx/")))
411
412 (define-public libmpcdec
413 (package
414 (name "libmpcdec")
415 (version "1.2.6")
416 (source (origin
417 (method url-fetch)
418 (uri (string-append
419 "https://files.musepack.net/source/libmpcdec-"
420 version ".tar.bz2"))
421 (sha256
422 (base32
423 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
424 (build-system gnu-build-system)
425 (synopsis "Decoding library for the Musepack audio format")
426 (description
427 "This library supports decoding of the Musepack (MPC) audio compression
428 format.")
429 (license license:bsd-3)
430 (home-page "https://musepack.net")))
431
432 (define-public mpc123
433 (package
434 (name "mpc123")
435 (version "0.2.4")
436 (source (origin
437 (method url-fetch)
438 (uri (list (string-append "mirror://sourceforge/mpc123/version%20"
439 version "/mpc123-" version ".tar.gz")
440 (string-append "mirror://debian/pool/main/m/" name
441 "/" name "_" version ".orig.tar.gz")))
442 (sha256
443 (base32
444 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
445 (patches (search-patches "mpc123-initialize-ao.patch"))))
446 (build-system gnu-build-system)
447 (arguments
448 '(#:phases
449 (modify-phases %standard-phases
450 (replace 'configure
451 (lambda _
452 (substitute* "Makefile"
453 (("CC[[:blank:]]*:=.*")
454 "CC := gcc\n"))))
455 (replace 'install
456 (lambda* (#:key outputs #:allow-other-keys)
457 (let* ((out (assoc-ref outputs "out"))
458 (bin (string-append out "/bin")))
459 (install-file "mpc123" bin)))))
460 #:tests? #f))
461 (native-inputs
462 `(("gettext" ,gettext-minimal)))
463 (inputs
464 `(("libao" ,ao)
465 ("libmpcdec" ,libmpcdec)))
466 (home-page "https://github.com/bucciarati/mpc123")
467 (synopsis "Audio player for Musepack-formatted files")
468 (description
469 "Mpc123 is a command-line player for files in the Musepack audio
470 compression format (.mpc files).")
471 (license license:gpl2+)))
472
473 (define-public eyed3
474 (package
475 (name "eyed3")
476 (version "0.8.11")
477 (source
478 (origin
479 (method url-fetch)
480 (uri (pypi-uri "eyeD3" version))
481 (sha256
482 (base32 "1347mhjysbdpmmvdqm6lhskdw0qj9vjdn4n172ffnz958adrnk0f"))))
483 (build-system python-build-system)
484 (arguments
485 `(#:tests? #f)) ; the required test data contains copyrighted material
486 (propagated-inputs
487 `(("python-grako" ,python-grako)
488 ("python-magic" ,python-magic)
489 ("python-pathlib" ,python-pathlib)
490 ("python-six" ,python-six)))
491 (synopsis "MP3 tag ID3 metadata editor")
492 (description "eyeD3 is a Python tool for working with audio files,
493 specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
494 command-line tool (eyeD3) and a Python library (import eyed3) that can be used
495 to write your own applications or plugins that are callable from the
496 command-line tool.")
497 (home-page "https://eyed3.readthedocs.io/en/latest/")
498 (license license:gpl2+)))
499
500 (define-public chromaprint
501 (package
502 (name "chromaprint")
503 (version "1.4.3")
504 (source (origin
505 (method url-fetch)
506 (uri (string-append
507 "https://github.com/acoustid/chromaprint/releases/download/v"
508 version "/chromaprint-" version ".tar.gz"))
509 (sha256
510 (base32
511 "10kz8lncal4s2rp2rqpgc6xyjp0jzcrihgkx7chf127vfs5n067a"))))
512 (build-system cmake-build-system)
513 (arguments
514 `(#:tests? #f ; tests require googletest *sources*
515 ;;#:configure-flags '("-DBUILD_TESTS=ON") ; for building the tests
516 #:configure-flags '("-DBUILD_TOOLS=ON") ; for fpcalc
517 #:test-target "check"))
518 (inputs
519 ;; requires one of FFmpeg (prefered), FFTW3 or vDSP
520 ;; use the same ffmpeg version as for acoustid-fingerprinter
521 `(("ffmpeg" ,ffmpeg)
522 ("boost" ,boost)))
523 (home-page "https://acoustid.org/chromaprint")
524 (synopsis "Audio fingerprinting library")
525 (description "Chromaprint is a library for calculating audio
526 fingerprints which are used by the Acoustid service. Its main purpose
527 is to provide an accurate identifier for record tracks.")
528 (license license:lgpl2.1+)))