gnu: libopenshot: Fix tests on other architectures.
[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>
76277052 4;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
cda163cd 5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
87fd7a35 6;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
12f92e38 7;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
e7c7b10d 8;;; Copyright © 2015, 2018 Ricardo Wurmus <rekado@elephly.net>
28cbf65c 9;;; Copyright © 2015, 2016, 2017, 2018, 2019 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>
4a78fd46 14;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
0dd8da0b 15;;; Copyright © 2016, 2018, 2019 Eric Bavier <bavier@member.fsf.org>
590abe01 16;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
72fa6667 17;;; Copyright © 2017 Feng Shu <tumashu@163.com>
dba326de 18;;; Copyright © 2017, 2018, 2019 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>
eb88e2c1 22;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
2973ebf5 23;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
394207c1 24;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
e21f3473 25;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
037d5913 26;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
4715f92e 27;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
a0135eee 28;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
4febfdd0 29;;; Copyright © 2018 Brendan Tildesley <brendan.tildesley@openmailbox.org>
0c85d2c6 30;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
18e56ad7 31;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
e7cdd311
MM
32;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
33;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
548642db 34;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
04b6e9c5 35;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
39efcc9b
AE
36;;;
37;;; This file is part of GNU Guix.
38;;;
39;;; GNU Guix is free software; you can redistribute it and/or modify it
40;;; under the terms of the GNU General Public License as published by
41;;; the Free Software Foundation; either version 3 of the License, or (at
42;;; your option) any later version.
43;;;
44;;; GNU Guix is distributed in the hope that it will be useful, but
45;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47;;; GNU General Public License for more details.
48;;;
49;;; You should have received a copy of the GNU General Public License
50;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
52(define-module (gnu packages video)
fe138965 53 #:use-module (ice-9 match)
08858812 54 #:use-module (srfi srfi-1)
2b94c14c 55 #:use-module (srfi srfi-26)
ae0bdd81 56 #:use-module ((guix licenses) #:prefix license:)
e930c2a3 57 #:use-module (guix utils)
39efcc9b
AE
58 #:use-module (guix packages)
59 #:use-module (guix download)
38829eac 60 #:use-module (guix git-download)
d8841cc5 61 #:use-module (guix svn-download)
44726031 62 #:use-module (guix build-system cmake)
39efcc9b 63 #:use-module (guix build-system gnu)
0e74bb5b 64 #:use-module (guix build-system glib-or-gtk)
635f981b 65 #:use-module (guix build-system meson)
6f45e45d 66 #:use-module (guix build-system perl)
615215a5 67 #:use-module (guix build-system python)
1c1178cd 68 #:use-module (guix build-system waf)
f27f264e 69 #:use-module (guix build-system trivial)
3b02429c 70 #:use-module (gnu packages)
39efcc9b 71 #:use-module (gnu packages algebra)
4fbcfc14 72 #:use-module (gnu packages assembly)
72bfebf5 73 #:use-module (gnu packages audio)
f1044010 74 #:use-module (gnu packages autotools)
d5a748e8 75 #:use-module (gnu packages avahi)
76277052 76 #:use-module (gnu packages backup)
38829eac 77 #:use-module (gnu packages base)
8dd6fc51 78 #:use-module (gnu packages bison)
2973ebf5 79 #:use-module (gnu packages boost)
d5a748e8 80 #:use-module (gnu packages cdrom)
2973ebf5 81 #:use-module (gnu packages check)
fe047e13 82 #:use-module (gnu packages cmake)
39efcc9b 83 #:use-module (gnu packages compression)
e0c40707 84 #:use-module (gnu packages cpp)
f464016d 85 #:use-module (gnu packages curl)
3a44c7bb 86 #:use-module (gnu packages dejagnu)
78d112c2 87 #:use-module (gnu packages dns)
2973ebf5 88 #:use-module (gnu packages docbook)
e37bdc0f 89 #:use-module (gnu packages documentation)
f22e0e26 90 #:use-module (gnu packages elf)
2973ebf5 91 #:use-module (gnu packages file)
8dd6fc51 92 #:use-module (gnu packages flex)
39efcc9b 93 #:use-module (gnu packages fontutils)
c161c22a 94 #:use-module (gnu packages freedesktop)
44726031
AE
95 #:use-module (gnu packages fribidi)
96 #:use-module (gnu packages gettext)
38829eac 97 #:use-module (gnu packages ghostscript)
d5a748e8
AE
98 #:use-module (gnu packages gl)
99 #:use-module (gnu packages glib)
2cd85cf9 100 #:use-module (gnu packages guile)
fe047e13 101 #:use-module (gnu packages gnome)
c3069cd1 102 #:use-module (gnu packages gnunet)
d5a748e8 103 #:use-module (gnu packages gnupg)
fe047e13 104 #:use-module (gnu packages gstreamer)
44726031 105 #:use-module (gnu packages gtk)
e55354b8 106 #:use-module (gnu packages image)
b5b20bda 107 #:use-module (gnu packages imagemagick)
f48feaa2 108 #:use-module (gnu packages iso-codes)
76277052 109 #:use-module (gnu packages libidn)
c812f460 110 #:use-module (gnu packages libreoffice)
d5a748e8
AE
111 #:use-module (gnu packages linux)
112 #:use-module (gnu packages lua)
fe047e13 113 #:use-module (gnu packages m4)
3a44c7bb 114 #:use-module (gnu packages man)
d5a748e8 115 #:use-module (gnu packages mp3)
4d94b93c 116 #:use-module (gnu packages ncurses)
579a9cde 117 #:use-module (gnu packages networking)
6f6c8b65 118 #:use-module (gnu packages ocr)
39efcc9b
AE
119 #:use-module (gnu packages perl)
120 #:use-module (gnu packages pkg-config)
a7d94b54 121 #:use-module (gnu packages popt)
fc2982f7 122 #:use-module (gnu packages protobuf)
d5a748e8 123 #:use-module (gnu packages pulseaudio)
39efcc9b 124 #:use-module (gnu packages python)
f48feaa2 125 #:use-module (gnu packages python-crypto)
589e3f4e 126 #:use-module (gnu packages python-web)
44d10b1f 127 #:use-module (gnu packages python-xyz)
d5a748e8 128 #:use-module (gnu packages qt)
76277052 129 #:use-module (gnu packages rdesktop)
2973ebf5 130 #:use-module (gnu packages ruby)
76277052 131 #:use-module (gnu packages samba)
d5a748e8 132 #:use-module (gnu packages sdl)
2973ebf5
GG
133 #:use-module (gnu packages serialization)
134 #:use-module (gnu packages shells)
cd0322a3 135 #:use-module (gnu packages sqlite)
d5a748e8 136 #:use-module (gnu packages ssh)
579a9cde 137 #:use-module (gnu packages swig)
6b2c6be0 138 #:use-module (gnu packages texinfo)
c426e61e 139 #:use-module (gnu packages textutils)
a7fd7b68 140 #:use-module (gnu packages tls)
1a291593 141 #:use-module (gnu packages time)
76277052 142 #:use-module (gnu packages upnp)
d5a748e8 143 #:use-module (gnu packages version-control)
870541d6 144 #:use-module (gnu packages vulkan)
bb470bd3 145 #:use-module (gnu packages web)
fe047e13 146 #:use-module (gnu packages webkit)
794223bc 147 #:use-module (gnu packages wxwidgets)
ee3b55ea 148 #:use-module (gnu packages xdisorg)
54ff0b7d 149 #:use-module (gnu packages xiph)
d5a748e8 150 #:use-module (gnu packages xml)
4fbcfc14 151 #:use-module (gnu packages xorg))
39efcc9b 152
6b2c6be0
SB
153(define-public aalib
154 (package
155 (name "aalib")
156 (version "1.4rc5")
157 (source (origin
158 (method url-fetch)
de67e922
LF
159 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
160 version "/" name "-" version ".tar.gz"))
6b2c6be0
SB
161 (sha256
162 (base32
163 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
164 (build-system gnu-build-system)
165 (native-inputs
166 `(("makeinfo" ,texinfo)))
167 (inputs
168 `(("ncurses" ,ncurses)))
169 (arguments
c437922a 170 `(#:phases
6b2c6be0 171 (modify-phases %standard-phases
3a4de6b2 172 (replace 'configure
014cbde6 173 (lambda* (#:key build inputs outputs #:allow-other-keys)
6b2c6be0
SB
174 ;; This old `configure' script doesn't support
175 ;; variables passed as arguments.
176 (let ((out (assoc-ref outputs "out"))
177 (ncurses (assoc-ref inputs "ncurses")))
178 (setenv "CONFIG_SHELL" (which "bash"))
3595e83d
MW
179 (invoke "./configure"
180 (string-append "--prefix=" out)
181 (string-append "--build=" build)
182 ;; The ancient config.guess is unable to
183 ;; guess the host triplet on mips64el.
184 ,@(if (string=? "mips64el-linux"
185 (%current-system))
186 '("--host=mips64el-unknown-linux-gnu")
187 '())
188 ;; The same is also true with aarch64.
189 ,@(if (string=? "aarch64-linux"
190 (%current-system))
191 '("--host=aarch64-unknown-linux-gnu")
192 '())
193 (string-append "--with-ncurses="
194 ncurses))))))))
6b2c6be0
SB
195 (home-page "http://aa-project.sourceforge.net/aalib/")
196 (synopsis "ASCII-art library")
197 (description
198 "AA-lib is a low level gfx library which does not require graphics device.
199In fact, there is no graphical output possible. AA-lib replaces those
200old-fashioned output methods with powerful ascii-art renderer.")
201 (license license:lgpl2.0+)))
202
cda163cd
TUBK
203(define-public liba52
204 (package
205 (name "liba52")
206 (version "0.7.4")
207 (source (origin
208 (method url-fetch)
8c056935
TUBK
209 (uri (string-append
210 ;; A mirror://sourceforge URI doesn't work, presumably
211 ;; because the SourceForge project is misconfigured.
212 "http://liba52.sourceforge.net/files/a52dec-" version
213 ".tar.gz"))
cda163cd
TUBK
214 (sha256
215 (base32
23da88f6 216 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
fc1adab1
AK
217 (patches (search-patches "liba52-enable-pic.patch"
218 "liba52-set-soname.patch"
219 "liba52-use-mtune-not-mcpu.patch"
220 "liba52-link-with-libm.patch"))))
cda163cd 221 (build-system gnu-build-system)
23da88f6
MW
222 ;; XXX We need to run ./bootstrap because of the build system fixes above.
223 (native-inputs
224 `(("autoconf" ,autoconf)
225 ("automake" ,automake)
226 ("libtool" ,libtool)))
412a2422 227 (arguments `(#:configure-flags '("--enable-shared")
23da88f6
MW
228 #:phases
229 (modify-phases %standard-phases
230 ;; XXX We need to run ./bootstrap because of the build
231 ;; system fixes above.
189be331 232 (replace 'bootstrap
78666a68 233 (lambda _ (invoke "sh" "bootstrap"))))))
cda163cd
TUBK
234 (home-page "http://liba52.sourceforge.net/")
235 (synopsis "ATSC A/52 stream decoder")
236 (description "liba52 is a library for decoding ATSC A/52 streams. The
237A/52 standard is used in a variety of applications, including digital
238television and DVD. It is also known as AC-3.")
ae0bdd81 239 (license license:gpl2+)))
cda163cd 240
e0884109
MW
241(define-public libmpeg2
242 (package
243 (name "libmpeg2")
244 (version "0.5.1")
245 (source (origin
246 (method url-fetch)
247 ;; A mirror://sourceforge URI doesn't work, presumably
248 ;; because the SourceForge project is misconfigured.
249 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
250 name "-" version ".tar.gz"))
251 (sha256
252 (base32
253 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
254 (inputs
255 `(("libx11" ,libx11)
256 ("libxext" ,libxext)
257 ("libxv" ,libxv)
258 ("libsm" ,libsm)
259 ("libice" ,libice)
260 ("sdl" ,sdl)))
261 (build-system gnu-build-system)
262 (home-page "http://libmpeg2.sourceforge.net/")
263 (synopsis "MPEG1 and MPEG2 video decoder library")
264 (description
265 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
266 (license license:gpl2+)))
267
82712597
MW
268(define-public libx264
269 (package
270 (name "libx264")
fac39b99 271 (version "20180810-2245")
82712597
MW
272 (source (origin
273 (method url-fetch)
4ff71cac 274 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
bb2a9558 275 "x264-snapshot-" version "-stable.tar.bz2"))
82712597
MW
276 (sha256
277 (base32
fac39b99 278 "0f25f39imas9pcqm7lnaa0shhjmf42hdx7jxzcnvxc7qsb7lh1bv"))))
82712597
MW
279 (build-system gnu-build-system)
280 (native-inputs
281 `(("pkg-config" ,pkg-config)
a0343008 282 ("nasm" ,nasm)))
82712597
MW
283 ;; TODO: Add gpac input
284 (arguments
285 `(#:tests? #f ;no check target
286 #:configure-flags '("--enable-shared"
287 ;; Don't build the command-line program. If we
288 ;; want it later, we should do so in a different
289 ;; package to avoid a circular dependency (the x264
290 ;; program depends on ffmpeg and ffmpeg depends on
291 ;; libx264).
cb50d0c2
MW
292 "--disable-cli"
293
294 ;; On MIPS, we must pass "--disable-asm" or else
295 ;; configure fails after printing: "You specified a
296 ;; pre-MSA CPU in your CFLAGS. If you really want
297 ;; to run on such a CPU, configure with
298 ;; --disable-asm."
299 ,@(if (string-prefix? "mips"
300 (or (%current-target-system)
301 (%current-system)))
302 '("--disable-asm")
303 '()))))
4ff71cac 304 (home-page "https://www.videolan.org/developers/x264.html")
82712597
MW
305 (synopsis "H.264 video coding library")
306 (description "libx264 is an advanced encoding library for creating
307H.264 (MPEG-4 AVC) video streams.")
308 (license (list license:gpl2+ ;most files
309 license:isc ;common/x86/x86inc.asm
310 license:lgpl2.1+ ;extras/getopt.c
311 license:bsd-3 ;extras/inttypes.h
312 (license:non-copyleft ;extras/cl*.h
313 "file://extras/cl.h"
314 "See extras/cl.h in the distribution.")))))
315
2973ebf5
GG
316(define-public mkvtoolnix
317 (package
318 (name "mkvtoolnix")
319 (version "13.0.0")
320 (source
321 (origin
322 (method url-fetch)
323 (uri (string-append "https://mkvtoolnix.download/sources/"
324 name "-" version ".tar.xz"))
325 (sha256
326 (base32
327 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
328 (modules '((guix build utils)))
6cbee49d
MW
329 (snippet '(begin
330 ;; Delete bundled libraries.
331 (for-each delete-file-recursively
332 '("lib/libebml"
333 "lib/libmatroska"
334 "lib/nlohmann-json"
335 "lib/pugixml"
336 "lib/utf8-cpp"))
337 #t))))
2973ebf5
GG
338 (build-system gnu-build-system)
339 (inputs
340 `(("boost" ,boost)
341 ("bzip2" ,bzip2)
342 ("libebml" ,libebml)
343 ("flac" ,flac)
344 ("file" ,file)
345 ("libmatroska" ,libmatroska)
346 ("libogg" ,libogg)
347 ("libvorbis" ,libvorbis)
348 ("lzo" ,lzo)
349 ("pugixml" ,pugixml)
350 ("qt" ,qt)
351 ("utfcpp" ,utfcpp)
352 ("zlib" ,zlib)))
353 (native-inputs
354 `(("docbook-xsl" ,docbook-xsl)
355 ("gettext" ,gettext-minimal)
356 ("googletest" ,googletest)
357 ("libxslt" ,libxslt)
358 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
359 ("perl" ,perl)
360 ("pkg-config" ,pkg-config)
361 ("po4a" ,po4a)
362 ("ruby" ,ruby)))
363 (arguments
364 `(#:configure-flags
365 (list (string-append "--with-boost="
366 (assoc-ref %build-inputs "boost"))
367 (string-append "--with-docbook-xsl-root="
368 (assoc-ref %build-inputs "docbook-xsl")
369 "/xml/xsl/docbook-xsl-"
370 ,(package-version docbook-xsl))
371 (string-append "--with-extra-includes="
372 (assoc-ref %build-inputs "nlohmann-json-cpp")
373 "/include/nlohmann"))
374 #:phases
375 (modify-phases %standard-phases
376 (add-before 'configure 'add-googletest
377 (lambda _
378 (symlink
379 (string-append (assoc-ref %build-inputs "googletest")
380 "/include/gtest") "lib/gtest")
381 #t))
382 (replace 'build
383 (lambda _
384 (let ((-j (list "-j" (number->string (parallel-job-count)))))
6c4d1413 385 (apply invoke "rake" -j))))
2973ebf5
GG
386 (replace 'check
387 (lambda _
6c4d1413 388 (invoke "rake" "tests/unit")))
2973ebf5
GG
389 (replace 'install
390 (lambda _
6c4d1413 391 (invoke "rake" "install"))))))
2973ebf5
GG
392 (home-page "https://mkvtoolnix.download")
393 (synopsis "Tools to create, alter and inspect Matroska files")
394 (description
395 "MKVToolNix provides tools for getting information about Matroska files
396(@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
397and creating Matroska files from other media files (@code{mkvmerge}).")
398 (license license:gpl2)))
399
7bc7ffc2
EF
400(define-public x265
401 (package
402 (name "x265")
23c25982 403 (version "3.0")
020d4d2c 404 (outputs '("out" "static"))
7bc7ffc2
EF
405 (source
406 (origin
407 (method url-fetch)
408 (uri (string-append "https://download.videolan.org/videolan/x265/"
409 "x265_" version ".tar.gz"))
410 (sha256
411 (base32
23c25982
EF
412 "0qh65wdpasrspkm1y0dlfa123myax568yi0sas0lmg5b1hkgrff5"))
413 (patches (search-patches "x265-arm-flags.patch"))
7bc7ffc2 414 (modules '((guix build utils)))
6cbee49d
MW
415 (snippet '(begin
416 (delete-file-recursively "source/compat/getopt")
417 #t))))
7bc7ffc2
EF
418 (build-system cmake-build-system)
419 (arguments
420 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
bd606fb2
EF
421 #:configure-flags
422 ;; Ensure position independent code for everyone.
423 (list "-DENABLE_PIC=TRUE"
8e59c5fe
EF
424 ,@(if (string-prefix? "armhf" (or (%current-system)
425 (%current-target-system)))
426 '("-DENABLE_ASSEMBLY=OFF")
427 '())
bd606fb2
EF
428 (string-append "-DCMAKE_INSTALL_PREFIX="
429 (assoc-ref %outputs "out")))
7bc7ffc2
EF
430 #:phases
431 (modify-phases %standard-phases
bd606fb2 432 (add-after 'unpack 'prepare-build
7bc7ffc2
EF
433 (lambda _
434 (delete-file-recursively "build")
435 (chdir "source")
8e59c5fe
EF
436 ;; recognize armv8 in 32-bit mode as ARM
437 (substitute* "CMakeLists.txt"
438 (("armv6l") "armv8l"))
bd606fb2
EF
439 #t))
440 (add-before 'configure 'build-12-bit
441 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
442 (mkdir "../build-12bit")
443 (with-directory-excursion "../build-12bit"
444 (apply invoke
445 "cmake" "../source"
446 "-DHIGH_BIT_DEPTH=ON"
447 "-DEXPORT_C_API=OFF"
448 "-DENABLE_CLI=OFF"
449 "-DMAIN12=ON"
450 configure-flags)
451 (substitute* (cons "cmake_install.cmake"
452 (append
453 (find-files "CMakeFiles/x265-shared.dir" ".")
454 (find-files "CMakeFiles/x265-static.dir" ".")))
455 (("libx265") "libx265_main12"))
456 (invoke "make"))))
457 (add-before 'configure 'build-10-bit
458 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
459 (mkdir "../build-10bit")
460 (with-directory-excursion "../build-10bit"
461 (apply invoke
462 "cmake" "../source"
463 "-DHIGH_BIT_DEPTH=ON"
464 "-DEXPORT_C_API=OFF"
465 "-DENABLE_CLI=OFF"
466 configure-flags)
467 (substitute* (cons "cmake_install.cmake"
468 (append
469 (find-files "CMakeFiles/x265-shared.dir" ".")
470 (find-files "CMakeFiles/x265-static.dir" ".")))
471 (("libx265") "libx265_main10"))
472 (invoke "make"))))
473 (add-after 'install 'install-more-libs
474 (lambda _
475 (with-directory-excursion "../build-12bit"
476 (invoke "make" "install"))
477 (with-directory-excursion "../build-10bit"
020d4d2c
EF
478 (invoke "make" "install"))))
479 (add-before 'strip 'move-static-libs
480 (lambda* (#:key outputs #:allow-other-keys)
481 (let ((out (assoc-ref outputs "out"))
482 (static (assoc-ref outputs "static")))
483 (mkdir-p (string-append static "/lib"))
484 (with-directory-excursion
485 (string-append out "/lib")
486 (for-each
487 (lambda (file)
488 (rename-file file
489 (string-append static "/lib/" file)))
490 (find-files "." "\\.a$"))))
491 #t)))))
7bc7ffc2
EF
492 (home-page "http://x265.org/")
493 (synopsis "Library for encoding h.265/HEVC video streams")
494 (description "x265 is a H.265 / HEVC video encoder application library,
495designed to encode video or images into an H.265 / HEVC encoded bitstream.")
496 (license license:gpl2+)))
497
c426e61e
TUBK
498(define-public libass
499 (package
500 (name "libass")
449ad88b 501 (version "0.14.0")
c426e61e
TUBK
502 (source (origin
503 (method url-fetch)
504 (uri (string-append
505 "https://github.com/libass/libass/releases/download/"
506 version "/libass-" version ".tar.xz"))
507 (sha256
508 (base32
449ad88b 509 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
c426e61e
TUBK
510 (build-system gnu-build-system)
511 (native-inputs
512 `(("pkg-config" ,pkg-config)
449ad88b 513 ("nasm" ,nasm)))
c426e61e
TUBK
514 (propagated-inputs
515 `(("freetype" ,freetype)
516 ("fribidi" ,fribidi)
517 ("fontconfig" ,fontconfig)
518 ("harfbuzz" ,harfbuzz)
519 ("enca" ,enca)))
520 (home-page "https://github.com/libass/libass")
521 (synopsis "Subtitle rendering library for the ASS/SSA format")
522 (description "libass is a subtitle rendering library for the
523ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
ae0bdd81 524 (license license:isc)))
c426e61e 525
4d94b93c
TUBK
526(define-public libcaca
527 (package
528 (name "libcaca")
529 (version "0.99.beta19")
530 (source (origin
531 (method url-fetch)
532 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
533 version ".tar.gz"))
534 (sha256
535 (base32
536 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
537 (build-system gnu-build-system)
538 (native-inputs `(("pkg-config" ,pkg-config)))
539 (inputs
540 `(("freeglut" ,freeglut)
541 ("ftgl" ,ftgl)
43d51239 542 ("imlib2" ,imlib2)
4d94b93c
TUBK
543 ("libx11" ,libx11)
544 ("mesa" ,mesa)
545 ("ncurses" ,ncurses)
546 ("zlib" ,zlib)))
547 (home-page "http://caca.zoy.org/wiki/libcaca")
548 (synopsis "Colour ASCII-art library")
549 (description "libcaca is a graphics library that outputs text instead of
550pixels, so that it can work on older video cards or text terminals. It
551supports Unicode, 2048 colors, dithering of color images, and advanced text
552canvas operations.")
ae0bdd81 553 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
4d94b93c 554
3bfb78dc
TUBK
555(define-public libdca
556 (package
557 (name "libdca")
649b334b 558 (version "0.0.6")
3bfb78dc
TUBK
559 (source (origin
560 (method url-fetch)
561 (uri (string-append
b8a31908 562 "https://download.videolan.org/pub/videolan/libdca/"
3bfb78dc
TUBK
563 version "/libdca-" version ".tar.bz2"))
564 (sha256
565 (base32
649b334b 566 "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
3bfb78dc 567 (build-system gnu-build-system)
b8a31908 568 (home-page "https://www.videolan.org/developers/libdca.html")
3bfb78dc
TUBK
569 (synopsis "DTS Coherent Acoustics decoder")
570 (description "libdca is a library for decoding DTS Coherent Acoustics
571streams.")
ae0bdd81 572 (license license:gpl2+)))
3bfb78dc 573
99d4c455
TUBK
574(define-public libdv
575 (package
576 (name "libdv")
577 (version "1.0.0")
578 (source (origin
579 (method url-fetch)
580 (uri (string-append
de67e922
LF
581 "mirror://sourceforge/" name "/" name "/"
582 version "/" name "-" version ".tar.gz"))
99d4c455
TUBK
583 (sha256
584 (base32
585 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
586 (build-system gnu-build-system)
587 (native-inputs `(("pkg-config" ,pkg-config)))
588 (inputs `(("libxv" ,libxv)))
589 (home-page "http://libdv.sourceforge.net/")
590 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
591 (description "The Quasar DV codec (libdv) is a software codec for DV
592video, the encoding format used by most digital camcorders, typically those
593that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
594developed according to the official standards for DV video: IEC 61834 and
595SMPTE 314M.")
ae0bdd81 596 (license license:lgpl2.1+)))
99d4c455 597
15f1d02a
GG
598(define-public libmatroska
599 (package
600 (name "libmatroska")
23e24ff6 601 (version "1.4.9")
15f1d02a
GG
602 (source
603 (origin
604 (method url-fetch)
605 (uri (string-append "https://dl.matroska.org/downloads/"
0dfc7612 606 name "/" name "-" version ".tar.xz"))
15f1d02a
GG
607 (sha256
608 (base32
23e24ff6
TGR
609 "1j4mjzx6mjzfjf9hz8g4w84krf5jccmr5cyynll0j1vwv3aiv9iq"))))
610 (build-system cmake-build-system)
15f1d02a
GG
611 (inputs
612 `(("libebml" ,libebml)))
23e24ff6
TGR
613 (arguments
614 `(#:configure-flags
615 (list "-DBUILD_SHARED_LIBS=YES")
616 #:tests? #f)) ; no test suite
15f1d02a 617 (home-page "https://www.matroska.org")
cb778117 618 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
15f1d02a
GG
619 (description
620 "Matroska aims to become the standard of multimedia container formats.
cb778117 621It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
15f1d02a
GG
622of XML. EBML enables the Matroska Development Team to gain significant
623advantages in terms of future format extensibility, without breaking file
624support in old parsers.
625libebml is a C++ library to read and write EBML files.")
626 (license license:lgpl2.1)))
627
ee3b55ea
TUBK
628(define-public libva
629 (package
630 (name "libva")
d835652a 631 (version "2.3.0")
ee3b55ea
TUBK
632 (source
633 (origin
634 (method url-fetch)
7035d2dd
MB
635 (uri (list
636 ;; Newer releases are only available on GitHub.
637 (string-append "https://github.com/01org/libva/releases/download/"
638 version "/libva-" version ".tar.bz2")
639 ;; Keep the old URL around for compatibility.
640 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
641 "libva/libva-" version "/libva-" version ".tar.bz2")))
ee3b55ea 642 (sha256
d835652a 643 (base32 "1r6wiw4k044cpb39rfqqdw6qmzw0268whpz124hywck9v980x130"))))
ee3b55ea
TUBK
644 (build-system gnu-build-system)
645 (native-inputs
646 `(("pkg-config" ,pkg-config)))
647 (inputs
648 `(("libdrm" ,libdrm)
649 ("libx11" ,libx11)
650 ("libxext" ,libxext)
651 ("libxfixes" ,libxfixes)
3ee7b4cc
EF
652 ("mesa" ,mesa)
653 ("wayland" ,wayland)))
372cf039
TUBK
654 (arguments
655 `(#:phases
656 (modify-phases %standard-phases
657 (add-before
658 'build 'fix-dlopen-paths
659 (lambda* (#:key outputs #:allow-other-keys)
660 (let ((out (assoc-ref outputs "out")))
661 (substitute* "va/drm/va_drm_auth_x11.c"
662 (("\"libva-x11\\.so\\.%d\"")
d5c88f16
MW
663 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
664 #t))))
372cf039
TUBK
665 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
666 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
667 #:configure-flags
668 (list (string-append "--with-drivers-path="
669 (assoc-ref %build-inputs "mesa") "/lib/dri"))
670 ;; However, we can't write to mesa's store directory, so override the
671 ;; following make variable to install the dummy driver to libva's
672 ;; $prefix/lib/dri directory.
673 #:make-flags
674 (list (string-append "dummy_drv_video_ladir="
675 (assoc-ref %outputs "out") "/lib/dri"))))
5c1c2254 676 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
ee3b55ea
TUBK
677 (synopsis "Video acceleration library")
678 (description "The main motivation for VA-API (Video Acceleration API) is
679to enable hardware accelerated video decode/encode at various
680entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
681standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
ae0bdd81 682 (license license:expat)))
ee3b55ea 683
39efcc9b
AE
684(define-public ffmpeg
685 (package
686 (name "ffmpeg")
c508c065 687 (version "4.1.1")
39efcc9b
AE
688 (source (origin
689 (method url-fetch)
a1121a7f
EF
690 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
691 version ".tar.xz"))
39efcc9b
AE
692 (sha256
693 (base32
c508c065 694 "11id9pm4azfrhpa4vr2yaw31dzgd55kl1zsxwn24sczx9n14jdrp"))))
39efcc9b
AE
695 (build-system gnu-build-system)
696 (inputs
c4c4cc05 697 `(("fontconfig" ,fontconfig)
39efcc9b 698 ("freetype" ,freetype)
8fd43200 699 ("frei0r-plugins" ,frei0r-plugins)
c8dab7f4 700 ("gnutls" ,gnutls)
e816b348 701 ("opus" ,opus)
71241192 702 ("ladspa" ,ladspa)
d4f12db8 703 ("lame" ,lame)
c426e61e 704 ("libass" ,libass)
5d3609e4 705 ("libbluray" ,libbluray)
4d94b93c 706 ("libcaca" ,libcaca)
cc6c0170 707 ("libcdio-paranoia" ,libcdio-paranoia)
1f61cc10 708 ("libdrm" ,libdrm)
39efcc9b 709 ("libtheora" ,libtheora)
bb3df15e 710 ("libva" ,libva)
f88f0d20 711 ("libvdpau" ,libvdpau)
39efcc9b 712 ("libvorbis" ,libvorbis)
dc55b8b2 713 ("libvpx" ,libvpx)
f88f0d20 714 ("libx11" ,libx11)
549381d6 715 ("libx264" ,libx264)
f88f0d20 716 ("mesa" ,mesa)
71241192 717 ("openal" ,openal)
71241192 718 ("pulseaudio" ,pulseaudio)
85bc5434 719 ("sdl" ,sdl2)
72bfebf5 720 ("soxr" ,soxr)
c4c4cc05 721 ("speex" ,speex)
72bfebf5 722 ("twolame" ,twolame)
6d777ff9 723 ("vidstab" ,vidstab)
d505801a 724 ("x265" ,x265)
67932f86 725 ("xvid" ,xvid)
b3546174 726 ("zlib" ,zlib)))
c4c4cc05
JD
727 (native-inputs
728 `(("bc" ,bc)
39efcc9b
AE
729 ("perl" ,perl)
730 ("pkg-config" ,pkg-config)
824d9dc3 731 ("texinfo" ,texinfo)
39efcc9b
AE
732 ("python" ,python-2) ; scripts use interpreter python2
733 ("speex" ,speex)
c4c4cc05 734 ("yasm" ,yasm)))
39efcc9b 735 (arguments
31f9322e 736 `(#:test-target "fate"
12f92e38
AP
737 #:configure-flags
738 ;; possible additional inputs:
739 ;; --enable-avisynth enable reading of AviSynth script
740 ;; files [no]
12f92e38
AP
741 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
742 ;; --enable-libcelt enable CELT decoding via libcelt [no]
743 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
744 ;; and libraw1394 [no]
745 ;; --enable-libfaac enable AAC encoding via libfaac [no]
746 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
747 ;; --enable-libflite enable flite (voice synthesis) support via
748 ;; libflite [no]
749 ;; --enable-libgme enable Game Music Emu via libgme [no]
750 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
751 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
752 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
753 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
754 ;; --enable-libnut enable NUT (de)muxing via libnut,
755 ;; native (de)muxer exists [no]
756 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
757 ;; libopencore-amrnb [no]
758 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
759 ;; libopencore-amrwb [no]
760 ;; --enable-libopencv enable video filtering via libopencv [no]
761 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
762 ;; OpenJPEG [no]
763 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
764 ;; --enable-libschroedinger enable Dirac de/encoding via
765 ;; libschroedinger [no]
766 ;; --enable-libshine enable fixed-point MP3 encoding via
767 ;; libshine [no]
768 ;; --enable-libssh enable SFTP protocol via libssh [no]
769 ;; (libssh2 does not work)
770 ;; --enable-libstagefright-h264 enable H.264 decoding via
771 ;; libstagefright [no]
772 ;; --enable-libutvideo enable Ut Video encoding and decoding via
773 ;; libutvideo [no]
774 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
12f92e38
AP
775 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
776 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
777 ;; libvo-amrwbenc [no]
778 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
779 ;; --enable-libxavs enable AVS encoding via xavs [no]
780 ;; --enable-libzmq enable message passing via libzmq [no]
781 ;; --enable-libzvbi enable teletext support via libzvbi [no]
782 ;; --enable-opencl enable OpenCL code
12f92e38
AP
783 '("--enable-avresample"
784 "--enable-gpl" ; enable optional gpl licensed parts
785 "--enable-shared"
8fd43200 786 "--enable-frei0r"
12f92e38 787 "--enable-fontconfig"
c8dab7f4 788 "--enable-gnutls"
12f92e38
AP
789 "--enable-ladspa"
790 "--enable-libass"
791 "--enable-libbluray"
792 "--enable-libcaca"
793 "--enable-libcdio"
794 "--enable-libfreetype"
795 "--enable-libmp3lame"
796 "--enable-libopus"
797 "--enable-libpulse"
12f92e38
AP
798 "--enable-libsoxr"
799 "--enable-libspeex"
800 "--enable-libtheora"
801 "--enable-libtwolame"
6d777ff9 802 "--enable-libvidstab"
12f92e38
AP
803 "--enable-libvorbis"
804 "--enable-libvpx"
805 "--enable-libxvid"
806 "--enable-libx264"
d505801a 807 "--enable-libx265"
12f92e38 808 "--enable-openal"
f88f0d20 809 "--enable-opengl"
1f61cc10 810 "--enable-libdrm"
12f92e38
AP
811
812 "--enable-runtime-cpudetect"
813
1e2a36e1
EF
814 ;; The HTML pages take 7.2 MiB
815 "--disable-htmlpages"
816
817 ;; The static libraries are 23 MiB
818 "--disable-static"
819
12f92e38
AP
820 ;; Runtime cpu detection is not implemented on
821 ;; MIPS, so we disable some features.
822 "--disable-mips32r2"
c5e1fcd0 823 "--disable-mipsdsp"
12f92e38
AP
824 "--disable-mipsdspr2"
825 "--disable-mipsfpu")
31f9322e 826 #:phases
f2feb0ce
LC
827 (modify-phases %standard-phases
828 (replace
39efcc9b
AE
829 'configure
830 ;; configure does not work followed by "SHELL=..." and
831 ;; "CONFIG_SHELL=..."; set environment variables instead
832 (lambda* (#:key outputs configure-flags #:allow-other-keys)
833 (let ((out (assoc-ref outputs "out")))
834 (substitute* "configure"
47734a56 835 (("#! /bin/sh") (string-append "#!" (which "sh"))))
39efcc9b
AE
836 (setenv "SHELL" (which "bash"))
837 (setenv "CONFIG_SHELL" (which "bash"))
3918ed73
MW
838 (apply invoke
839 "./configure"
840 (string-append "--prefix=" out)
841 ;; Add $libdir to the RUNPATH of all the binaries.
842 (string-append "--extra-ldflags=-Wl,-rpath="
843 out "/lib")
844 configure-flags))))
457e528e
LC
845 (add-before
846 'check 'set-ld-library-path
847 (lambda _
848 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
849 ;; running tests.
850 (let* ((dso (find-files "." "\\.so$"))
851 (path (string-join (map dirname dso) ":")))
852 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
853 (setenv "LD_LIBRARY_PATH" path)
27350ef8 854 #t))))))
702bfbf1 855 (home-page "https://www.ffmpeg.org/")
39efcc9b
AE
856 (synopsis "Audio and video framework")
857 (description "FFmpeg is a complete, cross-platform solution to record,
858convert and stream audio and video. It includes the libavcodec
859audio/video codec library.")
ae0bdd81 860 (license license:gpl2+)))
d5a748e8 861
06079c19
RH
862(define-public ffmpeg-3.4
863 (package
864 (inherit ffmpeg)
c5e57110 865 (version "3.4.5")
06079c19
RH
866 (source (origin
867 (method url-fetch)
868 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
869 version ".tar.xz"))
870 (sha256
871 (base32
c5e57110 872 "0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l"))))))
06079c19 873
1faf0a04
NG
874(define-public ffmpeg-for-stepmania
875 (hidden-package
876 (package
877 (inherit ffmpeg)
878 (version "2.1.3")
879 (source
880 (origin
881 (method git-fetch)
882 (uri (git-reference
883 (url "https://github.com/stepmania/ffmpeg.git")
884 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
885 (sha256
886 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
887 (file-name (git-file-name "ffmpeg" version))))
888 (arguments
889 (substitute-keyword-arguments (package-arguments ffmpeg)
890 ((#:configure-flags flags)
891 '(list "--disable-programs"
892 "--disable-doc"
893 "--disable-debug"
894 "--disable-avdevice"
895 "--disable-swresample"
896 "--disable-postproc"
897 "--disable-avfilter"
898 "--disable-shared"
899 "--enable-static"))))
900 (inputs '()))))
901
4febfdd0
BT
902(define-public ffmpegthumbnailer
903 (package
904 (name "ffmpegthumbnailer")
905 (version "2.2.0")
906 (source (origin
722e6ffe
RW
907 (method git-fetch)
908 (uri (git-reference
909 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
910 (commit version)))
911 (file-name (git-file-name name version))
4febfdd0
BT
912 (sha256
913 (base32
722e6ffe 914 "0kl8aa547icy9b05njps02a8sw4yn4f8fzs228kig247sn09s4cp"))))
4febfdd0
BT
915 (build-system cmake-build-system)
916 (native-inputs
917 `(("pkg-config" ,pkg-config)))
918 (inputs
919 `(("ffmpeg" ,ffmpeg)
920 ("libjpeg-turbo" ,libjpeg-turbo)
921 ("libpng" ,libpng)
922 ("gvfs" ,gvfs)))
923 (arguments
924 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
925 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
926 (synopsis "Create thumbnails from video files")
927 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
928can be used by file managers to create thumbnails for your video files. The
929thumbnailer uses ffmpeg to decode frames from the video files, so supported
930videoformats depend on the configuration flags of ffmpeg.")
931 (license license:gpl2+)))
932
d5a748e8
AE
933(define-public vlc
934 (package
935 (name "vlc")
dba326de 936 (version "3.0.6")
d5a748e8
AE
937 (source (origin
938 (method url-fetch)
939 (uri (string-append
a134cc8e 940 "https://download.videolan.org/pub/videolan/vlc/"
324c049f
LF
941 (car (string-split version #\-))
942 "/vlc-" version ".tar.xz"))
d5a748e8
AE
943 (sha256
944 (base32
dba326de 945 "1lvyyahv6g9zv7m5g5qinyrwmw47zdsd5ysimb862j7kw15nvh8q"))))
d5a748e8
AE
946 (build-system gnu-build-system)
947 (native-inputs
76277052
MW
948 `(("flex" ,flex)
949 ("bison" ,bison)
950 ("gettext" ,gettext-minimal)
951 ("git" ,git) ; needed for a test
d5a748e8
AE
952 ("pkg-config" ,pkg-config)))
953 ;; FIXME: Add optional inputs once available.
954 (inputs
955 `(("alsa-lib" ,alsa-lib)
956 ("avahi" ,avahi)
957 ("dbus" ,dbus)
76277052 958 ("eudev" ,eudev)
d5a748e8 959 ("flac" ,flac)
76277052 960 ("ffmpeg" ,ffmpeg)
d5a748e8
AE
961 ("fontconfig" ,fontconfig)
962 ("freetype" ,freetype)
76277052 963 ("fribidi" ,fribidi)
d5a748e8 964 ("gnutls" ,gnutls)
8824da4c 965 ("liba52" ,liba52)
76277052
MW
966 ("libarchive" ,libarchive)
967 ("libass" ,libass)
968 ("libavc1394" ,libavc1394)
969 ("libbluray" ,libbluray)
970 ("libcaca" ,libcaca)
d5a748e8 971 ("libcddb" ,libcddb)
76277052 972 ("libdca" ,libdca)
72b6a894 973 ("libdvbpsi" ,libdvbpsi)
76277052
MW
974 ("libdvdnav" ,libdvdnav)
975 ("libdvdread" ,libdvdread)
976 ("libebml" ,libebml)
d5a748e8 977 ("libgcrypt" ,libgcrypt)
76277052 978 ("libidn" ,libidn)
d5a748e8
AE
979 ("libkate" ,libkate)
980 ("libmad" ,libmad)
76277052 981 ("libmatroska" ,libmatroska)
78d112c2 982 ("libmicrodns" ,libmicrodns)
76277052
MW
983 ("libmodplug" ,libmodplug)
984 ("libmpeg2" ,libmpeg2)
d5a748e8
AE
985 ("libogg" ,libogg)
986 ("libpng" ,libpng)
76277052
MW
987 ("libraw1394" ,libraw1394)
988 ("librsvg" ,librsvg)
d5a748e8 989 ("libsamplerate" ,libsamplerate)
76277052 990 ("libsecret" ,libsecret)
d5a748e8 991 ("libssh2" ,libssh2)
76277052
MW
992 ("libupnp" ,libupnp)
993 ("libva" ,libva)
994 ("libvdpau" ,libvdpau)
d5a748e8 995 ("libvorbis" ,libvorbis)
86b2ab8f 996 ("libvpx" ,libvpx-1.7)
d5a748e8 997 ("libtheora" ,libtheora)
76277052 998 ("libx264" ,libx264)
d5a748e8 999 ("libxext" ,libxext)
c161c22a 1000 ("libxi" ,libxi)
d5a748e8
AE
1001 ("libxinerama" ,libxinerama)
1002 ("libxml2" ,libxml2)
1003 ("libxpm" ,libxpm)
2aaa5729 1004 ("livemedia-utils" ,livemedia-utils)
76277052 1005 ("lua" ,lua-5.2)
d5a748e8
AE
1006 ("mesa" ,mesa)
1007 ("opus" ,opus)
1008 ("perl" ,perl)
1009 ("pulseaudio" ,pulseaudio)
fc2982f7 1010 ("protobuf" ,protobuf)
d5a748e8 1011 ("python" ,python-wrapper)
552c3e95 1012 ("qtbase" ,qtbase)
76277052 1013 ("qtsvg" ,qtsvg)
552c3e95 1014 ("qtx11extras" ,qtx11extras)
76277052 1015 ("samba" ,samba)
d5a748e8
AE
1016 ("sdl" ,sdl)
1017 ("sdl-image" ,sdl-image)
1018 ("speex" ,speex)
76277052
MW
1019 ("speexdsp" ,speexdsp)
1020 ("taglib" ,taglib)
1021 ("twolame" ,twolame)
1022 ("unzip" ,unzip)
1023 ("wayland" ,wayland)
1024 ("wayland-protocols" ,wayland-protocols)
8f5f6c92 1025 ("x265" ,x265)
d5a748e8
AE
1026 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1027 (arguments
1028 `(#:configure-flags
eb1f2420 1029 `("CXXFLAGS=-std=gnu++11"
76277052 1030 "BUILDCC=gcc"
d5a748e8
AE
1031 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1032 (assoc-ref %build-inputs "ffmpeg")
cd76fbde
LC
1033 "/lib")) ;needed for the tests
1034
1035 #:phases
1036 (modify-phases %standard-phases
2d2e97bd 1037 (add-after 'unpack 'patch-source
2aaa5729
CL
1038 (lambda* (#:key inputs #:allow-other-keys)
1039 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
2d2e97bd 1040 (substitute* "configure"
2aaa5729
CL
1041 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1042 (string-append "LIVE555_PREFIX=" livemedia-utils)))
2d2e97bd
MB
1043 ;; Some of the tests require using the display to test out VLC,
1044 ;; which fails in our sandboxed build system
1045 (substitute* "test/run_vlc.sh"
1046 (("./vlc --ignore-config") "echo"))
76277052
MW
1047
1048 ;; modules/text_renderer/freetype/text_layout.c uses a
1049 ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
1050 ;; from fribidi.h, so for now we enable the use of deprecated
1051 ;; fribidi interfaces from this file.
1052 ;; FIXME: Try removing this for vlc >= 3.0.3.
1053 (substitute* "modules/text_renderer/freetype/text_layout.c"
1054 (("# define FRIBIDI_NO_DEPRECATED 1") ""))
1055
c7d901c1 1056 ;; Fix build against Qt 5.11.
76277052 1057 (substitute* "modules/gui/qt/actions_manager.cpp"
c7d901c1
CL
1058 (("#include <vlc_keys.h>") "#include <vlc_keys.h>
1059#include <QAction>"))
76277052 1060 (substitute* "modules/gui/qt/components/simple_preferences.cpp"
c7d901c1
CL
1061 (("#include <QFont>") "#include <QFont>
1062#include <QButtonGroup>"))
2aaa5729 1063 #t)))
76277052 1064 (add-after 'strip 'regenerate-plugin-cache
cd76fbde
LC
1065 (lambda* (#:key outputs #:allow-other-keys)
1066 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1067 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1068 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1069 ;; it references. Thus, we first reset the timestamps of all
1070 ;; these files, and then regenerate the cache such that the
1071 ;; mtimes it includes are always zero instead of being dependent
1072 ;; on the build time.
1073 (let* ((out (assoc-ref outputs "out"))
1074 (pkglibdir (string-append out "/lib/vlc"))
1075 (plugindir (string-append pkglibdir "/plugins"))
1076 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1077 ;; TODO: Factorize 'reset-timestamps'.
1078 (for-each (lambda (file)
1079 (let ((s (lstat file)))
1080 (unless (eq? (stat:type s) 'symlink)
76277052 1081 (utime file 1 1))))
cd76fbde 1082 (find-files plugindir))
76277052
MW
1083 (invoke cachegen plugindir))))
1084 (add-after 'install 'wrap-executable
1085 (lambda* (#:key outputs #:allow-other-keys)
1086 (let ((out (assoc-ref outputs "out"))
1087 (plugin-path (getenv "QT_PLUGIN_PATH")))
1088 (wrap-program (string-append out "/bin/vlc")
1089 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1090 #t)))))
d5a748e8
AE
1091 (home-page "https://www.videolan.org/")
1092 (synopsis "Audio and video framework")
1093 (description "VLC is a cross-platform multimedia player and framework
1094that plays most multimedia files as well as DVD, Audio CD, VCD, and various
34a19d35 1095streaming protocols.")
ae0bdd81 1096 (license license:gpl2+)))
ace69243
AE
1097
1098(define-public mplayer
1099 (package
1100 (name "mplayer")
e71b20e5 1101 (version "1.3.0")
ace69243
AE
1102 (source (origin
1103 (method url-fetch)
1104 (uri (string-append
ebde7c7a 1105 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
ace69243
AE
1106 version ".tar.xz"))
1107 (sha256
1108 (base32
e71b20e5 1109 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
ace69243
AE
1110 (build-system gnu-build-system)
1111 ;; FIXME: Add additional inputs once available.
1112 (native-inputs
1113 `(("pkg-config" ,pkg-config)))
1114 (inputs
1115 `(("alsa-lib" ,alsa-lib)
1116 ("cdparanoia" ,cdparanoia)
21e6428d 1117 ("ffmpeg" ,ffmpeg-3.4)
778a6a8b 1118 ("fontconfig" ,fontconfig)
ace69243 1119 ("freetype" ,freetype)
778a6a8b 1120;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
ace69243 1121 ("lame" ,lame)
778a6a8b 1122 ("libass" ,libass)
b3546174
MW
1123 ("libdvdcss" ,libdvdcss)
1124 ("libdvdnav" ,libdvdnav)
ace69243 1125 ("libjpeg" ,libjpeg)
778a6a8b
EF
1126 ("libmpeg2" ,libmpeg2)
1127 ("libmpg123" ,mpg123) ; audio codec for MP3
ace69243
AE
1128 ("libpng" ,libpng)
1129 ("libtheora" ,libtheora)
778a6a8b 1130 ("libvdpau" ,libvdpau)
ace69243
AE
1131 ("libvorbis" ,libvorbis)
1132 ("libx11" ,libx11)
778a6a8b 1133 ("libx264" ,libx264)
ace69243
AE
1134 ("libxinerama" ,libxinerama)
1135 ("libxv" ,libxv)
778a6a8b 1136 ("libxxf86dga" ,libxxf86dga)
ace69243 1137 ("mesa" ,mesa)
778a6a8b 1138 ("opus" ,opus)
ace69243
AE
1139 ("perl" ,perl)
1140 ("pulseaudio" ,pulseaudio)
1141 ("python" ,python-wrapper)
1142 ("sdl" ,sdl)
1143 ("speex" ,speex)
1144 ("yasm" ,yasm)
1145 ("zlib" ,zlib)))
1146 (arguments
1147 `(#:tests? #f ; no test target
1148 #:phases
ebde7c7a
EF
1149 (modify-phases %standard-phases
1150 (replace 'configure
ace69243
AE
1151 ;; configure does not work followed by "SHELL=..." and
1152 ;; "CONFIG_SHELL=..."; set environment variables instead
1153 (lambda* (#:key inputs outputs #:allow-other-keys)
1154 (let ((out (assoc-ref outputs "out"))
1155 (libx11 (assoc-ref inputs "libx11")))
1156 (substitute* "configure"
2564b7c2 1157 (("#! /bin/sh") (string-append "#!" (which "sh"))))
ace69243
AE
1158 (setenv "SHELL" (which "bash"))
1159 (setenv "CONFIG_SHELL" (which "bash"))
1fe5791d 1160 (invoke "./configure"
ace69243
AE
1161 (string-append "--extra-cflags=-I"
1162 libx11 "/include") ; to detect libx11
ebde7c7a 1163 "--disable-ffmpeg_a" ; disables bundled ffmpeg
ace69243 1164 (string-append "--prefix=" out)
fe138965
MW
1165 ;; Enable runtime cpu detection where supported,
1166 ;; and choose a suitable target.
1167 ,@(match (or (%current-target-system)
1168 (%current-system))
1169 ("x86_64-linux"
1170 '("--enable-runtime-cpudetection"
1171 "--target=x86_64-linux"))
1172 ("i686-linux"
1173 '("--enable-runtime-cpudetection"
1174 "--target=i686-linux"))
1175 ("mips64el-linux"
f0d6d835
MW
1176 '("--target=mips3-linux"))
1177 (_ (list (string-append
1178 "--target="
1179 (or (%current-target-system)
1180 (nix-system->gnu-triplet
1181 (%current-system)))))))
1fe5791d 1182 "--disable-iwmmxt")))))))
ebde7c7a 1183 (home-page "https://www.mplayerhq.hu/design7/news.html")
ace69243
AE
1184 (synopsis "Audio and video player")
1185 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1186Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1187NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1188SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
ae0bdd81 1189 (license license:gpl2)))
d0ed39be 1190
1c1178cd
TUBK
1191(define-public mpv
1192 (package
1193 (name "mpv")
cd81c9e2 1194 (version "0.29.1")
1c1178cd 1195 (source (origin
ce4ac7d5
RW
1196 (method git-fetch)
1197 (uri (git-reference
1198 (url "https://github.com/mpv-player/mpv.git")
1199 (commit (string-append "v" version))))
1200 (file-name (git-file-name name version))
1c1178cd
TUBK
1201 (sha256
1202 (base32
ce4ac7d5 1203 "138921kx8g6qprim558xin09xximjhsj9ss8b71ifg2m6kclym8m"))))
1c1178cd
TUBK
1204 (build-system waf-build-system)
1205 (native-inputs
832d60dc 1206 `(("perl" ,perl) ; for zsh completion file
1c1178cd
TUBK
1207 ("pkg-config" ,pkg-config)
1208 ("python-docutils" ,python-docutils)))
3440f12a 1209 ;; Missing features: libguess, V4L2
1c1178cd
TUBK
1210 (inputs
1211 `(("alsa-lib" ,alsa-lib)
1212 ("enca" ,enca)
06079c19 1213 ("ffmpeg" ,ffmpeg)
2d8781a4 1214 ("jack" ,jack-1)
1c1178cd
TUBK
1215 ("ladspa" ,ladspa)
1216 ("lcms" ,lcms)
1217 ("libass" ,libass)
1218 ("libbluray" ,libbluray)
1219 ("libcaca" ,libcaca)
1220 ("libbs2b" ,libbs2b)
1221 ("libcdio-paranoia" ,libcdio-paranoia)
1222 ("libdvdread" ,libdvdread)
1223 ("libdvdnav" ,libdvdnav)
1224 ("libjpeg" ,libjpeg)
1225 ("libva" ,libva)
81c29ccc 1226 ("libvdpau" ,libvdpau)
1c1178cd
TUBK
1227 ("libx11" ,libx11)
1228 ("libxext" ,libxext)
1229 ("libxinerama" ,libxinerama)
1230 ("libxrandr" ,libxrandr)
1231 ("libxscrnsaver" ,libxscrnsaver)
1232 ("libxv" ,libxv)
e66f0dd2
AP
1233 ;; XXX: lua > 5.2 is not currently supported; see
1234 ;; waftools/checks/custom.py
1235 ("lua" ,lua-5.2)
1c1178cd
TUBK
1236 ("mesa" ,mesa)
1237 ("mpg123" ,mpg123)
1238 ("pulseaudio" ,pulseaudio)
1239 ("rsound" ,rsound)
870541d6 1240 ("shaderc" ,shaderc)
08899ee9 1241 ("vulkan-headers" ,vulkan-headers)
e6fcf903 1242 ("vulkan-loader" ,vulkan-loader)
f0b8d83a 1243 ("waf" ,python-waf)
3440f12a 1244 ("wayland" ,wayland)
abc5ef5a 1245 ("wayland-protocols" ,wayland-protocols)
c695fb76 1246 ("libxkbcommon" ,libxkbcommon)
1c1178cd
TUBK
1247 ("youtube-dl" ,youtube-dl)
1248 ("zlib" ,zlib)))
1249 (arguments
1250 '(#:phases
1251 (modify-phases %standard-phases
1252 (add-before
f8503e2b 1253 'configure 'setup-waf
1c1178cd 1254 (lambda* (#:key inputs #:allow-other-keys)
a2aa746c
EF
1255 (let ((waf (assoc-ref inputs "waf")))
1256 (copy-file (string-append waf "/bin/waf") "waf"))
d39260dc
MW
1257 (setenv "CC" "gcc")
1258 #t)))
98c8b963 1259 #:configure-flags (list "--enable-libmpv-shared"
43ba5dd4
EF
1260 "--enable-cdda"
1261 "--enable-dvdread"
1262 "--enable-dvdnav"
98c8b963
EF
1263 "--enable-zsh-comp"
1264 "--disable-build-date")
1c1178cd
TUBK
1265 ;; No check function defined.
1266 #:tests? #f))
581873b5 1267 (home-page "https://mpv.io/")
1c1178cd
TUBK
1268 (synopsis "Audio and video player")
1269 (description "mpv is a general-purpose audio and video player. It is a
1270fork of mplayer2 and MPlayer. It shares some features with the former
1271projects while introducing many more.")
ae0bdd81 1272 (license license:gpl2+)))
1c1178cd 1273
0e74bb5b
AG
1274(define-public gnome-mpv
1275 (package
1276 (name "gnome-mpv")
7a66d8a4 1277 (version "0.16")
0e74bb5b
AG
1278 (source
1279 (origin
1280 (method url-fetch)
1281 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1282 "/download/v" version "/gnome-mpv-" version
1283 ".tar.xz"))
1284 (sha256
1285 (base32
7a66d8a4 1286 "0jzdzvhcqp5jp1inwk2466zf7r8iimk3x69066gl8mzaay98mk92"))))
0e74bb5b
AG
1287 (native-inputs
1288 `(("intltool" ,intltool)
1289 ("pkg-config" ,pkg-config)))
1290 (inputs
1291 `(("gtk+" ,gtk+)
1292 ("libepoxy" ,libepoxy)
1293 ("mpv" ,mpv)))
1294 (build-system glib-or-gtk-build-system)
1295 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1296 (synopsis "GTK+ frontend for the mpv media player")
1297 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1298GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1299access to mpv's powerful playback capabilities.")
1300 (license license:gpl3+)))
1301
d0ed39be
DT
1302(define-public libvpx
1303 (package
1304 (name "libvpx")
037d5913 1305 (version "1.8.0")
d0ed39be 1306 (source (origin
8a464433
MB
1307 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1308 (method git-fetch)
1309 (uri (git-reference
1310 (url "https://chromium.googlesource.com/webm/libvpx")
1311 (commit (string-append "v" version))))
1312 (file-name (git-file-name name version))
d0ed39be
DT
1313 (sha256
1314 (base32
037d5913
MB
1315 "079pb80am08lj8y5rx99vdr99mdqis9067f172zq12alkz849n93"))
1316 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
d0ed39be
DT
1317 (build-system gnu-build-system)
1318 (arguments
e896c227 1319 `(#:configure-flags (list "--enable-shared"
0e47b4e7
EF
1320 "--as=yasm"
1321 ;; Limit size to avoid CVE-2015-1258
1322 "--size-limit=16384x16384"
e896c227
MB
1323 (string-append "--prefix=" (assoc-ref %outputs "out")))
1324 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1325 (assoc-ref %outputs "out") "/lib"))
1326 #:phases (modify-phases %standard-phases
1327 (replace 'configure
1328 (lambda* (#:key configure-flags #:allow-other-keys)
1329 ;; The configure script does not understand some of the GNU
1330 ;; options, so we only add the flags specified above.
1331 (apply invoke "./configure" configure-flags))))
4f8f15cd 1332 #:tests? #f)) ; no check target
d0ed39be
DT
1333 (native-inputs
1334 `(("perl" ,perl)
1335 ("yasm" ,yasm)))
1336 (synopsis "VP8/VP9 video codec")
1337 (description "libvpx is a codec for the VP8/VP9 video compression format.")
ae0bdd81 1338 (license license:bsd-3)
ad7664f6 1339 (home-page "https://www.webmproject.org/")))
615215a5 1340
037d5913
MB
1341;; GNU IceCat fails to build against 1.8.0, so keep this version for now.
1342(define-public libvpx-1.7
1343 (package
1344 (inherit libvpx)
1345 (version "1.7.0")
1346 (source (origin
1347 (inherit (package-source libvpx))
1348 (uri (git-reference
1349 (url "https://chromium.googlesource.com/webm/libvpx")
1350 (commit (string-append "v" version))))
1351 (file-name (git-file-name "libvpx" version))
1352 (sha256
1353 (base32
1354 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1355 (patches
1356 (append
1357 (origin-patches (package-source libvpx))
1358 (search-patches "libvpx-use-after-free-in-postproc.patch")))))))
1359
615215a5
LC
1360(define-public youtube-dl
1361 (package
1362 (name "youtube-dl")
28cbf65c 1363 (version "2019.02.18")
615215a5
LC
1364 (source (origin
1365 (method url-fetch)
38f18309
EF
1366 (uri (string-append "https://github.com/rg3/youtube-dl/releases/"
1367 "download/" version "/youtube-dl-"
615215a5
LC
1368 version ".tar.gz"))
1369 (sha256
1370 (base32
28cbf65c 1371 "1sr0f6ixpaqyp3cf29zswx84y3nfabwnk3sljcgvgnmjp73zzfv1"))))
615215a5 1372 (build-system python-build-system)
2ad9515c
AV
1373 (arguments
1374 ;; The problem here is that the directory for the man page and completion
1375 ;; files is relative, and for some reason, setup.py uses the
1376 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1377 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1378 ;; completion file is called 'youtube-dl' rather than
1379 ;; 'youtube-dl.bash-completion'.
31c58006
LF
1380 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1381 #:phases (modify-phases %standard-phases
2ad9515c
AV
1382 (add-before 'install 'fix-the-data-directories
1383 (lambda* (#:key outputs #:allow-other-keys)
1384 (let ((prefix (assoc-ref outputs "out")))
1385 (mkdir "bash-completion")
1386 (rename-file "youtube-dl.bash-completion"
1387 "bash-completion/youtube-dl")
1388 (substitute* "setup.py"
1389 (("youtube-dl\\.bash-completion")
1390 "bash-completion/youtube-dl")
1391 (("'etc/")
1392 (string-append "'" prefix "/etc/"))
1393 (("'share/")
caa8de70
TGR
1394 (string-append "'" prefix "/share/")))
1395 #t))))))
615215a5
LC
1396 (synopsis "Download videos from YouTube.com and other sites")
1397 (description
b798dfde 1398 "Youtube-dl is a small command-line program to download videos from
1c911690 1399YouTube.com and many more sites.")
39dc7032 1400 (home-page "https://yt-dl.org")
ae0bdd81 1401 (license license:public-domain)))
e6bdb36a 1402
794223bc
CM
1403(define-public youtube-dl-gui
1404 (package
1405 (name "youtube-dl-gui")
1406 (version "0.3.8")
1407 (source
1408 (origin
1409 (method url-fetch)
1410 (uri (pypi-uri "Youtube-DLG" version))
1411 (sha256
1412 (base32
1413 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1414 (build-system python-build-system)
1415 (arguments
1416 ;; In Guix, wxpython has not yet been packaged for Python 3.
1417 `(#:python ,python-2
1418 ;; This package has no tests.
1419 #:tests? #f
1420 #:phases
1421 (modify-phases %standard-phases
1422 (add-before 'build 'patch-source
1423 (lambda* (#:key inputs #:allow-other-keys)
1424 ;; The youtube-dl-gui program lets you configure options. Some of
1425 ;; them are problematic, so we change their defaults.
1426 (substitute* "youtube_dl_gui/optionsmanager.py"
1427 ;; When this is true, the builder process will try (and fail) to
1428 ;; write logs to the builder user's home directory.
1429 (("'enable_log': True") "'enable_log': False")
1430 ;; This determines which youtube-dl program youtube-dl-gui will
1431 ;; run. If we don't set this, then youtube-dl-gui might download
1432 ;; an arbitrary copy from the Internet into the user's home
1433 ;; directory and run it, so let's make sure youtube-dl-gui uses
1434 ;; the youtube-dl from the inputs by default.
1435 (("'youtubedl_path': self.config_path")
1436 (string-append "'youtubedl_path': '"
1437 (assoc-ref inputs "youtube-dl")
1438 "/bin'"))
1439 ;; When this is True, when youtube-dl-gui is finished downloading
1440 ;; a file, it will try (and possibly fail) to open the directory
1441 ;; containing the downloaded file. This can fail because it
1442 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1443 ;; adding xdg-utils to the propagated inputs is not enough to
1444 ;; make this work, so for now we set the default to False.
1445 (("'open_dl_dir': True") "'open_dl_dir': False"))
1446 ;; The youtube-dl program from the inputs is actually a wrapper
1447 ;; script written in bash, so attempting to invoke it as a python
1448 ;; script will fail.
1449 (substitute* "youtube_dl_gui/downloaders.py"
1450 (("cmd = \\['python', self\\.youtubedl_path\\]")
1451 "cmd = [self.youtubedl_path]"))
1452 ;; Use relative paths for installing data files so youtube-dl-gui
1453 ;; installs the files relative to its prefix in the store, rather
1454 ;; than relative to /. Also, instead of installing data files into
1455 ;; $prefix/usr/share, install them into $prefix/share for
1456 ;; consistency (see: (standards) Directory Variables).
1457 (substitute* "setup.py"
1458 (("= '/usr/share") "= 'share"))
1459 ;; Update get_locale_file() so it finds the installed localization
1460 ;; files.
1461 (substitute* "youtube_dl_gui/utils.py"
1462 (("os\\.path\\.join\\('/usr', 'share'")
1463 (string-append "os.path.join('"
1464 (assoc-ref %outputs "out")
9dcfd6aa
MW
1465 "', 'share'")))
1466 #t)))))
794223bc
CM
1467 (inputs
1468 `(("python2-wxpython" ,python2-wxpython)
1469 ("youtube-dl" ,youtube-dl)))
1470 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1471 (synopsis
1472 "GUI (Graphical User Interface) for @command{youtube-dl}")
1473 (description
1474 "Youtube-dlG is a GUI (Graphical User Interface) for
1475@command{youtube-dl}. You can use it to download videos from YouTube and any
1476other site that youtube-dl supports.")
1477 (license license:unlicense)))
1478
72fa6667
FS
1479(define-public you-get
1480 (package
1481 (name "you-get")
b71c0645 1482 (version "0.4.1210")
72fa6667 1483 (source (origin
5d9e3edd
RW
1484 (method git-fetch)
1485 (uri (git-reference
1486 (url "https://github.com/soimort/you-get.git")
1487 (commit (string-append "v" version))))
1488 (file-name (git-file-name name version))
72fa6667
FS
1489 (sha256
1490 (base32
b71c0645 1491 "1plw518hzpzzcr38phlnsbpq7aqnps8iwrgr68f6d41rppl1qb25"))))
72fa6667 1492 (build-system python-build-system)
72fa6667 1493 (inputs
5e84eab0
TGR
1494 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1495 (arguments
1496 `(#:phases
1497 (modify-phases %standard-phases
1498 (add-after 'unpack 'qualify-input-references
1499 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1500 ;; happens to be in the user's $PATH at run time.
1501 (lambda* (#:key inputs #:allow-other-keys)
1502 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1503 "/bin/ffmpeg")))
1504 (substitute* "src/you_get/processor/ffmpeg.py"
1505 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1506 ;; same string is also used when sniffing ffmpeg's output.
1507 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1508 (string-append prefix "'" ffmpeg "'")))
1509 #t))))
1510 #:tests? #f)) ; XXX some tests need Internet access
817e91bc 1511 (synopsis "Download videos, audio, or images from Web sites")
72fa6667
FS
1512 (description
1513 "You-Get is a command-line utility to download media contents (videos,
1514audio, images) from the Web. It can use either mpv or vlc for playback.")
1515 (home-page "https://you-get.org/")
1516 (license license:expat)))
1517
6f45e45d
AV
1518(define-public youtube-viewer
1519 (package
1520 (name "youtube-viewer")
26057c36 1521 (version "3.5.2")
6f45e45d 1522 (source (origin
6be44578
TGR
1523 (method git-fetch)
1524 (uri (git-reference
1525 (url "https://github.com/trizen/youtube-viewer.git")
1526 (commit version)))
1527 (file-name (git-file-name name version))
6f45e45d
AV
1528 (sha256
1529 (base32
26057c36 1530 "0sx0f7jgc41a4anflw02zqk5yivydn02nn78kxkn3fik6xdmv3yd"))))
6f45e45d
AV
1531 (build-system perl-build-system)
1532 (native-inputs
1533 `(("perl-module-build" ,perl-module-build)))
1534 ;; FIXME: Add optional dependencies once available:
1535 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1536 (inputs
1537 `(("perl-data-dump" ,perl-data-dump)
1538 ("perl-file-sharedir" ,perl-file-sharedir)
1539 ("perl-gtk2" ,perl-gtk2)
1540 ("perl-json" ,perl-json)
1541 ("perl-libwww" ,perl-libwww)
1542 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1543 ("perl-mozilla-ca" ,perl-mozilla-ca)
1544 ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
1545 (arguments
1546 `(#:modules ((guix build perl-build-system)
1547 (guix build utils)
1548 (srfi srfi-26))
1549 #:module-build-flags '("--gtk")
63d99002
AV
1550 #:phases
1551 (modify-phases %standard-phases
0dd8da0b
EB
1552 (add-after 'install 'install-desktop
1553 (lambda* (#:key outputs #:allow-other-keys)
1554 (let* ((out (assoc-ref outputs "out"))
1555 (sharedir (string-append out "/share")))
1556 (install-file "share/gtk-youtube-viewer.desktop"
1557 (string-append sharedir "/applications"))
1558 (install-file "share/icons/gtk-youtube-viewer.png"
1559 (string-append sharedir "/pixmaps"))
1560 #t)))
63d99002
AV
1561 (add-after 'install 'wrap-program
1562 (lambda* (#:key outputs #:allow-other-keys)
1563 (let* ((out (assoc-ref outputs "out"))
1564 (bin-dir (string-append out "/bin/"))
1565 (site-dir (string-append out "/lib/perl5/site_perl/"))
1566 (lib-path (getenv "PERL5LIB")))
1567 (for-each (cut wrap-program <>
1568 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1569 (find-files bin-dir))
1570 #t))))))
6f45e45d
AV
1571 (synopsis
1572 "Lightweight application for searching and streaming videos from YouTube")
1573 (description
1574 "Youtube-viewer searches and plays YouTube videos in a native player.
1575It comes with various search options; it can search for videos, playlists
1576and/or channels. The videos are streamed directly in a selected video player
1577at the best resolution (customizable) and with closed-captions (if available).
1578Both command-line and GTK2 interface are available.")
1579 (home-page "https://github.com/trizen/youtube-viewer")
1580 (license license:perl-license)))
1581
5d3609e4
TUBK
1582(define-public libbluray
1583 (package
1584 (name "libbluray")
004450f4 1585 (version "1.0.2")
5d3609e4
TUBK
1586 (source (origin
1587 (method url-fetch)
5e3f68e6 1588 (uri (string-append "https://download.videolan.org/videolan/"
5d3609e4
TUBK
1589 name "/" version "/"
1590 name "-" version ".tar.bz2"))
1591 (sha256
1592 (base32
004450f4 1593 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
5d3609e4 1594 (build-system gnu-build-system)
6c0cd765 1595 (arguments
d76e2634 1596 `(#:configure-flags '("--disable-bdjava-jar")
6c0cd765
AP
1597 #:phases
1598 (modify-phases %standard-phases
004450f4
TGR
1599 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1600 ;; Avoid the need to propagate libxml2 by referring to it
1601 ;; directly, as is already done for fontconfig & freetype.
1602 (lambda* (#:key inputs #:allow-other-keys)
1603 (let ((libxml2 (assoc-ref inputs "libxml2")))
1604 (substitute* "configure"
1605 ((" libxml-2.0") ""))
1606 (substitute* "src/libbluray.pc.in"
1607 (("^Libs.private:" field)
1608 (string-append field " -L" libxml2 "/lib -lxml2")))
1609 #t)))
6c0cd765
AP
1610 (add-before 'build 'fix-dlopen-paths
1611 (lambda* (#:key inputs #:allow-other-keys)
1612 (let ((libaacs (assoc-ref inputs "libaacs"))
1613 (libbdplus (assoc-ref inputs "libbdplus")))
1614 (substitute* "src/libbluray/disc/aacs.c"
1615 (("\"libaacs\"")
1616 (string-append "\"" libaacs "/lib/libaacs\"")))
1617 (substitute* "src/libbluray/disc/bdplus.c"
1618 (("\"libbdplus\"")
1619 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1620 #t))))))
2da45ebe 1621 (native-inputs `(("pkg-config" ,pkg-config)))
5d3609e4 1622 (inputs
71ee51a0 1623 `(("fontconfig" ,fontconfig)
5d3609e4 1624 ("freetype" ,freetype)
6c0cd765
AP
1625 ("libaacs" ,libaacs)
1626 ("libbdplus" ,libbdplus)
71ee51a0 1627 ("libxml2" ,libxml2)))
5e3f68e6 1628 (home-page "https://www.videolan.org/developers/libbluray.html")
5d3609e4
TUBK
1629 (synopsis "Blu-Ray Disc playback library")
1630 (description
1631 "libbluray is a library designed for Blu-Ray Disc playback for media
1632players, like VLC or MPlayer.")
ae0bdd81 1633 (license license:lgpl2.1+)))
5d3609e4 1634
e6bdb36a
AE
1635(define-public libdvdread
1636 (package
1637 (name "libdvdread")
ff7559d6 1638 (version "6.0.1")
e6bdb36a
AE
1639 (source (origin
1640 (method url-fetch)
b8a31908 1641 (uri (string-append "https://download.videolan.org/videolan/"
767b4427
TGR
1642 "libdvdread/" version "/"
1643 "libdvdread-" version ".tar.bz2"))
e6bdb36a
AE
1644 (sha256
1645 (base32
ff7559d6 1646 "1gfmh8ii3s2fw1c8vn57piwxc0smd3va4h7xgp9s8g48cc04zki8"))))
e6bdb36a 1647 (build-system gnu-build-system)
e21f3473
RJ
1648 (arguments
1649 `(#:configure-flags '("--with-libdvdcss=yes")))
1650 (native-inputs
1651 `(("pkg-config" ,pkg-config)))
1652 (propagated-inputs
1653 `(("libdvdcss" ,libdvdcss)))
e6bdb36a
AE
1654 (home-page "http://dvdnav.mplayerhq.hu/")
1655 (synopsis "Library for reading video DVDs")
1656 (description
1657 "Libdvdread provides a simple foundation for reading DVD video
1658disks. It provides the functionality that is required to access many
1659DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1660authentication and descrambling (if an external libdvdcss library is
1661installed).")
ae0bdd81 1662 (license license:gpl2+)))
b027d919 1663
b5b20bda
TD
1664(define-public dvdauthor
1665 (package
1666 (name "dvdauthor")
1667 (version "0.7.2")
1668 (source
1669 (origin
1670 (method url-fetch)
1671 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1672 version ".tar.gz"))
1673 (sha256
1674 (base32
1675 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1676 (build-system gnu-build-system)
1677 (inputs
1678 `(("libdvdread" ,libdvdread)
1679 ("libpng" ,libpng)
1680 ("imagemagick" ,imagemagick)
1681 ("libxml2" ,libxml2)
1682 ("freetype" ,freetype)))
1683 (native-inputs
1684 `(("pkg-config" ,pkg-config)))
1685 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1686 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1687MPEG-2 stream containing VOB packets.")
1688 (home-page "http://dvdauthor.sourceforge.net")
1689 (license license:gpl3+)))
1690
b027d919
AE
1691(define-public libdvdnav
1692 (package
1693 (name "libdvdnav")
0976ea38 1694 (version "6.0.0")
b027d919
AE
1695 (source (origin
1696 (method url-fetch)
b8a31908 1697 (uri (string-append "https://download.videolan.org/videolan/"
b027d919
AE
1698 name "/" version "/"
1699 name "-" version ".tar.bz2"))
1700 (sha256
1701 (base32
0976ea38 1702 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
b027d919
AE
1703 (build-system gnu-build-system)
1704 (native-inputs
1705 `(("pkg-config" ,pkg-config)))
1706 (inputs
1707 `(("libdvdread" ,libdvdread)))
1708 (home-page "http://dvdnav.mplayerhq.hu/")
1709 (synopsis "Library for video DVD navigation features")
1710 (description
1711 "Libdvdnav is a library for developers of multimedia
1712applications. It allows easy use of sophisticated DVD navigation features
1713such as DVD menus, multiangle playback and even interactive DVD games. All
1714this functionality is provided through a simple API which provides the DVD
1715playback as a single logical stream of blocks, intermitted by special
1716dvdnav events to report certain conditions. The main usage of libdvdnav is
1717a loop regularly calling a function to get the next block, surrounded by
1718additional calls to tell the library of user interaction. The whole
1719DVD virtual machine and internal playback states are completely
1720encapsulated.")
ae0bdd81 1721 (license license:gpl2+)))
2cd85cf9 1722
a6f710ec
TUBK
1723(define-public libdvdcss
1724 (package
1725 (name "libdvdcss")
c77fb2d6 1726 (version "1.4.2")
a6f710ec
TUBK
1727 (source (origin
1728 (method url-fetch)
b8a31908 1729 (uri (string-append "https://download.videolan.org/pub/"
a6f710ec
TUBK
1730 name "/" version "/"
1731 name "-" version ".tar.bz2"))
1732 (sha256
1733 (base32
c77fb2d6 1734 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
a6f710ec 1735 (build-system gnu-build-system)
b8a31908 1736 (home-page "https://www.videolan.org/developers/libdvdcss.html")
a6f710ec
TUBK
1737 (synopsis "Library for accessing DVDs as block devices")
1738 (description
1739 "libdvdcss is a simple library designed for accessing DVDs like a block
1740device without having to bother about the decryption.")
ae0bdd81 1741 (license license:gpl2+)))
a6f710ec 1742
2cd85cf9
DT
1743(define-public srt2vtt
1744 (package
1745 (name "srt2vtt")
1746 (version "0.1")
1747 (source (origin
1748 (method url-fetch)
1749 (uri (string-append
152fc959 1750 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2cd85cf9
DT
1751 version ".tar.gz"))
1752 (sha256
1753 (base32
1754 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1755 (build-system gnu-build-system)
1756 (inputs
1757 `(("guile" ,guile-2.0)))
1758 (synopsis "SubRip to WebVTT subtitle converter")
1759 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1760for use with HTML5 video.")
373cc3b7 1761 (home-page "https://dthompson.us/projects/srt2vtt.html")
ae0bdd81 1762 (license license:gpl3+)))
44726031
AE
1763
1764(define-public avidemux
1765 (package
1766 (name "avidemux")
9e786e8b 1767 (version "2.6.12")
44726031
AE
1768 (source (origin
1769 (method url-fetch)
1770 (uri (string-append
de67e922
LF
1771 "mirror://sourceforge/" name "/" name "/" version "/"
1772 name "_" version ".tar.gz"))
44726031
AE
1773 (sha256
1774 (base32
9e786e8b 1775 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
fc1adab1 1776 (patches (search-patches "avidemux-install-to-lib.patch"))))
44726031
AE
1777 (build-system cmake-build-system)
1778 (native-inputs
1779 `(("pkg-config" ,pkg-config)))
1780 ;; FIXME: Once packaged, add libraries not found during the build.
1781 (inputs
1782 `(("alsa-lib" ,alsa-lib)
1783 ("fontconfig" ,fontconfig)
1784 ("freetype" ,freetype)
1785 ("fribidi" ,fribidi)
1786 ("glu" ,glu)
44726031
AE
1787 ("jack" ,jack-1)
1788 ("lame" ,lame)
4cafe8ad
EF
1789 ("libva" ,libva)
1790 ("libvdpau" ,libvdpau)
44726031
AE
1791 ("libvorbis" ,libvorbis)
1792 ("libvpx" ,libvpx)
1793 ("libxv" ,libxv)
1794 ("perl" ,perl)
1795 ("pulseaudio" ,pulseaudio)
1796 ("python" ,python-wrapper)
a2c24bf5
DC
1797 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1798 ;("qtbase" ,qtbase) with -std=gnu++11.
1799 ;("qttools" ,qttools)
44726031
AE
1800 ("sdl" ,sdl)
1801 ("sqlite" ,sqlite)
1802 ("yasm" ,yasm)
1803 ("zlib" ,zlib)))
1804 (arguments
1805 `(#:tests? #f ; no check target
1806 #:phases
1807 ;; Make sure files inside the included ffmpeg tarball are
1808 ;; patch-shebanged.
1898900f
EF
1809 (modify-phases %standard-phases
1810 (add-before 'patch-source-shebangs 'unpack-ffmpeg
44726031
AE
1811 (lambda _
1812 (with-directory-excursion "avidemux_core/ffmpeg_package"
9dcfd6aa
MW
1813 (invoke "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1814 (delete-file "ffmpeg-2.7.6.tar.bz2"))
1815 #t))
1898900f 1816 (add-after 'patch-source-shebangs 'repack-ffmpeg
44726031
AE
1817 (lambda _
1818 (with-directory-excursion "avidemux_core/ffmpeg_package"
9e786e8b 1819 (substitute* "ffmpeg-2.7.6/configure"
2fed4042 1820 (("#! /bin/sh") (string-append "#!" (which "sh"))))
9dcfd6aa
MW
1821 (invoke "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1822 ;; avoid non-determinism in the archive
1823 "--sort=name" "--mtime=@0"
1824 "--owner=root:0" "--group=root:0")
1825 (delete-file-recursively "ffmpeg-2.7.6"))
1826 #t))
1898900f
EF
1827 (replace 'configure
1828 (lambda _
1829 ;; Copy-paste settings from the cmake build system.
1830 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
9dcfd6aa
MW
1831 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
1832 #t))
1898900f
EF
1833 (replace 'build
1834 (lambda* (#:key inputs outputs #:allow-other-keys)
9dcfd6aa
MW
1835 (let* ((out (assoc-ref outputs "out"))
1836 (lib (string-append out "/lib"))
1837 (top (getcwd))
1838 (sdl (assoc-ref inputs "sdl"))
1839 (build_component
1840 (lambda* (component srcdir #:optional (args '()))
1841 (let ((builddir (string-append "build_" component)))
1842 (mkdir builddir)
1843 (with-directory-excursion builddir
1844 (apply invoke "cmake"
1845 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1846 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1847 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1848 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1849 "\"-Wl,-rpath=" lib "\"")
1850 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1851 (string-append "-DSDL_INCLUDE_DIR="
1852 sdl "/include/SDL")
1853 (string-append "../" srcdir)
1854 "-DENABLE_QT5=True"
1855 args)
1856 (invoke "make" "-j"
1898900f 1857 (number->string (parallel-job-count)))
9dcfd6aa 1858 (invoke "make" "install"))))))
1898900f 1859 (mkdir out)
9dcfd6aa
MW
1860 (build_component "core" "avidemux_core")
1861 (build_component "cli" "avidemux/cli")
1862 (build_component "qt4" "avidemux/qt4")
1863 (build_component "plugins_common" "avidemux_plugins"
1864 '("-DPLUGIN_UI=COMMON"))
1865 (build_component "plugins_cli" "avidemux_plugins"
1866 '("-DPLUGIN_UI=CLI"))
1867 (build_component "plugins_qt4" "avidemux_plugins"
1868 '("-DPLUGIN_UI=QT4"))
1869 (build_component "plugins_settings" "avidemux_plugins"
1870 '("-DPLUGIN_UI=SETTINGS"))
1898900f
EF
1871 ;; Remove .exe and .dll file.
1872 (delete-file-recursively
9dcfd6aa
MW
1873 (string-append out "/share/ADM6_addons"))
1874 #t)))
1898900f 1875 (delete 'install))))
44726031
AE
1876 (home-page "http://fixounet.free.fr/avidemux/")
1877 (synopsis "Video editor")
1878 (description "Avidemux is a video editor designed for simple cutting,
1879filtering and encoding tasks. It supports many file types, including AVI,
1880DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1881can be automated using projects, job queue and powerful scripting
1882capabilities.")
afd9ed5c 1883 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
44726031 1884 ;; Software with various licenses is included, see License.txt.
ae0bdd81 1885 (license license:gpl2+)))
44726031 1886
6f6c8b65
TUBK
1887(define-public vapoursynth
1888 (package
1889 (name "vapoursynth")
4f7a9e0b 1890 (version "37")
6f6c8b65 1891 (source (origin
97ef6df5
RW
1892 (method git-fetch)
1893 (uri (git-reference
1894 (url "https://github.com/vapoursynth/vapoursynth.git")
1895 (commit (string-append "R" version))))
1896 (file-name (git-file-name name version))
6f6c8b65
TUBK
1897 (sha256
1898 (base32
97ef6df5 1899 "1ma2s7dxk6y6l04qj1jvgwia4xj7999ny3a1yx2vbk5l83giam2p"))))
6f6c8b65
TUBK
1900 (build-system gnu-build-system)
1901 (native-inputs
1902 `(("autoconf" ,autoconf)
1903 ("automake" ,automake)
1904 ("cython" ,python-cython)
1905 ("libtool" ,libtool)
1906 ("pkg-config" ,pkg-config)
1907 ("python" ,python)
1908 ("yasm" ,yasm)))
1909 (inputs
1910 `(("ffmpeg" ,ffmpeg)
1911 ("libass" ,libass)
f80d5fe0
EF
1912 ("tesseract-ocr" ,tesseract-ocr)
1913 ("zimg" ,zimg)))
6f6c8b65
TUBK
1914 (arguments
1915 '(#:phases
1916 (modify-phases %standard-phases
52fb5b3a
TGR
1917 (add-after 'unpack 'autogen
1918 (lambda _
1919 (invoke "sh" "autogen.sh"))))))
6f6c8b65
TUBK
1920 (home-page "http://www.vapoursynth.com/")
1921 (synopsis "Video processing framework")
1922 (description "VapourSynth is a C++ library and Python module for video
1923manipulation. It aims to be a modern rewrite of Avisynth, supporting
1924multithreading, generalized colorspaces, per frame properties, and videos with
1925format changes.")
9a078f48 1926 ;; src/core/cpufeatures only allows x86, ARM or PPC
cda20ee8
EF
1927 (supported-systems (fold delete %supported-systems
1928 '("mips64el-linux" "aarch64-linux")))
6f6c8b65 1929 ;; As seen from the source files.
ae0bdd81 1930 (license license:lgpl2.1+)))
6f6c8b65 1931
67932f86
TUBK
1932(define-public xvid
1933 (package
1934 (name "xvid")
e05035c7 1935 (version "1.3.4")
67932f86
TUBK
1936 (source (origin
1937 (method url-fetch)
1938 (uri (string-append
1939 "http://downloads.xvid.org/downloads/xvidcore-"
1940 version ".tar.bz2"))
1941 (sha256
1942 (base32
e05035c7 1943 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
67932f86
TUBK
1944 (build-system gnu-build-system)
1945 (native-inputs `(("yasm" ,yasm)))
1946 (arguments
1947 '(#:phases
62fe2d47
EF
1948 (modify-phases %standard-phases
1949 (add-before
1950 'configure 'pre-configure
1951 (lambda _
1952 (chdir "build/generic")
1953 (substitute* "configure"
9dcfd6aa
MW
1954 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1955 #t)))
67932f86
TUBK
1956 ;; No 'check' target.
1957 #:tests? #f))
1958 (home-page "https://www.xvid.com/")
1959 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1960 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1961codec library. It uses ASP features such as b-frames, global and quarter
1962pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1963and custom quantization matrices.")
ae0bdd81 1964 (license license:gpl2+)))
e16fde14 1965
f48feaa2 1966(define-public streamlink
15b283e7
EF
1967 (package
1968 (name "streamlink")
1969 (version "0.14.2")
1970 (source
1971 (origin
1972 (method url-fetch)
1973 (uri (pypi-uri "streamlink" version))
1974 (sha256
1975 (base32
87fd7a35
EF
1976 "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8"))
1977 (patches (search-patches "streamlink-update-test.patch"))))
15b283e7
EF
1978 (build-system python-build-system)
1979 (home-page "https://github.com/streamlink/streamlink")
1980 (native-inputs
1981 `(("python-freezegun" ,python-freezegun)
1982 ("python-pytest" ,python-pytest)
1983 ("python-mock" ,python-mock)
1984 ("python-requests-mock" ,python-requests-mock)))
1985 (propagated-inputs
1986 `(("python-pysocks" ,python-pysocks)
1987 ("python-websocket-client" ,python-websocket-client)
1988 ("python-iso3166" ,python-iso3166)
1989 ("python-iso639" ,python-iso639)
b42b5afd 1990 ("python-isodate" ,python-isodate)
15b283e7
EF
1991 ("python-pycryptodome" ,python-pycryptodome)
1992 ("python-requests" ,python-requests)
1993 ("python-urllib3" ,python-urllib3)))
1994 (synopsis "Extract streams from various services")
1995 (description "Streamlink is command-line utility that extracts streams
f48feaa2 1996from sites like Twitch.tv and pipes them into a video player of choice.")
15b283e7 1997 (license license:bsd-2)))
f48feaa2 1998
d84e2257
OP
1999(define-public livestreamer
2000 (deprecated-package "livestreamer" streamlink))
2001
e5e5eb1f 2002(define-public twitchy
04b6e9c5 2003 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
e5e5eb1f
OP
2004 (package
2005 (name "twitchy")
04b6e9c5 2006 (version (git-version "3.4" "1" commit))
e5e5eb1f
OP
2007 (source
2008 (origin
2009 (method git-fetch)
2010 (uri (git-reference
2011 (url "https://github.com/BasioMeusPuga/twitchy.git")
2012 (commit commit)))
2013 (file-name (git-file-name name version))
2014 (sha256
2015 (base32
04b6e9c5 2016 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
e5e5eb1f
OP
2017 (build-system python-build-system)
2018 (arguments
2019 '(#:phases
2020 (modify-phases %standard-phases
04b6e9c5
TE
2021 (add-after 'unpack 'patch-paths
2022 (lambda* (#:key inputs #:allow-other-keys)
2023 (substitute* "twitchy/twitchy_play.py"
2024 (("\"streamlink ")
2025 (string-append "\"" (assoc-ref inputs "streamlink")
2026 "/bin/streamlink ")))
2027 #t))
e5e5eb1f
OP
2028 (add-before 'check 'check-setup
2029 (lambda _
2030 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
ca82bdfd
OP
2031 #t))
2032 (add-after 'install 'install-rofi-plugin
2033 (lambda* (#:key outputs #:allow-other-keys)
2034 (install-file "plugins/rofi-twitchy"
2035 (string-append (assoc-ref outputs "out")
9dcfd6aa
MW
2036 "/bin"))
2037 #t)))))
e5e5eb1f
OP
2038 (inputs
2039 `(("python-requests" ,python-requests)
2040 ("streamlink" ,streamlink)))
2041 (home-page "https://github.com/BasioMeusPuga/twitchy")
2042 (synopsis "Command-line interface for Twitch.tv")
2043 (description
2044 "This package provides a command-line interface for Twitch.tv")
2045 (license license:gpl3+))))
2046
307ad140
RW
2047(define-public mlt
2048 (package
2049 (name "mlt")
7acc52f9 2050 (version "6.12.0")
307ad140 2051 (source (origin
520b5d06
RW
2052 (method git-fetch)
2053 (uri (git-reference
2054 (url "https://github.com/mltframework/mlt.git")
2055 (commit (string-append "v" version))))
2056 (file-name (git-file-name name version))
307ad140
RW
2057 (sha256
2058 (base32
7acc52f9 2059 "0pzm3mjbbdl2rkbswgyfkx552xlxh2qrwzsi2a4dicfr92rfgq6w"))))
307ad140
RW
2060 (build-system gnu-build-system)
2061 (arguments
7acc52f9 2062 `(#:tests? #f ; no tests
e7cdd311 2063 #:make-flags '("CC=gcc" "CXX=g++ -std=gnu++11")
307ad140
RW
2064 #:configure-flags
2065 (list "--enable-gpl3"
2066 "--enable-gpl")
2067 #:phases
2068 (modify-phases %standard-phases
2069 (add-after
7acc52f9
TGR
2070 'configure 'override-LDFLAGS
2071 (lambda* (#:key outputs #:allow-other-keys)
2072 (substitute* "config.mak"
2073 (("LDFLAGS\\+=")
2074 (string-append "LDFLAGS+=-Wl,-rpath="
2075 (assoc-ref outputs "out")
2076 "/lib ")))
2077 #t)))))
307ad140
RW
2078 (inputs
2079 `(("alsa-lib" ,alsa-lib)
bb5c508c 2080 ("ffmpeg" ,ffmpeg-3.4)
307ad140 2081 ("fftw" ,fftw)
e7cdd311
MM
2082 ("frei0r-plugins" ,frei0r-plugins)
2083 ("gdk-pixbuf" ,gdk-pixbuf)
2084 ("gtk+" ,gtk+-2)
307ad140
RW
2085 ("libxml2" ,libxml2)
2086 ("jack" ,jack-1)
2087 ("ladspa" ,ladspa)
2088 ("libsamplerate" ,libsamplerate)
4c7729dc 2089 ("pulseaudio" ,pulseaudio)
e7cdd311
MM
2090 ("qtbase" ,qtbase)
2091 ("qtsvg" ,qtsvg)
307ad140
RW
2092 ("sdl" ,sdl)
2093 ("sox" ,sox)))
2094 (native-inputs
2095 `(("pkg-config" ,pkg-config)))
4c7729dc 2096 (home-page "https://www.mltframework.org/")
307ad140
RW
2097 (synopsis "Author, manage, and run multitrack audio/video compositions")
2098 (description
2099 "MLT is a multimedia framework, designed and developed for television
2100broadcasting. It provides a toolkit for broadcasters, video editors, media
2101players, transcoders, web streamers and many more types of applications. The
2102functionality of the system is provided via an assortment of ready to use
2103tools, XML authoring components, and an extensible plug-in based API.")
42b9541c 2104 (license license:gpl3)))
f464016d 2105
945d985a
DT
2106(define-public v4l-utils
2107 (package
2108 (name "v4l-utils")
f1d1ef71 2109 (version "1.12.5")
945d985a
DT
2110 (source (origin
2111 (method url-fetch)
1d4ac724 2112 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
945d985a
DT
2113 "/v4l-utils-" version ".tar.bz2"))
2114 (sha256
2115 (base32
f1d1ef71 2116 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
945d985a
DT
2117 (build-system gnu-build-system)
2118 (arguments
2119 '(#:configure-flags
2120 (list (string-append "--with-udevdir="
2121 (assoc-ref %outputs "out")
2cef0f7c
DC
2122 "/lib/udev")
2123 "CXXFLAGS=-std=gnu++11")))
945d985a 2124 (native-inputs
4ca077d5
TGR
2125 `(("perl" ,perl)
2126 ("pkg-config" ,pkg-config)))
945d985a
DT
2127 (inputs
2128 `(("alsa-lib" ,alsa-lib)
2129 ("glu" ,glu)
2130 ("libjpeg" ,libjpeg)
2131 ("libx11" ,libx11)
b37662e2 2132 ("qtbase" ,qtbase)
945d985a
DT
2133 ("eudev" ,eudev)))
2134 (synopsis "Realtime video capture utilities for Linux")
2135 (description "The v4l-utils provide a series of libraries and utilities to
2136be used for realtime video capture via Linux-specific APIs.")
2137 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2138 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2139 (license (list license:lgpl2.1+ license:gpl2))))
2140
f464016d
DT
2141(define-public obs
2142 (package
2143 (name "obs")
a42bdd1c 2144 (version "22.0.3")
f464016d 2145 (source (origin
2f069a1f
RW
2146 (method git-fetch)
2147 (uri (git-reference
a42bdd1c 2148 (url "https://github.com/obsproject/obs-studio.git")
2f069a1f
RW
2149 (commit version)))
2150 (file-name (git-file-name name version))
f464016d
DT
2151 (sha256
2152 (base32
a42bdd1c 2153 "0ri9qkqk3h71b1a5bwpjzqdr21bbmfqbykg48l779d20zln23n1i"))))
f464016d 2154 (build-system cmake-build-system)
08858812 2155 (arguments
f3bd1728 2156 `(#:tests? #f)) ; no tests
f464016d
DT
2157 (native-inputs
2158 `(("pkg-config" ,pkg-config)))
2159 (inputs
4f98c3c5
EF
2160 `(("alsa-lib" ,alsa-lib)
2161 ("curl" ,curl)
f464016d
DT
2162 ("eudev" ,eudev)
2163 ("ffmpeg" ,ffmpeg)
4f98c3c5 2164 ("fontconfig" ,fontconfig)
f464016d
DT
2165 ("freetype" ,freetype)
2166 ("jack" ,jack-1)
2167 ("jansson" ,jansson)
2168 ("libx264" ,libx264)
2169 ("libxcomposite" ,libxcomposite)
2170 ("mesa" ,mesa)
2171 ("pulseaudio" ,pulseaudio)
90a2309b
EF
2172 ("qtbase" ,qtbase)
2173 ("qtx11extras" ,qtx11extras)
4f98c3c5 2174 ("speex" ,speex)
d4df2032 2175 ("v4l-utils" ,v4l-utils)
f464016d
DT
2176 ("zlib" ,zlib)))
2177 (synopsis "Live streaming software")
2178 (description "Open Broadcaster Software provides a graphical interface for
2179video recording and live streaming. OBS supports capturing audio and video
2180from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2181and JACK.")
2182 (home-page "https://obsproject.com")
f3bd1728 2183 (supported-systems '("x86_64-linux" "i686-linux"))
f464016d 2184 (license license:gpl2+)))
d5650f86
EF
2185
2186(define-public libvdpau
2187 (package
2188 (name "libvdpau")
2189 (version "1.1.1")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2194 name "-" version ".tar.bz2"))
2195 (sha256
2196 (base32
2197 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
2198 (build-system gnu-build-system)
2199 (native-inputs
2200 `(("pkg-config" ,pkg-config)))
2201 (inputs
3993a28a
MB
2202 `(("libx11" ,libx11 "out")
2203 ("libxext" ,libxext)
2204 ("xorgproto" ,xorgproto)))
d5650f86
EF
2205 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2206 (synopsis "Video Decode and Presentation API")
2207 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2208provides an interface to video decode acceleration and presentation hardware
2209present in modern GPUs.")
2210 (license (license:x11-style "file://COPYING"))))
3161d32d
EF
2211
2212(define-public vdpauinfo
2213 (package
2214 (name "vdpauinfo")
2215 (version "1.0")
2216 (source
2217 (origin
2218 (method url-fetch)
2219 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2220 name "-" version ".tar.gz"))
2221 (sha256
2222 (base32
2223 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2224 (build-system gnu-build-system)
2225 (native-inputs
2226 `(("pkg-config" ,pkg-config)
2227 ("libx11" ,libx11)))
2228 (propagated-inputs
2229 `(("libvdpau" ,libvdpau)))
2230 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2231 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2232 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2233implementation.")
2234 (license (license:x11-style "file://COPYING"))))
a7d94b54 2235
67df7164
EF
2236(define-public libvdpau-va-gl
2237 (package
2238 (name "libvdpau-va-gl")
2239 (version "0.4.2")
2240 (source
2241 (origin
2242 (method url-fetch)
2243 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2244 "releases/download/v" version "/libvdpau-va-gl-"
2245 version ".tar.gz"))
2246 (sha256
2247 (base32
2248 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2249 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2250 (modules '((guix build utils)))
6cbee49d
MW
2251 (snippet '(begin (delete-file-recursively "3rdparty")
2252 #t))))
67df7164
EF
2253 (build-system cmake-build-system)
2254 (arguments
2255 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2256 (native-inputs
2257 `(("libvdpau" ,libvdpau)
2258 ("pkg-config" ,pkg-config)))
2259 (inputs
2260 `(("libva" ,libva)
2261 ("mesa" ,mesa)))
2262 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2263 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2264 (description
2265 "Many applications can use VDPAU to accelerate portions of the video
2266decoding process and video post-processing to the GPU video hardware. Since
2267there is no VDPAU available on Intel chips, they fall back to different drawing
2268techniques. This driver uses OpenGL under the hood to accelerate drawing and
2269scaling and VA-API (if available) to accelerate video decoding.")
2270 (license license:expat)))
2271
a7d94b54
LC
2272(define-public recordmydesktop
2273 (package
2274 (name "recordmydesktop")
2275 (version "0.3.8.1")
2276 (source (origin
2277 (method url-fetch)
2278 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2279 version "/recordmydesktop-" version ".tar.gz"))
2280 (sha256
2281 (base32
2282 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2283 (build-system gnu-build-system)
2284 (inputs `(("popt" ,popt)
2285 ("zlib" ,zlib)
2286 ("libx11" ,libx11)
2287 ("libice" ,libice)
2288 ("libsm" ,libsm)
2289 ("libxfixes" ,libxfixes)
2290 ("libxdamage" ,libxdamage)
2291 ("libxext" ,libxext)
ed6ba9cc 2292 ("alsa-lib" ,alsa-lib)
a7d94b54
LC
2293 ("libvorbis" ,libvorbis)
2294 ("libtheora" ,libtheora)))
2295 (home-page "http://recordmydesktop.sourceforge.net/")
2296 (synopsis "Desktop session video recorder")
2297 (description
2298 "recordMyDesktop is a command-line tool that captures the activity in
2299your graphical desktop and encodes it as a video. This is a useful tool for
2300making @dfn{screencasts}.")
2301 (license license:gpl2+)))
d8841cc5 2302
63cd4d53
AV
2303(define-public simplescreenrecorder
2304 (package
2305 (name "simplescreenrecorder")
8332ac03 2306 (version "0.3.11")
63cd4d53
AV
2307 (source
2308 (origin
21309b8b
RW
2309 (method git-fetch)
2310 (uri (git-reference
2311 (url "https://github.com/MaartenBaert/ssr.git")
2312 (commit version)))
2313 (file-name (git-file-name name version))
63cd4d53
AV
2314 (sha256
2315 (base32
21309b8b 2316 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
83c92882 2317 (build-system cmake-build-system)
63cd4d53
AV
2318 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2319 ;; README.md, the program builds and functions properly without them.
2320 ;; As a result, they are omitted. Please add them back if problems appear.
2321 (inputs
2322 `(("alsa-lib" ,alsa-lib)
8332ac03 2323 ("ffmpeg" ,ffmpeg)
63cd4d53
AV
2324 ("glu" ,glu)
2325 ("jack" ,jack-1)
2326 ("libxi" ,libxi)
2327 ("pulseaudio" ,pulseaudio)
91562061
MB
2328 ("qtbase" ,qtbase)
2329 ("qtx11extras" ,qtx11extras)))
63cd4d53 2330 (native-inputs `(("pkg-config" ,pkg-config)))
83c92882
TGR
2331 (arguments
2332 `(#:configure-flags
2333 (list "-DWITH_QT5=TRUE")
2334 #:tests? #f)) ; no test suite
63cd4d53
AV
2335 ;; Using HTTPS causes part of the page to be displayed improperly.
2336 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2337 (synopsis "Screen recorder")
2338 (description "SimpleScreenRecorder is an easy to use screen recorder with
2339a graphical user interface. It supports recording the entire screen, or a
2340part of it, and allows encoding in many different codecs and file formats.
2341Other features include a live preview and live streaming.")
2342 (license (list license:gpl3+ ; most files
2343 license:zlib ; glinject/elfhacks.*
2344 license:isc ; glinject/*
2345 license:x11)))) ; build-aux/install-sh
2346
d8841cc5
KK
2347(define-public libsmpeg
2348 (package
2349 (name "libsmpeg")
2350 (version "0.4.5")
2351 (source (origin
2352 (method svn-fetch)
2353 (uri (svn-reference
2354 (url "svn://svn.icculus.org/smpeg/trunk/")
2355 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
b9af0564 2356 (file-name (string-append name "-" version "-checkout"))
d8841cc5
KK
2357 (sha256
2358 (base32
2359 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2360 (build-system gnu-build-system)
2361 (arguments
e6269846
TGR
2362 `(#:phases
2363 (modify-phases %standard-phases
2364 (add-after 'unpack 'autogen.sh
2365 (lambda _
2366 (invoke "sh" "autogen.sh"))))))
d8841cc5
KK
2367 (native-inputs
2368 `(("autoconf" ,autoconf)
2369 ("automake" ,automake)))
2370 (inputs
2371 `(("sdl" ,sdl2)))
2372 (home-page "http://icculus.org/smpeg/")
2373 (synopsis "SDL MPEG decoding library")
2374 (description
2375 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2376with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2377player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2378library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2379and MPEG system streams.")
2380 (license (list license:expat
2381 license:lgpl2.1
2382 license:lgpl2.1+
2383 license:gpl2))))
4df07622
AP
2384
2385(define-public libbdplus
2386 (package
2387 (name "libbdplus")
2388 (version "0.1.2")
2389 (source
2390 (origin
2391 (method url-fetch)
6f13c4fd 2392 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
4df07622
AP
2393 version "/" name "-" version ".tar.bz2"))
2394 (sha256
2395 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2396 (inputs
2397 `(("libgcrypt" ,libgcrypt)))
2398 (build-system gnu-build-system)
b8a31908 2399 (home-page "https://www.videolan.org/developers/libbdplus.html")
4df07622
AP
2400 (synopsis "Library for decrypting certain Blu-Ray discs")
2401 (description "libbdplus is a library which implements the BD+ System
2402specifications.")
2403 (license license:lgpl2.1+)))
8dd6fc51
AP
2404
2405(define-public libaacs
2406 (package
2407 (name "libaacs")
ba58886a 2408 (version "0.9.0")
8dd6fc51
AP
2409 (source
2410 (origin
2411 (method url-fetch)
6c2481ef 2412 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
8dd6fc51
AP
2413 version "/" name "-" version ".tar.bz2"))
2414 (sha256
ba58886a 2415 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
8dd6fc51
AP
2416 (inputs
2417 `(("libgcrypt" ,libgcrypt)))
2418 (native-inputs
2419 `(("bison" ,bison)
2420 ("flex" ,flex)))
2421 (build-system gnu-build-system)
b8a31908 2422 (home-page "https://www.videolan.org/developers/libaacs.html")
8dd6fc51
AP
2423 (synopsis "Library for decrypting certain Blu-Ray discs")
2424 (description "libaacs is a library which implements the Advanced Access
2425Content System specification.")
2426 (license license:lgpl2.1+)))
05234973 2427
2428(define-public mps-youtube
2429 (package
2430 (name "mps-youtube")
c53fa8c8 2431 (version "0.2.8")
05234973 2432 (source
2433 (origin
e0a80ee4
RW
2434 (method git-fetch)
2435 (uri (git-reference
2436 (url "https://github.com/mps-youtube/mps-youtube.git")
2437 (commit (string-append "v" version))))
2438 (file-name (git-file-name name version))
05234973 2439 (sha256
2440 (base32
e0a80ee4 2441 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
05234973 2442 (build-system python-build-system)
175d6264 2443 (arguments
2444 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2445 ;; test suite results differ depending on the country and also introduce
2446 ;; non-determinism in the tests.
2447 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2448 `(#:tests? #f))
05234973 2449 (propagated-inputs
2450 `(("python-pafy" ,python-pafy)
2451 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2452 (home-page "https://github.com/mps-youtube/mps-youtube")
2453 (synopsis "Terminal based YouTube player and downloader")
2454 (description
2455 "@code{mps-youtube} is based on mps, a terminal based program to
2456search, stream and download music. This implementation uses YouTube as
2457a source of content and can play and download video as well as audio.
2458It can use either mpv or mplayer for playback, and for conversion of
2459formats ffmpeg or libav is used. Users should install one of the
2460supported players in addition to this package.")
2461 (license license:gpl3+)))
fe047e13
EB
2462
2463(define-public handbrake
2464 (package
2465 (name "handbrake")
37b82ccc 2466 (version "1.1.2")
fe047e13
EB
2467 (source (origin
2468 (method url-fetch)
37b82ccc
EB
2469 (uri (string-append "https://download.handbrake.fr/releases/"
2470 version "/HandBrake-" version "-source.tar.bz2"))
fe047e13
EB
2471 (sha256
2472 (base32
37b82ccc 2473 "0bny0hwlr55g2c69rsamv0xvwmfh1s4a582b9vq20xv5ly84m6ms"))
fe047e13
EB
2474 (modules '((guix build utils)))
2475 (snippet
37b82ccc
EB
2476 ;; Remove "contrib" and source not necessary for
2477 ;; building/running under a GNU environment.
fe047e13 2478 '(begin
37b82ccc
EB
2479 (for-each delete-file-recursively
2480 '("contrib" "macosx" "win"))
2481 (substitute* "make/include/main.defs"
2482 ;; Disable unconditional inclusion of "contrib" libraries
2483 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2484 ;; which would lead to fetching and building of these
2485 ;; libraries. Use our own instead.
2486 (("MODULES \\+= contrib") "# MODULES += contrib"))
fe047e13
EB
2487 #t))))
2488 (build-system glib-or-gtk-build-system)
2489 (native-inputs
2490 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2491 ("autoconf" ,autoconf)
2492 ("curl" ,curl) ;not actually used, but tested for
2493 ("intltool" ,intltool)
2494 ("libtool" ,libtool)
2495 ("pkg-config" ,pkg-config)
2496 ("python" ,python-2))) ;for configuration
2497 (inputs
2498 `(("bzip2" ,bzip2)
2499 ("dbus-glib" ,dbus-glib)
37b82ccc 2500 ("ffmpeg" ,ffmpeg)
fe047e13
EB
2501 ("fontconfig" ,fontconfig)
2502 ("freetype" ,freetype)
2503 ("glib" ,glib)
2504 ("gstreamer" ,gstreamer)
2505 ("gst-plugins-base" ,gst-plugins-base)
2506 ("gtk+" ,gtk+)
37b82ccc 2507 ("jansson" ,jansson)
fe047e13
EB
2508 ("lame" ,lame)
2509 ("libass" ,libass)
2510 ("libbluray" ,libbluray)
2511 ("libdvdnav" ,libdvdnav)
2512 ("libdvdread" ,libdvdread)
2513 ("libgudev" ,libgudev)
2514 ("libmpeg2" ,libmpeg2)
2515 ("libnotify" ,libnotify)
2516 ("libogg" ,libogg)
37b82ccc 2517 ("libopus" ,opus)
fe047e13
EB
2518 ("libsamplerate" ,libsamplerate)
2519 ("libtheora" ,libtheora)
2520 ("libvorbis" ,libvorbis)
2521 ("libvpx" ,libvpx)
2522 ("libxml2" ,libxml2)
2523 ("libx264" ,libx264)
2524 ("x265" ,x265)
2525 ("zlib" ,zlib)))
2526 (arguments
2527 `(#:tests? #f ;tests require Ruby and claim to be unsupported
37b82ccc
EB
2528 #:configure-flags
2529 (list (string-append "CPPFLAGS=-I"
2530 (assoc-ref %build-inputs "libxml2")
2531 "/include/libxml2")
2532 "LDFLAGS=-lx265")
fe047e13
EB
2533 #:phases
2534 (modify-phases %standard-phases
189be331 2535 (replace 'bootstrap
fe047e13
EB
2536 ;; Run bootstrap ahead of time so that shebangs get patched.
2537 (lambda _
2538 (setenv "CONFIG_SHELL" (which "sh"))
2539 (setenv "NOCONFIGURE" "1")
2540 ;; Patch the Makefile so that it doesn't bootstrap again.
2541 (substitute* "gtk/module.rules"
2542 ((".*autogen\\.sh.*") ""))
da6f345c 2543 (invoke "sh" "./gtk/autogen.sh")))
fe047e13
EB
2544 (replace 'configure
2545 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2546 ;; 'configure' is not an autoconf-generated script, and
2547 ;; errors on unrecognized arguments,
2548 ;; e.g. --enable-fast-install
2549 (let ((out (assoc-ref outputs "out")))
da6f345c
TGR
2550 (apply invoke "./configure"
2551 (string-append "--prefix=" out)
2552 (or configure-flags '())))))
fe047e13
EB
2553 (add-after 'configure 'chdir-build
2554 (lambda _ (chdir "./build") #t)))))
2555 (home-page "https://handbrake.fr")
2556 (synopsis "Video transcoder")
2557 (description
2558 "HandBrake is a tool for converting video from any format to a selection
2559of modern, widely supported codecs.")
37b82ccc
EB
2560 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2561 ;; Combination under GPLv2. See LICENSE.
2562 (license license:gpl2)))
590abe01
JN
2563
2564(define-public openh264
2565 (package
2566 (name "openh264")
03229b36 2567 (version "1.8.0")
590abe01
JN
2568 (source (origin
2569 (method url-fetch)
2570 (uri (string-append "https://github.com/cisco/"
03229b36
MB
2571 name "/releases/download/v"
2572 version "/Source.Code.tar.gz.gz"))
590abe01
JN
2573 (file-name (string-append name "-" version ".tar.gz"))
2574 (sha256
2575 (base32
03229b36 2576 "0niha3wnn1jsndvz9vfwy2wyql8mp9j6v75vjsipy0idwan5yzgf"))))
590abe01
JN
2577 (build-system gnu-build-system)
2578 (native-inputs
2579 `(("nasm" ,nasm)
2580 ("python" ,python)))
2581 (arguments
8363a835
EF
2582 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2583 "CC=gcc")
590abe01
JN
2584 #:test-target "test"
2585 #:phases (modify-phases %standard-phases
2586 ;; no configure script
2587 (delete 'configure))))
2588 (home-page "http://www.openh264.org/")
2589 (synopsis "H264 decoder library")
2590 (description
2591 "Openh264 is a library which can decode H264 video streams.")
2592 (license license:bsd-2)))
3a44c7bb 2593
2594(define-public libmp4v2
2595 (package
2596 (name "libmp4v2")
2597 (version "2.0.0")
2598 (source
2599 (origin
2600 (method url-fetch)
2601 ;; XXX: The new location of upstream is uncertain and will become relevant the
2602 ;; moment when the googlecode archive shuts down. It is past the date it
2603 ;; should've been turned off. I tried to communicate with upstream, but this
2604 ;; wasn't very responsive and not very helpful. The short summary is, it is
2605 ;; chaos when it comes to the amount of forks and only time will tell where
2606 ;; the new upstream location is.
2607 (uri (string-append "https://storage.googleapis.com/google-"
2608 "code-archive-downloads/v2/"
2609 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2610 (file-name (string-append name "-" version ".tar.bz2"))
2611 (sha256
2612 (base32
2613 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2614 (build-system gnu-build-system)
2615 (outputs '("out"
2616 "static")) ; 3.7MiB .a file
2617 (arguments
2618 `(#:phases
2619 (modify-phases %standard-phases
2620 (add-after 'unpack 'remove-dates
2621 (lambda _
2622 ;; Make the build reproducible.
2623 (substitute* "configure"
2624 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2625 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2626 #t))
2627 (add-after 'install 'move-static-libraries
2628 (lambda* (#:key outputs #:allow-other-keys)
2629 ;; Move static libraries to the "static" output.
2630 (let* ((out (assoc-ref outputs "out"))
2631 (lib (string-append out "/lib"))
2632 (static (assoc-ref outputs "static"))
2633 (slib (string-append static "/lib")))
2634 (mkdir-p slib)
2635 (for-each (lambda (file)
2636 (install-file file slib)
2637 (delete-file file))
2638 (find-files lib "\\.a$"))
2639 #t))))))
2640 (native-inputs
2641 `(("help2man" ,help2man)
2642 ("dejagnu" ,dejagnu)))
2643 (home-page "https://code.google.com/archive/p/mp4v2/")
2644 (synopsis "API to create and modify mp4 files")
2645 (description
2646 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2647ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2648file format that has been used as a multimedia file format in a variety of platforms and
2649applications. It is a very powerful and extensible format that can accommodate
2650practically any type of media.")
2651 (license license:mpl1.1)))
e0c40707
EJ
2652
2653(define-public libmediainfo
2654 (package
2655 (name "libmediainfo")
2656 (version "0.7.95")
2657 (source (origin
2658 (method url-fetch)
2659 (uri (string-append "https://mediaarea.net/download/source/"
2660 name "/" version"/"
2661 name "_" version ".tar.bz2"))
2662 (sha256
2663 (base32
2664 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2665 ;; TODO add a Big Buck Bunny webm for tests.
2666 (native-inputs
2667 `(("autoconf" ,autoconf)
2668 ("automake" ,automake)
2669 ("libtool" ,libtool)
2670 ("pkg-config" ,pkg-config)
2671 ("zlib" ,zlib)
2672 ("tinyxml2" ,tinyxml2)
2673 ("curl" ,curl)
2674 ("libzen" ,libzen)))
2675 (build-system gnu-build-system)
2676 (arguments
2677 '(#:tests? #f ; see above TODO
2678 #:phases
2679 ;; build scripts not in root of archive
2680 (modify-phases %standard-phases
0cae36b5 2681 (add-after 'unpack 'change-to-build-dir
e0c40707 2682 (lambda _
0cae36b5
EF
2683 (chdir "Project/GNU/Library")
2684 #t))
2685 (add-after 'change-to-build-dir 'autogen
e0c40707 2686 (lambda _
bf6edb95 2687 (invoke "sh" "autogen.sh"))))))
e0c40707
EJ
2688 (home-page "https://mediaarea.net/en/MediaInfo")
2689 (synopsis "Library for retrieving media metadata")
2690 (description "MediaInfo is a library used for retrieving technical
2691information and other metadata about audio or video files. A non-exhaustive
2692list of the information MediaInfo can retrieve from media files include:
2693
2694@itemize
2695@item General: title, author, director, album, track number, date, duration...
2696@item Video: codec, aspect, fps, bitrate...
2697@item Audio: codec, sample rate, channels, language, bitrate...
2698@item Text: language of subtitle
2699@item Chapters: number of chapters, list of chapters
2700@end itemize
2701
2702MediaInfo supports the following formats:
2703
2704@itemize
2705@item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2706MPEG-2, MPEG-4, DVD (VOB)...
2707@item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2708@item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2709@item Subtitles: SRT, SSA, ASS, SAMI...
2710@end itemize\n")
2711 (license license:bsd-2)))
2712
d5fa2777
EJ
2713;; TODO also have a GUI version available
2714(define-public mediainfo
2715 (package
2716 (name "mediainfo")
f528588a 2717 (version "18.12")
d5fa2777
EJ
2718 (source (origin
2719 (method url-fetch)
f528588a
PN
2720 ;; Warning: This source has proved unreliable 1 time at least.
2721 ;; Consider an alternate source or report upstream if this
2722 ;; happens again.
d5fa2777
EJ
2723 (uri (string-append "https://mediaarea.net/download/source/"
2724 name "/" version "/"
2725 name "_" version ".tar.bz2"))
2726 (sha256
2727 (base32
f528588a 2728 "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
d5fa2777
EJ
2729 (native-inputs
2730 `(("autoconf" ,autoconf)
2731 ("automake" ,automake)
2732 ("libtool" ,libtool)
2733 ("pkg-config" ,pkg-config)
2734 ("zlib" ,zlib)
c695fb76 2735 ("libmediainfo" ,libmediainfo)
d5fa2777
EJ
2736 ("libzen" ,libzen)))
2737 (build-system gnu-build-system)
2738 (arguments
2739 '(#:tests? #f ; lacks tests
2740 #:phases
2741 ;; build scripts not in root of archive
2742 (modify-phases %standard-phases
2f17187f 2743 (add-after 'unpack 'change-to-build-dir
d5fa2777 2744 (lambda _
2f17187f 2745 (chdir "Project/GNU/CLI")
f528588a 2746 #t)))))
d5fa2777
EJ
2747 (home-page "https://mediaarea.net/en/MediaInfo")
2748 (synopsis "Utility for reading media metadata")
2749 (description "MediaInfo is a utility used for retrieving technical
2750information and other metadata about audio or video files. It supports the
2751many codecs and formats supported by libmediainfo.")
2752 (license license:bsd-2)))
fa379a5b
CL
2753
2754(define-public livemedia-utils
2755 (package
2756 (name "livemedia-utils")
318ec0a8 2757 (version "2018.10.17")
fa379a5b
CL
2758 (source (origin
2759 (method url-fetch)
2760 (uri (string-append
517c66c0 2761 "https://download.videolan.org/contrib/live555/live."
fa379a5b
CL
2762 version ".tar.gz"))
2763 (sha256
2764 (base32
318ec0a8 2765 "1s69ipvdc6ldscp0cr1zpsll8xc3qcagr95nl84x7b1rbg4xjs3w"))
156c14c1 2766 (modules '((guix build utils)))
6cbee49d
MW
2767 (snippet '(begin
2768 ;; As of glibc 2.26, <xlocale.h> no longer is.
2769 (substitute* "liveMedia/include/Locale.hh"
2857e527
MW
2770 (("xlocale\\.h") "locale.h"))
2771 #t))))
fa379a5b
CL
2772 (build-system gnu-build-system)
2773 (arguments
2774 '(#:tests? #f ; no tests
2775 #:make-flags (list "CC=gcc"
2776 (string-append "LDFLAGS=-Wl,-rpath="
2777 (assoc-ref %outputs "out") "/lib")
2778 (string-append "PREFIX="
2779 (assoc-ref %outputs "out")))
2780 #:phases (modify-phases %standard-phases
2781 (add-before 'configure 'fix-makefiles-generation
2782 (lambda _
2783 (substitute* "genMakefiles"
2784 (("/bin/rm") "rm"))
2785 #t))
2786 (replace 'configure
2787 (lambda _
6b677bb0
TGR
2788 (invoke "./genMakefiles"
2789 "linux-with-shared-libraries"))))))
fa379a5b
CL
2790 (home-page "http://www.live555.com/liveMedia/")
2791 (synopsis "Set of C++ libraries for multimedia streaming")
2792 (description "This code forms a set of C++ libraries for multimedia
2793streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2794can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2795JPEG video, and several audio codecs. They can easily be extended to support
2796additional (audio and/or video) codecs, and can also be used to build basic
2797RTSP or SIP clients and servers.")
2798 (license license:lgpl3+)))
0dff4dd9
CL
2799
2800(define-public libdvbpsi
2801 (package
2802 (name "libdvbpsi")
74b977d7 2803 (version "1.3.2")
0dff4dd9
CL
2804 (source (origin
2805 (method url-fetch)
2806 (uri (string-append
2807 "https://download.videolan.org/pub/libdvbpsi/"
2808 version "/libdvbpsi-" version ".tar.bz2"))
2809 (sha256
2810 (base32
74b977d7 2811 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
0dff4dd9
CL
2812 (build-system gnu-build-system)
2813 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2814 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2815tables")
2816 (description "libdvbpsi is a simple library designed for decoding and
2817generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2818and ITU-T H.222.0.")
2819 (license license:lgpl2.1)))
6779ae27
JL
2820
2821(define-public ffms2
2822 (package
2823 (name "ffms2")
2824 (version "2.23")
b1eaede0 2825 (home-page "https://github.com/FFMS/ffms2")
6779ae27 2826 (source (origin
940fdd0c
RW
2827 (method git-fetch)
2828 (uri (git-reference
2829 (url "https://github.com/FFMS/ffms2.git")
2830 (commit version)))
2831 (file-name (git-file-name name version))
6779ae27
JL
2832 (sha256
2833 (base32
940fdd0c 2834 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
6779ae27
JL
2835 (build-system gnu-build-system)
2836 (arguments
2837 '(#:configure-flags
2838 (list "--enable-avresample")))
2839 (inputs
2840 `(("zlib" ,zlib)))
2841 (propagated-inputs
2842 `(("ffmpeg" ,ffmpeg)))
2843 (native-inputs
2844 `(("pkg-config" ,pkg-config)))
2845 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2846 (description
2847 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2848programmers to access a standard API to open and decompress media files.")
2849 ;; sources are distributed under a different license that the binary.
2850 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2851 (license license:gpl2+))); inherits from ffmpeg
c812f460
JL
2852
2853(define-public aegisub
2854 (package
2855 (name "aegisub")
2856 (version "3.2.2")
2857 (source (origin
2858 (method url-fetch)
2859 (uri (string-append
2860 "http://ftp.aegisub.org/pub/archives/releases/source/"
2861 name "-" version ".tar.xz"))
2862 (sha256
2863 (base32
18e56ad7 2864 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
644af6c8
BH
2865 (patches (search-patches "aegisub-icu59-include-unistr.patch"
2866 "aegisub-boost68.patch"))))
c812f460
JL
2867 (build-system gnu-build-system)
2868 (arguments
2869 `(#:configure-flags
2870 (list "--disable-update-checker"
2871 "--without-portaudio"
2872 "--without-openal"
18e56ad7
BH
2873 "--without-oss"
2874 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
c812f460
JL
2875 ;; tests require busted, a lua package we don't have yet
2876 #:tests? #f
2877 #:phases
2878 (modify-phases %standard-phases
2879 (add-before 'configure 'fix-ldflags
2880 (lambda _
18e56ad7 2881 (setenv "LDFLAGS" "-pthread")
f6974e15
BH
2882 #t))
2883 (add-after 'unpack 'fix-boost-headers
2884 (lambda _
2885 (substitute*
2886 '("src/subtitles_provider_libass.cpp"
2887 "src/colour_button.cpp"
2888 "src/video_provider_dummy.cpp"
2889 "./src/video_frame.cpp")
2890 (("#include <boost/gil/gil_all.hpp>")
2891 "#include <boost/gil.hpp>"))
2892 #t)))))
c812f460
JL
2893 (inputs
2894 `(("boost" ,boost)
2895 ("desktop-file-utils" ,desktop-file-utils)
2896 ("ffms2" ,ffms2)
2897 ("fftw" ,fftw)
2898 ("hunspell" ,hunspell)
2899 ("mesa" ,mesa)
2900 ("libass" ,libass)
2901 ("alsa-lib" ,alsa-lib)
2902 ("pulseaudio" ,pulseaudio)
2903 ("libx11" ,libx11)
2904 ("freetype" ,freetype)
2905 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2906 (native-inputs
2907 `(("intltool" ,intltool)
2908 ("pkg-config" ,pkg-config)))
2909 (home-page "http://www.aegisub.org/")
2910 (synopsis "Subtitle engine")
2911 (description
2912 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2913it quick and easy to time subtitles to audio, and features many powerful
2914tools for styling them, including a built-in real-time video preview.")
2915 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2916 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2917 license:expat)))) ; and src/gl that is under a license similar
2918 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2919 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2920 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2921
635f981b 2922(define-public gst-transcoder
2923 (package
2924 (name "gst-transcoder")
2925 (version "1.12.2")
2926 (source
2927 (origin
e7c7b10d
RW
2928 (method git-fetch)
2929 (uri (git-reference
2930 (url "https://github.com/pitivi/gst-transcoder.git")
2931 (commit version)))
2932 (file-name (git-file-name name version))
635f981b 2933 (sha256
2934 (base32
e7c7b10d 2935 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
635f981b 2936 (build-system meson-build-system)
2937 (inputs
2938 `(("gobject-introspection" ,gobject-introspection)
2939 ("glib" ,glib)
2940 ("gstreamer" ,gstreamer)
2941 ("gst-plugins-base" ,gst-plugins-base)))
2942 (native-inputs
2943 `(("python" ,python)
2944 ("pkg-config" ,pkg-config)))
2945 (home-page "https://github.com/pitivi/gst-transcoder/")
2946 (synopsis "GStreamer Transcoding API")
2947 (description "GStreamer Transcoding API")
2948 (license license:lgpl2.1)))
e37bdc0f 2949
2950(define-public gavl
2951 (package
2952 (name "gavl")
2953 (version "1.4.0")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (string-append "mirror://sourceforge/gmerlin/"
2958 name "/" version "/"
2959 name "-" version ".tar.gz"))
2960 (file-name (string-append name "-" version ".tar.gz"))
2961 (sha256
2962 (base32
2963 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2964 (build-system gnu-build-system)
c178aa34
EF
2965 (arguments
2966 '(#:configure-flags '("LIBS=-lm")))
e37bdc0f 2967 (native-inputs
2968 `(("pkg-config" ,pkg-config)
2969 ("doxygen" ,doxygen)))
2970 (home-page "http://gmerlin.sourceforge.net")
2971 (synopsis "Low level library for multimedia API building")
2972 (description
2973 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2974library, upon which multimedia APIs can be built. Gavl handles all the
2975details of audio and video formats like colorspaces, sample rates,
2976multichannel configurations, etc. It provides standardized definitions for
2977those formats as well as container structures for carrying audio samples or
2978video images inside an application.
2979
2980In addition, it handles the sometimes ugly task of converting between all
2981these formats and provides some elementary operations (copying, scaling,
2982alpha blending etc).")
2983 (license license:gpl3)))
49e1d76d 2984
2985(define-public frei0r-plugins
2986 (package
2987 (name "frei0r-plugins")
2988 (version "1.6.1")
2989 (source
2990 (origin
2991 (method url-fetch)
2992 (uri (string-append "https://files.dyne.org/frei0r/"
2993 "frei0r-plugins-" version ".tar.gz"))
2994 (sha256
2995 (base32
2996 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2997 (build-system gnu-build-system)
2998 (arguments
2999 `(#:phases
3000 (modify-phases %standard-phases
3001 (add-after 'unpack 'autotools
3002 (lambda _
63181c85
TGR
3003 (invoke "sh" "autogen.sh"))))))
3004 ;; TODO: opencv for additional face detection filters.
49e1d76d 3005 (inputs
3006 `(("gavl" ,gavl)
3007 ("cairo" ,cairo)))
3008 (native-inputs
3009 `(("pkg-config" ,pkg-config)
3010 ("libtool" ,libtool)
3011 ("automake" ,automake)
3012 ("autoconf" ,autoconf)))
3013 (home-page "https://www.dyne.org/software/frei0r/")
3014 (synopsis "Minimalistic plugin API for video effects")
3015 (description
3016 "Frei0r is a minimalistic plugin API for video effects.
3017The main emphasis is on simplicity for an API that will round up
3018the most common video effects into simple filters, sources and
3019mixers that can be controlled by parameters. Frei0r wants to
3020provide a way to share these simple effects between many
3021applications, avoiding their reimplementation by different projects.
3022It counts more than 100 plugins.")
3023 (license (list license:gpl2+
3024 ;; The following files are licensed as LGPL2.1+:
3025 ;; src/generator/ising0r/ising0r.c
3026 ;; src/generator/onecol0r/onecol0r.cpp
3027 ;; src/generator/nois0r/nois0r.cpp
3028 ;; src/generator/lissajous0r/lissajous0r.cpp
3029 ;; src/filter/ndvi/gradientlut.hpp
3030 ;; src/filter/ndvi/ndvi.cpp
3031 ;; src/filter/facedetect/facedetect.cpp
3032 license:lgpl2.1+))))
eb3e41c9
LC
3033
3034(define-public motion
3035 (package
3036 (name "motion")
a9e9c738 3037 (version "4.2.2")
eb3e41c9
LC
3038 (home-page "https://motion-project.github.io/")
3039 (source (origin
2ea678fa
TGR
3040 (method git-fetch)
3041 (uri (git-reference
3042 (url "https://github.com/Motion-Project/motion.git")
3043 (commit (string-append "release-" version))))
eb3e41c9
LC
3044 (sha256
3045 (base32
a9e9c738 3046 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
2ea678fa 3047 (file-name (git-file-name name version))))
eb3e41c9
LC
3048 (build-system gnu-build-system)
3049 (native-inputs
464f5447 3050 `(("autoconf" ,autoconf-wrapper)
eb3e41c9 3051 ("automake" ,automake)
33bddd30 3052 ("gettext" ,gettext-minimal)
eb3e41c9
LC
3053 ("pkg-config" ,pkg-config)))
3054 (inputs
3055 `(("libjpeg" ,libjpeg)
bb5c508c 3056 ("ffmpeg" ,ffmpeg-3.4)
c3069cd1 3057 ("libmicrohttpd" ,libmicrohttpd)
eb3e41c9
LC
3058 ("sqlite" ,sqlite)))
3059 (arguments
3060 '(#:phases (modify-phases %standard-phases
189be331 3061 (replace 'bootstrap
eb3e41c9
LC
3062 (lambda _
3063 (patch-shebang "version.sh")
3064 (invoke "autoreconf" "-vfi"))))
3065 #:configure-flags '("--sysconfdir=/etc")
3066 #:make-flags (list (string-append "sysconfdir="
3067 (assoc-ref %outputs "out")
3068 "/etc"))
3069
a9e9c738 3070 #:tests? #f)) ; no 'check' target
eb3e41c9
LC
3071 (synopsis "Detect motion from video signals")
3072 (description
3073 "Motion is a program that monitors the video signal from one or more
3074cameras and is able to detect if a significant part of the picture has
3075changed. Or in other words, it can detect motion.")
3076
3077 ;; Some files say "version 2" and others "version 2 or later".
3078 (license license:gpl2)))
f27f264e
PN
3079
3080(define-public subdl
3081 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3082 (revision "1"))
3083 (package
3084 (name "subdl")
3085 (version (git-version "1.0.3" revision commit))
3086 (source (origin
3087 (method git-fetch)
3088 (uri (git-reference
3089 (url "https://github.com/alexanderwink/subdl.git")
3090 (commit commit)))
3091 (file-name (git-file-name name version))
3092 (sha256
3093 (base32
3094 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3095 (build-system trivial-build-system)
3096 (arguments
3097 `(#:modules ((guix build utils))
3098 #:builder (begin
3099 (use-modules (guix build utils))
3100 (let* ((out (assoc-ref %outputs "out"))
3101 (bin (string-append out "/bin"))
3102 (source (assoc-ref %build-inputs "source"))
3103 (python (assoc-ref %build-inputs "python")))
3104 (install-file (string-append source "/subdl") bin)
3105 (patch-shebang (string-append bin "/subdl")
3106 (list (string-append python "/bin")))))))
3107 (inputs `(("python" ,python)))
3108 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3109 (description "Subdl is a command-line tool for downloading subtitles from
3110opensubtitles.org. By default, it will search for English subtitles, display
3111the results, download the highest-rated result in the requested language and
3112save it to the appropriate filename.")
3113 (license license:gpl3+)
3114 (home-page "https://github.com/alexanderwink/subdl"))))
eb88e2c1
CL
3115
3116(define-public l-smash
3117 (package
3118 (name "l-smash")
3119 (version "2.14.5")
3120 (source (origin
45b2eff0
RW
3121 (method git-fetch)
3122 (uri (git-reference
3123 (url "https://github.com/l-smash/l-smash.git")
3124 (commit (string-append "v" version))))
3125 (file-name (git-file-name name version))
eb88e2c1
CL
3126 (sha256
3127 (base32
45b2eff0 3128 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
eb88e2c1
CL
3129 (build-system gnu-build-system)
3130 (arguments
3131 `(#:tests? #f ;no tests
3132 #:make-flags
3133 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3134 (assoc-ref %outputs "out") "/lib"))
3135 #:phases
3136 (modify-phases %standard-phases
3137 ;; configure fails if it is followed by CONFIG_SHELL
3138 (replace 'configure
3139 (lambda* (#:key outputs #:allow-other-keys)
3140 (let ((out (assoc-ref outputs "out")))
3141 (invoke "./configure" (string-append "--prefix=" out)
3142 "--disable-static")))))))
3143 (native-inputs
3144 `(("which" ,which)))
3145 (home-page "https://l-smash.github.io/l-smash/")
3146 (synopsis "MP4 multiplexer and demultiplexer library")
3147 (description
3148 "L-SMASH is a cross-platform library that handles the ISO base media file
3149format and some of its derived file formats, including MP4. It operates as a
3150multiplexer and demultiplexer, and can mux video and audio in several formats
3151using standalone executable files.")
3152 (license license:isc)))
a0135eee
LF
3153
3154(define-public qtfaststart
3155 (package
3156 (name "qtfaststart")
3157 (version "1.8")
3158 (source (origin
3159 (method url-fetch)
3160 (uri (pypi-uri "qtfaststart" version))
3161 (sha256
3162 (base32
3163 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3164 (build-system python-build-system)
3165 (arguments
3166 '(#:tests? #f)) ; no test suite
3167 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3168 (description "qtfaststart enables streaming and pseudo-streaming of
3169QuickTime and MP4 files by moving metadata and offset information to the
3170beginning of the file. It can also print some useful information about the
3171structure of the file. This program is based on qt-faststart.c from the FFmpeg
3172project, which is released into the public domain, as well as ISO 14496-12:2005
3173(the official spec for MP4), which can be obtained from the ISO or found
3174online.")
3175 (home-page "https://github.com/danielgtaylor/qtfaststart")
3176 (license license:expat)))
485638cd
LF
3177
3178(define-public vidstab
3179 (package
3180 (name "vidstab")
3181 (version "1.1.0")
3182 (source (origin
d61236df
RW
3183 (method git-fetch)
3184 (uri (git-reference
3185 (url "https://github.com/georgmartius/vid.stab.git")
3186 (commit (string-append "v" version))))
3187 (file-name (git-file-name name version))
485638cd
LF
3188 (sha256
3189 (base32
d61236df 3190 "0a3frpm2kdbx7vszhg64p3alisag73bcspl7fp3a2f1kgq7rbh38"))))
485638cd
LF
3191 (build-system cmake-build-system)
3192 (arguments
3193 '(#:tests? #f)) ; tests are not run as part of standard build process
3194 (home-page "http://public.hronopik.de/vid.stab/")
3195 (synopsis "Video stabilization library")
3196 (description "Vidstab is a video stabilization library which can be used
3197with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3198vehicle typically suffers from undesirable shakes and jitters. Activities such
3199as surfing, skiing, riding and walking while shooting videos are especially
3200prone to erratic camera shakes. Vidstab targets these video contents to help
3201create smoother and stable videos.")
3202 (license license:gpl2+)))
579a9cde
EB
3203
3204(define-public libopenshot
3205 (package
3206 (name "libopenshot")
3207 (version "0.2.2")
3208 (source (origin
3209 (method git-fetch)
3210 (uri (git-reference
3211 (url "https://github.com/OpenShot/libopenshot")
3212 (commit (string-append "v" version))))
3213 (file-name (git-file-name name version))
3214 (sha256
3215 (base32
3216 "1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd"))
3217 (modules '((guix build utils)))
3218 (snippet '(begin
3219 ;; Allow overriding of the python installation dir
3220 (substitute* "src/bindings/python/CMakeLists.txt"
3221 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3222 (string-append set " CACHE PATH "
3223 "\"Python bindings directory\")")))
3224 #t))
4f889375
EF
3225 (patches (search-patches "libopenshot-fixup-tests.patch"
3226 "libopenshot-tests-with-system-libs.patch"))))
579a9cde
EB
3227 (build-system cmake-build-system)
3228 (native-inputs
3229 `(("pkg-config" ,pkg-config)
3230 ("python" ,python)
3231 ("swig" ,swig)
3232 ("unittest++" ,unittest-cpp)))
3233 (propagated-inputs ;all referenced in installed headers
3234 `(("cppzmq" ,cppzmq)
3235 ("ffmpeg" ,ffmpeg)
3236 ("imagemagick" ,imagemagick)
3237 ("jsoncpp" ,jsoncpp)
3238 ("libopenshot-audio" ,libopenshot-audio)
3239 ("qt" ,qt) ;widgets, core, gui, multimedia, and multimediawidgets
3240 ("zeromq" ,zeromq)))
3241 (arguments
3242 `(#:configure-flags
3243 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3244 ,(version-major+minor (package-version python))
3245 "/site-packages")
3246 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3247 #:phases
3248 (modify-phases %standard-phases
3249 (add-before 'configure 'set-vars
3250 (lambda* (#:key inputs #:allow-other-keys)
3251 (setenv "LIBOPENSHOT_AUDIO_DIR"
3252 (assoc-ref inputs "libopenshot-audio"))
3253 (setenv "ZMQDIR"
3254 (assoc-ref inputs "zeromq"))
3255 (setenv "UNITTEST_DIR"
3256 (string-append (assoc-ref inputs "unittest++")
3257 "/include/UnitTest++"))
3258 #t)))))
3259 (home-page "https://openshot.org")
3260 (synopsis "Video-editing, animation, and playback library")
3261 (description "OpenShot Library (libopenshot) is a powerful C++ video
3262editing library with a multi-threaded and feature rich video editing
3263API. It includes bindings for Python, Ruby, and other languages.")
3264 (license license:lgpl3+)))
69a3fcc0
EB
3265
3266(define-public openshot
3267 (package
3268 (name "openshot")
3269 (version "2.4.3")
3270 (source (origin
3271 (method git-fetch)
3272 (uri (git-reference
3273 (url "https://github.com/OpenShot/openshot-qt")
3274 (commit (string-append "v" version))))
3275 (file-name (git-file-name name version))
3276 (sha256
3277 (base32
3278 "1qdw1mli4y9qhrnllnkaf6ydgw5vfvdb90chs4i679k0x0jyb9a2"))))
3279 (build-system python-build-system)
3280 (inputs
3281 `(("ffmpeg" ,ffmpeg)
3282 ("libopenshot" ,libopenshot)
3283 ("python" ,python)
3284 ("python-pyqt" ,python-pyqt)
3285 ("python-pyzmq" ,python-pyzmq)
3286 ("python-requests" ,python-requests)
3287 ("qtsvg" ,qtsvg)))
3288 (arguments
3289 `(#:tests? #f ;no tests
3290 #:phases (modify-phases %standard-phases
3291 (delete 'build) ;install phase does all the work
3292 (add-before 'install 'set-tmp-home
3293 (lambda _
3294 ;; src/classes/info.py "needs" to create several
3295 ;; directories in $HOME when loaded during build
3296 (setenv "HOME" "/tmp")
3297 #t))
3298 (add-after 'install 'wrap-program
3299 (lambda* (#:key inputs outputs #:allow-other-keys)
3300 (wrap-program (string-append (assoc-ref outputs "out")
3301 "/bin/openshot-qt")
3302 `("QT_PLUGIN_PATH" prefix
3303 ,(list (string-append (assoc-ref inputs "qtsvg")
3304 "/lib/qt5/plugins/")))))))))
3305 (home-page "https://openshot.org")
3306 (synopsis "Video editor")
3307 (description "OpenShot takes your videos, photos, and music files and
3308helps you create the film you have always dreamed of. Easily add sub-titles,
3309transitions, and effects and then export your film to many common formats.")
3310 (license license:gpl3+)))
8c380a01
EF
3311
3312(define-public dav1d
3313 (package
3314 (name "dav1d")
3315 (version "0.1.0")
3316 (source
3317 (origin
3318 (method url-fetch)
3319 (uri (string-append "https://downloads.videolan.org/pub/videolan/"
3320 "dav1d/" version "/dav1d-" version ".tar.xz"))
3321 (sha256
3322 (base32
3323 "0dw0liday8cbyrirhm6bgzhxg4cdy66nspfkdlq338gdsfqcvrsc"))))
3324 (build-system meson-build-system)
3325 (native-inputs `(("nasm" ,nasm)))
3326 (home-page "https://code.videolan.org/videolan/dav1d")
3327 (synopsis "AV1 decoder")
3328 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3329speed and correctness.")
3330 (license license:bsd-2)))
20b4aa6b
RH
3331
3332(define-public wlstream
3333 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3334 (revision "1"))
3335 (package
3336 (name "wlstream")
3337 (version (git-version "0.0" revision commit))
3338 (source
1d591432
RH
3339 (origin
3340 (method git-fetch)
3341 (uri (git-reference
3342 (url "https://github.com/atomnuker/wlstream.git")
3343 (commit commit)))
3344 (file-name (git-file-name name version))
3345 (sha256
3346 (base32
3347 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
20b4aa6b
RH
3348 (build-system meson-build-system)
3349 (native-inputs `(("libdrm" ,libdrm)
3350 ("pkg-config" ,pkg-config)))
3351 (inputs `(("ffmpeg" ,ffmpeg)
3352 ("pulseaudio" ,pulseaudio)
3353 ("wayland" ,wayland)
3354 ("wayland-protocols" ,wayland-protocols)))
3355 (home-page "https://github.com/atomnuker/wlstream")
3356 (synopsis "Screen capture tool for Wayland sessions")
3357 (description "Wlstream is a screen capture tool for recording audio and
3358video from a Wayland session.")
3359 (license license:lgpl2.1+))))