gnu-maintenance: GNU updater no longer relies on FTP access.
[jackhill/guix/guix.git] / gnu / packages / video.scm
CommitLineData
39efcc9b 1;;; GNU Guix --- Functional package management for GNU
71ee51a0 2;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
945d985a 3;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
ca3f9952 4;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
cda163cd 5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
68b3627c 6;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
12f92e38 7;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
307ad140 8;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
63cd4d53 9;;; Copyright © 2015, 2016, 2017 Alex Vong <alexvong1995@gmail.com>
2b841707 10;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
3c8ba11a 11;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
ed6ba9cc 12;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
4df07622 13;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
3a44c7bb 14;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
fe047e13 15;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
590abe01 16;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
72fa6667 17;;; Copyright © 2017 Feng Shu <tumashu@163.com>
b8a31908 18;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
794223bc 19;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
b5b20bda 20;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
e0c40707 21;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
fa379a5b 22;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
2973ebf5 23;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
39efcc9b
AE
24;;;
25;;; This file is part of GNU Guix.
26;;;
27;;; GNU Guix is free software; you can redistribute it and/or modify it
28;;; under the terms of the GNU General Public License as published by
29;;; the Free Software Foundation; either version 3 of the License, or (at
30;;; your option) any later version.
31;;;
32;;; GNU Guix is distributed in the hope that it will be useful, but
33;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35;;; GNU General Public License for more details.
36;;;
37;;; You should have received a copy of the GNU General Public License
38;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
40(define-module (gnu packages video)
fe138965 41 #:use-module (ice-9 match)
08858812 42 #:use-module (srfi srfi-1)
ae0bdd81 43 #:use-module ((guix licenses) #:prefix license:)
e930c2a3 44 #:use-module (guix utils)
39efcc9b
AE
45 #:use-module (guix packages)
46 #:use-module (guix download)
38829eac 47 #:use-module (guix git-download)
d8841cc5 48 #:use-module (guix svn-download)
44726031 49 #:use-module (guix build-system cmake)
39efcc9b 50 #:use-module (guix build-system gnu)
0e74bb5b 51 #:use-module (guix build-system glib-or-gtk)
615215a5 52 #:use-module (guix build-system python)
1c1178cd 53 #:use-module (guix build-system waf)
3b02429c 54 #:use-module (gnu packages)
39efcc9b 55 #:use-module (gnu packages algebra)
72bfebf5 56 #:use-module (gnu packages audio)
f1044010 57 #:use-module (gnu packages autotools)
d5a748e8 58 #:use-module (gnu packages avahi)
38829eac 59 #:use-module (gnu packages base)
8dd6fc51 60 #:use-module (gnu packages bison)
2973ebf5 61 #:use-module (gnu packages boost)
d5a748e8 62 #:use-module (gnu packages cdrom)
2973ebf5 63 #:use-module (gnu packages check)
fe047e13 64 #:use-module (gnu packages cmake)
39efcc9b 65 #:use-module (gnu packages compression)
e0c40707 66 #:use-module (gnu packages cpp)
f464016d 67 #:use-module (gnu packages curl)
44726031 68 #:use-module (gnu packages databases)
3a44c7bb 69 #:use-module (gnu packages dejagnu)
2973ebf5 70 #:use-module (gnu packages docbook)
f22e0e26 71 #:use-module (gnu packages elf)
2973ebf5 72 #:use-module (gnu packages file)
8dd6fc51 73 #:use-module (gnu packages flex)
39efcc9b 74 #:use-module (gnu packages fontutils)
c161c22a 75 #:use-module (gnu packages freedesktop)
44726031
AE
76 #:use-module (gnu packages fribidi)
77 #:use-module (gnu packages gettext)
38829eac 78 #:use-module (gnu packages ghostscript)
d5a748e8
AE
79 #:use-module (gnu packages gl)
80 #:use-module (gnu packages glib)
2cd85cf9 81 #:use-module (gnu packages guile)
fe047e13 82 #:use-module (gnu packages gnome)
d5a748e8 83 #:use-module (gnu packages gnupg)
fe047e13 84 #:use-module (gnu packages gstreamer)
44726031 85 #:use-module (gnu packages gtk)
e55354b8 86 #:use-module (gnu packages image)
b5b20bda 87 #:use-module (gnu packages imagemagick)
d5a748e8
AE
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages lua)
fe047e13 90 #:use-module (gnu packages m4)
3a44c7bb 91 #:use-module (gnu packages man)
d5a748e8 92 #:use-module (gnu packages mp3)
4d94b93c 93 #:use-module (gnu packages ncurses)
6f6c8b65 94 #:use-module (gnu packages ocr)
39efcc9b
AE
95 #:use-module (gnu packages perl)
96 #:use-module (gnu packages pkg-config)
a7d94b54 97 #:use-module (gnu packages popt)
d5a748e8 98 #:use-module (gnu packages pulseaudio)
39efcc9b 99 #:use-module (gnu packages python)
d5a748e8 100 #:use-module (gnu packages qt)
2973ebf5 101 #:use-module (gnu packages ruby)
d5a748e8 102 #:use-module (gnu packages sdl)
2973ebf5
GG
103 #:use-module (gnu packages serialization)
104 #:use-module (gnu packages shells)
d5a748e8 105 #:use-module (gnu packages ssh)
6b2c6be0 106 #:use-module (gnu packages texinfo)
c426e61e 107 #:use-module (gnu packages textutils)
a7fd7b68 108 #:use-module (gnu packages tls)
d5a748e8 109 #:use-module (gnu packages version-control)
bb470bd3 110 #:use-module (gnu packages web)
fe047e13 111 #:use-module (gnu packages webkit)
794223bc 112 #:use-module (gnu packages wxwidgets)
ee3b55ea 113 #:use-module (gnu packages xdisorg)
54ff0b7d 114 #:use-module (gnu packages xiph)
d5a748e8
AE
115 #:use-module (gnu packages xml)
116 #:use-module (gnu packages xorg)
148585c2 117 #:use-module (gnu packages assembly))
39efcc9b 118
6b2c6be0
SB
119(define-public aalib
120 (package
121 (name "aalib")
122 (version "1.4rc5")
123 (source (origin
124 (method url-fetch)
de67e922
LF
125 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
126 version "/" name "-" version ".tar.gz"))
6b2c6be0
SB
127 (sha256
128 (base32
129 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
130 (build-system gnu-build-system)
131 (native-inputs
132 `(("makeinfo" ,texinfo)))
133 (inputs
134 `(("ncurses" ,ncurses)))
135 (arguments
c437922a 136 `(#:phases
6b2c6be0 137 (modify-phases %standard-phases
3a4de6b2 138 (replace 'configure
014cbde6 139 (lambda* (#:key build inputs outputs #:allow-other-keys)
6b2c6be0
SB
140 ;; This old `configure' script doesn't support
141 ;; variables passed as arguments.
142 (let ((out (assoc-ref outputs "out"))
143 (ncurses (assoc-ref inputs "ncurses")))
144 (setenv "CONFIG_SHELL" (which "bash"))
145 (zero? (system* "./configure"
146 (string-append "--prefix=" out)
014cbde6 147 (string-append "--build=" build)
c437922a
MW
148 ;; The ancient config.guess is unable to
149 ;; guess the host triplet on mips64el.
150 ,@(if (string=? "mips64el-linux"
151 (%current-system))
152 '("--host=mips64el-unknown-linux-gnu")
153 '())
64465558
EF
154 ;; The same is also true with aarch64.
155 ,@(if (string=? "aarch64-linux"
156 (%current-system))
157 '("--host=aarch64-unknown-linux-gnu")
158 '())
6b2c6be0
SB
159 (string-append "--with-ncurses="
160 ncurses)))))))))
161 (home-page "http://aa-project.sourceforge.net/aalib/")
162 (synopsis "ASCII-art library")
163 (description
164 "AA-lib is a low level gfx library which does not require graphics device.
165In fact, there is no graphical output possible. AA-lib replaces those
166old-fashioned output methods with powerful ascii-art renderer.")
167 (license license:lgpl2.0+)))
168
cda163cd
TUBK
169(define-public liba52
170 (package
171 (name "liba52")
172 (version "0.7.4")
173 (source (origin
174 (method url-fetch)
8c056935
TUBK
175 (uri (string-append
176 ;; A mirror://sourceforge URI doesn't work, presumably
177 ;; because the SourceForge project is misconfigured.
178 "http://liba52.sourceforge.net/files/a52dec-" version
179 ".tar.gz"))
cda163cd
TUBK
180 (sha256
181 (base32
23da88f6 182 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
fc1adab1
AK
183 (patches (search-patches "liba52-enable-pic.patch"
184 "liba52-set-soname.patch"
185 "liba52-use-mtune-not-mcpu.patch"
186 "liba52-link-with-libm.patch"))))
cda163cd 187 (build-system gnu-build-system)
23da88f6
MW
188 ;; XXX We need to run ./bootstrap because of the build system fixes above.
189 (native-inputs
190 `(("autoconf" ,autoconf)
191 ("automake" ,automake)
192 ("libtool" ,libtool)))
412a2422 193 (arguments `(#:configure-flags '("--enable-shared")
23da88f6
MW
194 #:phases
195 (modify-phases %standard-phases
196 ;; XXX We need to run ./bootstrap because of the build
197 ;; system fixes above.
198 (add-after
199 'unpack 'bootstrap
200 (lambda _ (zero? (system* "sh" "bootstrap")))))))
cda163cd
TUBK
201 (home-page "http://liba52.sourceforge.net/")
202 (synopsis "ATSC A/52 stream decoder")
203 (description "liba52 is a library for decoding ATSC A/52 streams. The
204A/52 standard is used in a variety of applications, including digital
205television and DVD. It is also known as AC-3.")
ae0bdd81 206 (license license:gpl2+)))
cda163cd 207
e0884109
MW
208(define-public libmpeg2
209 (package
210 (name "libmpeg2")
211 (version "0.5.1")
212 (source (origin
213 (method url-fetch)
214 ;; A mirror://sourceforge URI doesn't work, presumably
215 ;; because the SourceForge project is misconfigured.
216 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
217 name "-" version ".tar.gz"))
218 (sha256
219 (base32
220 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
221 (inputs
222 `(("libx11" ,libx11)
223 ("libxext" ,libxext)
224 ("libxv" ,libxv)
225 ("libsm" ,libsm)
226 ("libice" ,libice)
227 ("sdl" ,sdl)))
228 (build-system gnu-build-system)
229 (home-page "http://libmpeg2.sourceforge.net/")
230 (synopsis "MPEG1 and MPEG2 video decoder library")
231 (description
232 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
233 (license license:gpl2+)))
234
82712597
MW
235(define-public libx264
236 (package
237 (name "libx264")
715dd13d 238 (version "20170316-2245")
82712597
MW
239 (source (origin
240 (method url-fetch)
4ff71cac 241 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
82712597
MW
242 "x264-snapshot-" version ".tar.bz2"))
243 (sha256
244 (base32
715dd13d 245 "1s1nnvl3axz38sv4g09skijl6k9mbbngbb1nsh26w4dr2w2gyzad"))))
82712597
MW
246 (build-system gnu-build-system)
247 (native-inputs
248 `(("pkg-config" ,pkg-config)
249 ("yasm" ,yasm)))
250 ;; TODO: Add gpac input
251 (arguments
252 `(#:tests? #f ;no check target
253 #:configure-flags '("--enable-shared"
254 ;; Don't build the command-line program. If we
255 ;; want it later, we should do so in a different
256 ;; package to avoid a circular dependency (the x264
257 ;; program depends on ffmpeg and ffmpeg depends on
258 ;; libx264).
cb50d0c2
MW
259 "--disable-cli"
260
261 ;; On MIPS, we must pass "--disable-asm" or else
262 ;; configure fails after printing: "You specified a
263 ;; pre-MSA CPU in your CFLAGS. If you really want
264 ;; to run on such a CPU, configure with
265 ;; --disable-asm."
266 ,@(if (string-prefix? "mips"
267 (or (%current-target-system)
268 (%current-system)))
269 '("--disable-asm")
270 '()))))
4ff71cac 271 (home-page "https://www.videolan.org/developers/x264.html")
82712597
MW
272 (synopsis "H.264 video coding library")
273 (description "libx264 is an advanced encoding library for creating
274H.264 (MPEG-4 AVC) video streams.")
275 (license (list license:gpl2+ ;most files
276 license:isc ;common/x86/x86inc.asm
277 license:lgpl2.1+ ;extras/getopt.c
278 license:bsd-3 ;extras/inttypes.h
279 (license:non-copyleft ;extras/cl*.h
280 "file://extras/cl.h"
281 "See extras/cl.h in the distribution.")))))
282
2973ebf5
GG
283(define-public mkvtoolnix
284 (package
285 (name "mkvtoolnix")
286 (version "13.0.0")
287 (source
288 (origin
289 (method url-fetch)
290 (uri (string-append "https://mkvtoolnix.download/sources/"
291 name "-" version ".tar.xz"))
292 (sha256
293 (base32
294 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
295 (modules '((guix build utils)))
296 (snippet
297 '(begin
298 ;; Delete bundled libraries.
299 (for-each delete-file-recursively
300 '("lib/libebml"
301 "lib/libmatroska"
302 "lib/nlohmann-json"
303 "lib/pugixml"
304 "lib/utf8-cpp"))))))
305 (build-system gnu-build-system)
306 (inputs
307 `(("boost" ,boost)
308 ("bzip2" ,bzip2)
309 ("libebml" ,libebml)
310 ("flac" ,flac)
311 ("file" ,file)
312 ("libmatroska" ,libmatroska)
313 ("libogg" ,libogg)
314 ("libvorbis" ,libvorbis)
315 ("lzo" ,lzo)
316 ("pugixml" ,pugixml)
317 ("qt" ,qt)
318 ("utfcpp" ,utfcpp)
319 ("zlib" ,zlib)))
320 (native-inputs
321 `(("docbook-xsl" ,docbook-xsl)
322 ("gettext" ,gettext-minimal)
323 ("googletest" ,googletest)
324 ("libxslt" ,libxslt)
325 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
326 ("perl" ,perl)
327 ("pkg-config" ,pkg-config)
328 ("po4a" ,po4a)
329 ("ruby" ,ruby)))
330 (arguments
331 `(#:configure-flags
332 (list (string-append "--with-boost="
333 (assoc-ref %build-inputs "boost"))
334 (string-append "--with-docbook-xsl-root="
335 (assoc-ref %build-inputs "docbook-xsl")
336 "/xml/xsl/docbook-xsl-"
337 ,(package-version docbook-xsl))
338 (string-append "--with-extra-includes="
339 (assoc-ref %build-inputs "nlohmann-json-cpp")
340 "/include/nlohmann"))
341 #:phases
342 (modify-phases %standard-phases
343 (add-before 'configure 'add-googletest
344 (lambda _
345 (symlink
346 (string-append (assoc-ref %build-inputs "googletest")
347 "/include/gtest") "lib/gtest")
348 #t))
349 (replace 'build
350 (lambda _
351 (let ((-j (list "-j" (number->string (parallel-job-count)))))
352 (zero? (apply system* "rake" -j)))))
353 (replace 'check
354 (lambda _
355 (zero? (system* "rake" "tests/unit"))))
356 (replace 'install
357 (lambda _
358 (zero? (system* "rake" "install")))))))
359 (home-page "https://mkvtoolnix.download")
360 (synopsis "Tools to create, alter and inspect Matroska files")
361 (description
362 "MKVToolNix provides tools for getting information about Matroska files
363(@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
364and creating Matroska files from other media files (@code{mkvmerge}).")
365 (license license:gpl2)))
366
7bc7ffc2
EF
367(define-public x265
368 (package
369 (name "x265")
cfa7473c 370 (version "2.4")
7bc7ffc2
EF
371 (source
372 (origin
373 (method url-fetch)
374 (uri (string-append "https://download.videolan.org/videolan/x265/"
375 "x265_" version ".tar.gz"))
376 (sha256
377 (base32
cfa7473c 378 "0afp0xlk0fb4q6j4sh3hyvjnjccdp61sn21zg3fyqvwgswcafalw"))
7bc7ffc2
EF
379 (modules '((guix build utils)))
380 (snippet
381 '(delete-file-recursively "source/compat/getopt"))))
382 (build-system cmake-build-system)
383 (arguments
384 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
a160778c
EF
385 ;; Currently the source code doesn't check for aarch64
386 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
387 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
388 '())
7bc7ffc2
EF
389 #:phases
390 (modify-phases %standard-phases
391 (add-before 'configure 'prepare-build
392 (lambda _
393 (delete-file-recursively "build")
394 (chdir "source")
395 #t)))))
396 (home-page "http://x265.org/")
397 (synopsis "Library for encoding h.265/HEVC video streams")
398 (description "x265 is a H.265 / HEVC video encoder application library,
399designed to encode video or images into an H.265 / HEVC encoded bitstream.")
400 (license license:gpl2+)))
401
c426e61e
TUBK
402(define-public libass
403 (package
404 (name "libass")
6cb5476a 405 (version "0.13.7")
c426e61e
TUBK
406 (source (origin
407 (method url-fetch)
408 (uri (string-append
409 "https://github.com/libass/libass/releases/download/"
410 version "/libass-" version ".tar.xz"))
411 (sha256
412 (base32
6cb5476a 413 "17byv926w1mxn56n896sxvdq4m0yv1l7qbm688h6zr3nzgsyarbh"))))
c426e61e
TUBK
414 (build-system gnu-build-system)
415 (native-inputs
416 `(("pkg-config" ,pkg-config)
417 ("yasm" ,yasm)))
418 (propagated-inputs
419 `(("freetype" ,freetype)
420 ("fribidi" ,fribidi)
421 ("fontconfig" ,fontconfig)
422 ("harfbuzz" ,harfbuzz)
423 ("enca" ,enca)))
424 (home-page "https://github.com/libass/libass")
425 (synopsis "Subtitle rendering library for the ASS/SSA format")
426 (description "libass is a subtitle rendering library for the
427ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
ae0bdd81 428 (license license:isc)))
c426e61e 429
4d94b93c
TUBK
430(define-public libcaca
431 (package
432 (name "libcaca")
433 (version "0.99.beta19")
434 (source (origin
435 (method url-fetch)
436 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
437 version ".tar.gz"))
438 (sha256
439 (base32
440 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
441 (build-system gnu-build-system)
442 (native-inputs `(("pkg-config" ,pkg-config)))
443 (inputs
444 `(("freeglut" ,freeglut)
445 ("ftgl" ,ftgl)
43d51239 446 ("imlib2" ,imlib2)
4d94b93c
TUBK
447 ("libx11" ,libx11)
448 ("mesa" ,mesa)
449 ("ncurses" ,ncurses)
450 ("zlib" ,zlib)))
451 (home-page "http://caca.zoy.org/wiki/libcaca")
452 (synopsis "Colour ASCII-art library")
453 (description "libcaca is a graphics library that outputs text instead of
454pixels, so that it can work on older video cards or text terminals. It
455supports Unicode, 2048 colors, dithering of color images, and advanced text
456canvas operations.")
ae0bdd81 457 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
4d94b93c 458
3bfb78dc
TUBK
459(define-public libdca
460 (package
461 (name "libdca")
462 (version "0.0.5")
463 (source (origin
464 (method url-fetch)
465 (uri (string-append
b8a31908 466 "https://download.videolan.org/pub/videolan/libdca/"
3bfb78dc
TUBK
467 version "/libdca-" version ".tar.bz2"))
468 (sha256
469 (base32
470 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
471 (build-system gnu-build-system)
b8a31908 472 (home-page "https://www.videolan.org/developers/libdca.html")
3bfb78dc
TUBK
473 (synopsis "DTS Coherent Acoustics decoder")
474 (description "libdca is a library for decoding DTS Coherent Acoustics
475streams.")
ae0bdd81 476 (license license:gpl2+)))
3bfb78dc 477
99d4c455
TUBK
478(define-public libdv
479 (package
480 (name "libdv")
481 (version "1.0.0")
482 (source (origin
483 (method url-fetch)
484 (uri (string-append
de67e922
LF
485 "mirror://sourceforge/" name "/" name "/"
486 version "/" name "-" version ".tar.gz"))
99d4c455
TUBK
487 (sha256
488 (base32
489 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
490 (build-system gnu-build-system)
491 (native-inputs `(("pkg-config" ,pkg-config)))
492 (inputs `(("libxv" ,libxv)))
493 (home-page "http://libdv.sourceforge.net/")
494 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
495 (description "The Quasar DV codec (libdv) is a software codec for DV
496video, the encoding format used by most digital camcorders, typically those
497that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
498developed according to the official standards for DV video: IEC 61834 and
499SMPTE 314M.")
ae0bdd81 500 (license license:lgpl2.1+)))
99d4c455 501
15f1d02a
GG
502(define-public libmatroska
503 (package
504 (name "libmatroska")
505 (version "1.4.7")
506 (source
507 (origin
508 (method url-fetch)
509 (uri (string-append "https://dl.matroska.org/downloads/"
510 name "/" name "-" version ".tar.bz2"))
511 (sha256
512 (base32
513 "1yi5cnv13nhl27xyqayd5l3sf0j3swfj3apzibv71yg9pariwi26"))))
514 (build-system gnu-build-system)
515 (native-inputs
516 `(("pkg-config" ,pkg-config)))
517 (inputs
518 `(("libebml" ,libebml)))
519 (home-page "https://www.matroska.org")
520 (synopsis "C++ libary to parse Matroska files (.mkv and .mka)")
521 (description
522 "Matroska aims to become the standard of multimedia container formats.
523It is based on EBML (Extensible Binary Meta Language), a binary derivative
524of XML. EBML enables the Matroska Development Team to gain significant
525advantages in terms of future format extensibility, without breaking file
526support in old parsers.
527libebml is a C++ library to read and write EBML files.")
528 (license license:lgpl2.1)))
529
ee3b55ea
TUBK
530(define-public libva
531 (package
532 (name "libva")
f3fc65f9 533 (version "1.8.2")
ee3b55ea
TUBK
534 (source
535 (origin
536 (method url-fetch)
537 (uri (string-append
5cc3096c 538 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
ee3b55ea
TUBK
539 version".tar.bz2"))
540 (sha256
f3fc65f9 541 (base32 "1pnfl3q7dzxs26l3jk9xi97gr0qwnaz6dhvf9ifp2yplr3fy7lwy"))))
ee3b55ea
TUBK
542 (build-system gnu-build-system)
543 (native-inputs
544 `(("pkg-config" ,pkg-config)))
545 (inputs
546 `(("libdrm" ,libdrm)
547 ("libx11" ,libx11)
548 ("libxext" ,libxext)
549 ("libxfixes" ,libxfixes)
550 ("mesa" ,mesa)))
372cf039
TUBK
551 (arguments
552 `(#:phases
553 (modify-phases %standard-phases
554 (add-before
555 'build 'fix-dlopen-paths
556 (lambda* (#:key outputs #:allow-other-keys)
557 (let ((out (assoc-ref outputs "out")))
558 (substitute* "va/drm/va_drm_auth_x11.c"
559 (("\"libva-x11\\.so\\.%d\"")
560 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
561 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
562 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
563 #:configure-flags
564 (list (string-append "--with-drivers-path="
565 (assoc-ref %build-inputs "mesa") "/lib/dri"))
566 ;; However, we can't write to mesa's store directory, so override the
567 ;; following make variable to install the dummy driver to libva's
568 ;; $prefix/lib/dri directory.
569 #:make-flags
570 (list (string-append "dummy_drv_video_ladir="
571 (assoc-ref %outputs "out") "/lib/dri"))))
5c1c2254 572 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
ee3b55ea
TUBK
573 (synopsis "Video acceleration library")
574 (description "The main motivation for VA-API (Video Acceleration API) is
575to enable hardware accelerated video decode/encode at various
576entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
577standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
ae0bdd81 578 (license license:expat)))
ee3b55ea 579
39efcc9b
AE
580(define-public ffmpeg
581 (package
582 (name "ffmpeg")
c918773a 583 (version "3.3.3")
39efcc9b
AE
584 (source (origin
585 (method url-fetch)
a1121a7f
EF
586 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
587 version ".tar.xz"))
39efcc9b
AE
588 (sha256
589 (base32
c918773a 590 "07is8msrhxr1dk6vgwa192k2pl2a0in1h9w8f9cknlvbvhn01afj"))))
39efcc9b
AE
591 (build-system gnu-build-system)
592 (inputs
c4c4cc05 593 `(("fontconfig" ,fontconfig)
39efcc9b 594 ("freetype" ,freetype)
c8dab7f4 595 ("gnutls" ,gnutls)
e816b348 596 ("opus" ,opus)
71241192 597 ("ladspa" ,ladspa)
d4f12db8 598 ("lame" ,lame)
c426e61e 599 ("libass" ,libass)
5d3609e4 600 ("libbluray" ,libbluray)
4d94b93c 601 ("libcaca" ,libcaca)
cc6c0170 602 ("libcdio-paranoia" ,libcdio-paranoia)
39efcc9b 603 ("libtheora" ,libtheora)
bb3df15e 604 ("libva" ,libva)
f88f0d20 605 ("libvdpau" ,libvdpau)
39efcc9b 606 ("libvorbis" ,libvorbis)
dc55b8b2 607 ("libvpx" ,libvpx)
f88f0d20 608 ("libx11" ,libx11)
549381d6 609 ("libx264" ,libx264)
f88f0d20 610 ("mesa" ,mesa)
71241192 611 ("openal" ,openal)
71241192 612 ("pulseaudio" ,pulseaudio)
85bc5434 613 ("sdl" ,sdl2)
72bfebf5 614 ("soxr" ,soxr)
c4c4cc05 615 ("speex" ,speex)
72bfebf5 616 ("twolame" ,twolame)
d505801a 617 ("x265" ,x265)
67932f86 618 ("xvid" ,xvid)
b3546174 619 ("zlib" ,zlib)))
c4c4cc05
JD
620 (native-inputs
621 `(("bc" ,bc)
39efcc9b
AE
622 ("perl" ,perl)
623 ("pkg-config" ,pkg-config)
824d9dc3 624 ("texinfo" ,texinfo)
39efcc9b
AE
625 ("python" ,python-2) ; scripts use interpreter python2
626 ("speex" ,speex)
c4c4cc05 627 ("yasm" ,yasm)))
39efcc9b 628 (arguments
31f9322e 629 `(#:test-target "fate"
12f92e38
AP
630 #:configure-flags
631 ;; possible additional inputs:
632 ;; --enable-avisynth enable reading of AviSynth script
633 ;; files [no]
634 ;; --enable-frei0r enable frei0r video filtering
635 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
636 ;; --enable-libcelt enable CELT decoding via libcelt [no]
637 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
638 ;; and libraw1394 [no]
639 ;; --enable-libfaac enable AAC encoding via libfaac [no]
640 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
641 ;; --enable-libflite enable flite (voice synthesis) support via
642 ;; libflite [no]
643 ;; --enable-libgme enable Game Music Emu via libgme [no]
644 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
645 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
646 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
647 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
648 ;; --enable-libnut enable NUT (de)muxing via libnut,
649 ;; native (de)muxer exists [no]
650 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
651 ;; libopencore-amrnb [no]
652 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
653 ;; libopencore-amrwb [no]
654 ;; --enable-libopencv enable video filtering via libopencv [no]
655 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
656 ;; OpenJPEG [no]
657 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
658 ;; --enable-libschroedinger enable Dirac de/encoding via
659 ;; libschroedinger [no]
660 ;; --enable-libshine enable fixed-point MP3 encoding via
661 ;; libshine [no]
662 ;; --enable-libssh enable SFTP protocol via libssh [no]
663 ;; (libssh2 does not work)
664 ;; --enable-libstagefright-h264 enable H.264 decoding via
665 ;; libstagefright [no]
666 ;; --enable-libutvideo enable Ut Video encoding and decoding via
667 ;; libutvideo [no]
668 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
669 ;; --enable-libvidstab enable video stabilization using
670 ;; vid.stab [no]
671 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
672 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
673 ;; libvo-amrwbenc [no]
674 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
675 ;; --enable-libxavs enable AVS encoding via xavs [no]
676 ;; --enable-libzmq enable message passing via libzmq [no]
677 ;; --enable-libzvbi enable teletext support via libzvbi [no]
678 ;; --enable-opencl enable OpenCL code
12f92e38
AP
679 '("--enable-avresample"
680 "--enable-gpl" ; enable optional gpl licensed parts
681 "--enable-shared"
682 "--enable-fontconfig"
c8dab7f4 683 "--enable-gnutls"
12f92e38
AP
684 "--enable-ladspa"
685 "--enable-libass"
686 "--enable-libbluray"
687 "--enable-libcaca"
688 "--enable-libcdio"
689 "--enable-libfreetype"
690 "--enable-libmp3lame"
691 "--enable-libopus"
692 "--enable-libpulse"
12f92e38
AP
693 "--enable-libsoxr"
694 "--enable-libspeex"
695 "--enable-libtheora"
696 "--enable-libtwolame"
697 "--enable-libvorbis"
698 "--enable-libvpx"
699 "--enable-libxvid"
700 "--enable-libx264"
d505801a 701 "--enable-libx265"
12f92e38 702 "--enable-openal"
f88f0d20 703 "--enable-opengl"
12f92e38
AP
704
705 "--enable-runtime-cpudetect"
706
707 ;; Runtime cpu detection is not implemented on
708 ;; MIPS, so we disable some features.
709 "--disable-mips32r2"
c5e1fcd0 710 "--disable-mipsdsp"
12f92e38
AP
711 "--disable-mipsdspr2"
712 "--disable-mipsfpu")
31f9322e 713 #:phases
f2feb0ce
LC
714 (modify-phases %standard-phases
715 (replace
39efcc9b
AE
716 'configure
717 ;; configure does not work followed by "SHELL=..." and
718 ;; "CONFIG_SHELL=..."; set environment variables instead
719 (lambda* (#:key outputs configure-flags #:allow-other-keys)
720 (let ((out (assoc-ref outputs "out")))
721 (substitute* "configure"
47734a56 722 (("#! /bin/sh") (string-append "#!" (which "sh"))))
39efcc9b
AE
723 (setenv "SHELL" (which "bash"))
724 (setenv "CONFIG_SHELL" (which "bash"))
12f92e38
AP
725 (zero? (apply system*
726 "./configure"
727 (string-append "--prefix=" out)
728 ;; Add $libdir to the RUNPATH of all the binaries.
729 (string-append "--extra-ldflags=-Wl,-rpath="
730 out "/lib")
731 configure-flags)))))
457e528e
LC
732 (add-before
733 'check 'set-ld-library-path
734 (lambda _
735 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
736 ;; running tests.
737 (let* ((dso (find-files "." "\\.so$"))
738 (path (string-join (map dirname dso) ":")))
739 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
740 (setenv "LD_LIBRARY_PATH" path)
27350ef8 741 #t))))))
702bfbf1 742 (home-page "https://www.ffmpeg.org/")
39efcc9b
AE
743 (synopsis "Audio and video framework")
744 (description "FFmpeg is a complete, cross-platform solution to record,
745convert and stream audio and video. It includes the libavcodec
746audio/video codec library.")
ae0bdd81 747 (license license:gpl2+)))
d5a748e8 748
940778c7
LC
749(define-public ffmpeg-2.8
750 (package
751 (inherit ffmpeg)
47111bb3 752 (version "2.8.13")
940778c7
LC
753 (source (origin
754 (method url-fetch)
755 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
756 version ".tar.xz"))
757 (sha256
758 (base32
47111bb3 759 "0hyqr391pika4vgynv90bacz11wdpqcqfgj5h7g5jrmgvz6hgj68"))))
940778c7
LC
760 (arguments
761 (substitute-keyword-arguments (package-arguments ffmpeg)
762 ((#:configure-flags flags)
763 `(map (lambda (flag)
764 (if (string=? flag "--disable-mipsdsp")
765 "--disable-mipsdspr1"
766 flag))
767 ,flags))))))
768
d5a748e8
AE
769(define-public vlc
770 (package
771 (name "vlc")
dd13aa90 772 (version "2.2.6")
d5a748e8
AE
773 (source (origin
774 (method url-fetch)
775 (uri (string-append
a134cc8e 776 "https://download.videolan.org/pub/videolan/vlc/"
d5a748e8
AE
777 version "/vlc-" version ".tar.xz"))
778 (sha256
779 (base32
dd13aa90 780 "1a22b913p2227ljz89c4fgjlyln5gcz8z58w32r0wh4srnnd60y4"))))
d5a748e8
AE
781 (build-system gnu-build-system)
782 (native-inputs
2d2e97bd 783 `(("git" ,git) ; needed for a test
d5a748e8
AE
784 ("pkg-config" ,pkg-config)))
785 ;; FIXME: Add optional inputs once available.
786 (inputs
787 `(("alsa-lib" ,alsa-lib)
788 ("avahi" ,avahi)
789 ("dbus" ,dbus)
790 ("flac" ,flac)
b4dff935 791 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
d5a748e8
AE
792 ("fontconfig" ,fontconfig)
793 ("freetype" ,freetype)
794 ("gnutls" ,gnutls)
8824da4c 795 ("liba52" ,liba52)
d5a748e8 796 ("libcddb" ,libcddb)
72b6a894 797 ("libdvbpsi" ,libdvbpsi)
d5a748e8
AE
798 ("libgcrypt" ,libgcrypt)
799 ("libkate" ,libkate)
800 ("libmad" ,libmad)
801 ("libogg" ,libogg)
802 ("libpng" ,libpng)
803 ("libsamplerate" ,libsamplerate)
804 ("libssh2" ,libssh2)
805 ("libvorbis" ,libvorbis)
806 ("libtheora" ,libtheora)
807 ("libxext" ,libxext)
c161c22a 808 ("libxi" ,libxi)
d5a748e8
AE
809 ("libxinerama" ,libxinerama)
810 ("libxml2" ,libxml2)
811 ("libxpm" ,libxpm)
2aaa5729 812 ("livemedia-utils" ,livemedia-utils)
d5a748e8
AE
813 ("lua" ,lua-5.1)
814 ("mesa" ,mesa)
815 ("opus" ,opus)
816 ("perl" ,perl)
817 ("pulseaudio" ,pulseaudio)
818 ("python" ,python-wrapper)
552c3e95
MB
819 ("qtbase" ,qtbase)
820 ("qtx11extras" ,qtx11extras)
d5a748e8
AE
821 ("sdl" ,sdl)
822 ("sdl-image" ,sdl-image)
823 ("speex" ,speex)
8f5f6c92 824 ("x265" ,x265)
d5a748e8
AE
825 ("xcb-util-keysyms" ,xcb-util-keysyms)))
826 (arguments
827 `(#:configure-flags
eb1f2420 828 `("CXXFLAGS=-std=gnu++11"
d5a748e8
AE
829 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
830 (assoc-ref %build-inputs "ffmpeg")
cd76fbde
LC
831 "/lib")) ;needed for the tests
832
833 #:phases
834 (modify-phases %standard-phases
2d2e97bd 835 (add-after 'unpack 'patch-source
2aaa5729
CL
836 (lambda* (#:key inputs #:allow-other-keys)
837 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
2d2e97bd 838 (substitute* "configure"
2aaa5729
CL
839 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
840 (string-append "LIVE555_PREFIX=" livemedia-utils)))
2d2e97bd
MB
841 ;; Some of the tests require using the display to test out VLC,
842 ;; which fails in our sandboxed build system
843 (substitute* "test/run_vlc.sh"
844 (("./vlc --ignore-config") "echo"))
845 ;; XXX Likely not needed for >2.2.6.
846 (substitute* "modules/gui/qt4/components/interface_widgets.cpp"
847 (("<qx11info_x11.h>") "<QtX11Extras/qx11info_x11.h>"))
2aaa5729 848 #t)))
cd76fbde
LC
849 (add-after 'install 'regenerate-plugin-cache
850 (lambda* (#:key outputs #:allow-other-keys)
851 ;; The 'install-exec-hook' rule in the top-level Makefile.am
852 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
853 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
854 ;; it references. Thus, we first reset the timestamps of all
855 ;; these files, and then regenerate the cache such that the
856 ;; mtimes it includes are always zero instead of being dependent
857 ;; on the build time.
858 (let* ((out (assoc-ref outputs "out"))
859 (pkglibdir (string-append out "/lib/vlc"))
860 (plugindir (string-append pkglibdir "/plugins"))
861 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
862 ;; TODO: Factorize 'reset-timestamps'.
863 (for-each (lambda (file)
864 (let ((s (lstat file)))
865 (unless (eq? (stat:type s) 'symlink)
866 (utime file 0 0 0 0))))
867 (find-files plugindir))
868 (zero? (system* cachegen plugindir))))))))
d5a748e8
AE
869 (home-page "https://www.videolan.org/")
870 (synopsis "Audio and video framework")
871 (description "VLC is a cross-platform multimedia player and framework
872that plays most multimedia files as well as DVD, Audio CD, VCD, and various
873treaming protocols.")
ae0bdd81 874 (license license:gpl2+)))
ace69243
AE
875
876(define-public mplayer
877 (package
878 (name "mplayer")
e71b20e5 879 (version "1.3.0")
ace69243
AE
880 (source (origin
881 (method url-fetch)
882 (uri (string-append
ebde7c7a 883 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
ace69243
AE
884 version ".tar.xz"))
885 (sha256
886 (base32
e71b20e5 887 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
ace69243
AE
888 (build-system gnu-build-system)
889 ;; FIXME: Add additional inputs once available.
890 (native-inputs
891 `(("pkg-config" ,pkg-config)))
892 (inputs
893 `(("alsa-lib" ,alsa-lib)
894 ("cdparanoia" ,cdparanoia)
b3546174 895 ("ffmpeg" ,ffmpeg)
778a6a8b 896 ("fontconfig" ,fontconfig)
ace69243 897 ("freetype" ,freetype)
778a6a8b 898;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
ace69243 899 ("lame" ,lame)
778a6a8b 900 ("libass" ,libass)
b3546174
MW
901 ("libdvdcss" ,libdvdcss)
902 ("libdvdnav" ,libdvdnav)
ace69243 903 ("libjpeg" ,libjpeg)
778a6a8b
EF
904 ("libmpeg2" ,libmpeg2)
905 ("libmpg123" ,mpg123) ; audio codec for MP3
ace69243
AE
906 ("libpng" ,libpng)
907 ("libtheora" ,libtheora)
778a6a8b 908 ("libvdpau" ,libvdpau)
ace69243
AE
909 ("libvorbis" ,libvorbis)
910 ("libx11" ,libx11)
778a6a8b 911 ("libx264" ,libx264)
ace69243
AE
912 ("libxinerama" ,libxinerama)
913 ("libxv" ,libxv)
778a6a8b 914 ("libxxf86dga" ,libxxf86dga)
ace69243 915 ("mesa" ,mesa)
778a6a8b 916 ("opus" ,opus)
ace69243
AE
917 ("perl" ,perl)
918 ("pulseaudio" ,pulseaudio)
919 ("python" ,python-wrapper)
920 ("sdl" ,sdl)
921 ("speex" ,speex)
922 ("yasm" ,yasm)
923 ("zlib" ,zlib)))
924 (arguments
925 `(#:tests? #f ; no test target
926 #:phases
ebde7c7a
EF
927 (modify-phases %standard-phases
928 (replace 'configure
ace69243
AE
929 ;; configure does not work followed by "SHELL=..." and
930 ;; "CONFIG_SHELL=..."; set environment variables instead
931 (lambda* (#:key inputs outputs #:allow-other-keys)
932 (let ((out (assoc-ref outputs "out"))
933 (libx11 (assoc-ref inputs "libx11")))
934 (substitute* "configure"
2564b7c2 935 (("#! /bin/sh") (string-append "#!" (which "sh"))))
ace69243
AE
936 (setenv "SHELL" (which "bash"))
937 (setenv "CONFIG_SHELL" (which "bash"))
938 (zero? (system*
939 "./configure"
940 (string-append "--extra-cflags=-I"
941 libx11 "/include") ; to detect libx11
ebde7c7a 942 "--disable-ffmpeg_a" ; disables bundled ffmpeg
ace69243 943 (string-append "--prefix=" out)
fe138965
MW
944 ;; Enable runtime cpu detection where supported,
945 ;; and choose a suitable target.
946 ,@(match (or (%current-target-system)
947 (%current-system))
948 ("x86_64-linux"
949 '("--enable-runtime-cpudetection"
950 "--target=x86_64-linux"))
951 ("i686-linux"
952 '("--enable-runtime-cpudetection"
953 "--target=i686-linux"))
954 ("mips64el-linux"
f0d6d835
MW
955 '("--target=mips3-linux"))
956 (_ (list (string-append
957 "--target="
958 (or (%current-target-system)
959 (nix-system->gnu-triplet
960 (%current-system)))))))
ebde7c7a
EF
961 "--disable-iwmmxt"))))))))
962 (home-page "https://www.mplayerhq.hu/design7/news.html")
ace69243
AE
963 (synopsis "Audio and video player")
964 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
965Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
966NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
967SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
ae0bdd81 968 (license license:gpl2)))
d0ed39be 969
1c1178cd
TUBK
970(define-public mpv
971 (package
972 (name "mpv")
8016393e 973 (version "0.26.0")
1c1178cd
TUBK
974 (source (origin
975 (method url-fetch)
976 (uri (string-append
977 "https://github.com/mpv-player/mpv/archive/v" version
978 ".tar.gz"))
979 (sha256
980 (base32
8016393e 981 "0ihvnwrp24jjf43k1hvy8n8w4ipl4z7apjppd4i0y9jzilsyzwys"))
1c1178cd
TUBK
982 (file-name (string-append name "-" version ".tar.gz"))))
983 (build-system waf-build-system)
984 (native-inputs
832d60dc 985 `(("perl" ,perl) ; for zsh completion file
1c1178cd
TUBK
986 ("pkg-config" ,pkg-config)
987 ("python-docutils" ,python-docutils)))
81c29ccc 988 ;; Missing features: libguess, Wayland, V4L2
1c1178cd
TUBK
989 (inputs
990 `(("alsa-lib" ,alsa-lib)
991 ("enca" ,enca)
992 ("ffmpeg" ,ffmpeg)
2d8781a4 993 ("jack" ,jack-1)
1c1178cd
TUBK
994 ("ladspa" ,ladspa)
995 ("lcms" ,lcms)
996 ("libass" ,libass)
997 ("libbluray" ,libbluray)
998 ("libcaca" ,libcaca)
999 ("libbs2b" ,libbs2b)
1000 ("libcdio-paranoia" ,libcdio-paranoia)
1001 ("libdvdread" ,libdvdread)
1002 ("libdvdnav" ,libdvdnav)
1003 ("libjpeg" ,libjpeg)
1004 ("libva" ,libva)
81c29ccc 1005 ("libvdpau" ,libvdpau)
1c1178cd
TUBK
1006 ("libx11" ,libx11)
1007 ("libxext" ,libxext)
1008 ("libxinerama" ,libxinerama)
1009 ("libxrandr" ,libxrandr)
1010 ("libxscrnsaver" ,libxscrnsaver)
1011 ("libxv" ,libxv)
e66f0dd2
AP
1012 ;; XXX: lua > 5.2 is not currently supported; see
1013 ;; waftools/checks/custom.py
1014 ("lua" ,lua-5.2)
1c1178cd
TUBK
1015 ("mesa" ,mesa)
1016 ("mpg123" ,mpg123)
1017 ("pulseaudio" ,pulseaudio)
1018 ("rsound" ,rsound)
f0b8d83a 1019 ("waf" ,python-waf)
1c1178cd
TUBK
1020 ("youtube-dl" ,youtube-dl)
1021 ("zlib" ,zlib)))
1022 (arguments
1023 '(#:phases
1024 (modify-phases %standard-phases
1025 (add-before
f8503e2b 1026 'configure 'setup-waf
1c1178cd
TUBK
1027 (lambda* (#:key inputs #:allow-other-keys)
1028 (copy-file (assoc-ref inputs "waf") "waf")
599fd842 1029 (setenv "CC" "gcc"))))
98c8b963 1030 #:configure-flags (list "--enable-libmpv-shared"
43ba5dd4
EF
1031 "--enable-cdda"
1032 "--enable-dvdread"
1033 "--enable-dvdnav"
98c8b963
EF
1034 "--enable-zsh-comp"
1035 "--disable-build-date")
1c1178cd
TUBK
1036 ;; No check function defined.
1037 #:tests? #f))
581873b5 1038 (home-page "https://mpv.io/")
1c1178cd
TUBK
1039 (synopsis "Audio and video player")
1040 (description "mpv is a general-purpose audio and video player. It is a
1041fork of mplayer2 and MPlayer. It shares some features with the former
1042projects while introducing many more.")
ae0bdd81 1043 (license license:gpl2+)))
1c1178cd 1044
0e74bb5b
AG
1045(define-public gnome-mpv
1046 (package
1047 (name "gnome-mpv")
ba4e15ae 1048 (version "0.12")
0e74bb5b
AG
1049 (source
1050 (origin
1051 (method url-fetch)
1052 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1053 "/download/v" version "/gnome-mpv-" version
1054 ".tar.xz"))
1055 (sha256
1056 (base32
ba4e15ae 1057 "0dcnz9vlf791v8d15j7hpymv87h6nb15alww6xjq0zpal5hi44kc"))))
0e74bb5b
AG
1058 (native-inputs
1059 `(("intltool" ,intltool)
1060 ("pkg-config" ,pkg-config)))
1061 (inputs
1062 `(("gtk+" ,gtk+)
1063 ("libepoxy" ,libepoxy)
1064 ("mpv" ,mpv)))
1065 (build-system glib-or-gtk-build-system)
1066 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1067 (synopsis "GTK+ frontend for the mpv media player")
1068 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1069GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1070access to mpv's powerful playback capabilities.")
1071 (license license:gpl3+)))
1072
d0ed39be
DT
1073(define-public libvpx
1074 (package
1075 (name "libvpx")
65064909 1076 (version "1.6.1")
d0ed39be
DT
1077 (source (origin
1078 (method url-fetch)
723e8866
MW
1079 (uri (string-append "http://storage.googleapis.com/"
1080 "downloads.webmproject.org/releases/webm/"
1081 name "-" version ".tar.bz2"))
d0ed39be
DT
1082 (sha256
1083 (base32
65064909 1084 "06d8hqjkfs6wl45qf4pwh1kpbvkx6cwywd5y8d4lgagvjwm0qb0w"))
c7c49446 1085 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
d0ed39be
DT
1086 (build-system gnu-build-system)
1087 (arguments
0e47b4e7
EF
1088 `(#:phases
1089 (modify-phases %standard-phases
1090 (replace 'configure
1091 (lambda* (#:key outputs #:allow-other-keys)
1092 (setenv "CONFIG_SHELL" (which "bash"))
1093 (let ((out (assoc-ref outputs "out")))
1094 (setenv "LDFLAGS"
1095 (string-append "-Wl,-rpath=" out "/lib"))
1096 (zero? (system* "./configure"
1097 "--enable-shared"
1098 "--as=yasm"
1099 ;; Limit size to avoid CVE-2015-1258
1100 "--size-limit=16384x16384"
1101 (string-append "--prefix=" out)))))))
4f8f15cd 1102 #:tests? #f)) ; no check target
d0ed39be
DT
1103 (native-inputs
1104 `(("perl" ,perl)
1105 ("yasm" ,yasm)))
1106 (synopsis "VP8/VP9 video codec")
1107 (description "libvpx is a codec for the VP8/VP9 video compression format.")
ae0bdd81 1108 (license license:bsd-3)
d0ed39be 1109 (home-page "http://www.webmproject.org/")))
615215a5
LC
1110
1111(define-public youtube-dl
1112 (package
1113 (name "youtube-dl")
33fd32c2 1114 (version "2017.09.02")
615215a5
LC
1115 (source (origin
1116 (method url-fetch)
39dc7032 1117 (uri (string-append "https://yt-dl.org/downloads/"
615215a5
LC
1118 version "/youtube-dl-"
1119 version ".tar.gz"))
1120 (sha256
1121 (base32
33fd32c2 1122 "1sfra8rfb7hkbgmw2n2s42fpkh0y7j9lyars7qda3rj34ai7r6k9"))))
615215a5 1123 (build-system python-build-system)
2ad9515c
AV
1124 (arguments
1125 ;; The problem here is that the directory for the man page and completion
1126 ;; files is relative, and for some reason, setup.py uses the
1127 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1128 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1129 ;; completion file is called 'youtube-dl' rather than
1130 ;; 'youtube-dl.bash-completion'.
31c58006
LF
1131 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1132 #:phases (modify-phases %standard-phases
2ad9515c
AV
1133 (add-before 'install 'fix-the-data-directories
1134 (lambda* (#:key outputs #:allow-other-keys)
1135 (let ((prefix (assoc-ref outputs "out")))
1136 (mkdir "bash-completion")
1137 (rename-file "youtube-dl.bash-completion"
1138 "bash-completion/youtube-dl")
1139 (substitute* "setup.py"
1140 (("youtube-dl\\.bash-completion")
1141 "bash-completion/youtube-dl")
1142 (("'etc/")
1143 (string-append "'" prefix "/etc/"))
1144 (("'share/")
1145 (string-append "'" prefix "/share/")))))))))
615215a5
LC
1146 (synopsis "Download videos from YouTube.com and other sites")
1147 (description
b798dfde 1148 "Youtube-dl is a small command-line program to download videos from
615215a5 1149YouTube.com and a few more sites.")
39dc7032 1150 (home-page "https://yt-dl.org")
ae0bdd81 1151 (license license:public-domain)))
e6bdb36a 1152
794223bc
CM
1153(define-public youtube-dl-gui
1154 (package
1155 (name "youtube-dl-gui")
1156 (version "0.3.8")
1157 (source
1158 (origin
1159 (method url-fetch)
1160 (uri (pypi-uri "Youtube-DLG" version))
1161 (sha256
1162 (base32
1163 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1164 (build-system python-build-system)
1165 (arguments
1166 ;; In Guix, wxpython has not yet been packaged for Python 3.
1167 `(#:python ,python-2
1168 ;; This package has no tests.
1169 #:tests? #f
1170 #:phases
1171 (modify-phases %standard-phases
1172 (add-before 'build 'patch-source
1173 (lambda* (#:key inputs #:allow-other-keys)
1174 ;; The youtube-dl-gui program lets you configure options. Some of
1175 ;; them are problematic, so we change their defaults.
1176 (substitute* "youtube_dl_gui/optionsmanager.py"
1177 ;; When this is true, the builder process will try (and fail) to
1178 ;; write logs to the builder user's home directory.
1179 (("'enable_log': True") "'enable_log': False")
1180 ;; This determines which youtube-dl program youtube-dl-gui will
1181 ;; run. If we don't set this, then youtube-dl-gui might download
1182 ;; an arbitrary copy from the Internet into the user's home
1183 ;; directory and run it, so let's make sure youtube-dl-gui uses
1184 ;; the youtube-dl from the inputs by default.
1185 (("'youtubedl_path': self.config_path")
1186 (string-append "'youtubedl_path': '"
1187 (assoc-ref inputs "youtube-dl")
1188 "/bin'"))
1189 ;; When this is True, when youtube-dl-gui is finished downloading
1190 ;; a file, it will try (and possibly fail) to open the directory
1191 ;; containing the downloaded file. This can fail because it
1192 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1193 ;; adding xdg-utils to the propagated inputs is not enough to
1194 ;; make this work, so for now we set the default to False.
1195 (("'open_dl_dir': True") "'open_dl_dir': False"))
1196 ;; The youtube-dl program from the inputs is actually a wrapper
1197 ;; script written in bash, so attempting to invoke it as a python
1198 ;; script will fail.
1199 (substitute* "youtube_dl_gui/downloaders.py"
1200 (("cmd = \\['python', self\\.youtubedl_path\\]")
1201 "cmd = [self.youtubedl_path]"))
1202 ;; Use relative paths for installing data files so youtube-dl-gui
1203 ;; installs the files relative to its prefix in the store, rather
1204 ;; than relative to /. Also, instead of installing data files into
1205 ;; $prefix/usr/share, install them into $prefix/share for
1206 ;; consistency (see: (standards) Directory Variables).
1207 (substitute* "setup.py"
1208 (("= '/usr/share") "= 'share"))
1209 ;; Update get_locale_file() so it finds the installed localization
1210 ;; files.
1211 (substitute* "youtube_dl_gui/utils.py"
1212 (("os\\.path\\.join\\('/usr', 'share'")
1213 (string-append "os.path.join('"
1214 (assoc-ref %outputs "out")
1215 "', 'share'"))))))))
1216 (inputs
1217 `(("python2-wxpython" ,python2-wxpython)
1218 ("youtube-dl" ,youtube-dl)))
1219 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1220 (synopsis
1221 "GUI (Graphical User Interface) for @command{youtube-dl}")
1222 (description
1223 "Youtube-dlG is a GUI (Graphical User Interface) for
1224@command{youtube-dl}. You can use it to download videos from YouTube and any
1225other site that youtube-dl supports.")
1226 (license license:unlicense)))
1227
72fa6667
FS
1228(define-public you-get
1229 (package
1230 (name "you-get")
90062885 1231 (version "0.4.803")
72fa6667
FS
1232 (source (origin
1233 (method url-fetch)
1234 (uri (string-append
e2155f58
FS
1235 "https://github.com/soimort/you-get/archive/v"
1236 version ".tar.gz"))
1237 (file-name (string-append name "-" version ".tar.gz"))
72fa6667
FS
1238 (sha256
1239 (base32
90062885 1240 "1rjy809x67dadzvj3midkhcda2kp6rqmbj6rbhjd5f16rvqgn7jp"))))
72fa6667
FS
1241 (build-system python-build-system)
1242 (arguments
1243 ;; no tests
1244 '(#:tests? #f))
1245 (inputs
1246 `(("ffmpeg" ,ffmpeg)))
1247 (synopsis "Download videos, audios, or images from Web sites")
1248 (description
1249 "You-Get is a command-line utility to download media contents (videos,
1250audio, images) from the Web. It can use either mpv or vlc for playback.")
1251 (home-page "https://you-get.org/")
1252 (license license:expat)))
1253
5d3609e4
TUBK
1254(define-public libbluray
1255 (package
1256 (name "libbluray")
d76e2634 1257 (version "1.0.1")
5d3609e4
TUBK
1258 (source (origin
1259 (method url-fetch)
5e3f68e6 1260 (uri (string-append "https://download.videolan.org/videolan/"
5d3609e4
TUBK
1261 name "/" version "/"
1262 name "-" version ".tar.bz2"))
1263 (sha256
1264 (base32
d76e2634 1265 "0fl5cxfj870rwqmmz3s04wh7wnabb7rnynfj1v3sz37ln8frm7qg"))))
5d3609e4 1266 (build-system gnu-build-system)
6c0cd765 1267 (arguments
d76e2634 1268 `(#:configure-flags '("--disable-bdjava-jar")
6c0cd765
AP
1269 #:phases
1270 (modify-phases %standard-phases
1271 (add-before 'build 'fix-dlopen-paths
1272 (lambda* (#:key inputs #:allow-other-keys)
1273 (let ((libaacs (assoc-ref inputs "libaacs"))
1274 (libbdplus (assoc-ref inputs "libbdplus")))
1275 (substitute* "src/libbluray/disc/aacs.c"
1276 (("\"libaacs\"")
1277 (string-append "\"" libaacs "/lib/libaacs\"")))
1278 (substitute* "src/libbluray/disc/bdplus.c"
1279 (("\"libbdplus\"")
1280 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1281 #t))))))
2da45ebe 1282 (native-inputs `(("pkg-config" ,pkg-config)))
5d3609e4 1283 (inputs
71ee51a0 1284 `(("fontconfig" ,fontconfig)
5d3609e4 1285 ("freetype" ,freetype)
6c0cd765
AP
1286 ("libaacs" ,libaacs)
1287 ("libbdplus" ,libbdplus)
71ee51a0 1288 ("libxml2" ,libxml2)))
5e3f68e6 1289 (home-page "https://www.videolan.org/developers/libbluray.html")
5d3609e4
TUBK
1290 (synopsis "Blu-Ray Disc playback library")
1291 (description
1292 "libbluray is a library designed for Blu-Ray Disc playback for media
1293players, like VLC or MPlayer.")
ae0bdd81 1294 (license license:lgpl2.1+)))
5d3609e4 1295
e6bdb36a
AE
1296(define-public libdvdread
1297 (package
1298 (name "libdvdread")
9aebf330 1299 (version "5.0.3")
e6bdb36a
AE
1300 (source (origin
1301 (method url-fetch)
b8a31908 1302 (uri (string-append "https://download.videolan.org/videolan/"
e6bdb36a
AE
1303 name "/" version "/"
1304 name "-" version ".tar.bz2"))
1305 (sha256
1306 (base32
9aebf330 1307 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
e6bdb36a
AE
1308 (build-system gnu-build-system)
1309 (home-page "http://dvdnav.mplayerhq.hu/")
1310 (synopsis "Library for reading video DVDs")
1311 (description
1312 "Libdvdread provides a simple foundation for reading DVD video
1313disks. It provides the functionality that is required to access many
1314DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1315authentication and descrambling (if an external libdvdcss library is
1316installed).")
ae0bdd81 1317 (license license:gpl2+)))
b027d919 1318
b5b20bda
TD
1319(define-public dvdauthor
1320 (package
1321 (name "dvdauthor")
1322 (version "0.7.2")
1323 (source
1324 (origin
1325 (method url-fetch)
1326 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1327 version ".tar.gz"))
1328 (sha256
1329 (base32
1330 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1331 (build-system gnu-build-system)
1332 (inputs
1333 `(("libdvdread" ,libdvdread)
1334 ("libpng" ,libpng)
1335 ("imagemagick" ,imagemagick)
1336 ("libxml2" ,libxml2)
1337 ("freetype" ,freetype)))
1338 (native-inputs
1339 `(("pkg-config" ,pkg-config)))
1340 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1341 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1342MPEG-2 stream containing VOB packets.")
1343 (home-page "http://dvdauthor.sourceforge.net")
1344 (license license:gpl3+)))
1345
b027d919
AE
1346(define-public libdvdnav
1347 (package
1348 (name "libdvdnav")
734976b6 1349 (version "5.0.3")
b027d919
AE
1350 (source (origin
1351 (method url-fetch)
b8a31908 1352 (uri (string-append "https://download.videolan.org/videolan/"
b027d919
AE
1353 name "/" version "/"
1354 name "-" version ".tar.bz2"))
1355 (sha256
1356 (base32
734976b6 1357 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
b027d919
AE
1358 (build-system gnu-build-system)
1359 (native-inputs
1360 `(("pkg-config" ,pkg-config)))
1361 (inputs
1362 `(("libdvdread" ,libdvdread)))
1363 (home-page "http://dvdnav.mplayerhq.hu/")
1364 (synopsis "Library for video DVD navigation features")
1365 (description
1366 "Libdvdnav is a library for developers of multimedia
1367applications. It allows easy use of sophisticated DVD navigation features
1368such as DVD menus, multiangle playback and even interactive DVD games. All
1369this functionality is provided through a simple API which provides the DVD
1370playback as a single logical stream of blocks, intermitted by special
1371dvdnav events to report certain conditions. The main usage of libdvdnav is
1372a loop regularly calling a function to get the next block, surrounded by
1373additional calls to tell the library of user interaction. The whole
1374DVD virtual machine and internal playback states are completely
1375encapsulated.")
ae0bdd81 1376 (license license:gpl2+)))
2cd85cf9 1377
f1044010
TUBK
1378(define-public libdvdnav-4
1379 (package
1380 (inherit libdvdnav)
1381 (version "4.2.1")
1382 (source (origin
1383 (method url-fetch)
1384 (uri
1385 (string-append
b8a31908 1386 "https://download.videolan.org/videolan/libdvdnav/libdvdnav-"
f1044010
TUBK
1387 version ".tar.xz"))
1388 (sha256
1389 (base32
1390 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1391 (native-inputs
1392 `(("pkg-config" ,pkg-config)
1393 ("autoconf" ,autoconf)
1394 ("automake" ,automake)
1395 ("libtool" ,libtool)))
1396 (arguments
1397 '(#:phases
1398 (alist-cons-after
1399 'unpack 'autoreconf
1400 (lambda _
1401 (zero? (system* "autoreconf" "-vif")))
1402 %standard-phases)))))
1403
a6f710ec
TUBK
1404(define-public libdvdcss
1405 (package
1406 (name "libdvdcss")
98416109 1407 (version "1.4.0")
a6f710ec
TUBK
1408 (source (origin
1409 (method url-fetch)
b8a31908 1410 (uri (string-append "https://download.videolan.org/pub/"
a6f710ec
TUBK
1411 name "/" version "/"
1412 name "-" version ".tar.bz2"))
1413 (sha256
1414 (base32
98416109 1415 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
a6f710ec 1416 (build-system gnu-build-system)
b8a31908 1417 (home-page "https://www.videolan.org/developers/libdvdcss.html")
a6f710ec
TUBK
1418 (synopsis "Library for accessing DVDs as block devices")
1419 (description
1420 "libdvdcss is a simple library designed for accessing DVDs like a block
1421device without having to bother about the decryption.")
ae0bdd81 1422 (license license:gpl2+)))
a6f710ec 1423
2cd85cf9
DT
1424(define-public srt2vtt
1425 (package
1426 (name "srt2vtt")
1427 (version "0.1")
1428 (source (origin
1429 (method url-fetch)
1430 (uri (string-append
152fc959 1431 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2cd85cf9
DT
1432 version ".tar.gz"))
1433 (sha256
1434 (base32
1435 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1436 (build-system gnu-build-system)
1437 (inputs
1438 `(("guile" ,guile-2.0)))
1439 (synopsis "SubRip to WebVTT subtitle converter")
1440 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1441for use with HTML5 video.")
1442 (home-page "http://dthompson.us/pages/software/srt2vtt")
ae0bdd81 1443 (license license:gpl3+)))
44726031
AE
1444
1445(define-public avidemux
1446 (package
1447 (name "avidemux")
9e786e8b 1448 (version "2.6.12")
44726031
AE
1449 (source (origin
1450 (method url-fetch)
1451 (uri (string-append
de67e922
LF
1452 "mirror://sourceforge/" name "/" name "/" version "/"
1453 name "_" version ".tar.gz"))
44726031
AE
1454 (sha256
1455 (base32
9e786e8b 1456 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
fc1adab1 1457 (patches (search-patches "avidemux-install-to-lib.patch"))))
44726031
AE
1458 (build-system cmake-build-system)
1459 (native-inputs
1460 `(("pkg-config" ,pkg-config)))
1461 ;; FIXME: Once packaged, add libraries not found during the build.
1462 (inputs
1463 `(("alsa-lib" ,alsa-lib)
1464 ("fontconfig" ,fontconfig)
1465 ("freetype" ,freetype)
1466 ("fribidi" ,fribidi)
1467 ("glu" ,glu)
44726031
AE
1468 ("jack" ,jack-1)
1469 ("lame" ,lame)
4cafe8ad
EF
1470 ("libva" ,libva)
1471 ("libvdpau" ,libvdpau)
44726031
AE
1472 ("libvorbis" ,libvorbis)
1473 ("libvpx" ,libvpx)
1474 ("libxv" ,libxv)
1475 ("perl" ,perl)
1476 ("pulseaudio" ,pulseaudio)
1477 ("python" ,python-wrapper)
a2c24bf5
DC
1478 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1479 ;("qtbase" ,qtbase) with -std=gnu++11.
1480 ;("qttools" ,qttools)
44726031
AE
1481 ("sdl" ,sdl)
1482 ("sqlite" ,sqlite)
1483 ("yasm" ,yasm)
1484 ("zlib" ,zlib)))
1485 (arguments
1486 `(#:tests? #f ; no check target
1487 #:phases
1488 ;; Make sure files inside the included ffmpeg tarball are
1489 ;; patch-shebanged.
1898900f
EF
1490 (modify-phases %standard-phases
1491 (add-before 'patch-source-shebangs 'unpack-ffmpeg
44726031
AE
1492 (lambda _
1493 (with-directory-excursion "avidemux_core/ffmpeg_package"
1898900f
EF
1494 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1495 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1496 (add-after 'patch-source-shebangs 'repack-ffmpeg
44726031
AE
1497 (lambda _
1498 (with-directory-excursion "avidemux_core/ffmpeg_package"
9e786e8b 1499 (substitute* "ffmpeg-2.7.6/configure"
2fed4042 1500 (("#! /bin/sh") (string-append "#!" (which "sh"))))
9e786e8b 1501 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
c09e6a5f 1502 ;; avoid non-determinism in the archive
92226a47
MW
1503 "--sort=name" "--mtime=@0"
1504 "--owner=root:0" "--group=root:0")
1898900f
EF
1505 (delete-file-recursively "ffmpeg-2.7.6"))))
1506 (replace 'configure
1507 (lambda _
1508 ;; Copy-paste settings from the cmake build system.
1509 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1510 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1511 (replace 'build
1512 (lambda* (#:key inputs outputs #:allow-other-keys)
1513 (let*
1514 ((out (assoc-ref outputs "out"))
1515 (lib (string-append out "/lib"))
1516 (top (getcwd))
1517 (sdl (assoc-ref inputs "sdl"))
1518 (build_component
1519 (lambda* (component srcdir #:optional (args '()))
1520 (let ((builddir (string-append "build_" component)))
1521 (mkdir builddir)
1522 (with-directory-excursion builddir
1523 (zero?
1524 (and
44726031
AE
1525 (apply system* "cmake"
1526 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1527 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1528 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
c687f731
AE
1529 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1530 "\"-Wl,-rpath=" lib "\"")
44726031
AE
1531 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1532 (string-append "-DSDL_INCLUDE_DIR="
1533 sdl "/include/SDL")
1534 (string-append "../" srcdir)
aab56ab7 1535 "-DENABLE_QT5=True"
44726031 1536 args)
1898900f
EF
1537 (system* "make" "-j"
1538 (number->string (parallel-job-count)))
1539 (system* "make" "install"))))))))
1540 (mkdir out)
1541 (and (build_component "core" "avidemux_core")
1542 (build_component "cli" "avidemux/cli")
1543 (build_component "qt4" "avidemux/qt4")
1544 (build_component "plugins_common" "avidemux_plugins"
1545 '("-DPLUGIN_UI=COMMON"))
1546 (build_component "plugins_cli" "avidemux_plugins"
1547 '("-DPLUGIN_UI=CLI"))
1548 (build_component "plugins_qt4" "avidemux_plugins"
1549 '("-DPLUGIN_UI=QT4"))
1550 (build_component "plugins_settings" "avidemux_plugins"
1551 '("-DPLUGIN_UI=SETTINGS")))
1552 ;; Remove .exe and .dll file.
1553 (delete-file-recursively
1554 (string-append out "/share/ADM6_addons")))))
1555 (delete 'install))))
44726031
AE
1556 (home-page "http://fixounet.free.fr/avidemux/")
1557 (synopsis "Video editor")
1558 (description "Avidemux is a video editor designed for simple cutting,
1559filtering and encoding tasks. It supports many file types, including AVI,
1560DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1561can be automated using projects, job queue and powerful scripting
1562capabilities.")
afd9ed5c 1563 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
44726031 1564 ;; Software with various licenses is included, see License.txt.
ae0bdd81 1565 (license license:gpl2+)))
44726031 1566
6f6c8b65
TUBK
1567(define-public vapoursynth
1568 (package
1569 (name "vapoursynth")
4f7a9e0b 1570 (version "37")
6f6c8b65
TUBK
1571 (source (origin
1572 (method url-fetch)
1573 (uri (string-append
1574 "https://github.com/vapoursynth/vapoursynth/archive/R"
1575 version ".tar.gz"))
0b37c4cd 1576 (file-name (string-append name "-" version ".tar.gz"))
6f6c8b65
TUBK
1577 (sha256
1578 (base32
4f7a9e0b 1579 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
6f6c8b65
TUBK
1580 (build-system gnu-build-system)
1581 (native-inputs
1582 `(("autoconf" ,autoconf)
1583 ("automake" ,automake)
1584 ("cython" ,python-cython)
1585 ("libtool" ,libtool)
1586 ("pkg-config" ,pkg-config)
1587 ("python" ,python)
1588 ("yasm" ,yasm)))
1589 (inputs
1590 `(("ffmpeg" ,ffmpeg)
1591 ("libass" ,libass)
f80d5fe0
EF
1592 ("tesseract-ocr" ,tesseract-ocr)
1593 ("zimg" ,zimg)))
6f6c8b65
TUBK
1594 (arguments
1595 '(#:phases
1596 (modify-phases %standard-phases
1597 (add-after
f8503e2b 1598 'unpack 'autogen
6f6c8b65
TUBK
1599 (lambda _
1600 (zero? (system* "sh" "autogen.sh")))))))
1601 (home-page "http://www.vapoursynth.com/")
1602 (synopsis "Video processing framework")
1603 (description "VapourSynth is a C++ library and Python module for video
1604manipulation. It aims to be a modern rewrite of Avisynth, supporting
1605multithreading, generalized colorspaces, per frame properties, and videos with
1606format changes.")
9a078f48 1607 ;; src/core/cpufeatures only allows x86, ARM or PPC
cda20ee8
EF
1608 (supported-systems (fold delete %supported-systems
1609 '("mips64el-linux" "aarch64-linux")))
6f6c8b65 1610 ;; As seen from the source files.
ae0bdd81 1611 (license license:lgpl2.1+)))
6f6c8b65 1612
67932f86
TUBK
1613(define-public xvid
1614 (package
1615 (name "xvid")
e05035c7 1616 (version "1.3.4")
67932f86
TUBK
1617 (source (origin
1618 (method url-fetch)
1619 (uri (string-append
1620 "http://downloads.xvid.org/downloads/xvidcore-"
1621 version ".tar.bz2"))
1622 (sha256
1623 (base32
e05035c7 1624 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
67932f86
TUBK
1625 (build-system gnu-build-system)
1626 (native-inputs `(("yasm" ,yasm)))
1627 (arguments
1628 '(#:phases
62fe2d47
EF
1629 (modify-phases %standard-phases
1630 (add-before
1631 'configure 'pre-configure
1632 (lambda _
1633 (chdir "build/generic")
1634 (substitute* "configure"
1635 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
67932f86
TUBK
1636 ;; No 'check' target.
1637 #:tests? #f))
1638 (home-page "https://www.xvid.com/")
1639 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1640 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1641codec library. It uses ASP features such as b-frames, global and quarter
1642pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1643and custom quantization matrices.")
ae0bdd81 1644 (license license:gpl2+)))
e16fde14
DT
1645
1646(define-public livestreamer
1647 (package
1648 (name "livestreamer")
68e88a09 1649 (version "1.12.2")
e16fde14
DT
1650 (source (origin
1651 (method url-fetch)
1652 (uri (string-append
1653 "https://github.com/chrippa/livestreamer/archive/v"
1654 version ".tar.gz"))
1655 (file-name (string-append "livestreamer-" version ".tar.gz"))
1656 (sha256
1657 (base32
68e88a09 1658 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
e16fde14
DT
1659 (build-system python-build-system)
1660 (arguments
1661 '(#:tests? #f)) ; tests rely on external web servers
e16fde14 1662 (propagated-inputs
5b9fe59f 1663 `(("python-requests" ,python-requests)))
e16fde14
DT
1664 (synopsis "Internet video stream viewer")
1665 (description "Livestreamer is a command-line utility that extracts streams
1666from various services and pipes them into a video playing application.")
1667 (home-page "http://livestreamer.io/")
1668 (license license:bsd-2)))
307ad140
RW
1669
1670(define-public mlt
1671 (package
1672 (name "mlt")
f05f5b30 1673 (version "6.4.1")
307ad140
RW
1674 (source (origin
1675 (method url-fetch)
4c7729dc
EF
1676 (uri (string-append "https://github.com/mltframework/mlt/"
1677 "archive/v" version ".tar.gz"))
1678 (file-name (string-append name "-" version ".tar.gz"))
307ad140
RW
1679 (sha256
1680 (base32
f05f5b30 1681 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
307ad140
RW
1682 (build-system gnu-build-system)
1683 (arguments
1684 `(#:tests? #f ; no tests
1685 #:make-flags '("CC=gcc")
1686 #:configure-flags
1687 (list "--enable-gpl3"
1688 "--enable-gpl")
1689 #:phases
1690 (modify-phases %standard-phases
1691 (add-after
1692 'configure 'override-LDFLAGS
1693 (lambda* (#:key outputs #:allow-other-keys)
1694 (substitute* "config.mak"
1695 (("LDFLAGS\\+=")
1696 (string-append "LDFLAGS+=-Wl,-rpath="
1697 (assoc-ref outputs "out")
1698 "/lib ")))
1699 #t)))))
1700 (inputs
1701 `(("alsa-lib" ,alsa-lib)
1702 ("fftw" ,fftw)
1703 ("libxml2" ,libxml2)
1704 ("jack" ,jack-1)
1705 ("ladspa" ,ladspa)
1706 ("libsamplerate" ,libsamplerate)
4c7729dc 1707 ("pulseaudio" ,pulseaudio)
307ad140
RW
1708 ("sdl" ,sdl)
1709 ("sox" ,sox)))
1710 (native-inputs
1711 `(("pkg-config" ,pkg-config)))
4c7729dc 1712 (home-page "https://www.mltframework.org/")
307ad140
RW
1713 (synopsis "Author, manage, and run multitrack audio/video compositions")
1714 (description
1715 "MLT is a multimedia framework, designed and developed for television
1716broadcasting. It provides a toolkit for broadcasters, video editors, media
1717players, transcoders, web streamers and many more types of applications. The
1718functionality of the system is provided via an assortment of ready to use
1719tools, XML authoring components, and an extensible plug-in based API.")
1720 (license license:lgpl2.1+)))
f464016d 1721
945d985a
DT
1722(define-public v4l-utils
1723 (package
1724 (name "v4l-utils")
f1d1ef71 1725 (version "1.12.5")
945d985a
DT
1726 (source (origin
1727 (method url-fetch)
1d4ac724 1728 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
945d985a
DT
1729 "/v4l-utils-" version ".tar.bz2"))
1730 (sha256
1731 (base32
f1d1ef71 1732 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
945d985a
DT
1733 (build-system gnu-build-system)
1734 (arguments
1735 '(#:configure-flags
1736 (list (string-append "--with-udevdir="
1737 (assoc-ref %outputs "out")
2cef0f7c
DC
1738 "/lib/udev")
1739 "CXXFLAGS=-std=gnu++11")))
945d985a 1740 (native-inputs
4ca077d5
TGR
1741 `(("perl" ,perl)
1742 ("pkg-config" ,pkg-config)))
945d985a
DT
1743 (inputs
1744 `(("alsa-lib" ,alsa-lib)
1745 ("glu" ,glu)
1746 ("libjpeg" ,libjpeg)
1747 ("libx11" ,libx11)
b37662e2 1748 ("qtbase" ,qtbase)
945d985a
DT
1749 ("eudev" ,eudev)))
1750 (synopsis "Realtime video capture utilities for Linux")
1751 (description "The v4l-utils provide a series of libraries and utilities to
1752be used for realtime video capture via Linux-specific APIs.")
1753 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1754 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1755 (license (list license:lgpl2.1+ license:gpl2))))
1756
f464016d
DT
1757(define-public obs
1758 (package
1759 (name "obs")
341ccb0f 1760 (version "18.0.2")
f464016d
DT
1761 (source (origin
1762 (method url-fetch)
1763 (uri (string-append "https://github.com/jp9000/obs-studio"
1764 "/archive/" version ".tar.gz"))
1765 (file-name (string-append name "-" version ".tar.gz"))
1766 (sha256
1767 (base32
341ccb0f 1768 "02pbiyvf5x0zh448h5rpmyn33qnsqk694xxlyns83mdi74savyqw"))))
f464016d 1769 (build-system cmake-build-system)
08858812 1770 (arguments
f3bd1728 1771 `(#:tests? #f)) ; no tests
f464016d
DT
1772 (native-inputs
1773 `(("pkg-config" ,pkg-config)))
1774 (inputs
4f98c3c5
EF
1775 `(("alsa-lib" ,alsa-lib)
1776 ("curl" ,curl)
f464016d
DT
1777 ("eudev" ,eudev)
1778 ("ffmpeg" ,ffmpeg)
4f98c3c5 1779 ("fontconfig" ,fontconfig)
f464016d
DT
1780 ("freetype" ,freetype)
1781 ("jack" ,jack-1)
1782 ("jansson" ,jansson)
1783 ("libx264" ,libx264)
1784 ("libxcomposite" ,libxcomposite)
1785 ("mesa" ,mesa)
1786 ("pulseaudio" ,pulseaudio)
90a2309b
EF
1787 ("qtbase" ,qtbase)
1788 ("qtx11extras" ,qtx11extras)
4f98c3c5 1789 ("speex" ,speex)
d4df2032 1790 ("v4l-utils" ,v4l-utils)
f464016d
DT
1791 ("zlib" ,zlib)))
1792 (synopsis "Live streaming software")
1793 (description "Open Broadcaster Software provides a graphical interface for
1794video recording and live streaming. OBS supports capturing audio and video
1795from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1796and JACK.")
1797 (home-page "https://obsproject.com")
f3bd1728 1798 (supported-systems '("x86_64-linux" "i686-linux"))
f464016d 1799 (license license:gpl2+)))
d5650f86
EF
1800
1801(define-public libvdpau
1802 (package
1803 (name "libvdpau")
1804 (version "1.1.1")
1805 (source
1806 (origin
1807 (method url-fetch)
1808 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1809 name "-" version ".tar.bz2"))
1810 (sha256
1811 (base32
1812 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1813 (build-system gnu-build-system)
1814 (native-inputs
1815 `(("pkg-config" ,pkg-config)))
1816 (inputs
1817 `(("dri2proto" ,dri2proto)
1818 ("libx11" ,libx11 "out")
1819 ("libxext" ,libxext)))
1820 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1821 (synopsis "Video Decode and Presentation API")
1822 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1823provides an interface to video decode acceleration and presentation hardware
1824present in modern GPUs.")
1825 (license (license:x11-style "file://COPYING"))))
3161d32d
EF
1826
1827(define-public vdpauinfo
1828 (package
1829 (name "vdpauinfo")
1830 (version "1.0")
1831 (source
1832 (origin
1833 (method url-fetch)
1834 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1835 name "-" version ".tar.gz"))
1836 (sha256
1837 (base32
1838 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1839 (build-system gnu-build-system)
1840 (native-inputs
1841 `(("pkg-config" ,pkg-config)
1842 ("libx11" ,libx11)))
1843 (propagated-inputs
1844 `(("libvdpau" ,libvdpau)))
1845 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1846 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1847 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1848implementation.")
1849 (license (license:x11-style "file://COPYING"))))
a7d94b54
LC
1850
1851(define-public recordmydesktop
1852 (package
1853 (name "recordmydesktop")
1854 (version "0.3.8.1")
1855 (source (origin
1856 (method url-fetch)
1857 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1858 version "/recordmydesktop-" version ".tar.gz"))
1859 (sha256
1860 (base32
1861 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1862 (build-system gnu-build-system)
1863 (inputs `(("popt" ,popt)
1864 ("zlib" ,zlib)
1865 ("libx11" ,libx11)
1866 ("libice" ,libice)
1867 ("libsm" ,libsm)
1868 ("libxfixes" ,libxfixes)
1869 ("libxdamage" ,libxdamage)
1870 ("libxext" ,libxext)
ed6ba9cc 1871 ("alsa-lib" ,alsa-lib)
a7d94b54
LC
1872 ("libvorbis" ,libvorbis)
1873 ("libtheora" ,libtheora)))
1874 (home-page "http://recordmydesktop.sourceforge.net/")
1875 (synopsis "Desktop session video recorder")
1876 (description
1877 "recordMyDesktop is a command-line tool that captures the activity in
1878your graphical desktop and encodes it as a video. This is a useful tool for
1879making @dfn{screencasts}.")
1880 (license license:gpl2+)))
d8841cc5 1881
63cd4d53
AV
1882(define-public simplescreenrecorder
1883 (package
1884 (name "simplescreenrecorder")
1885 (version "0.3.8")
1886 (source
1887 (origin
1888 (method url-fetch)
1889 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
1890 version ".tar.gz"))
1891 (file-name (string-append name "-" version ".tar.gz"))
1892 (sha256
1893 (base32
1894 "0v8w35n8w772s08w7k0icynqdsdakbrcanbgx6j847bfqfsg21gg"))))
1895 (build-system gnu-build-system)
1896 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
1897 ;; README.md, the program builds and functions properly without them.
1898 ;; As a result, they are omitted. Please add them back if problems appear.
1899 (inputs
1900 `(("alsa-lib" ,alsa-lib)
1901 ("ffmpeg" ,ffmpeg)
1902 ("glu" ,glu)
1903 ("jack" ,jack-1)
1904 ("libxi" ,libxi)
1905 ("pulseaudio" ,pulseaudio)
1906 ("qt" ,qt-4))) ; README.md: using Qt 5 causes some stability issues
1907 (native-inputs `(("pkg-config" ,pkg-config)))
1908 ;; Using HTTPS causes part of the page to be displayed improperly.
1909 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
1910 (synopsis "Screen recorder")
1911 (description "SimpleScreenRecorder is an easy to use screen recorder with
1912a graphical user interface. It supports recording the entire screen, or a
1913part of it, and allows encoding in many different codecs and file formats.
1914Other features include a live preview and live streaming.")
1915 (license (list license:gpl3+ ; most files
1916 license:zlib ; glinject/elfhacks.*
1917 license:isc ; glinject/*
1918 license:x11)))) ; build-aux/install-sh
1919
d8841cc5
KK
1920(define-public libsmpeg
1921 (package
1922 (name "libsmpeg")
1923 (version "0.4.5")
1924 (source (origin
1925 (method svn-fetch)
1926 (uri (svn-reference
1927 (url "svn://svn.icculus.org/smpeg/trunk/")
1928 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
b9af0564 1929 (file-name (string-append name "-" version "-checkout"))
d8841cc5
KK
1930 (sha256
1931 (base32
1932 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
1933 (build-system gnu-build-system)
1934 (arguments
1935 `(#:phases (modify-phases %standard-phases
1936 (add-after 'unpack 'autogen.sh
1937 (lambda _
1938 (zero? (system* "sh" "autogen.sh")))))))
1939 (native-inputs
1940 `(("autoconf" ,autoconf)
1941 ("automake" ,automake)))
1942 (inputs
1943 `(("sdl" ,sdl2)))
1944 (home-page "http://icculus.org/smpeg/")
1945 (synopsis "SDL MPEG decoding library")
1946 (description
1947 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
1948with sound support. Video playback is based on the ubiquitous Berkeley MPEG
1949player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
1950library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
1951and MPEG system streams.")
1952 (license (list license:expat
1953 license:lgpl2.1
1954 license:lgpl2.1+
1955 license:gpl2))))
4df07622
AP
1956
1957(define-public libbdplus
1958 (package
1959 (name "libbdplus")
1960 (version "0.1.2")
1961 (source
1962 (origin
1963 (method url-fetch)
6f13c4fd 1964 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
4df07622
AP
1965 version "/" name "-" version ".tar.bz2"))
1966 (sha256
1967 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
1968 (inputs
1969 `(("libgcrypt" ,libgcrypt)))
1970 (build-system gnu-build-system)
b8a31908 1971 (home-page "https://www.videolan.org/developers/libbdplus.html")
4df07622
AP
1972 (synopsis "Library for decrypting certain Blu-Ray discs")
1973 (description "libbdplus is a library which implements the BD+ System
1974specifications.")
1975 (license license:lgpl2.1+)))
8dd6fc51
AP
1976
1977(define-public libaacs
1978 (package
1979 (name "libaacs")
ba58886a 1980 (version "0.9.0")
8dd6fc51
AP
1981 (source
1982 (origin
1983 (method url-fetch)
6c2481ef 1984 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
8dd6fc51
AP
1985 version "/" name "-" version ".tar.bz2"))
1986 (sha256
ba58886a 1987 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
8dd6fc51
AP
1988 (inputs
1989 `(("libgcrypt" ,libgcrypt)))
1990 (native-inputs
1991 `(("bison" ,bison)
1992 ("flex" ,flex)))
1993 (build-system gnu-build-system)
b8a31908 1994 (home-page "https://www.videolan.org/developers/libaacs.html")
8dd6fc51
AP
1995 (synopsis "Library for decrypting certain Blu-Ray discs")
1996 (description "libaacs is a library which implements the Advanced Access
1997Content System specification.")
1998 (license license:lgpl2.1+)))
05234973 1999
2000(define-public mps-youtube
2001 (package
2002 (name "mps-youtube")
2003 (version "0.2.7.1")
2004 (source
2005 (origin
2006 (method url-fetch)
2007 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2008 "archive/v" version ".tar.gz"))
2009 (file-name (string-append name "-" version ".tar.gz"))
2010 (sha256
2011 (base32
2012 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
2013 (build-system python-build-system)
175d6264 2014 (arguments
2015 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2016 ;; test suite results differ depending on the country and also introduce
2017 ;; non-determinism in the tests.
2018 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2019 `(#:tests? #f))
05234973 2020 (propagated-inputs
2021 `(("python-pafy" ,python-pafy)
2022 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2023 (home-page "https://github.com/mps-youtube/mps-youtube")
2024 (synopsis "Terminal based YouTube player and downloader")
2025 (description
2026 "@code{mps-youtube} is based on mps, a terminal based program to
2027search, stream and download music. This implementation uses YouTube as
2028a source of content and can play and download video as well as audio.
2029It can use either mpv or mplayer for playback, and for conversion of
2030formats ffmpeg or libav is used. Users should install one of the
2031supported players in addition to this package.")
2032 (license license:gpl3+)))
fe047e13
EB
2033
2034(define-public handbrake
2035 (package
2036 (name "handbrake")
2037 (version "0.10.5")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (string-append "https://handbrake.fr/rotation.php?file="
2041 "HandBrake-" version ".tar.bz2"))
2042 (file-name (string-append "handbrake-" version ".tar.bz2"))
2043 (sha256
2044 (base32
2045 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2046 (patches (search-patches "handbrake-pkg-config-path.patch"))
2047 (modules '((guix build utils)))
2048 (snippet
2049 ;; Remove bundled libraries and source not necessary for
2050 ;; running under a GNU environment.
2051 '(begin
2052 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2053 #t))))
2054 (build-system glib-or-gtk-build-system)
2055 (native-inputs
2056 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2057 ("autoconf" ,autoconf)
2058 ("curl" ,curl) ;not actually used, but tested for
2059 ("intltool" ,intltool)
2060 ("libtool" ,libtool)
2061 ("pkg-config" ,pkg-config)
2062 ("python" ,python-2))) ;for configuration
2063 (inputs
2064 `(("bzip2" ,bzip2)
2065 ("dbus-glib" ,dbus-glib)
2066 ("ffmpeg" ,ffmpeg)
2067 ("fontconfig" ,fontconfig)
2068 ("freetype" ,freetype)
2069 ("glib" ,glib)
2070 ("gstreamer" ,gstreamer)
2071 ("gst-plugins-base" ,gst-plugins-base)
2072 ("gtk+" ,gtk+)
2073 ("lame" ,lame)
2074 ("libass" ,libass)
2075 ("libbluray" ,libbluray)
2076 ("libdvdnav" ,libdvdnav)
2077 ("libdvdread" ,libdvdread)
2078 ("libgudev" ,libgudev)
2079 ("libmpeg2" ,libmpeg2)
2080 ("libnotify" ,libnotify)
2081 ("libogg" ,libogg)
2082 ("libsamplerate" ,libsamplerate)
2083 ("libtheora" ,libtheora)
2084 ("libvorbis" ,libvorbis)
2085 ("libvpx" ,libvpx)
2086 ("libxml2" ,libxml2)
2087 ("libx264" ,libx264)
2088 ("x265" ,x265)
2089 ("zlib" ,zlib)))
2090 (arguments
2091 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2092 #:phases
2093 (modify-phases %standard-phases
2094 (add-before 'patch-source-shebangs 'bootstrap-gtk
2095 ;; Run bootstrap ahead of time so that shebangs get patched.
2096 (lambda _
2097 (setenv "CONFIG_SHELL" (which "sh"))
2098 (setenv "NOCONFIGURE" "1")
2099 ;; Patch the Makefile so that it doesn't bootstrap again.
2100 (substitute* "gtk/module.rules"
2101 ((".*autogen\\.sh.*") ""))
2102 (zero? (system* "sh" "./gtk/autogen.sh"))))
2103 (add-before 'configure 'disable-contrib
2104 (lambda _
2105 (substitute* "make/include/main.defs"
2106 ;; Disable unconditional inclusion of some "contrib"
2107 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2108 ;; and libbluray), which would lead to fetching and
2109 ;; building of these libraries. Use our own instead.
2110 (("MODULES \\+= contrib") "# MODULES += contrib"))
2111 #t))
2112 (add-before 'configure 'fix-x265-linking
2113 (lambda _
2114 (substitute* "test/module.defs"
2115 ;; Fix missing library during linking error
2116 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2117 #t))
2118 (replace 'configure
2119 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2120 ;; 'configure' is not an autoconf-generated script, and
2121 ;; errors on unrecognized arguments,
2122 ;; e.g. --enable-fast-install
2123 (let ((out (assoc-ref outputs "out")))
2124 (zero? (apply system* "./configure"
2125 (string-append "--prefix=" out)
2126 (or configure-flags '()))))))
2127 (add-after 'configure 'chdir-build
2128 (lambda _ (chdir "./build") #t)))))
2129 (home-page "https://handbrake.fr")
2130 (synopsis "Video transcoder")
2131 (description
2132 "HandBrake is a tool for converting video from any format to a selection
2133of modern, widely supported codecs.")
2134 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2135 (license (list license:gpl2+ license:bsd-3))))
590abe01
JN
2136
2137(define-public openh264
2138 (package
2139 (name "openh264")
1a34ca0e 2140 (version "1.7.0")
590abe01
JN
2141 (source (origin
2142 (method url-fetch)
2143 (uri (string-append "https://github.com/cisco/"
2144 name "/archive/v" version ".tar.gz"))
2145 (file-name (string-append name "-" version ".tar.gz"))
2146 (sha256
2147 (base32
1a34ca0e 2148 "0gv571bqkxk7ic64dmavs1q8nr7p59mcf4ibqp4lc070gn6w61ww"))))
590abe01
JN
2149 (build-system gnu-build-system)
2150 (native-inputs
2151 `(("nasm" ,nasm)
2152 ("python" ,python)))
2153 (arguments
8363a835
EF
2154 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2155 "CC=gcc")
590abe01
JN
2156 #:test-target "test"
2157 #:phases (modify-phases %standard-phases
2158 ;; no configure script
2159 (delete 'configure))))
2160 (home-page "http://www.openh264.org/")
2161 (synopsis "H264 decoder library")
2162 (description
2163 "Openh264 is a library which can decode H264 video streams.")
2164 (license license:bsd-2)))
3a44c7bb 2165
2166(define-public libmp4v2
2167 (package
2168 (name "libmp4v2")
2169 (version "2.0.0")
2170 (source
2171 (origin
2172 (method url-fetch)
2173 ;; XXX: The new location of upstream is uncertain and will become relevant the
2174 ;; moment when the googlecode archive shuts down. It is past the date it
2175 ;; should've been turned off. I tried to communicate with upstream, but this
2176 ;; wasn't very responsive and not very helpful. The short summary is, it is
2177 ;; chaos when it comes to the amount of forks and only time will tell where
2178 ;; the new upstream location is.
2179 (uri (string-append "https://storage.googleapis.com/google-"
2180 "code-archive-downloads/v2/"
2181 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2182 (file-name (string-append name "-" version ".tar.bz2"))
2183 (sha256
2184 (base32
2185 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2186 (build-system gnu-build-system)
2187 (outputs '("out"
2188 "static")) ; 3.7MiB .a file
2189 (arguments
2190 `(#:phases
2191 (modify-phases %standard-phases
2192 (add-after 'unpack 'remove-dates
2193 (lambda _
2194 ;; Make the build reproducible.
2195 (substitute* "configure"
2196 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2197 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2198 #t))
2199 (add-after 'install 'move-static-libraries
2200 (lambda* (#:key outputs #:allow-other-keys)
2201 ;; Move static libraries to the "static" output.
2202 (let* ((out (assoc-ref outputs "out"))
2203 (lib (string-append out "/lib"))
2204 (static (assoc-ref outputs "static"))
2205 (slib (string-append static "/lib")))
2206 (mkdir-p slib)
2207 (for-each (lambda (file)
2208 (install-file file slib)
2209 (delete-file file))
2210 (find-files lib "\\.a$"))
2211 #t))))))
2212 (native-inputs
2213 `(("help2man" ,help2man)
2214 ("dejagnu" ,dejagnu)))
2215 (home-page "https://code.google.com/archive/p/mp4v2/")
2216 (synopsis "API to create and modify mp4 files")
2217 (description
2218 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2219ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2220file format that has been used as a multimedia file format in a variety of platforms and
2221applications. It is a very powerful and extensible format that can accommodate
2222practically any type of media.")
2223 (license license:mpl1.1)))
e0c40707
EJ
2224
2225(define-public libmediainfo
2226 (package
2227 (name "libmediainfo")
2228 (version "0.7.95")
2229 (source (origin
2230 (method url-fetch)
2231 (uri (string-append "https://mediaarea.net/download/source/"
2232 name "/" version"/"
2233 name "_" version ".tar.bz2"))
2234 (sha256
2235 (base32
2236 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2237 ;; TODO add a Big Buck Bunny webm for tests.
2238 (native-inputs
2239 `(("autoconf" ,autoconf)
2240 ("automake" ,automake)
2241 ("libtool" ,libtool)
2242 ("pkg-config" ,pkg-config)
2243 ("zlib" ,zlib)
2244 ("tinyxml2" ,tinyxml2)
2245 ("curl" ,curl)
2246 ("libzen" ,libzen)))
2247 (build-system gnu-build-system)
2248 (arguments
2249 '(#:tests? #f ; see above TODO
2250 #:phases
2251 ;; build scripts not in root of archive
2252 (modify-phases %standard-phases
2253 (add-before 'configure 'pre-configure
2254 (lambda _
2255 (chdir "Project/GNU/Library")))
2256 (add-before 'configure 'autogen
2257 (lambda _
2258 (zero? (system* "./autogen.sh")))))))
2259 (home-page "https://mediaarea.net/en/MediaInfo")
2260 (synopsis "Library for retrieving media metadata")
2261 (description "MediaInfo is a library used for retrieving technical
2262information and other metadata about audio or video files. A non-exhaustive
2263list of the information MediaInfo can retrieve from media files include:
2264
2265@itemize
2266@item General: title, author, director, album, track number, date, duration...
2267@item Video: codec, aspect, fps, bitrate...
2268@item Audio: codec, sample rate, channels, language, bitrate...
2269@item Text: language of subtitle
2270@item Chapters: number of chapters, list of chapters
2271@end itemize
2272
2273MediaInfo supports the following formats:
2274
2275@itemize
2276@item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2277MPEG-2, MPEG-4, DVD (VOB)...
2278@item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2279@item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2280@item Subtitles: SRT, SSA, ASS, SAMI...
2281@end itemize\n")
2282 (license license:bsd-2)))
2283
d5fa2777
EJ
2284;; TODO also have a GUI version available
2285(define-public mediainfo
2286 (package
2287 (name "mediainfo")
2288 (version "0.7.95")
2289 (source (origin
2290 (method url-fetch)
2291 (uri (string-append "https://mediaarea.net/download/source/"
2292 name "/" version "/"
2293 name "_" version ".tar.bz2"))
2294 (sha256
2295 (base32
2296 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2297 (native-inputs
2298 `(("autoconf" ,autoconf)
2299 ("automake" ,automake)
2300 ("libtool" ,libtool)
2301 ("pkg-config" ,pkg-config)
2302 ("zlib" ,zlib)
2303 ("libmediainfo", libmediainfo)
2304 ("libzen" ,libzen)))
2305 (build-system gnu-build-system)
2306 (arguments
2307 '(#:tests? #f ; lacks tests
2308 #:phases
2309 ;; build scripts not in root of archive
2310 (modify-phases %standard-phases
2311 (add-before 'configure 'pre-configure
2312 (lambda _
2313 (chdir "Project/GNU/CLI")))
2314 (add-before 'configure 'autogen
2315 (lambda _
2316 (zero? (system* "./autogen.sh")))))))
2317 (home-page "https://mediaarea.net/en/MediaInfo")
2318 (synopsis "Utility for reading media metadata")
2319 (description "MediaInfo is a utility used for retrieving technical
2320information and other metadata about audio or video files. It supports the
2321many codecs and formats supported by libmediainfo.")
2322 (license license:bsd-2)))
fa379a5b
CL
2323
2324(define-public livemedia-utils
2325 (package
2326 (name "livemedia-utils")
e7178996 2327 (version "2017.06.04")
fa379a5b
CL
2328 (source (origin
2329 (method url-fetch)
2330 (uri (string-append
517c66c0 2331 "https://download.videolan.org/contrib/live555/live."
fa379a5b
CL
2332 version ".tar.gz"))
2333 (sha256
2334 (base32
e7178996 2335 "0xf3vynxqpxpd762zni0jkblnjlgbqxjx99m83m7gqx6zriph271"))))
fa379a5b
CL
2336 (build-system gnu-build-system)
2337 (arguments
2338 '(#:tests? #f ; no tests
2339 #:make-flags (list "CC=gcc"
2340 (string-append "LDFLAGS=-Wl,-rpath="
2341 (assoc-ref %outputs "out") "/lib")
2342 (string-append "PREFIX="
2343 (assoc-ref %outputs "out")))
2344 #:phases (modify-phases %standard-phases
2345 (add-before 'configure 'fix-makefiles-generation
2346 (lambda _
2347 (substitute* "genMakefiles"
2348 (("/bin/rm") "rm"))
2349 #t))
2350 (replace 'configure
2351 (lambda _
2352 (zero? (system* "./genMakefiles"
2353 "linux-with-shared-libraries")))))))
2354 (home-page "http://www.live555.com/liveMedia/")
2355 (synopsis "Set of C++ libraries for multimedia streaming")
2356 (description "This code forms a set of C++ libraries for multimedia
2357streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2358can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2359JPEG video, and several audio codecs. They can easily be extended to support
2360additional (audio and/or video) codecs, and can also be used to build basic
2361RTSP or SIP clients and servers.")
2362 (license license:lgpl3+)))
0dff4dd9
CL
2363
2364(define-public libdvbpsi
2365 (package
2366 (name "libdvbpsi")
2367 (version "1.3.1")
2368 (source (origin
2369 (method url-fetch)
2370 (uri (string-append
2371 "https://download.videolan.org/pub/libdvbpsi/"
2372 version "/libdvbpsi-" version ".tar.bz2"))
2373 (sha256
2374 (base32
2375 "0824r08kaspbrrg2dd5d46s475zb7j59brqkm2y6x3mdsnpng0yn"))))
2376 (build-system gnu-build-system)
2377 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2378 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2379tables")
2380 (description "libdvbpsi is a simple library designed for decoding and
2381generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2382and ITU-T H.222.0.")
2383 (license license:lgpl2.1)))