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