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