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