gnu: ffmpeg: Update to 4.4.
[jackhill/guix/guix.git] / gnu / packages / video.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2014, 2015, 2016, 2018, 2020 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
11 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
12 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
13 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
14 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
15 ;;; Copyright © 2016, 2018, 2019, 2020 Eric Bavier <bavier@posteo.net>
16 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
17 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
18 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
21 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
22 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
23 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
24 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
25 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
26 ;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
28 ;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
29 ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
30 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
31 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
32 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
33 ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
34 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
35 ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
36 ;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
37 ;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
38 ;;; Copyright © 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com>
39 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
40 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
41 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
42 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
43 ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
44 ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
45 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
46 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
47 ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
48 ;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
49 ;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
50 ;;; Copyright © 2021 Alexey Abramov <levenson@mmer.org>
51 ;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
52 ;;; Copyright © 2021 David Wilson <david@daviwil.com>
53 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
54 ;;;
55 ;;; This file is part of GNU Guix.
56 ;;;
57 ;;; GNU Guix is free software; you can redistribute it and/or modify it
58 ;;; under the terms of the GNU General Public License as published by
59 ;;; the Free Software Foundation; either version 3 of the License, or (at
60 ;;; your option) any later version.
61 ;;;
62 ;;; GNU Guix is distributed in the hope that it will be useful, but
63 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
64 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
65 ;;; GNU General Public License for more details.
66 ;;;
67 ;;; You should have received a copy of the GNU General Public License
68 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
69
70 (define-module (gnu packages video)
71 #:use-module (ice-9 match)
72 #:use-module ((srfi srfi-1) #:hide (zip))
73 #:use-module (srfi srfi-26)
74 #:use-module ((guix licenses) #:prefix license:)
75 #:use-module (guix utils)
76 #:use-module (guix packages)
77 #:use-module (guix download)
78 #:use-module (guix git-download)
79 #:use-module (guix svn-download)
80 #:use-module (guix hg-download)
81 #:use-module (guix build-system cargo)
82 #:use-module (guix build-system cmake)
83 #:use-module (guix build-system copy)
84 #:use-module (guix build-system gnu)
85 #:use-module (guix build-system glib-or-gtk)
86 #:use-module (guix build-system meson)
87 #:use-module (guix build-system perl)
88 #:use-module (guix build-system python)
89 #:use-module (guix build-system waf)
90 #:use-module (guix build-system trivial)
91 #:use-module (gnu packages)
92 #:use-module (gnu packages algebra)
93 #:use-module (gnu packages assembly)
94 #:use-module (gnu packages audio)
95 #:use-module (gnu packages autotools)
96 #:use-module (gnu packages avahi)
97 #:use-module (gnu packages backup)
98 #:use-module (gnu packages base)
99 #:use-module (gnu packages bison)
100 #:use-module (gnu packages boost)
101 #:use-module (gnu packages cdrom)
102 #:use-module (gnu packages check)
103 #:use-module (gnu packages cmake)
104 #:use-module (gnu packages compression)
105 #:use-module (gnu packages cpp)
106 #:use-module (gnu packages crates-io)
107 #:use-module (gnu packages crates-graphics)
108 #:use-module (gnu packages curl)
109 #:use-module (gnu packages dejagnu)
110 #:use-module (gnu packages dns)
111 #:use-module (gnu packages docbook)
112 #:use-module (gnu packages documentation)
113 #:use-module (gnu packages elf)
114 #:use-module (gnu packages file)
115 #:use-module (gnu packages flex)
116 #:use-module (gnu packages fonts)
117 #:use-module (gnu packages fontutils)
118 #:use-module (gnu packages freedesktop)
119 #:use-module (gnu packages fribidi)
120 #:use-module (gnu packages gettext)
121 #:use-module (gnu packages ghostscript)
122 #:use-module (gnu packages gl)
123 #:use-module (gnu packages glib)
124 #:use-module (gnu packages guile)
125 #:use-module (gnu packages gnome)
126 #:use-module (gnu packages gnunet)
127 #:use-module (gnu packages gnupg)
128 #:use-module (gnu packages gstreamer)
129 #:use-module (gnu packages gtk)
130 #:use-module (gnu packages image)
131 #:use-module (gnu packages imagemagick)
132 #:use-module (gnu packages iso-codes)
133 #:use-module (gnu packages libidn)
134 #:use-module (gnu packages libreoffice)
135 #:use-module (gnu packages libusb)
136 #:use-module (gnu packages linux)
137 #:use-module (gnu packages lua)
138 #:use-module (gnu packages m4)
139 #:use-module (gnu packages man)
140 #:use-module (gnu packages markup)
141 #:use-module (gnu packages maths)
142 #:use-module (gnu packages mp3)
143 #:use-module (gnu packages ncurses)
144 #:use-module (gnu packages networking)
145 #:use-module (gnu packages ocr)
146 #:use-module (gnu packages pcre)
147 #:use-module (gnu packages perl)
148 #:use-module (gnu packages perl-check)
149 #:use-module (gnu packages perl-web)
150 #:use-module (gnu packages photo)
151 #:use-module (gnu packages pkg-config)
152 #:use-module (gnu packages popt)
153 #:use-module (gnu packages pretty-print)
154 #:use-module (gnu packages protobuf)
155 #:use-module (gnu packages pulseaudio)
156 #:use-module (gnu packages python)
157 #:use-module (gnu packages python-crypto)
158 #:use-module (gnu packages python-web)
159 #:use-module (gnu packages python-xyz)
160 #:use-module (gnu packages qt)
161 #:use-module (gnu packages rdesktop)
162 #:use-module (gnu packages re2c)
163 #:use-module (gnu packages ruby)
164 #:use-module (gnu packages rust-apps)
165 #:use-module (gnu packages samba)
166 #:use-module (gnu packages sdl)
167 #:use-module (gnu packages serialization)
168 #:use-module (gnu packages shells)
169 #:use-module (gnu packages sqlite)
170 #:use-module (gnu packages ssh)
171 #:use-module (gnu packages swig)
172 #:use-module (gnu packages texinfo)
173 #:use-module (gnu packages textutils)
174 #:use-module (gnu packages tls)
175 #:use-module (gnu packages time)
176 #:use-module (gnu packages upnp)
177 #:use-module (gnu packages vulkan)
178 #:use-module (gnu packages web)
179 #:use-module (gnu packages webkit)
180 #:use-module (gnu packages wxwidgets)
181 #:use-module (gnu packages xdisorg)
182 #:use-module (gnu packages xiph)
183 #:use-module (gnu packages xml)
184 #:use-module (gnu packages xorg))
185
186 (define-public transcode
187 (package
188 (name "transcode")
189 (version "1.1.7")
190 (source
191 (origin
192 (method url-fetch)
193 (uri
194 (string-append "https://sources.archlinux.org/other/community/"
195 name "/" name "-" version ".tar.bz2"))
196 (sha256
197 (base32 "14ha9xjsjrj131f35jd56z5v1jb4rbsrj1nril5shqnxw3c74khy"))
198 (patches
199 (search-patches "transcode-ffmpeg.patch"))))
200 (build-system gnu-build-system)
201 (arguments
202 `(#:configure-flags
203 (list
204 "--enable-libv4l2"
205 "--enable-libmpeg2"
206 "--enable-libmpeg2convert"
207 "--enable-v4l"
208 ;;; XXX: Not available.
209 ;"--enable-bktr"
210 ;"--enable-sunau"
211 "--enable-oss"
212 "--enable-alsa"
213 ;;; XXX: Not available.
214 ;"--enable-libpostproc"
215 "--enable-freetype2"
216 "--enable-xvid"
217 "--enable-x264"
218 "--enable-ogg"
219 "--enable-vorbis"
220 "--enable-theora"
221 ;;; XXX: Not available.
222 ;"--enable-pvm3"
223 "--enable-libdv"
224 "--enable-libquicktime"
225 "--enable-lzo"
226 "--enable-a52"
227 "--enable-faac"
228 "--enable-libxml2"
229 ;;; XXX: Not available.
230 ;"--enable-ibp"
231 ;;"--enable-mjpegtools"
232 "--enable-sdl"
233 "--enable-imagemagick"
234 ;;; XXX: Not available.
235 ;"--enable-libjpegmmx"
236 "--enable-libjpeg")))
237 ;;; XXX: Not available.
238 ;"--enable-bsdav"
239 ;"--enable-pv3"
240 ;"--enable-nuv"
241 (native-inputs
242 `(("autoconf" ,autoconf)
243 ("automake" ,automake)
244 ("iconv" ,libiconv)
245 ("libtool" ,libtool)
246 ("libxml2" ,libxml2)
247 ("perl" ,perl)
248 ("pkg-config" ,pkg-config)
249 ("python" ,python-wrapper)))
250 (inputs
251 `(("alsa-lib" ,alsa-lib)
252 ("faac" ,faac)
253 ("ffmpeg" ,ffmpeg)
254 ("freetype" ,freetype)
255 ("imagemagick" ,imagemagick)
256 ("lame" ,lame)
257 ("liba52" ,liba52)
258 ("libdv" ,libdv)
259 ("libdvdread" ,libdvdread)
260 ("libjpeg" ,libjpeg-turbo)
261 ("libmpeg2" ,libmpeg2)
262 ("libogg" ,libogg)
263 ("libquicktime" ,libquicktime)
264 ("libtheora" ,libtheora)
265 ("libvorbis" ,libvorbis)
266 ("lzo" ,lzo)
267 ("mjepgtools" ,mjpegtools)
268 ("sdl" ,sdl)
269 ("v4l-utils" ,v4l-utils)
270 ("x11" ,libx11)
271 ("x264" ,libx264)
272 ("xaw" ,libxaw)
273 ("xext" ,libxext)
274 ("xpm" ,libxpm)
275 ("xv" ,libxv)
276 ("xvid" ,xvid)
277 ("zlib" ,zlib)))
278 (synopsis "Audio/Video Transcoder")
279 (description "Transcode is a fast, versatile and command-line based
280 audio/video everything to everything converter primarily focussed on producing
281 AVI video files with MP3 audio, but also including a program to read all the
282 video and audio streams from a DVD.")
283 (home-page
284 "http://linuxfromscratch.org/blfs/view/svn/multimedia/transcode.html")
285 (license license:gpl2+)))
286
287 (define-public svt-hevc
288 (package
289 (name "svt-hevc")
290 (version "1.5.1")
291 (source
292 (origin
293 (method git-fetch)
294 (uri
295 (git-reference
296 (url "https://github.com/OpenVisualCloud/SVT-HEVC")
297 (commit (string-append "v" version))))
298 (file-name (git-file-name name version))
299 (sha256
300 (base32 "0rac70p6rpvdx9v0bdd8nphgr7imdxb7nz0x77n3p7h3180zz9x0"))))
301 (build-system cmake-build-system)
302 (arguments
303 `(#:tests? #f)) ; Test script is stand-alone
304 (native-inputs
305 `(("yasm" ,yasm)))
306 (synopsis "SVT HEVC encoder")
307 (description "Scalable Video Technology (SVT) is a software-based video
308 coding technology that is highly optimized for Intel's Xeon processors. Using
309 the SVT-HEVC encoder, it is possible to spread video encoding processing across
310 multiple Intel's Xeon processors to achieve a real advantage of processing
311 efficiency.")
312 (home-page "https://01.org/svt")
313 (license (license:non-copyleft "file:///LICENSE.md"))))
314
315 (define-public mediasdk
316 (package
317 (name "mediasdk")
318 (version "20.1.1")
319 (source
320 (origin
321 (method git-fetch)
322 (uri
323 (git-reference
324 (url "https://github.com/Intel-Media-SDK/MediaSDK")
325 (commit (string-append "intel-" name "-" version))))
326 (file-name (git-file-name name version))
327 (sha256
328 (base32 "0blwcxr5j8762nylx2cxrq0h53bpgnk859dbs6crq4wr9fcxlx9z"))))
329 (build-system cmake-build-system)
330 (arguments
331 `(#:configure-flags
332 (list
333 "-DENABLE_X11=ON"
334 "-DENABLE_X11_DRI3=ON"
335 "-DENABLE_WAYLAND=ON"
336 "-DENABLE_TEXTLOG=ON"
337 "-DENABLE_STAT=ON"
338 "-DBUILD_TESTS=ON"
339 "-DBUILD_TOOLS=ON"
340 (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
341 (assoc-ref %outputs "out") "/lib"))))
342 (native-inputs
343 `(("pkg-config" ,pkg-config)
344 ("python" ,python-wrapper)))
345 (inputs
346 `(("libdrm" ,libdrm)
347 ("libva" ,libva)
348 ("pciaccess" ,libpciaccess)
349 ("wayland" ,wayland)
350 ("x11" ,libx11)))
351 (synopsis "Intel Media SDK")
352 (description "MediaSDK provides a plain C API to access hardware-accelerated
353 video decode, encode and filtering on Intel's Gen graphics hardware platforms.")
354 (home-page "http://mediasdk.intel.com/")
355 (license (license:non-copyleft "file:///LICENSE"))))
356
357 (define-public schroedinger
358 (package
359 (name "schroedinger")
360 (version "1.0.11")
361 (source
362 (origin
363 (method url-fetch)
364 (uri
365 (string-append "https://launchpad.net/" name "/trunk/" version
366 "/+download/" name "-" version ".tar.gz"))
367 (sha256
368 (base32 "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"))))
369 (build-system gnu-build-system)
370 (outputs '("out" "doc"))
371 (arguments
372 `(#:phases
373 (modify-phases %standard-phases
374 (add-after 'install 'move-docs
375 (lambda* (#:key outputs #:allow-other-keys)
376 (let* ((out (assoc-ref outputs "out"))
377 (doc (assoc-ref outputs "doc")))
378 (mkdir-p (string-append doc "/share"))
379 (rename-file
380 (string-append out "/share/gtk-doc")
381 (string-append doc "/share/gtk-doc"))
382 #t))))))
383 (native-inputs
384 `(("dash" ,dash)
385 ("gtk-doc" ,gtk-doc/stable)
386 ("pkg-config" ,pkg-config)))
387 (inputs
388 `(("glew" ,glew)
389 ("opengl" ,mesa)))
390 (propagated-inputs
391 `(("orc" ,orc)))
392 (synopsis "Dirac video codec")
393 (description "Schroedinger is a project implementing the Dirac video codec in
394 ANSI C code. It is meant to be highly optimized and portable. It is developed
395 as a joint effort between the BBC and Fluendo.")
396 (home-page "https://launchpad.net/schroedinger")
397 (license
398 ;; This library is licensed under 4 different licenses,
399 ;; and you can choose to use it under the terms of any one of them.
400 (list
401 license:gpl2+
402 license:lgpl2.0+
403 license:expat
404 license:mpl1.1))))
405
406 (define-public libquicktime
407 (package
408 (name "libquicktime")
409 (version "1.2.4")
410 (source
411 (origin
412 (method url-fetch)
413 (uri
414 (string-append "https://sourceforge.net/projects/" name "/files/"
415 name "/" version "/" name "-" version ".tar.gz"))
416 (sha256
417 (base32 "0s3kshzl3zfjw3phzv73r91fkr9z8q8kc3dhsys4f4xk6ff3alqw"))
418 (patches
419 (search-patches "libquicktime-ffmpeg.patch"))))
420 (build-system gnu-build-system)
421 (native-inputs
422 `(("gettext" ,gettext-minimal)
423 ("doxygen" ,doxygen)
424 ("pkg-config" ,pkg-config)))
425 (inputs
426 `(("alsa" ,alsa-lib)
427 ("ffmpeg" ,ffmpeg)
428 ("gtk+-2" ,gtk+-2)
429 ("lame" ,lame)
430 ("libdv" ,libdv)
431 ("libjpeg" ,libjpeg-turbo)
432 ("libpng" ,libpng)
433 ("libvorbis" ,libvorbis)
434 ("opengl" ,mesa)
435 ("schroedinger" ,schroedinger)
436 ("x11" ,libx11)
437 ("x264" ,libx264)
438 ("xaw" ,libxaw)
439 ("xv" ,libxv)))
440 (synopsis "Quick Time Library")
441 (description "The goal of this project is to enhance the quicktime4linux
442 library.")
443 (home-page "http://libquicktime.sourceforge.net/")
444 (license license:lgpl2.1+)))
445
446 (define-public mjpegtools
447 (package
448 (name "mjpegtools")
449 (version "2.1.0")
450 (source
451 (origin
452 (method url-fetch)
453 (uri
454 (string-append "https://sourceforge.net/projects/" name "/files/"
455 name "/" version "/" name "-" version ".tar.gz"))
456 (sha256
457 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
458 (build-system gnu-build-system)
459 (inputs
460 `(("gtk+-2" ,gtk+-2)
461 ("libdv" ,libdv)
462 ("libpng" ,libpng)
463 ("libquicktime" ,libquicktime)
464 ("sdl" ,sdl)))
465 (synopsis "Tools for handling MPEG")
466 (description "Mjpeg tools is a suite of programs which support video capture,
467 editing, playback, and compression to MPEG of MJPEG video. Edit, play and
468 compression software is hardware independent.")
469 (home-page "http://mjpeg.sourceforge.net/")
470 (license license:gpl2+)))
471
472 (define-public libmms
473 (package
474 (name "libmms")
475 (version "0.6.4")
476 (source
477 (origin
478 (method url-fetch)
479 (uri
480 (string-append "https://sourceforge.net/projects/" name "/files/"
481 name "/" version "/" name "-" version ".tar.gz"))
482 (sha256
483 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
484 (build-system gnu-build-system)
485 (synopsis "MMS stream protocol library")
486 (description "Libmms is a library for streaming media files using the mmst
487 and mmsh protocols.")
488 (home-page "https://sourceforge.net/projects/libmms/")
489 (license license:lgpl2.1+)))
490
491 (define-public libvideogfx
492 (package
493 (name "libvideogfx")
494 (version "1.0.9")
495 (source
496 (origin
497 (method git-fetch)
498 (uri
499 (git-reference
500 (url "https://github.com/farindk/libvideogfx")
501 (commit (string-append "v" version))))
502 (file-name (git-file-name name version))
503 (sha256
504 (base32 "154b0j8cfg879pg08xcbwvbz8z9nrfnyj31i48vxir1psas70ynq"))))
505 (build-system gnu-build-system)
506 (arguments
507 `(#:phases
508 (modify-phases %standard-phases
509 (add-after 'unpack 'fix-build-errors
510 (lambda _
511 (substitute* "libvideogfx/graphics/fileio/ffmpeg.cc"
512 (("av_close_input_file\\(")
513 "avformat_close_input(&"))
514 (substitute* "libvideogfx/graphics/fileio/png.cc"
515 (("is != NULL") "is.good()"))
516 #t)))))
517 (native-inputs
518 `(("autoconf" ,autoconf)
519 ("automake" ,automake)
520 ("libtool" ,libtool)
521 ("pkg-config" ,pkg-config)))
522 (inputs
523 `(("ffmpeg" ,ffmpeg-2.8)
524 ("jpeg" ,libjpeg-turbo)
525 ("png" ,libpng)
526 ("x11" ,libx11)
527 ("xext" ,libxext)))
528 (synopsis "Video processing library")
529 (description "LibVideoGfx is a C++ library for low-level video processing.
530 It aims at speeding up the development process for image and video processing
531 applications by providing high-level classes for commonly required tasks.")
532 (home-page "https://dirk-farin.net/software/libvideogfx/index.html")
533 (license license:lgpl2.1+)))
534
535 (define-public libde265
536 (package
537 (name "libde265")
538 (version "1.0.8")
539 (source
540 (origin
541 (method git-fetch)
542 (uri
543 (git-reference
544 (url "https://github.com/strukturag/libde265")
545 (commit (string-append "v" version))))
546 (file-name (git-file-name name version))
547 (sha256
548 (base32 "1dzflqbk248lz5ws0ni5acmf32b3rmnq5gsfaz7691qqjxkl1zml"))))
549 (build-system gnu-build-system)
550 (arguments
551 `(#:configure-flags
552 (list "--disable-static")))
553 (native-inputs
554 `(("autoconf" ,autoconf)
555 ("automake" ,automake)
556 ("libtool" ,libtool)
557 ("pkg-config" ,pkg-config)
558 ("python" ,python-wrapper)))
559 (inputs
560 `(;; XXX: Build fails with libvideogfx.
561 ;; ("libvideogfx" ,libvideogfx)
562 ("qt" ,qtbase)
563 ("sdl" ,sdl)))
564 (synopsis "H.265 video codec implementation")
565 (description "Libde265 is an implementation of the h.265 video codec. It is
566 written from scratch and has a plain C API to enable a simple integration into
567 other software.")
568 (home-page "https://www.libde265.org/")
569 (license
570 (list
571 ;; Applications.
572 license:expat
573 ;; Library.
574 license:lgpl3+))))
575
576 (define-public tslib
577 (package
578 (name "tslib")
579 (version "1.22")
580 (source
581 (origin
582 (method git-fetch)
583 (uri
584 (git-reference
585 (url "https://github.com/libts/tslib")
586 (commit version)))
587 (file-name (git-file-name name version))
588 (sha256
589 (base32 "197p6vy539wvfrv23agbvmay4rjya1jnisi46llm0nx4cvqh48by"))))
590 (build-system gnu-build-system)
591 (arguments
592 `(#:test-target "tests"
593 #:configure-flags
594 (list "--with-sdl2")))
595 (native-inputs
596 `(("autoconf" ,autoconf)
597 ("automake" ,automake)
598 ("libtool" ,libtool)
599 ("pkg-config" ,pkg-config)))
600 (inputs
601 `(("linux-headers" ,linux-libre-headers)
602 ("sdl2" ,sdl2)))
603 (synopsis "Touchscreen access library")
604 (description "TSLib is a cross-platform library that provides access to
605 touchscreen devices and the ability to apply filters to their input events.")
606 (home-page "http://www.tslib.org/")
607 (license license:lgpl2.1+)))
608
609 (define-public libmpeg3
610 (package
611 (name "libmpeg3")
612 (version "1.8")
613 (source
614 (origin
615 (method url-fetch)
616 (uri
617 (string-append "https://sourceforge.net/projects/heroines/files/"
618 "releases/081108/" name "-" version "-src.tar.bz2"))
619 (sha256
620 (base32 "1i53vv0wm5qfwgg1z7j9g14s6c7gxxkiy4vbdkq3lijjyyz50vv5"))))
621 (build-system gnu-build-system)
622 (arguments
623 `(#:test-target "test"
624 #:make-flags
625 (list
626 (string-append "A52DIR=" (assoc-ref %build-inputs "liba52"))
627 (string-append "DST=" (assoc-ref %outputs "out") "/bin"))
628 #:phases
629 (modify-phases %standard-phases
630 (add-after 'unpack 'delete-bundled-a52dec
631 (lambda _
632 (delete-file-recursively "a52dec-0.7.3")
633 (substitute* "Makefile"
634 (("include Makefile\\.a52")
635 "")
636 (("\\(A52DIR\\)/include")
637 "(A52DIR)/include/a52dec")
638 (("LIBS = " match)
639 (string-append match "-la52 ")))
640 #t))
641 (add-before 'install 'create-destination-directory
642 (lambda* (#:key outputs #:allow-other-keys)
643 (let* ((out (string-append (assoc-ref outputs "out"))))
644 (mkdir-p (string-append out "/bin"))
645 #t))))))
646 (native-inputs
647 `(("nasm" ,nasm)))
648 (inputs
649 `(("liba52" ,liba52)))
650 (synopsis "Advanced MPEG editing and manipulation library")
651 (description "Libmpeg3 decodes MP2, MP3, AC3, MPEG-1 video, MPEG-2 video,
652 and DVD footage in a single library. It supports many esoteric features like
653 parallel video decoding, frame-accurate editing, YUV 4:2:2, and ATSC transport
654 stream decoding")
655 (home-page "http://heroinewarrior.com/libmpeg3.php")
656 (license license:gpl2+)))
657
658 (define-public aalib
659 (package
660 (name "aalib")
661 (version "1.4rc5")
662 (source (origin
663 (method url-fetch)
664 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
665 version "/" name "-" version ".tar.gz"))
666 (sha256
667 (base32
668 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
669 (build-system gnu-build-system)
670 (native-inputs
671 `(("makeinfo" ,texinfo)))
672 (inputs
673 `(("ncurses" ,ncurses)))
674 (arguments
675 `(#:phases
676 (modify-phases %standard-phases
677 (replace 'configure
678 (lambda* (#:key build inputs outputs #:allow-other-keys)
679 ;; This old `configure' script doesn't support
680 ;; variables passed as arguments.
681 (let ((out (assoc-ref outputs "out"))
682 (ncurses (assoc-ref inputs "ncurses")))
683 (setenv "CONFIG_SHELL" (which "bash"))
684 (invoke "./configure"
685 (string-append "--prefix=" out)
686 (string-append "--build=" build)
687 ;; The ancient config.guess is unable to
688 ;; guess the host triplet on mips64el.
689 ,@(if (string=? "mips64el-linux"
690 (%current-system))
691 '("--host=mips64el-unknown-linux-gnu")
692 '())
693 ;; The same is also true with aarch64.
694 ,@(if (string=? "aarch64-linux"
695 (%current-system))
696 '("--host=aarch64-unknown-linux-gnu")
697 '())
698 (string-append "--with-ncurses="
699 ncurses))))))))
700 (home-page "http://aa-project.sourceforge.net/aalib/")
701 (synopsis "ASCII-art library")
702 (description
703 "AA-lib is a low level gfx library which does not require graphics device.
704 In fact, there is no graphical output possible. AA-lib replaces those
705 old-fashioned output methods with powerful ascii-art renderer.")
706 (license license:lgpl2.0+)))
707
708 (define-public celluloid
709 (package
710 (name "celluloid")
711 (version "0.21")
712 (source
713 (origin
714 (method url-fetch)
715 (uri (string-append "https://github.com/celluloid-player/celluloid"
716 "/releases/download/v" version
717 "/celluloid-" version ".tar.xz"))
718 (sha256
719 (base32 "1dvyf21iv9hrgv99szc24386vkacmhidm5b4d31hqqjs3b6di692"))))
720 (build-system glib-or-gtk-build-system)
721 (native-inputs
722 `(("intltool" ,intltool)
723 ("pkg-config" ,pkg-config)))
724 (inputs
725 `(("gtk+" ,gtk+)
726 ("libepoxy" ,libepoxy)
727 ("mpv" ,mpv)))
728 (home-page "https://github.com/celluloid-player/celluloid")
729 (synopsis "GTK+ frontend for the mpv media player")
730 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
731 It interacts with mpv via the client API exported by libmpv, allowing access to
732 mpv's powerful playback capabilities.")
733 (license license:gpl3+)))
734
735 (define-public liba52
736 (package
737 (name "liba52")
738 (version "0.7.4")
739 (source (origin
740 (method url-fetch)
741 (uri (string-append
742 ;; A mirror://sourceforge URI doesn't work, presumably
743 ;; because the SourceForge project is misconfigured.
744 "http://liba52.sourceforge.net/files/a52dec-" version
745 ".tar.gz"))
746 (sha256
747 (base32
748 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
749 (patches (search-patches "liba52-enable-pic.patch"
750 "liba52-set-soname.patch"
751 "liba52-use-mtune-not-mcpu.patch"
752 "liba52-link-with-libm.patch"))))
753 (build-system gnu-build-system)
754 ;; XXX We need to run ./bootstrap because of the build system fixes above.
755 (native-inputs
756 `(("autoconf" ,autoconf)
757 ("automake" ,automake)
758 ("libtool" ,libtool)))
759 (arguments `(#:configure-flags '("--enable-shared")
760 #:phases
761 (modify-phases %standard-phases
762 ;; XXX We need to run ./bootstrap because of the build
763 ;; system fixes above.
764 (replace 'bootstrap
765 (lambda _ (invoke "sh" "bootstrap"))))))
766 (home-page "http://liba52.sourceforge.net/")
767 (synopsis "ATSC A/52 stream decoder")
768 (description "liba52 is a library for decoding ATSC A/52 streams. The
769 A/52 standard is used in a variety of applications, including digital
770 television and DVD. It is also known as AC-3.")
771 (license license:gpl2+)))
772
773 (define-public libaom
774 (package
775 (name "libaom")
776 (version "3.1.0")
777 (source (origin
778 (method git-fetch)
779 (uri (git-reference
780 (url "https://aomedia.googlesource.com/aom/")
781 (commit (string-append "v" version))))
782 (file-name (git-file-name name version))
783 (sha256
784 (base32
785 "1v3i34jmbz1p3x8msj3vx46nl6jdzxbkr2lfbh06vard8adb16il"))))
786 (build-system cmake-build-system)
787 (native-inputs
788 `(("perl" ,perl)
789 ("pkg-config" ,pkg-config)
790 ("python" ,python))) ; to detect the version
791 (arguments
792 `(#:tests? #f ;no check target
793 #:configure-flags
794 ;; build dynamic library
795 (list "-DBUILD_SHARED_LIBS=YES"
796 "-DENABLE_PIC=TRUE"
797 "-DAOM_TARGET_CPU=generic"
798 (string-append "-DCMAKE_INSTALL_PREFIX="
799 (assoc-ref %outputs "out")))))
800 (home-page "https://aomedia.googlesource.com/aom/")
801 (synopsis "AV1 video codec")
802 (description "Libaom is the reference implementation of AV1. It includes a
803 shared library and encoder and decoder command-line executables.")
804 (license license:bsd-2)))
805
806 (define-public libmpeg2
807 (package
808 (name "libmpeg2")
809 (version "0.5.1")
810 (source (origin
811 (method url-fetch)
812 ;; A mirror://sourceforge URI doesn't work, presumably
813 ;; because the SourceForge project is misconfigured.
814 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
815 name "-" version ".tar.gz"))
816 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
817 "libmpeg2-global-symbol-test.patch"))
818 (sha256
819 (base32
820 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
821 (inputs
822 `(("libx11" ,libx11)
823 ("libxext" ,libxext)
824 ("libxv" ,libxv)
825 ("libsm" ,libsm)
826 ("libice" ,libice)
827 ("sdl" ,sdl)))
828 (build-system gnu-build-system)
829 (home-page "http://libmpeg2.sourceforge.net/")
830 (synopsis "MPEG1 and MPEG2 video decoder library")
831 (description
832 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
833 (license license:gpl2+)))
834
835 (define-public libx264
836 ;; There are no tags in the repository, so we take the version number from
837 ;; the X264_BUILD variable defined in x264.h.
838 (let ((version "161")
839 (commit "4c2aafd864dd201832ec2be0fef4484925146650")
840 (revision "0"))
841 (package
842 (name "libx264")
843 (version (git-version version revision commit))
844 (source (origin
845 (method git-fetch)
846 (uri (git-reference
847 (url "https://code.videolan.org/videolan/x264.git")
848 (commit commit)))
849 (file-name (git-file-name name version))
850 (sha256
851 (base32
852 "1i6v9h3xx9pi0zmlj3anwwjxqa63sbhy9crrif8dphipwfn9hyg5"))))
853 (build-system gnu-build-system)
854 (native-inputs
855 `(("pkg-config" ,pkg-config)
856 ("nasm" ,nasm)))
857 ;; TODO: Add gpac input
858 (arguments
859 `(#:tests? #f ;no check target
860 #:configure-flags '("--enable-shared"
861 ;; Don't build the command-line program. If we
862 ;; want it later, we should do so in a different
863 ;; package to avoid a circular dependency (the x264
864 ;; program depends on ffmpeg and ffmpeg depends on
865 ;; libx264).
866 "--disable-cli"
867
868 ;; On MIPS, we must pass "--disable-asm" or else
869 ;; configure fails after printing: "You specified a
870 ;; pre-MSA CPU in your CFLAGS. If you really want
871 ;; to run on such a CPU, configure with
872 ;; --disable-asm."
873 ,@(if (string-prefix? "mips"
874 (or (%current-target-system)
875 (%current-system)))
876 '("--disable-asm")
877 '()))))
878 (home-page "https://www.videolan.org/developers/x264.html")
879 (synopsis "H.264 video coding library")
880 (description "libx264 is an advanced encoding library for creating
881 H.264 (MPEG-4 AVC) video streams.")
882 (license (list license:gpl2+ ;most files
883 license:isc ;common/x86/x86inc.asm
884 license:lgpl2.1+ ;extras/getopt.c
885 license:bsd-3 ;extras/inttypes.h
886 (license:non-copyleft ;extras/cl*.h
887 "file://extras/cl.h"
888 "See extras/cl.h in the distribution."))))))
889
890 (define-public mkvtoolnix
891 (package
892 (name "mkvtoolnix")
893 (version "52.0.0")
894 (source
895 (origin
896 (method url-fetch)
897 (uri (string-append "https://mkvtoolnix.download/sources/"
898 "mkvtoolnix-" version ".tar.xz"))
899 (sha256
900 (base32 "15y7ahlifsclnkl70wn5w34dil8nwcwcjnw3k2ydqc6dz4vb0j5s"))
901 (modules '((guix build utils)))
902 (snippet '(begin
903 ;; Delete bundled libraries.
904 (for-each delete-file-recursively
905 '("lib/fmt"
906 "lib/libebml"
907 "lib/libmatroska"
908 "lib/nlohmann-json"
909 "lib/pugixml"
910 "lib/utf8-cpp"))
911 #t))))
912 (build-system gnu-build-system)
913 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
914 (inputs
915 `(("boost" ,boost)
916 ("bzip2" ,bzip2)
917 ("cmark" ,cmark)
918 ("libebml" ,libebml)
919 ("file" ,file)
920 ("flac" ,flac)
921 ("fmt" ,fmt)
922 ("libdvdread" ,libdvdread)
923 ("libmatroska" ,libmatroska)
924 ("libogg" ,libogg)
925 ("libvorbis" ,libvorbis)
926 ("lzo" ,lzo)
927 ("pcre2" ,pcre2)
928 ("pugixml" ,pugixml)
929 ("qtbase" ,qtbase)
930 ("qtmultimedia" ,qtmultimedia)
931 ("utfcpp" ,utfcpp)
932 ("zlib" ,zlib)))
933 (native-inputs
934 `(("docbook-xsl" ,docbook-xsl)
935 ("gettext" ,gettext-minimal)
936 ("googletest" ,googletest)
937 ("libxslt" ,libxslt)
938 ("json-modern-cxx" ,json-modern-cxx)
939 ("perl" ,perl)
940 ("pkg-config" ,pkg-config)
941 ("po4a" ,po4a)
942 ("qttools" ,qttools)
943 ("ruby" ,ruby)))
944 (arguments
945 `(#:configure-flags
946 (list (string-append "--with-boost="
947 (assoc-ref %build-inputs "boost"))
948 (string-append "--with-docbook-xsl-root="
949 (assoc-ref %build-inputs "docbook-xsl")
950 "/xml/xsl/docbook-xsl-"
951 ,(package-version docbook-xsl))
952 "--enable-update-check=no"
953 "--enable-precompiled-headers=no")
954 #:phases
955 (modify-phases %standard-phases
956 (add-after 'unpack 'patch-relative-file-names
957 (lambda* (#:key outputs #:allow-other-keys)
958 (let ((out (assoc-ref outputs "out")))
959 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
960 (("mkvmerge" match)
961 (string-append out "/bin/" match)))
962 #t)))
963 (add-before 'configure 'add-googletest
964 (lambda* (#:key inputs #:allow-other-keys)
965 (symlink
966 (string-append (assoc-ref inputs "googletest")
967 "/include/gtest") "lib/gtest")
968 #t))
969 (replace 'build
970 (lambda _
971 (let ((-j (list "-j" (number->string (parallel-job-count)))))
972 (apply invoke "rake" -j))))
973 (replace 'check
974 (lambda _
975 (invoke "rake" "tests/unit")))
976 (replace 'install
977 (lambda _
978 (invoke "rake" "install")))
979 (add-after 'install 'post-install
980 (lambda* (#:key outputs #:allow-other-keys)
981 ;; Move the Qt interface to "gui".
982 (let* ((out (assoc-ref outputs "out"))
983 (gui (assoc-ref outputs "gui"))
984 (strip-store-dir (lambda (path)
985 (substring path (string-prefix-length out path)))))
986 (for-each
987 (lambda (file)
988 (mkdir-p (string-append gui (dirname file)))
989 (rename-file (string-append out file)
990 (string-append gui file)))
991 (append '("/bin/mkvtoolnix-gui"
992 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
993 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
994 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
995 (map strip-store-dir (find-files out "\\.ogg$"))
996 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
997 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
998 (for-each
999 (lambda (file)
1000 (delete-file-recursively (string-append out file)))
1001 '("/share/applications"
1002 "/share/metainfo"
1003 "/share/mime"
1004 "/share/mkvtoolnix")))
1005 #t)))))
1006 (home-page "https://mkvtoolnix.download")
1007 (synopsis "Tools to create, alter and inspect Matroska files")
1008 (description
1009 "MKVToolNix provides tools for getting information about Matroska files
1010 (@command{mkvinfo}), extracting tracks/data from Matroska files
1011 (@command{mkvextract}), and creating Matroska files from other media files
1012 (@command{mkvmerge}).")
1013 (license license:gpl2)))
1014
1015 (define-public straw-viewer
1016 (package
1017 (name "straw-viewer")
1018 (version "0.1.3")
1019 (source
1020 (origin
1021 (method git-fetch)
1022 (uri (git-reference
1023 (url "https://github.com/trizen/straw-viewer")
1024 (commit version)))
1025 (file-name (git-file-name name version))
1026 (sha256
1027 (base32 "1n21byn7hqykpm94jmmnir1fwsskq6dp9wgj0bd2qf0qx5nq33cl"))))
1028 (build-system perl-build-system)
1029 (native-inputs
1030 `(("perl-module-build" ,perl-module-build)
1031 ("perl-test-pod" ,perl-test-pod)))
1032 (inputs
1033 `(("perl-data-dump" ,perl-data-dump)
1034 ("perl-json" ,perl-json)
1035 ("perl-libwww" ,perl-libwww)
1036 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1037 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
1038 ("perl-mozilla-ca" ,perl-mozilla-ca)
1039 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
1040 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1041 ("xdg-utils" ,xdg-utils)))
1042 ;; Required only when building the graphical interface (--gtk).
1043 ;;("perl-file-sharedir" ,perl-file-sharedir)
1044
1045 ;; Some videos play without youtube-dl, but others silently fail to.
1046 (propagated-inputs
1047 `(("youtube-dl" ,youtube-dl)))
1048 (arguments
1049 `(#:modules ((guix build perl-build-system)
1050 (guix build utils)
1051 (srfi srfi-26))
1052 #:phases
1053 (modify-phases %standard-phases
1054 (add-after 'unpack 'refer-to-inputs
1055 (lambda* (#:key inputs #:allow-other-keys)
1056 (substitute* "lib/WWW/StrawViewer.pm"
1057 (("'youtube-dl'")
1058 (format #f "'~a/bin/youtube-dl'"
1059 (assoc-ref inputs "youtube-dl"))))
1060 (substitute* "bin/gtk-straw-viewer"
1061 (("'xdg-open'")
1062 (format #f "'~a/bin/xdg-open'"
1063 (assoc-ref inputs "xdg-utils"))))
1064 #t))
1065 ;; (add-after 'install 'install-desktop
1066 ;; (lambda* (#:key outputs #:allow-other-keys)
1067 ;; (let* ((out (assoc-ref outputs "out"))
1068 ;; (sharedir (string-append out "/share")))
1069 ;; (install-file "share/gtk-straw-viewer.desktop"
1070 ;; (string-append sharedir "/applications"))
1071 ;; (install-file "share/icons/gtk-straw-viewer.png"
1072 ;; (string-append sharedir "/pixmaps"))
1073 ;; #t)))
1074 (add-after 'install 'wrap-program
1075 (lambda* (#:key outputs #:allow-other-keys)
1076 (let* ((out (assoc-ref outputs "out"))
1077 (bin-dir (string-append out "/bin/"))
1078 (site-dir (string-append out "/lib/perl5/site_perl/"))
1079 (lib-path (getenv "PERL5LIB")))
1080 (for-each (cut wrap-program <>
1081 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1082 (find-files bin-dir))
1083 #t))))))
1084 (synopsis
1085 "Light-weight application for searching and streaming videos from YouTube")
1086 (description
1087 "Straw-viewer searches for YouTube videos using @uref{https://invidio.us/,
1088 invidio.us} and plays them locally in a native media player like @command{vlc}
1089 or @command{mpv}.
1090
1091 You can search for videos, playlists, and/or channels. The videos are streamed
1092 directly to the player at the best chosen resolution and with closed captions if
1093 available.")
1094 ;; XXX Add #:module-build-flags '("--gtk") dependencies and this sentence.
1095 ;; Both a command-line and a graphical interface are available.
1096 (home-page "https://github.com/trizen/youtube-viewer")
1097 (license license:perl-license)))
1098
1099 (define-public x265
1100 (package
1101 (name "x265")
1102 (version "3.4")
1103 (outputs '("out" "static"))
1104 (source
1105 (origin
1106 (method url-fetch)
1107 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
1108 "/downloads/x265_" version ".tar.gz")
1109 (string-append "https://download.videolan.org/videolan/x265/"
1110 "x265_" version ".tar.gz")))
1111 (sha256
1112 (base32 "0wl62hfsdqpf3r3z3s6l9bz7pdb1rcik5ll00b3yaadplqipy162"))
1113 (patches (search-patches "x265-arm-flags.patch"))
1114 (modules '((guix build utils)))
1115 (snippet '(begin
1116 (delete-file-recursively "source/compat/getopt")
1117 #t))))
1118 (build-system cmake-build-system)
1119 (native-inputs
1120 ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
1121 (if (string-prefix? "i686" (%current-system))
1122 '()
1123 `(("nasm" ,nasm))))
1124 (arguments
1125 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
1126 #:configure-flags
1127 ;; Ensure position independent code for everyone.
1128 (list "-DENABLE_PIC=TRUE"
1129 ,@(if (target-arm?)
1130 '("-DENABLE_ASSEMBLY=OFF")
1131 '())
1132 (string-append "-DCMAKE_INSTALL_PREFIX="
1133 (assoc-ref %outputs "out")))
1134 #:phases
1135 (modify-phases %standard-phases
1136 (add-after 'unpack 'prepare-build
1137 (lambda _
1138 (delete-file-recursively "build")
1139 (chdir "source")
1140 #t))
1141 (add-before 'configure 'build-12-bit
1142 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1143 (mkdir "../build-12bit")
1144 (with-directory-excursion "../build-12bit"
1145 (apply invoke
1146 "cmake" "../source"
1147 "-DHIGH_BIT_DEPTH=ON"
1148 "-DEXPORT_C_API=OFF"
1149 "-DENABLE_CLI=OFF"
1150 "-DMAIN12=ON"
1151 configure-flags)
1152 (substitute* (cons "cmake_install.cmake"
1153 (append
1154 (find-files "CMakeFiles/x265-shared.dir" ".")
1155 (find-files "CMakeFiles/x265-static.dir" ".")))
1156 (("libx265") "libx265_main12"))
1157 (invoke "make"))))
1158 (add-before 'configure 'build-10-bit
1159 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1160 (mkdir "../build-10bit")
1161 (with-directory-excursion "../build-10bit"
1162 (apply invoke
1163 "cmake" "../source"
1164 "-DHIGH_BIT_DEPTH=ON"
1165 "-DEXPORT_C_API=OFF"
1166 "-DENABLE_CLI=OFF"
1167 configure-flags)
1168 (substitute* (cons "cmake_install.cmake"
1169 (append
1170 (find-files "CMakeFiles/x265-shared.dir" ".")
1171 (find-files "CMakeFiles/x265-static.dir" ".")))
1172 (("libx265") "libx265_main10"))
1173 (invoke "make"))))
1174 (add-after 'install 'install-more-libs
1175 (lambda _
1176 (with-directory-excursion "../build-12bit"
1177 (invoke "make" "install"))
1178 (with-directory-excursion "../build-10bit"
1179 (invoke "make" "install"))))
1180 (add-before 'strip 'move-static-libs
1181 (lambda* (#:key outputs #:allow-other-keys)
1182 (let ((out (assoc-ref outputs "out"))
1183 (static (assoc-ref outputs "static")))
1184 (mkdir-p (string-append static "/lib"))
1185 (with-directory-excursion
1186 (string-append out "/lib")
1187 (for-each
1188 (lambda (file)
1189 (rename-file file
1190 (string-append static "/lib/" file)))
1191 (find-files "." "\\.a$"))))
1192 #t)))))
1193 (home-page "http://x265.org/")
1194 (synopsis "Library for encoding h.265/HEVC video streams")
1195 (description "x265 is a H.265 / HEVC video encoder application library,
1196 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
1197 (license license:gpl2+)))
1198
1199 (define-public libass
1200 (package
1201 (name "libass")
1202 (version "0.15.0")
1203 (source (origin
1204 (method url-fetch)
1205 (uri (string-append
1206 "https://github.com/libass/libass/releases/download/"
1207 version "/libass-" version ".tar.xz"))
1208 (sha256
1209 (base32
1210 "0cz8v6kh3f2j5rdjrra2z0h715fa16vjm7kambvqx9hak86262cz"))))
1211 (build-system gnu-build-system)
1212 (arguments
1213 '(#:configure-flags '("--disable-static")))
1214 (native-inputs
1215 `(("pkg-config" ,pkg-config)
1216 ("nasm" ,nasm)))
1217 (propagated-inputs
1218 `(("freetype" ,freetype)
1219 ("fribidi" ,fribidi)
1220 ("fontconfig" ,fontconfig)
1221 ("harfbuzz" ,harfbuzz)))
1222 (home-page "https://github.com/libass/libass")
1223 (synopsis "Subtitle rendering library for the ASS/SSA format")
1224 (description "libass is a subtitle rendering library for the
1225 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
1226 (license license:isc)))
1227
1228 (define-public libcaca
1229 (package
1230 (name "libcaca")
1231 (version "0.99.beta19")
1232 (source (origin
1233 (method url-fetch)
1234 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
1235 version ".tar.gz"))
1236 (sha256
1237 (base32
1238 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))
1239 (patches (search-patches "libcaca-CVE-2021-3410-pt1.patch"
1240 "libcaca-CVE-2021-3410-pt2.patch"))))
1241 (build-system gnu-build-system)
1242 (arguments
1243 '(#:configure-flags '("--disable-static")))
1244 (native-inputs `(("pkg-config" ,pkg-config)))
1245 (inputs
1246 `(("freeglut" ,freeglut)
1247 ("ftgl" ,ftgl)
1248 ("imlib2" ,imlib2)
1249 ("libx11" ,libx11)
1250 ("mesa" ,mesa)
1251 ("ncurses" ,ncurses)
1252 ("zlib" ,zlib)))
1253 (home-page "http://caca.zoy.org/wiki/libcaca")
1254 (synopsis "Colour ASCII-art library")
1255 (description "libcaca is a graphics library that outputs text instead of
1256 pixels, so that it can work on older video cards or text terminals. It
1257 supports Unicode, 2048 colors, dithering of color images, and advanced text
1258 canvas operations.")
1259 (license license:wtfpl2)))
1260
1261 (define-public libdca
1262 (package
1263 (name "libdca")
1264 (version "0.0.7")
1265 (source (origin
1266 (method url-fetch)
1267 (uri (string-append
1268 "https://download.videolan.org/pub/videolan/libdca/"
1269 version "/libdca-" version ".tar.bz2"))
1270 (sha256
1271 (base32
1272 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
1273 (build-system gnu-build-system)
1274 (native-inputs
1275 `(("autoconf" ,autoconf)
1276 ("automake" ,automake)
1277 ("libtool" ,libtool)))
1278 (home-page "https://www.videolan.org/developers/libdca.html")
1279 (synopsis "DTS Coherent Acoustics decoder")
1280 (description "libdca is a library for decoding DTS Coherent Acoustics
1281 streams.")
1282 (license license:gpl2+)))
1283
1284 (define-public libdv
1285 (package
1286 (name "libdv")
1287 (version "1.0.0")
1288 (source (origin
1289 (method url-fetch)
1290 (uri (string-append
1291 "mirror://sourceforge/libdv/libdv/"
1292 version "/libdv-" version ".tar.gz"))
1293 (sha256
1294 (base32
1295 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
1296 (build-system gnu-build-system)
1297 (native-inputs `(("pkg-config" ,pkg-config)))
1298 (inputs `(("libxv" ,libxv)))
1299 (home-page "http://libdv.sourceforge.net/")
1300 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
1301 (description "The Quasar DV codec (libdv) is a software codec for DV
1302 video, the encoding format used by most digital camcorders, typically those
1303 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
1304 developed according to the official standards for DV video: IEC 61834 and
1305 SMPTE 314M.")
1306 (license license:lgpl2.1+)))
1307
1308 (define-public libmatroska
1309 (package
1310 (name "libmatroska")
1311 (version "1.6.3")
1312 (source
1313 (origin
1314 (method url-fetch)
1315 (uri (string-append "https://dl.matroska.org/downloads/"
1316 "libmatroska/libmatroska-" version ".tar.xz"))
1317 (sha256
1318 (base32 "06h81sxyz2riic0gpzik6ffcnq32wrqphi8c6k55glcdymiimyfs"))))
1319 (build-system cmake-build-system)
1320 (inputs
1321 `(("libebml" ,libebml)))
1322 (arguments
1323 `(#:configure-flags
1324 (list "-DBUILD_SHARED_LIBS=YES")
1325 #:tests? #f)) ; no test suite
1326 (home-page "https://www.matroska.org")
1327 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
1328 (description
1329 "Matroska aims to become the standard of multimedia container formats.
1330 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
1331 of XML. EBML enables the Matroska Development Team to gain significant
1332 advantages in terms of future format extensibility, without breaking file
1333 support in old parsers.
1334 libebml is a C++ library to read and write EBML files.")
1335 (license license:lgpl2.1)))
1336
1337 (define-public libva
1338 (package
1339 (name "libva")
1340 (version "2.10.0")
1341 (source
1342 (origin
1343 (method url-fetch)
1344 (uri (string-append "https://github.com/intel/libva/releases/download/"
1345 version "/libva-" version ".tar.bz2"))
1346 (sha256
1347 (base32 "0dh2zjn6wi74ga75r6pbrrj8hjm213zyxvn9bv78z0fra1dy70gs"))))
1348 (build-system gnu-build-system)
1349 (native-inputs
1350 `(("pkg-config" ,pkg-config)))
1351 (inputs
1352 `(("libdrm" ,libdrm)
1353 ("libx11" ,libx11)
1354 ("libxext" ,libxext)
1355 ("libxfixes" ,libxfixes)
1356 ("mesa" ,mesa)
1357 ("wayland" ,wayland)))
1358 (arguments
1359 `(#:phases
1360 (modify-phases %standard-phases
1361 (add-before
1362 'build 'fix-dlopen-paths
1363 (lambda* (#:key outputs #:allow-other-keys)
1364 (let ((out (assoc-ref outputs "out")))
1365 (substitute* "va/drm/va_drm_auth_x11.c"
1366 (("\"libva-x11\\.so\\.%d\"")
1367 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
1368 #t))))
1369 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
1370 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
1371 #:configure-flags
1372 (list (string-append "--with-drivers-path="
1373 (assoc-ref %build-inputs "mesa") "/lib/dri"))
1374 ;; However, we can't write to mesa's store directory, so override the
1375 ;; following make variable to install the dummy driver to libva's
1376 ;; $prefix/lib/dri directory.
1377 #:make-flags
1378 (list (string-append "dummy_drv_video_ladir="
1379 (assoc-ref %outputs "out") "/lib/dri"))))
1380 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
1381 (synopsis "Video acceleration library")
1382 (description "The main motivation for VA-API (Video Acceleration API) is
1383 to enable hardware accelerated video decode/encode at various
1384 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
1385 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
1386 (license license:expat)))
1387
1388 (define-public libva-utils
1389 (package
1390 (name "libva-utils")
1391 (version "2.5.0")
1392 (source
1393 (origin
1394 (method url-fetch)
1395 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
1396 version "/libva-utils-" version ".tar.bz2"))
1397 (sha256
1398 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
1399 (build-system gnu-build-system)
1400 (arguments
1401 `(#:configure-flags
1402 (list "--enable-wayland"
1403 "--enable-x11")))
1404 (native-inputs
1405 `(("pkg-config" ,pkg-config)))
1406 (inputs
1407 `(("libdrm" ,libdrm)
1408 ("libva" ,libva)
1409 ("libx11" ,libx11)
1410 ("mesa" ,mesa)
1411 ("wayland" ,wayland)))
1412 (home-page "https://01.org/linuxmedia/vaapi")
1413 (synopsis "Collection of testing utilities for VA-API")
1414 (description
1415 "This is a collection of utilities to query and test the @acronym{VA-API,
1416 Video Acceleration API} implemented by the libva library.
1417
1418 These tools require a supported graphics chip, driver, and VA-API back end to
1419 operate properly.")
1420 (license license:expat)))
1421
1422 (define-public ffmpeg
1423 (package
1424 (name "ffmpeg")
1425 (version "4.4")
1426 (source (origin
1427 (method url-fetch)
1428 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1429 version ".tar.xz"))
1430 (sha256
1431 (base32
1432 "02fr8mvf2agwmyb9q2bmh9p09gpz3xxmpcbbbj8iydz57hc0mc86"))))
1433 (build-system gnu-build-system)
1434 (inputs
1435 `(("dav1d" ,dav1d)
1436 ("fontconfig" ,fontconfig)
1437 ("freetype" ,freetype)
1438 ("frei0r-plugins" ,frei0r-plugins)
1439 ("gnutls" ,gnutls)
1440 ("opus" ,opus)
1441 ("ladspa" ,ladspa)
1442 ("lame" ,lame)
1443 ("libaom" ,libaom)
1444 ("libass" ,libass)
1445 ("libbluray" ,libbluray)
1446 ("libcaca" ,libcaca)
1447 ("libcdio-paranoia" ,libcdio-paranoia)
1448 ("libdrm" ,libdrm)
1449 ("libtheora" ,libtheora)
1450 ("libva" ,libva)
1451 ("libvdpau" ,libvdpau)
1452 ("libvorbis" ,libvorbis)
1453 ("libvpx" ,libvpx)
1454 ("libx11" ,libx11)
1455 ("libx264" ,libx264)
1456 ("mesa" ,mesa)
1457 ("openal" ,openal)
1458 ("pulseaudio" ,pulseaudio)
1459 ;; XXX: rav1e depends on rust, which currently only works on x86_64.
1460 ;; See also the related configure flag when changing this.
1461 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
1462 (%current-system)))
1463 `(("rav1e" ,rav1e))
1464 '())
1465 ("sdl" ,sdl2)
1466 ("soxr" ,soxr)
1467 ("speex" ,speex)
1468 ;; FFmpeg is not yet compatible with SRT > 1.4.1.
1469 ("srt" ,srt-1.4.1)
1470 ("twolame" ,twolame)
1471 ("vidstab" ,vidstab)
1472 ("x265" ,x265)
1473 ("xvid" ,xvid)
1474 ("zlib" ,zlib)))
1475 (native-inputs
1476 `(("bc" ,bc)
1477 ("perl" ,perl)
1478 ("pkg-config" ,pkg-config)
1479 ("texinfo" ,texinfo)
1480 ("speex" ,speex)
1481 ("yasm" ,yasm)))
1482 (arguments
1483 `(#:test-target "fate"
1484 #:configure-flags
1485 ;; possible additional inputs:
1486 ;; --enable-avisynth enable reading of AviSynth script
1487 ;; files [no]
1488 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
1489 ;; --enable-libcelt enable CELT decoding via libcelt [no]
1490 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
1491 ;; and libraw1394 [no]
1492 ;; --enable-libfaac enable AAC encoding via libfaac [no]
1493 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
1494 ;; --enable-libflite enable flite (voice synthesis) support via
1495 ;; libflite [no]
1496 ;; --enable-libgme enable Game Music Emu via libgme [no]
1497 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1498 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1499 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1500 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1501 ;; --enable-libnut enable NUT (de)muxing via libnut,
1502 ;; native (de)muxer exists [no]
1503 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1504 ;; libopencore-amrnb [no]
1505 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1506 ;; libopencore-amrwb [no]
1507 ;; --enable-libopencv enable video filtering via libopencv [no]
1508 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1509 ;; OpenJPEG [no]
1510 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1511 ;; --enable-libschroedinger enable Dirac de/encoding via
1512 ;; libschroedinger [no]
1513 ;; --enable-libshine enable fixed-point MP3 encoding via
1514 ;; libshine [no]
1515 ;; --enable-libssh enable SFTP protocol via libssh [no]
1516 ;; (libssh2 does not work)
1517 ;; --enable-libstagefright-h264 enable H.264 decoding via
1518 ;; libstagefright [no]
1519 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1520 ;; libutvideo [no]
1521 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1522 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1523 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1524 ;; libvo-amrwbenc [no]
1525 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1526 ;; --enable-libxavs enable AVS encoding via xavs [no]
1527 ;; --enable-libzmq enable message passing via libzmq [no]
1528 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1529 ;; --enable-opencl enable OpenCL code
1530 '("--enable-avresample"
1531 "--enable-gpl" ; enable optional gpl licensed parts
1532 "--enable-shared"
1533 "--enable-frei0r"
1534 "--enable-fontconfig"
1535 "--enable-gnutls"
1536 "--enable-ladspa"
1537 "--enable-libaom"
1538 "--enable-libass"
1539 "--enable-libbluray"
1540 "--enable-libcaca"
1541 "--enable-libcdio"
1542 "--enable-libdav1d"
1543 "--enable-libfreetype"
1544 "--enable-libmp3lame"
1545 "--enable-libopus"
1546 "--enable-libpulse"
1547 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
1548 (%current-system)))
1549 '("--enable-librav1e")
1550 '())
1551 "--enable-libsoxr"
1552 "--enable-libspeex"
1553 "--enable-libsrt"
1554 "--enable-libtheora"
1555 "--enable-libtwolame"
1556 "--enable-libvidstab"
1557 "--enable-libvorbis"
1558 "--enable-libvpx"
1559 "--enable-libxvid"
1560 "--enable-libx264"
1561 "--enable-libx265"
1562 "--enable-openal"
1563 "--enable-opengl"
1564 "--enable-libdrm"
1565
1566 "--enable-runtime-cpudetect"
1567
1568 ;; The HTML pages take 7.2 MiB
1569 "--disable-htmlpages"
1570
1571 ;; The static libraries are 23 MiB
1572 "--disable-static"
1573
1574 ;; Runtime cpu detection is not implemented on
1575 ;; MIPS, so we disable some features.
1576 "--disable-mips32r2"
1577 "--disable-mipsdsp"
1578 "--disable-mipsdspr2"
1579 "--disable-mipsfpu")
1580 #:phases
1581 (modify-phases %standard-phases
1582 (replace
1583 'configure
1584 ;; configure does not work followed by "SHELL=..." and
1585 ;; "CONFIG_SHELL=..."; set environment variables instead
1586 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1587 (let ((out (assoc-ref outputs "out")))
1588 (substitute* "configure"
1589 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1590 (setenv "SHELL" (which "bash"))
1591 (setenv "CONFIG_SHELL" (which "bash"))
1592 (apply invoke
1593 "./configure"
1594 (string-append "--prefix=" out)
1595 ;; Add $libdir to the RUNPATH of all the binaries.
1596 (string-append "--extra-ldflags=-Wl,-rpath="
1597 out "/lib")
1598 configure-flags))))
1599 (add-before
1600 'check 'set-ld-library-path
1601 (lambda _
1602 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1603 ;; running tests.
1604 (let* ((dso (find-files "." "\\.so$"))
1605 (path (string-join (map dirname dso) ":")))
1606 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1607 (setenv "LD_LIBRARY_PATH" path)
1608 #t))))))
1609 (home-page "https://www.ffmpeg.org/")
1610 (synopsis "Audio and video framework")
1611 (description "FFmpeg is a complete, cross-platform solution to record,
1612 convert and stream audio and video. It includes the libavcodec
1613 audio/video codec library.")
1614 (license license:gpl2+)))
1615
1616 (define-public ffmpeg-3.4
1617 (package
1618 (inherit ffmpeg)
1619 (version "3.4.7")
1620 (source (origin
1621 (method url-fetch)
1622 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1623 version ".tar.xz"))
1624 (sha256
1625 (base32
1626 "1j7mdk9szrljgv4sdx69bm1pnbb3cldbdxbkr42jbdi9zn11gl7g"))))
1627 (arguments
1628 (substitute-keyword-arguments (package-arguments ffmpeg)
1629 ((#:modules modules %gnu-build-system-modules)
1630 `((srfi srfi-1)
1631 ,@modules))
1632 ((#:configure-flags flags)
1633 `(fold delete
1634 ,flags
1635 '("--enable-libdav1d"
1636 "--enable-libaom"
1637 "--enable-librav1e"
1638 "--enable-libsrt")))))
1639 (inputs (fold alist-delete
1640 (package-inputs ffmpeg)
1641 '("dav1d" "libaom" "rav1e" "srt")))))
1642
1643 (define-public ffmpeg-2.8
1644 (package
1645 (inherit ffmpeg)
1646 (version "2.8.16")
1647 (source (origin
1648 (method url-fetch)
1649 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1650 version ".tar.xz"))
1651 (sha256
1652 (base32
1653 "14n0xg22yz1r4apif2idm91s3avcmkz4sl8gyj5763gcy415k2bb"))))
1654 (arguments
1655 `(#:tests? #f ; XXX: Enable them later, if required
1656 #:configure-flags
1657 (list
1658 "--disable-static"
1659 "--enable-shared"
1660 "--extra-cflags=-DFF_API_OLD_ENCODE_VIDEO -DFF_API_OLD_ENCODE_AUDIO")
1661 #:phases
1662 (modify-phases %standard-phases
1663 (replace 'configure
1664 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1665 (let ((out (assoc-ref outputs "out")))
1666 (substitute* "configure"
1667 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1668 ;; configure does not work followed by "SHELL=..." and
1669 ;; "CONFIG_SHELL=..."; set environment variables instead.
1670 (setenv "SHELL" (which "bash"))
1671 (setenv "CONFIG_SHELL" (which "bash"))
1672 (apply invoke
1673 "./configure"
1674 (string-append "--prefix=" out)
1675 ;; Add $libdir to the RUNPATH of all the binaries.
1676 (string-append "--extra-ldflags=-Wl,-rpath="
1677 out "/lib")
1678 configure-flags))))
1679 (add-before
1680 'check 'set-ld-library-path
1681 (lambda _
1682 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1683 ;; running tests.
1684 (let* ((dso (find-files "." "\\.so$"))
1685 (path (string-join (map dirname dso) ":")))
1686 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1687 (setenv "LD_LIBRARY_PATH" path)
1688 #t))))))
1689 (inputs (fold alist-delete
1690 (package-inputs ffmpeg)
1691 '("dav1d" "libaom" "rav1e" "srt")))))
1692
1693 (define-public ffmpeg-for-stepmania
1694 (hidden-package
1695 (package
1696 (inherit ffmpeg)
1697 (version "2.1.3")
1698 (source
1699 (origin
1700 (method git-fetch)
1701 (uri (git-reference
1702 (url "https://github.com/stepmania/ffmpeg")
1703 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1704 (sha256
1705 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1706 (file-name (git-file-name "ffmpeg" version))))
1707 (arguments
1708 (substitute-keyword-arguments (package-arguments ffmpeg)
1709 ((#:configure-flags flags)
1710 '(list "--disable-programs"
1711 "--disable-doc"
1712 "--disable-debug"
1713 "--disable-avdevice"
1714 "--disable-swresample"
1715 "--disable-postproc"
1716 "--disable-avfilter"
1717 "--disable-shared"
1718 "--enable-static"))))
1719 (inputs '()))))
1720
1721 (define-public ffmpegthumbnailer
1722 (package
1723 (name "ffmpegthumbnailer")
1724 (version "2.2.2")
1725 (source (origin
1726 (method git-fetch)
1727 (uri (git-reference
1728 (url "https://github.com/dirkvdb/ffmpegthumbnailer")
1729 (commit version)))
1730 (file-name (git-file-name name version))
1731 (sha256
1732 (base32
1733 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1734 (build-system cmake-build-system)
1735 (native-inputs
1736 `(("pkg-config" ,pkg-config)))
1737 (inputs
1738 `(("ffmpeg" ,ffmpeg)
1739 ("libjpeg-turbo" ,libjpeg-turbo)
1740 ("libpng" ,libpng)
1741 ("gvfs" ,gvfs)))
1742 (arguments
1743 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1744 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1745 (synopsis "Create thumbnails from video files")
1746 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1747 can be used by file managers to create thumbnails for your video files. The
1748 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1749 videoformats depend on the configuration flags of ffmpeg.")
1750 (license license:gpl2+)))
1751
1752 (define-public vlc
1753 (package
1754 (name "vlc")
1755 (version "3.0.12")
1756 (source (origin
1757 (method url-fetch)
1758 (uri (string-append
1759 "https://download.videolan.org/pub/videolan/vlc/"
1760 (car (string-split version #\-))
1761 "/vlc-" version ".tar.xz"))
1762 (sha256
1763 (base32
1764 "0ygqihw2c5vvzv8950dlf7rdwz1cpz1668jgyja604ljibrmix7g"))))
1765 (build-system gnu-build-system)
1766 (native-inputs
1767 `(("flex" ,flex)
1768 ("bison" ,bison)
1769 ("gettext" ,gettext-minimal)
1770 ("pkg-config" ,pkg-config)))
1771 ;; FIXME: Add optional inputs once available.
1772 (inputs
1773 `(("alsa-lib" ,alsa-lib)
1774 ("avahi" ,avahi)
1775 ("dav1d" ,dav1d)
1776 ("dbus" ,dbus)
1777 ("eudev" ,eudev)
1778 ("flac" ,flac)
1779 ("ffmpeg" ,ffmpeg)
1780 ("fontconfig" ,fontconfig)
1781 ("freetype" ,freetype)
1782 ("fribidi" ,fribidi)
1783 ("gnutls" ,gnutls)
1784 ("liba52" ,liba52)
1785 ("libarchive" ,libarchive)
1786 ("libass" ,libass)
1787 ("libavc1394" ,libavc1394)
1788 ("libbluray" ,libbluray)
1789 ("libcaca" ,libcaca)
1790 ("libcddb" ,libcddb)
1791 ("libdca" ,libdca)
1792 ("libdvbpsi" ,libdvbpsi)
1793 ("libdvdnav" ,libdvdnav)
1794 ("libdvdread" ,libdvdread)
1795 ("libebml" ,libebml)
1796 ("libgcrypt" ,libgcrypt)
1797 ("libidn" ,libidn)
1798 ("libkate" ,libkate)
1799 ("libmad" ,libmad)
1800 ("libmatroska" ,libmatroska)
1801 ("libmicrodns" ,libmicrodns)
1802 ("libmodplug" ,libmodplug)
1803 ("libmpeg2" ,libmpeg2)
1804 ("libogg" ,libogg)
1805 ("libpng" ,libpng)
1806 ("libraw1394" ,libraw1394)
1807 ("librsvg" ,librsvg)
1808 ("libsamplerate" ,libsamplerate)
1809 ("libsecret" ,libsecret)
1810 ("libssh2" ,libssh2)
1811 ("libupnp" ,libupnp)
1812 ("libva" ,libva)
1813 ("libvdpau" ,libvdpau)
1814 ("libvorbis" ,libvorbis)
1815 ("libvpx" ,libvpx)
1816 ("libtheora" ,libtheora)
1817 ("libx264" ,libx264)
1818 ("libxext" ,libxext)
1819 ("libxi" ,libxi)
1820 ("libxinerama" ,libxinerama)
1821 ("libxml2" ,libxml2)
1822 ("libxpm" ,libxpm)
1823 ("livemedia-utils" ,livemedia-utils)
1824 ("lua" ,lua-5.2)
1825 ("mesa" ,mesa)
1826 ("opus" ,opus)
1827 ("perl" ,perl)
1828 ("pulseaudio" ,pulseaudio)
1829 ("protobuf" ,protobuf)
1830 ("python" ,python-wrapper)
1831 ("qtbase" ,qtbase)
1832 ("qtsvg" ,qtsvg)
1833 ("qtx11extras" ,qtx11extras)
1834 ("samba" ,samba)
1835 ("sdl" ,sdl)
1836 ("sdl-image" ,sdl-image)
1837 ("speex" ,speex)
1838 ("speexdsp" ,speexdsp)
1839 ;; VLC is not yet compatible with SRT > 1.4.1.
1840 ("srt" ,srt-1.4.1)
1841 ("taglib" ,taglib)
1842 ("twolame" ,twolame)
1843 ("unzip" ,unzip)
1844 ("wayland" ,wayland)
1845 ("wayland-protocols" ,wayland-protocols)
1846 ("x265" ,x265)
1847 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1848 (arguments
1849 `(#:configure-flags
1850 `("BUILDCC=gcc"
1851 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1852 (assoc-ref %build-inputs "ffmpeg")
1853 "/lib")) ;needed for the tests
1854
1855 #:phases
1856 (modify-phases %standard-phases
1857 (add-after 'unpack 'patch-source
1858 (lambda* (#:key inputs #:allow-other-keys)
1859 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1860 (substitute* "configure"
1861 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1862 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1863 ;; Some of the tests require using the display to test out VLC,
1864 ;; which fails in our sandboxed build system
1865 (substitute* "test/run_vlc.sh"
1866 (("./vlc --ignore-config") "echo"))
1867 #t)))
1868 (add-after 'strip 'regenerate-plugin-cache
1869 (lambda* (#:key outputs #:allow-other-keys)
1870 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1871 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1872 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1873 ;; it references. Thus, we first reset the timestamps of all
1874 ;; these files, and then regenerate the cache such that the
1875 ;; mtimes it includes are always zero instead of being dependent
1876 ;; on the build time.
1877 (let* ((out (assoc-ref outputs "out"))
1878 (pkglibdir (string-append out "/lib/vlc"))
1879 (plugindir (string-append pkglibdir "/plugins"))
1880 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1881 ;; TODO: Factorize 'reset-timestamps'.
1882 (for-each (lambda (file)
1883 (let ((s (lstat file)))
1884 (unless (eq? (stat:type s) 'symlink)
1885 (utime file 1 1))))
1886 (find-files plugindir))
1887 (invoke cachegen plugindir))))
1888 (add-after 'install 'wrap-executable
1889 (lambda* (#:key outputs #:allow-other-keys)
1890 (let ((out (assoc-ref outputs "out"))
1891 (plugin-path (getenv "QT_PLUGIN_PATH")))
1892 (wrap-program (string-append out "/bin/vlc")
1893 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1894 #t)))))
1895 (home-page "https://www.videolan.org/")
1896 (synopsis "Audio and video framework")
1897 (description "VLC is a cross-platform multimedia player and framework
1898 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1899 streaming protocols.")
1900 (license license:gpl2+)))
1901
1902 (define-public mplayer
1903 (package
1904 (name "mplayer")
1905 (version "1.4")
1906 (source (origin
1907 (method url-fetch)
1908 (uri (string-append
1909 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1910 version ".tar.xz"))
1911 (sha256
1912 (base32
1913 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
1914 (build-system gnu-build-system)
1915 ;; FIXME: Add additional inputs once available.
1916 (native-inputs
1917 `(("pkg-config" ,pkg-config)
1918 ("yasm" ,yasm)))
1919 (inputs
1920 `(("alsa-lib" ,alsa-lib)
1921 ("cdparanoia" ,cdparanoia)
1922 ("ffmpeg" ,ffmpeg)
1923 ("fontconfig" ,fontconfig)
1924 ("freetype" ,freetype)
1925 ("giflib" ,giflib)
1926 ("lame" ,lame)
1927 ("libass" ,libass)
1928 ("libdvdcss" ,libdvdcss)
1929 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
1930 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
1931 ("libjpeg" ,libjpeg-turbo)
1932 ("libmpeg2" ,libmpeg2)
1933 ("libmpg123" ,mpg123) ; audio codec for MP3
1934 ("libpng" ,libpng)
1935 ("libtheora" ,libtheora)
1936 ("libvdpau" ,libvdpau)
1937 ("libvorbis" ,libvorbis)
1938 ("libx11" ,libx11)
1939 ("libx264" ,libx264)
1940 ("libxinerama" ,libxinerama)
1941 ("libxv" ,libxv)
1942 ("libxxf86dga" ,libxxf86dga)
1943 ("mesa" ,mesa)
1944 ("opus" ,opus)
1945 ("perl" ,perl)
1946 ("pulseaudio" ,pulseaudio)
1947 ("python" ,python-wrapper)
1948 ("sdl" ,sdl)
1949 ("speex" ,speex)
1950 ("zlib" ,zlib)))
1951 (arguments
1952 `(#:tests? #f ; no test target
1953 #:phases
1954 (modify-phases %standard-phases
1955 (replace 'configure
1956 ;; configure does not work followed by "SHELL=..." and
1957 ;; "CONFIG_SHELL=..."; set environment variables instead
1958 (lambda* (#:key inputs outputs #:allow-other-keys)
1959 (let ((out (assoc-ref outputs "out"))
1960 (libx11 (assoc-ref inputs "libx11")))
1961 (substitute* "configure"
1962 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1963 (setenv "SHELL" (which "bash"))
1964 (setenv "CONFIG_SHELL" (which "bash"))
1965 (invoke "./configure"
1966 (string-append "--extra-cflags=-I"
1967 libx11 "/include") ; to detect libx11
1968 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1969 (string-append "--prefix=" out)
1970 ;; Enable runtime cpu detection where supported,
1971 ;; and choose a suitable target.
1972 ,@(match (or (%current-target-system)
1973 (%current-system))
1974 ("x86_64-linux"
1975 '("--enable-runtime-cpudetection"
1976 "--target=x86_64-linux"))
1977 ("i686-linux"
1978 '("--enable-runtime-cpudetection"
1979 "--target=i686-linux"))
1980 ("mips64el-linux"
1981 '("--target=mips3-linux"))
1982 (_ (list (string-append
1983 "--target="
1984 (or (%current-target-system)
1985 (nix-system->gnu-triplet
1986 (%current-system)))))))
1987 "--disable-iwmmxt")))))))
1988 (home-page "https://www.mplayerhq.hu")
1989 (synopsis "Audio and video player")
1990 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1991 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1992 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1993 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1994 (license license:gpl2)))
1995
1996 (define-public mpv
1997 (package
1998 (name "mpv")
1999 (version "0.33.1")
2000 (source (origin
2001 (method git-fetch)
2002 (uri (git-reference
2003 (url "https://github.com/mpv-player/mpv")
2004 (commit (string-append "v" version))))
2005 (file-name (git-file-name name version))
2006 (sha256
2007 (base32
2008 "06rw1f55zcsj78ql8w70j9ljp2qb1pv594xj7q9cmq7i92a7hq45"))))
2009 (build-system waf-build-system)
2010 (native-inputs
2011 `(("perl" ,perl) ; for zsh completion file
2012 ("pkg-config" ,pkg-config)
2013 ("python-docutils" ,python-docutils)))
2014 ;; Missing features: libguess, V4L2
2015 (inputs
2016 `(("alsa-lib" ,alsa-lib)
2017 ("enca" ,enca)
2018 ("ffmpeg" ,ffmpeg)
2019 ("jack" ,jack-1)
2020 ("ladspa" ,ladspa)
2021 ("lcms" ,lcms)
2022 ("libass" ,libass)
2023 ("libbluray" ,libbluray)
2024 ("libcaca" ,libcaca)
2025 ("libbs2b" ,libbs2b)
2026 ("libcdio-paranoia" ,libcdio-paranoia)
2027 ("libdvdread" ,libdvdread)
2028 ("libdvdnav" ,libdvdnav)
2029 ("libjpeg" ,libjpeg-turbo)
2030 ("libva" ,libva)
2031 ("libvdpau" ,libvdpau)
2032 ("libx11" ,libx11)
2033 ("libxext" ,libxext)
2034 ("libxinerama" ,libxinerama)
2035 ("libxrandr" ,libxrandr)
2036 ("libxscrnsaver" ,libxscrnsaver)
2037 ("libxv" ,libxv)
2038 ;; XXX: lua > 5.2 is not currently supported; see
2039 ;; waftools/checks/custom.py
2040 ("lua" ,lua-5.2)
2041 ("mesa" ,mesa)
2042 ("mpg123" ,mpg123)
2043 ("pulseaudio" ,pulseaudio)
2044 ("rsound" ,rsound)
2045 ("shaderc" ,shaderc)
2046 ("vulkan-headers" ,vulkan-headers)
2047 ("vulkan-loader" ,vulkan-loader)
2048 ("waf" ,python-waf)
2049 ("wayland" ,wayland)
2050 ("wayland-protocols" ,wayland-protocols)
2051 ("libxkbcommon" ,libxkbcommon)
2052 ("youtube-dl" ,youtube-dl)
2053 ("zlib" ,zlib)))
2054 (arguments
2055 '(#:phases
2056 (modify-phases %standard-phases
2057 (add-after
2058 'unpack 'patch-paths
2059 (lambda* (#:key inputs #:allow-other-keys)
2060 (let ((ytdl (assoc-ref inputs "youtube-dl")))
2061 (substitute* "player/lua/ytdl_hook.lua"
2062 (("\"youtube-dl\",")
2063 (string-append "\"" ytdl "/bin/youtube-dl\",")))
2064 #t)))
2065 (add-before 'configure 'build-reproducibly
2066 (lambda _
2067 ;; Somewhere in the build system library dependencies are enumerated
2068 ;; and passed as linker flags, but the order in which they are added
2069 ;; varies. See <https://github.com/mpv-player/mpv/issues/7855>.
2070 ;; Set PYTHONHASHSEED as a workaround for deterministic results.
2071 (setenv "PYTHONHASHSEED" "1")
2072 #t))
2073 (add-before
2074 'configure 'setup-waf
2075 (lambda* (#:key inputs #:allow-other-keys)
2076 (let ((waf (assoc-ref inputs "waf")))
2077 (copy-file (string-append waf "/bin/waf") "waf"))
2078 (setenv "CC" "gcc")
2079 #t)))
2080 #:configure-flags (list "--enable-libmpv-shared"
2081 "--enable-cdda"
2082 "--enable-dvdnav"
2083 "--disable-build-date")
2084 ;; No check function defined.
2085 #:tests? #f))
2086 (home-page "https://mpv.io/")
2087 (synopsis "Audio and video player")
2088 (description "mpv is a general-purpose audio and video player. It is a
2089 fork of mplayer2 and MPlayer. It shares some features with the former
2090 projects while introducing many more.")
2091 (license license:gpl2+)))
2092
2093 (define-public gnome-mpv
2094 (deprecated-package "gnome-mpv" celluloid))
2095
2096 (define-public mpv-mpris
2097 (package
2098 (name "mpv-mpris")
2099 (version "0.5")
2100 (source
2101 (origin
2102 (method git-fetch)
2103 (uri (git-reference
2104 (url "https://github.com/hoyon/mpv-mpris")
2105 (commit version)))
2106 (file-name (git-file-name name version))
2107 (sha256
2108 (base32
2109 "07p6li5z38pkfd40029ag2jqx917vyl3ng5p2i4v5a0af14slcnk"))))
2110 (build-system copy-build-system)
2111 (arguments
2112 '(#:install-plan
2113 '(("mpris.so" "lib/"))
2114 #:phases
2115 (modify-phases %standard-phases
2116 (add-before 'install 'build
2117 (lambda _
2118 (setenv "CC" (which "gcc"))
2119 (invoke "make"))))))
2120 (native-inputs
2121 `(("pkg-config" ,pkg-config)))
2122 (inputs
2123 `(("glib" ,glib)
2124 ("mpv" ,mpv)))
2125 (home-page "https://github.com/hoyon/mpv-mpris")
2126 (synopsis "MPRIS plugin for mpv")
2127 (description "This package provides an @dfn{MPRIS} (Media Player Remote
2128 Interfacing Specification) plugin for the @code{mpv} media player. It implements
2129 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
2130 interfaces.
2131
2132 To load this plugin, specify the following option when starting mpv:
2133 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
2134 @file{$HOME/.config/mpv/scripts}.")
2135 (license license:expat)))
2136
2137 (define-public libvpx
2138 (package
2139 (name "libvpx")
2140 (version "1.9.0")
2141 (source (origin
2142 (method git-fetch)
2143 (uri (git-reference
2144 (url "https://chromium.googlesource.com/webm/libvpx")
2145 (commit (string-append "v" version))))
2146 (file-name (git-file-name name version))
2147 (sha256
2148 (base32
2149 "16xv6ambc82g14h1y0q1vyy57wp6j9fbp0nk0wd5csnrw407rhry"))
2150 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
2151 (build-system gnu-build-system)
2152 (arguments
2153 `(#:configure-flags (list "--enable-shared"
2154 "--disable-static"
2155 "--as=yasm"
2156 ;; Limit size to avoid CVE-2015-1258
2157 "--size-limit=16384x16384"
2158 (string-append "--prefix=" (assoc-ref %outputs "out")))
2159 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2160 (assoc-ref %outputs "out") "/lib"))
2161 #:phases (modify-phases %standard-phases
2162 (replace 'configure
2163 (lambda* (#:key configure-flags #:allow-other-keys)
2164 ;; The configure script does not understand some of the GNU
2165 ;; options, so we only add the flags specified above.
2166 (apply invoke "./configure" configure-flags))))
2167
2168 ;; XXX: The test suite wants to download 871 files from a cloud storage
2169 ;; service (see test/test-data.sha1). It is possible to specify a
2170 ;; custom directory, but there seems to be no tarball with all files.
2171 #:tests? #f))
2172 (native-inputs
2173 `(("perl" ,perl)
2174 ("yasm" ,yasm)))
2175 (synopsis "VP8/VP9 video codec")
2176 (description "libvpx is a codec for the VP8/VP9 video compression format.")
2177 (license license:bsd-3)
2178 (home-page "https://www.webmproject.org/")))
2179
2180 (define-public youtube-dl
2181 (package
2182 (name "youtube-dl")
2183 (version "2021.05.16")
2184 (source (origin
2185 (method url-fetch)
2186 (uri (string-append "https://youtube-dl.org/downloads/latest/"
2187 "youtube-dl-" version ".tar.gz"))
2188 (sha256
2189 (base32
2190 "1z8sdzvkxhscnzy7cnjag308glif0k8jylr11biqwzypm1f2l0fl"))
2191 (snippet
2192 '(begin
2193 ;; Delete the pre-generated files, except for the man page
2194 ;; which requires 'pandoc' to build.
2195 (for-each delete-file '("youtube-dl"
2196 ;;pandoc is needed to generate
2197 ;;"youtube-dl.1"
2198 "youtube-dl.bash-completion"
2199 "youtube-dl.fish"
2200 "youtube-dl.zsh"))
2201 #t))))
2202 (build-system python-build-system)
2203 (arguments
2204 ;; The problem here is that the directory for the man page and completion
2205 ;; files is relative, and for some reason, setup.py uses the
2206 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
2207 ;; So, we need pass the prefix directly. In addition, make sure the Bash
2208 ;; completion file is called 'youtube-dl' rather than
2209 ;; 'youtube-dl.bash-completion'.
2210 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
2211 #:phases (modify-phases %standard-phases
2212 (add-after 'unpack 'default-to-the-ffmpeg-input
2213 (lambda _
2214 ;; See <https://issues.guix.gnu.org/43418#5>.
2215 ;; ffmpeg is big but required to request free formats
2216 ;; from, e.g., YouTube so pull it in unconditionally.
2217 ;; Continue respecting the --ffmpeg-location argument.
2218 (substitute* "youtube_dl/postprocessor/ffmpeg.py"
2219 (("\\.get\\('ffmpeg_location'\\)" match)
2220 (format #f "~a or '~a'" match (which "ffmpeg"))))
2221 #t))
2222 (add-before 'build 'build-generated-files
2223 (lambda _
2224 ;; Avoid the make targets that require pandoc.
2225 (invoke "make"
2226 "PYTHON=python"
2227 "youtube-dl"
2228 ;;"youtube-dl.1" ; needs pandoc
2229 "youtube-dl.bash-completion"
2230 "youtube-dl.zsh"
2231 "youtube-dl.fish")))
2232 (add-before 'install 'fix-the-data-directories
2233 (lambda* (#:key outputs #:allow-other-keys)
2234 (let ((prefix (assoc-ref outputs "out")))
2235 (mkdir "bash-completion")
2236 (rename-file "youtube-dl.bash-completion"
2237 "bash-completion/youtube-dl")
2238 (substitute* "setup.py"
2239 (("youtube-dl\\.bash-completion")
2240 "bash-completion/youtube-dl")
2241 (("'etc/")
2242 (string-append "'" prefix "/etc/"))
2243 (("'share/")
2244 (string-append "'" prefix "/share/")))
2245 #t)))
2246 (add-after 'install 'install-completion
2247 (lambda* (#:key outputs #:allow-other-keys)
2248 (let* ((out (assoc-ref outputs "out"))
2249 (zsh (string-append out
2250 "/share/zsh/site-functions")))
2251 (mkdir-p zsh)
2252 (copy-file "youtube-dl.zsh"
2253 (string-append zsh "/_youtube-dl"))
2254 #t))))))
2255 (native-inputs
2256 `(("zip" ,zip)))
2257 (inputs
2258 `(("ffmpeg" ,ffmpeg)))
2259 (synopsis "Download videos from YouTube.com and other sites")
2260 (description
2261 "Youtube-dl is a small command-line program to download videos from
2262 YouTube.com and many more sites.")
2263 (home-page "https://yt-dl.org")
2264 (license license:public-domain)))
2265
2266 (define-public youtube-dl-gui
2267 (package
2268 (name "youtube-dl-gui")
2269 (version "0.3.8")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (pypi-uri "Youtube-DLG" version))
2274 (sha256
2275 (base32
2276 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
2277 (build-system python-build-system)
2278 (arguments
2279 ;; In Guix, wxpython has not yet been packaged for Python 3.
2280 `(#:python ,python-2
2281 ;; This package has no tests.
2282 #:tests? #f
2283 #:phases
2284 (modify-phases %standard-phases
2285 (add-before 'build 'patch-source
2286 (lambda* (#:key inputs #:allow-other-keys)
2287 ;; The youtube-dl-gui program lets you configure options. Some of
2288 ;; them are problematic, so we change their defaults.
2289 (substitute* "youtube_dl_gui/optionsmanager.py"
2290 ;; When this is true, the builder process will try (and fail) to
2291 ;; write logs to the builder user's home directory.
2292 (("'enable_log': True") "'enable_log': False")
2293 ;; This determines which youtube-dl program youtube-dl-gui will
2294 ;; run. If we don't set this, then youtube-dl-gui might download
2295 ;; an arbitrary copy from the Internet into the user's home
2296 ;; directory and run it, so let's make sure youtube-dl-gui uses
2297 ;; the youtube-dl from the inputs by default.
2298 (("'youtubedl_path': self.config_path")
2299 (string-append "'youtubedl_path': '"
2300 (assoc-ref inputs "youtube-dl")
2301 "/bin'"))
2302 ;; When this is True, when youtube-dl-gui is finished downloading
2303 ;; a file, it will try (and possibly fail) to open the directory
2304 ;; containing the downloaded file. This can fail because it
2305 ;; assumes that xdg-open is in PATH. Unfortunately, simply
2306 ;; adding xdg-utils to the propagated inputs is not enough to
2307 ;; make this work, so for now we set the default to False.
2308 (("'open_dl_dir': True") "'open_dl_dir': False"))
2309 ;; The youtube-dl program from the inputs is actually a wrapper
2310 ;; script written in bash, so attempting to invoke it as a python
2311 ;; script will fail.
2312 (substitute* "youtube_dl_gui/downloaders.py"
2313 (("cmd = \\['python', self\\.youtubedl_path\\]")
2314 "cmd = [self.youtubedl_path]"))
2315 ;; Use relative paths for installing data files so youtube-dl-gui
2316 ;; installs the files relative to its prefix in the store, rather
2317 ;; than relative to /. Also, instead of installing data files into
2318 ;; $prefix/usr/share, install them into $prefix/share for
2319 ;; consistency (see: (standards) Directory Variables).
2320 (substitute* "setup.py"
2321 (("= '/usr/share") "= 'share"))
2322 ;; Update get_locale_file() so it finds the installed localization
2323 ;; files.
2324 (substitute* "youtube_dl_gui/utils.py"
2325 (("os\\.path\\.join\\('/usr', 'share'")
2326 (string-append "os.path.join('"
2327 (assoc-ref %outputs "out")
2328 "', 'share'")))
2329 #t))
2330 (add-after 'install 'create-desktop-file
2331 (lambda* (#:key outputs #:allow-other-keys)
2332 (let* ((out (assoc-ref outputs "out"))
2333 (applications (string-append out "/share/applications")))
2334 (mkdir-p applications)
2335 (call-with-output-file
2336 (string-append applications "/youtube-dl-gui.desktop")
2337 (lambda (file)
2338 (format
2339 file
2340 "[Desktop Entry]~@
2341 Name=Youtube-dl GUI~@
2342 Comment=Graphical interface to download video with youtube-dl~@
2343 Exec=youtube-dl-gui~@
2344 TryExec=youtube-dl-gui~@
2345 Terminal=false~@
2346 Icon=youtube-dl-gui~@
2347 Type=Application~@
2348 Categories=AudioVideo;Audio;Video;Network~%")))
2349 #t))))))
2350 (inputs
2351 `(("python2-wxpython" ,python2-wxpython)
2352 ("youtube-dl" ,youtube-dl)))
2353 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
2354 (synopsis
2355 "GUI (Graphical User Interface) for @command{youtube-dl}")
2356 (description
2357 "Youtube-dlG is a GUI (Graphical User Interface) for
2358 @command{youtube-dl}. You can use it to download videos from YouTube and any
2359 other site that youtube-dl supports.")
2360 (license license:unlicense)))
2361
2362 (define-public you-get
2363 (package
2364 (name "you-get")
2365 (version "0.4.1500")
2366 (source (origin
2367 (method git-fetch)
2368 (uri (git-reference
2369 (url "https://github.com/soimort/you-get")
2370 (commit (string-append "v" version))))
2371 (file-name (git-file-name name version))
2372 (sha256
2373 (base32
2374 "02wkmq6bjg9iz0kccsgs192aiky99l2jnw1xs6zjhvjvq7jyvf7s"))))
2375 (build-system python-build-system)
2376 (inputs
2377 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
2378 (arguments
2379 `(#:phases
2380 (modify-phases %standard-phases
2381 (add-after 'unpack 'qualify-input-references
2382 ;; Explicitly invoke the input ffmpeg, instead of whichever one
2383 ;; happens to be in the user's $PATH at run time.
2384 (lambda* (#:key inputs #:allow-other-keys)
2385 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
2386 "/bin/ffmpeg")))
2387 (substitute* "src/you_get/processor/ffmpeg.py"
2388 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
2389 ;; same string is also used when sniffing ffmpeg's output.
2390 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
2391 (string-append prefix "'" ffmpeg "'")))
2392 #t))))
2393 #:tests? #f)) ; XXX some tests need Internet access
2394 (synopsis "Download videos, audio, or images from Web sites")
2395 (description
2396 "You-Get is a command-line utility to download media contents (videos,
2397 audio, images) from the Web. It can use either mpv or vlc for playback.")
2398 (home-page "https://you-get.org/")
2399 (license license:expat)))
2400
2401 (define-public youtube-viewer
2402 (package
2403 (name "youtube-viewer")
2404 (version "3.8.1")
2405 (source (origin
2406 (method git-fetch)
2407 (uri (git-reference
2408 (url "https://github.com/trizen/youtube-viewer")
2409 (commit version)))
2410 (file-name (git-file-name name version))
2411 (sha256
2412 (base32
2413 "0xdybiihd66b79rbsawjhxs9snm78gld5ziz3gnp8vdcw0bshwz7"))))
2414 (build-system perl-build-system)
2415 (native-inputs
2416 `(("perl-module-build" ,perl-module-build)))
2417 (inputs
2418 `(("perl-data-dump" ,perl-data-dump)
2419 ("perl-file-sharedir" ,perl-file-sharedir)
2420 ("perl-gtk2" ,perl-gtk2)
2421 ("perl-json" ,perl-json)
2422 ("perl-json-xs" ,perl-json-xs)
2423 ("perl-libwww" ,perl-libwww)
2424 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
2425 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
2426 ("perl-memoize" ,perl-memoize)
2427 ("perl-mozilla-ca" ,perl-mozilla-ca)
2428 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
2429 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
2430 ("xdg-utils" ,xdg-utils)
2431
2432 ;; Some videos play without youtube-dl, but others silently fail to.
2433 ("youtube-dl" ,youtube-dl)))
2434 (arguments
2435 `(#:modules ((guix build perl-build-system)
2436 (guix build utils)
2437 (srfi srfi-26))
2438 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
2439 ;; is broken without perl-gtk3.
2440 #:module-build-flags '("--gtk2")
2441 #:phases
2442 (modify-phases %standard-phases
2443 (add-after 'unpack 'refer-to-inputs
2444 (lambda* (#:key inputs #:allow-other-keys)
2445 (substitute* "lib/WWW/YoutubeViewer.pm"
2446 (("'youtube-dl'")
2447 (format #f "'~a/bin/youtube-dl'"
2448 (assoc-ref inputs "youtube-dl"))))
2449 (substitute* '("bin/gtk2-youtube-viewer"
2450 "bin/gtk3-youtube-viewer")
2451 (("'xdg-open'")
2452 (format #f "'~a/bin/xdg-open'"
2453 (assoc-ref inputs "xdg-utils"))))
2454 #t))
2455 (add-after 'install 'install-desktop
2456 (lambda* (#:key outputs #:allow-other-keys)
2457 (let* ((out (assoc-ref outputs "out"))
2458 (sharedir (string-append out "/share")))
2459 (install-file "share/gtk-youtube-viewer.desktop"
2460 (string-append sharedir "/applications"))
2461 (install-file "share/icons/gtk-youtube-viewer.png"
2462 (string-append sharedir "/pixmaps"))
2463 #t)))
2464 (add-after 'install 'wrap-program
2465 (lambda* (#:key outputs #:allow-other-keys)
2466 (let* ((out (assoc-ref outputs "out"))
2467 (bin-dir (string-append out "/bin/"))
2468 (site-dir (string-append out "/lib/perl5/site_perl/"))
2469 (lib-path (getenv "PERL5LIB")))
2470 (for-each (cut wrap-program <>
2471 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
2472 (find-files bin-dir))
2473 #t))))))
2474 (synopsis
2475 "Lightweight application for searching and streaming videos from YouTube")
2476 (description
2477 "Youtube-viewer searches and plays YouTube videos in a native player.
2478 It comes with various search options; it can search for videos, playlists
2479 and/or channels. The videos are streamed directly in a selected video player
2480 at the best resolution (customizable) and with closed-captions (if available).
2481 Both command-line and GTK2 interface are available.")
2482 (home-page "https://github.com/trizen/youtube-viewer")
2483 (license license:perl-license)))
2484
2485 (define-public libbluray
2486 (package
2487 (name "libbluray")
2488 (version "1.0.2")
2489 (source (origin
2490 (method url-fetch)
2491 (uri (string-append "https://download.videolan.org/videolan/"
2492 name "/" version "/"
2493 name "-" version ".tar.bz2"))
2494 (sha256
2495 (base32
2496 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
2497 (build-system gnu-build-system)
2498 (arguments
2499 `(#:configure-flags '("--disable-bdjava-jar"
2500 "--disable-static")
2501 #:phases
2502 (modify-phases %standard-phases
2503 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
2504 ;; Avoid the need to propagate libxml2 by referring to it
2505 ;; directly, as is already done for fontconfig & freetype.
2506 (lambda* (#:key inputs #:allow-other-keys)
2507 (let ((libxml2 (assoc-ref inputs "libxml2")))
2508 (substitute* "configure"
2509 ((" libxml-2.0") ""))
2510 (substitute* "src/libbluray.pc.in"
2511 (("^Libs.private:" field)
2512 (string-append field " -L" libxml2 "/lib -lxml2")))
2513 #t)))
2514 (add-before 'build 'fix-dlopen-paths
2515 (lambda* (#:key inputs #:allow-other-keys)
2516 (let ((libaacs (assoc-ref inputs "libaacs"))
2517 (libbdplus (assoc-ref inputs "libbdplus")))
2518 (substitute* "src/libbluray/disc/aacs.c"
2519 (("\"libaacs\"")
2520 (string-append "\"" libaacs "/lib/libaacs\"")))
2521 (substitute* "src/libbluray/disc/bdplus.c"
2522 (("\"libbdplus\"")
2523 (string-append "\"" libbdplus "/lib/libbdplus\"")))
2524 #t))))))
2525 (native-inputs `(("pkg-config" ,pkg-config)))
2526 (inputs
2527 `(("fontconfig" ,fontconfig)
2528 ("freetype" ,freetype)
2529 ("libaacs" ,libaacs)
2530 ("libbdplus" ,libbdplus)
2531 ("libxml2" ,libxml2)))
2532 (home-page "https://www.videolan.org/developers/libbluray.html")
2533 (synopsis "Blu-Ray Disc playback library")
2534 (description
2535 "libbluray is a library designed for Blu-Ray Disc playback for media
2536 players, like VLC or MPlayer.")
2537 (license license:lgpl2.1+)))
2538
2539 (define-public libdvdread
2540 (package
2541 (name "libdvdread")
2542 (version "6.0.2")
2543 (source (origin
2544 (method url-fetch)
2545 (uri (string-append "https://download.videolan.org/videolan/"
2546 "libdvdread/" version "/"
2547 "libdvdread-" version ".tar.bz2"))
2548 (sha256
2549 (base32
2550 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
2551 (build-system gnu-build-system)
2552 (arguments
2553 `(#:configure-flags '("--with-libdvdcss=yes")))
2554 (native-inputs
2555 `(("pkg-config" ,pkg-config)))
2556 (propagated-inputs
2557 `(("libdvdcss" ,libdvdcss)))
2558 (home-page "http://dvdnav.mplayerhq.hu/")
2559 (synopsis "Library for reading video DVDs")
2560 (description
2561 "Libdvdread provides a simple foundation for reading DVD video
2562 disks. It provides the functionality that is required to access many
2563 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
2564 authentication and descrambling (if an external libdvdcss library is
2565 installed).")
2566 (license license:gpl2+)))
2567
2568 (define-public dvdauthor
2569 (package
2570 (name "dvdauthor")
2571 (version "0.7.2")
2572 (source
2573 (origin
2574 (method url-fetch)
2575 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
2576 version ".tar.gz"))
2577 (sha256
2578 (base32
2579 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
2580 (build-system gnu-build-system)
2581 (inputs
2582 `(("libdvdread" ,libdvdread)
2583 ("libpng" ,libpng)
2584 ("imagemagick" ,imagemagick)
2585 ("libxml2" ,libxml2)
2586 ("freetype" ,freetype)))
2587 (native-inputs
2588 `(("pkg-config" ,pkg-config)))
2589 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
2590 (description "@command{dvdauthor} will generate a DVD-Video movie from a
2591 MPEG-2 stream containing VOB packets.")
2592 (home-page "http://dvdauthor.sourceforge.net")
2593 (license license:gpl3+)))
2594
2595 (define-public libdvdnav
2596 (package
2597 (name "libdvdnav")
2598 (version "6.0.1")
2599 (source (origin
2600 (method url-fetch)
2601 (uri (string-append "https://download.videolan.org/videolan/"
2602 "libdvdnav/" version "/"
2603 "libdvdnav-" version ".tar.bz2"))
2604 (sha256
2605 (base32
2606 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
2607 (build-system gnu-build-system)
2608 (native-inputs
2609 `(("pkg-config" ,pkg-config)))
2610 (inputs
2611 `(("libdvdread" ,libdvdread)))
2612 (home-page "http://dvdnav.mplayerhq.hu/")
2613 (synopsis "Library for video DVD navigation features")
2614 (description
2615 "Libdvdnav is a library for developers of multimedia
2616 applications. It allows easy use of sophisticated DVD navigation features
2617 such as DVD menus, multiangle playback and even interactive DVD games. All
2618 this functionality is provided through a simple API which provides the DVD
2619 playback as a single logical stream of blocks, intermitted by special
2620 dvdnav events to report certain conditions. The main usage of libdvdnav is
2621 a loop regularly calling a function to get the next block, surrounded by
2622 additional calls to tell the library of user interaction. The whole
2623 DVD virtual machine and internal playback states are completely
2624 encapsulated.")
2625 (license license:gpl2+)))
2626
2627 (define-public libdvdcss
2628 (package
2629 (name "libdvdcss")
2630 (version "1.4.3")
2631 (source (origin
2632 (method url-fetch)
2633 (uri (string-append "https://download.videolan.org/pub/"
2634 name "/" version "/"
2635 name "-" version ".tar.bz2"))
2636 (sha256
2637 (base32
2638 "0y800y33spblb20s1lsjbaiybknmwwmmiczmjqx5s760blpwjg13"))))
2639 (build-system gnu-build-system)
2640 (home-page "https://www.videolan.org/developers/libdvdcss.html")
2641 (synopsis "Library for accessing DVDs as block devices")
2642 (description
2643 "libdvdcss is a simple library designed for accessing DVDs like a block
2644 device without having to bother about the decryption.")
2645 (license license:gpl2+)))
2646
2647 (define-public srt2vtt
2648 (package
2649 (name "srt2vtt")
2650 (version "0.2")
2651 (source (origin
2652 (method url-fetch)
2653 (uri (string-append
2654 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2655 version ".tar.gz"))
2656 (sha256
2657 (base32
2658 "1ravl635x81fcai4h2xnsn926i69pafgr6zkghq6319iprkw8ffv"))))
2659 (build-system gnu-build-system)
2660 (arguments
2661 `(#:phases
2662 (modify-phases %standard-phases
2663 (add-after 'install 'wrap-srt2vtt
2664 (lambda* (#:key outputs #:allow-other-keys)
2665 (let* ((out (assoc-ref outputs "out"))
2666 (bin (string-append out "/bin"))
2667 (version ,(let ((v (package-version guile-3.0)))
2668 (string-append (car (string-split v #\.))
2669 ".0")))
2670 (site (string-append out "/share/guile/site/" version))
2671 (compiled (string-append
2672 out "/lib/guile/" version
2673 "/site-ccache")))
2674 (wrap-program (string-append bin "/srt2vtt")
2675 `("GUILE_LOAD_PATH" ":" prefix (,site))
2676 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,compiled)))))))))
2677 (native-inputs
2678 `(("pkg-config" ,pkg-config)))
2679 (inputs
2680 `(("guile" ,guile-3.0)))
2681 (synopsis "SubRip to WebVTT subtitle converter")
2682 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2683 for use with HTML5 video.")
2684 (home-page "https://dthompson.us/projects/srt2vtt.html")
2685 (license license:gpl3+)))
2686
2687 (define-public avidemux
2688 (package
2689 (name "avidemux")
2690 (version "2.7.8")
2691 (source (origin
2692 (method url-fetch)
2693 (uri (string-append
2694 "mirror://sourceforge/avidemux/avidemux/" version "/"
2695 "avidemux_" version ".tar.gz"))
2696 (sha256
2697 (base32
2698 "00blv5455ry3bb86zyzk1xmq3rbqmbif62khc0kq3whza97l12k2"))
2699 (patches (search-patches "avidemux-install-to-lib.patch"))))
2700 (build-system cmake-build-system)
2701 (native-inputs
2702 `(("perl" ,perl)
2703 ("pkg-config" ,pkg-config)
2704 ("python" ,python-wrapper)
2705 ("qttools" ,qttools)
2706 ("yasm" ,yasm)))
2707 ;; FIXME: Once packaged, add libraries not found during the build.
2708 (inputs
2709 `(("alsa-lib" ,alsa-lib)
2710 ("fontconfig" ,fontconfig)
2711 ("freetype" ,freetype)
2712 ("fribidi" ,fribidi)
2713 ("glu" ,glu)
2714 ("jack" ,jack-1)
2715 ("lame" ,lame)
2716 ("libaom" ,libaom)
2717 ("libva" ,libva)
2718 ("libvdpau" ,libvdpau)
2719 ("libvorbis" ,libvorbis)
2720 ("libvpx" ,libvpx)
2721 ("libxv" ,libxv)
2722 ("pulseaudio" ,pulseaudio)
2723 ("qtbase" ,qtbase)
2724 ("sqlite" ,sqlite)
2725 ("zlib" ,zlib)))
2726 (arguments
2727 `(#:tests? #f ; no check target
2728 #:phases
2729 ;; Make sure files inside the included ffmpeg tarball are
2730 ;; patch-shebanged.
2731 (let ((ffmpeg "ffmpeg-4.2.4"))
2732 (modify-phases %standard-phases
2733 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2734 (lambda _
2735 (with-directory-excursion "avidemux_core/ffmpeg_package"
2736 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2737 (delete-file (string-append ffmpeg ".tar.bz2")))
2738 #t))
2739 (add-after 'patch-source-shebangs 'repack-ffmpeg
2740 (lambda _
2741 (with-directory-excursion "avidemux_core/ffmpeg_package"
2742 (substitute* (string-append ffmpeg "/configure")
2743 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2744 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2745 ;; avoid non-determinism in the archive
2746 "--sort=name" "--mtime=@0"
2747 "--owner=root:0" "--group=root:0")
2748 (delete-file-recursively ffmpeg))
2749 #t))
2750 (replace 'configure
2751 (lambda _
2752 ;; Copy-paste settings from the cmake build system.
2753 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2754 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2755 #t))
2756 (replace 'build
2757 (lambda* (#:key inputs outputs #:allow-other-keys)
2758 (let* ((out (assoc-ref outputs "out"))
2759 (lib (string-append out "/lib"))
2760 (top (getcwd))
2761 (build_component
2762 (lambda* (component srcdir #:optional (args '()))
2763 (let ((builddir (string-append "build_" component)))
2764 (mkdir builddir)
2765 (with-directory-excursion builddir
2766 (apply invoke "cmake"
2767 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2768 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2769 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2770 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2771 "\"-Wl,-rpath=" lib "\"")
2772 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
2773 (string-append "../" srcdir)
2774 "-DENABLE_QT5=True"
2775 args)
2776 (invoke "make" "-j"
2777 (number->string (parallel-job-count)))
2778 (invoke "make" "install"))))))
2779 (mkdir out)
2780 (build_component "core" "avidemux_core")
2781 (build_component "cli" "avidemux/cli")
2782 (build_component "qt4" "avidemux/qt4")
2783 (build_component "plugins_common" "avidemux_plugins"
2784 '("-DPLUGIN_UI=COMMON"))
2785 (build_component "plugins_cli" "avidemux_plugins"
2786 '("-DPLUGIN_UI=CLI"))
2787 (build_component "plugins_qt4" "avidemux_plugins"
2788 '("-DPLUGIN_UI=QT4"))
2789 (build_component "plugins_settings" "avidemux_plugins"
2790 '("-DPLUGIN_UI=SETTINGS"))
2791 ;; Remove .exe and .dll file.
2792 (delete-file-recursively
2793 (string-append out "/share/ADM6_addons"))
2794 #t)))
2795 (delete 'install)))))
2796 (home-page "http://fixounet.free.fr/avidemux/")
2797 (synopsis "Video editor")
2798 (description "Avidemux is a video editor designed for simple cutting,
2799 filtering and encoding tasks. It supports many file types, including AVI,
2800 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2801 can be automated using projects, job queue and powerful scripting
2802 capabilities.")
2803 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
2804 ;; Software with various licenses is included, see License.txt.
2805 (license license:gpl2+)))
2806
2807 (define-public vapoursynth
2808 (package
2809 (name "vapoursynth")
2810 (version "53")
2811 (source (origin
2812 (method git-fetch)
2813 (uri (git-reference
2814 (url "https://github.com/vapoursynth/vapoursynth")
2815 (commit (string-append "R" version))))
2816 (file-name (git-file-name name version))
2817 (sha256
2818 (base32
2819 "0qcsfkpkry0cmvi60khjwvfz4fqhy23nqmn4pb9qrwll26sn9dcr"))))
2820 (build-system gnu-build-system)
2821 (arguments
2822 `(#:phases
2823 (modify-phases %standard-phases
2824 (add-after 'install 'wrap
2825 (lambda* (#:key outputs #:allow-other-keys)
2826 (let* ((out (assoc-ref outputs "out"))
2827 (site (string-append out "/lib/python"
2828 ,(version-major+minor
2829 (package-version python))
2830 "/site-packages")))
2831 (wrap-program (string-append out "/bin/vspipe")
2832 `("PYTHONPATH" ":" = (,site)))))))))
2833 (native-inputs
2834 `(("autoconf" ,autoconf)
2835 ("automake" ,automake)
2836 ("cython" ,python-cython)
2837 ("libtool" ,libtool)
2838 ("pkg-config" ,pkg-config)
2839 ("yasm" ,yasm)))
2840 (inputs
2841 `(("ffmpeg" ,ffmpeg)
2842 ("libass" ,libass)
2843 ("python" ,python)
2844 ("tesseract-ocr" ,tesseract-ocr)
2845 ("zimg" ,zimg)))
2846 (home-page "http://www.vapoursynth.com/")
2847 (synopsis "Video processing framework")
2848 (description "VapourSynth is a C++ library and Python module for video
2849 manipulation. It aims to be a modern rewrite of Avisynth, supporting
2850 multithreading, generalized colorspaces, per frame properties, and videos with
2851 format changes.")
2852 ;; src/core/cpufeatures only allows x86, ARM or PPC
2853 (supported-systems (fold delete %supported-systems
2854 '("mips64el-linux" "aarch64-linux")))
2855 ;; As seen from the source files.
2856 (license license:lgpl2.1+)))
2857
2858 (define-public xvid
2859 (package
2860 (name "xvid")
2861 (version "1.3.7")
2862 (source (origin
2863 (method url-fetch)
2864 (uri (string-append
2865 "http://downloads.xvid.com/downloads/xvidcore-"
2866 version ".tar.bz2"))
2867 (sha256
2868 (base32
2869 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
2870 (build-system gnu-build-system)
2871 (native-inputs `(("yasm" ,yasm)))
2872 (arguments
2873 '(#:phases
2874 (modify-phases %standard-phases
2875 (add-before 'configure 'pre-configure
2876 (lambda _
2877 (chdir "build/generic")
2878 (substitute* "configure"
2879 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2880 #t)))
2881 #:tests? #f)) ; no test suite
2882 (home-page "https://www.xvid.com/")
2883 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2884 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2885 codec library. It uses ASP features such as b-frames, global and quarter
2886 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2887 and custom quantization matrices.")
2888 (license license:gpl2+)))
2889
2890 (define-public streamlink
2891 (package
2892 (name "streamlink")
2893 (version "2.0.0")
2894 (source
2895 (origin
2896 (method url-fetch)
2897 (uri (pypi-uri "streamlink" version))
2898 (sha256
2899 (base32
2900 "1nv2kj1k42a1b20ws8sdzlxk3wh1qz6pg5mxp75433b3c7lxksn0"))))
2901 (build-system python-build-system)
2902 (home-page "https://github.com/streamlink/streamlink")
2903 (native-inputs
2904 `(("python-freezegun" ,python-freezegun)
2905 ("python-pytest" ,python-pytest)
2906 ("python-mock" ,python-mock)
2907 ("python-requests-mock" ,python-requests-mock)))
2908 (propagated-inputs
2909 `(("python-pysocks" ,python-pysocks)
2910 ("python-websocket-client" ,python-websocket-client)
2911 ("python-iso3166" ,python-iso3166)
2912 ("python-iso639" ,python-iso639)
2913 ("python-isodate" ,python-isodate)
2914 ("python-pycryptodome" ,python-pycryptodome)
2915 ("python-requests" ,python-requests)
2916 ("python-urllib3" ,python-urllib3)))
2917 (synopsis "Extract streams from various services")
2918 (description "Streamlink is command-line utility that extracts streams
2919 from sites like Twitch.tv and pipes them into a video player of choice.")
2920 (license license:bsd-2)))
2921
2922 (define-public twitchy
2923 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2924 (package
2925 (name "twitchy")
2926 (version (git-version "3.4" "1" commit))
2927 (source
2928 (origin
2929 (method git-fetch)
2930 (uri (git-reference
2931 (url "https://github.com/BasioMeusPuga/twitchy")
2932 (commit commit)))
2933 (file-name (git-file-name name version))
2934 (sha256
2935 (base32
2936 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2937 (build-system python-build-system)
2938 (arguments
2939 '(#:phases
2940 (modify-phases %standard-phases
2941 (add-after 'unpack 'patch-paths
2942 (lambda* (#:key inputs #:allow-other-keys)
2943 (substitute* "twitchy/twitchy_play.py"
2944 (("\"streamlink ")
2945 (string-append "\"" (assoc-ref inputs "streamlink")
2946 "/bin/streamlink ")))
2947 #t))
2948 (add-before 'check 'check-setup
2949 (lambda _
2950 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2951 #t))
2952 (add-after 'install 'install-rofi-plugin
2953 (lambda* (#:key outputs #:allow-other-keys)
2954 (install-file "plugins/rofi-twitchy"
2955 (string-append (assoc-ref outputs "out")
2956 "/bin"))
2957 #t)))))
2958 (inputs
2959 `(("python-requests" ,python-requests)
2960 ("streamlink" ,streamlink)))
2961 (home-page "https://github.com/BasioMeusPuga/twitchy")
2962 (synopsis "Command-line interface for Twitch.tv")
2963 (description
2964 "This package provides a command-line interface for Twitch.tv")
2965 (license license:gpl3+))))
2966
2967 (define-public mlt
2968 (package
2969 (name "mlt")
2970 (version "6.22.1")
2971 (source (origin
2972 (method git-fetch)
2973 (uri (git-reference
2974 (url "https://github.com/mltframework/mlt")
2975 (commit (string-append "v" version))))
2976 (file-name (git-file-name name version))
2977 (sha256
2978 (base32
2979 "0jxv848ykw0csbnayrd710ylw46m0picfv7rpzsxz1vh4jzs395k"))))
2980 (build-system gnu-build-system)
2981 (arguments
2982 `(#:tests? #f ; no tests
2983 #:make-flags '("CC=gcc" "CXX=g++")
2984 #:configure-flags
2985 (list "--enable-gpl3"
2986 "--enable-gpl")
2987 #:phases
2988 (modify-phases %standard-phases
2989 (add-after
2990 'configure 'override-LDFLAGS
2991 (lambda* (#:key outputs #:allow-other-keys)
2992 (substitute* "config.mak"
2993 (("LDFLAGS\\+=")
2994 (string-append "LDFLAGS+=-Wl,-rpath="
2995 (assoc-ref outputs "out")
2996 "/lib ")))
2997 #t)))))
2998 (inputs
2999 `(("alsa-lib" ,alsa-lib)
3000 ("ffmpeg" ,ffmpeg)
3001 ("fftw" ,fftw)
3002 ("frei0r-plugins" ,frei0r-plugins)
3003 ("gdk-pixbuf" ,gdk-pixbuf)
3004 ("gtk+" ,gtk+-2)
3005 ("libxml2" ,libxml2)
3006 ("jack" ,jack-1)
3007 ("ladspa" ,ladspa)
3008 ("libexif" ,libexif)
3009 ("libvorbis" ,libvorbis)
3010 ("rubberband" ,rubberband)
3011 ("libsamplerate" ,libsamplerate)
3012 ("pulseaudio" ,pulseaudio)
3013 ("qtbase" ,qtbase)
3014 ("qtsvg" ,qtsvg)
3015 ("sdl" ,sdl)
3016 ("sox" ,sox)))
3017 (native-inputs
3018 `(("pkg-config" ,pkg-config)))
3019 (home-page "https://www.mltframework.org/")
3020 (synopsis "Author, manage, and run multitrack audio/video compositions")
3021 (description
3022 "MLT is a multimedia framework, designed and developed for television
3023 broadcasting. It provides a toolkit for broadcasters, video editors, media
3024 players, transcoders, web streamers and many more types of applications. The
3025 functionality of the system is provided via an assortment of ready to use
3026 tools, XML authoring components, and an extensible plug-in based API.")
3027 (license license:gpl3)))
3028
3029 (define-public v4l-utils
3030 (package
3031 (name "v4l-utils")
3032 (version "1.20.0")
3033 (source (origin
3034 (method url-fetch)
3035 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
3036 "/v4l-utils-" version ".tar.bz2"))
3037 (sha256
3038 (base32
3039 "1xr66y6w422hil6s7n8d61a2vhwh4im8l267amf41jvw7xqihqcm"))))
3040 (build-system gnu-build-system)
3041 ;; Separate graphical tools in order to save almost 1 GiB on the closure
3042 ;; for the common case.
3043 (outputs '("out" "gui"))
3044 (arguments
3045 '(#:configure-flags
3046 (list "--disable-static"
3047 (string-append "--with-udevdir="
3048 (assoc-ref %outputs "out")
3049 "/lib/udev"))
3050 #:phases
3051 (modify-phases %standard-phases
3052 (add-after 'install 'split
3053 (lambda* (#:key outputs #:allow-other-keys)
3054 (let ((out (assoc-ref outputs "out"))
3055 (gui (assoc-ref outputs "gui")))
3056 (mkdir-p (string-append gui "/bin"))
3057 (mkdir-p (string-append gui "/share/man/man1"))
3058 (mkdir-p (string-append gui "/share/applications"))
3059 (for-each
3060 (lambda (prog)
3061 (for-each
3062 (lambda (file)
3063 (rename-file (string-append out file)
3064 (string-append gui file)))
3065 (list
3066 (string-append "/bin/" prog)
3067 (string-append "/share/man/man1/" prog ".1")
3068 (string-append "/share/applications/" prog ".desktop"))))
3069 '("qv4l2" "qvidcap"))
3070 (copy-recursively (string-append out "/share/icons")
3071 (string-append gui "/share/icons"))
3072 (delete-file-recursively (string-append out "/share/icons"))
3073 (rmdir (string-append out "/share/applications"))
3074 #t))))))
3075 (native-inputs
3076 `(("perl" ,perl)
3077 ("pkg-config" ,pkg-config)))
3078 (inputs
3079 `(("alsa-lib" ,alsa-lib)
3080 ("glu" ,glu)
3081 ("libjpeg" ,libjpeg-turbo)
3082 ("libx11" ,libx11)
3083 ("qtbase" ,qtbase)
3084 ("eudev" ,eudev)))
3085 (synopsis "Realtime video capture utilities for Linux")
3086 (description "The v4l-utils provide a series of libraries and utilities to
3087 be used for realtime video capture via Linux-specific APIs.")
3088 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
3089 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
3090 (license (list license:lgpl2.1+ license:gpl2))))
3091
3092 (define-public obs
3093 (package
3094 (name "obs")
3095 (version "26.1.2")
3096 (source (origin
3097 (method git-fetch)
3098 (uri (git-reference
3099 (url "https://github.com/obsproject/obs-studio")
3100 (commit version)))
3101 (file-name (git-file-name name version))
3102 (sha256
3103 (base32
3104 "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc"))
3105 (patches
3106 (search-patches "obs-modules-location.patch"))))
3107 (build-system cmake-build-system)
3108 (arguments
3109 `(#:configure-flags
3110 (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version)
3111 "-DENABLE_UNIT_TESTS=TRUE")
3112 #:phases
3113 (modify-phases %standard-phases
3114 (add-after 'install 'wrap-executable
3115 (lambda* (#:key outputs #:allow-other-keys)
3116 (let ((out (assoc-ref outputs "out"))
3117 (plugin-path (getenv "QT_PLUGIN_PATH")))
3118 (wrap-program (string-append out "/bin/obs")
3119 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
3120 #t)))))
3121 (native-search-paths
3122 (list (search-path-specification
3123 (variable "OBS_PLUGINS_DIRECTORY")
3124 (separator #f) ;single entry
3125 (files '("lib/obs-plugins")))
3126 (search-path-specification
3127 (variable "OBS_PLUGINS_DATA_DIRECTORY")
3128 (separator #f) ;single entry
3129 (files '("share/obs/obs-plugins")))))
3130 (native-inputs
3131 `(("cmocka" ,cmocka)
3132 ("pkg-config" ,pkg-config)))
3133 (inputs
3134 `(("alsa-lib" ,alsa-lib)
3135 ("curl" ,curl)
3136 ("eudev" ,eudev)
3137 ("ffmpeg" ,ffmpeg)
3138 ("fontconfig" ,fontconfig)
3139 ("freetype" ,freetype)
3140 ("jack" ,jack-1)
3141 ("jansson" ,jansson)
3142 ("libx264" ,libx264)
3143 ("libxcomposite" ,libxcomposite)
3144 ("mbedtls" ,mbedtls-apache)
3145 ("mesa" ,mesa)
3146 ("pulseaudio" ,pulseaudio)
3147 ("qtbase" ,qtbase)
3148 ("qtsvg" ,qtsvg)
3149 ("qtx11extras" ,qtx11extras)
3150 ("speexdsp" ,speexdsp)
3151 ("v4l-utils" ,v4l-utils)
3152 ("zlib" ,zlib)))
3153 (synopsis "Live streaming software")
3154 (description "Open Broadcaster Software provides a graphical interface for
3155 video recording and live streaming. OBS supports capturing audio and video
3156 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
3157 and JACK.")
3158 (home-page "https://obsproject.com")
3159 (license license:gpl2+)))
3160
3161 (define-public obs-spectralizer
3162 (package
3163 (name "obs-spectralizer")
3164 (version "1.3.3")
3165 (source
3166 (origin
3167 (method git-fetch)
3168 (uri (git-reference
3169 (url "https://github.com/univrsal/spectralizer")
3170 (commit (string-append "v" version))))
3171 (file-name (git-file-name name version))
3172
3173 ;; Remove bundled Windows DLLs.
3174 (snippet '(delete-file-recursively "fftw3"))
3175 (modules '((guix build utils)))
3176
3177 (sha256
3178 (base32
3179 "0q75cnyqydpvfda51zm9gxqj3wqr99ad0lxzjhw0ld67qvj1ag6i"))))
3180 (build-system cmake-build-system)
3181 (arguments
3182 `(#:tests? #f
3183 #:configure-flags
3184 (list "-DGLOBAL_INSTALLATION=ON" "-DUSE_CMAKE_LIBDIR=ON")))
3185 (inputs `(("obs" ,obs)
3186 ("fftw" ,fftw)))
3187 (home-page "https://github.com/univrsal/spectralizer")
3188 (synopsis "OBS plugin for audio visualization")
3189 (description "This OBS plugins allows you to vizualize MPD and internal
3190 OBS audio sources.")
3191 (license license:gpl2)))
3192
3193 (define-public obs-websocket
3194 (package
3195 (name "obs-websocket")
3196 (version "4.9.0")
3197 (source
3198 (origin
3199 (method git-fetch)
3200 (uri (git-reference
3201 (url "https://github.com/Palakis/obs-websocket")
3202 (commit version)
3203 (recursive? #t)))
3204 (file-name (git-file-name name version))
3205 (sha256
3206 (base32 "1r47861ma1s3998clahbnbc216wcf706b1ps514k5p28h511l5w0"))))
3207 (build-system cmake-build-system)
3208 (arguments
3209 `(#:tests? #f ;no tests
3210 #:phases
3211 (modify-phases %standard-phases
3212 (add-after 'unpack 'remove-permission-change
3213 (lambda* _
3214 (substitute* "CMakeLists.txt"
3215 ;; Remove lines that set writeable permissions on outputs.
3216 (("set\\(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS") "")
3217 (("OWNER_READ.*\\)") "")
3218 (("PERMISSIONS") ")"))
3219 #t)))))
3220 (inputs
3221 `(("obs" ,obs)
3222 ("qtbase" ,qtbase)))
3223 (home-page "https://github.com/Palakis/obs-websocket")
3224 (synopsis "OBS plugin for remote control via WebSockets")
3225 (description "This OBS plugin allows you to establish a WebSocket channel
3226 from within your running OBS instance so that you can control it remotely from
3227 programs on your current machine or on other machines.")
3228 (license license:gpl2+)))
3229
3230 (define-public obs-wlrobs
3231 (package
3232 (name "obs-wlrobs")
3233 (version "1.0")
3234 (source
3235 (origin
3236 (method hg-fetch)
3237 (uri (hg-reference
3238 (url "https://hg.sr.ht/~scoopta/wlrobs")
3239 (changeset (string-append "v" version))))
3240 (file-name (git-file-name name version))
3241 (sha256
3242 (base32
3243 "1faiq2gdb7qis3m1hilm4pz8lkmkab75vzm608dbiazahhybf96p"))))
3244 (build-system meson-build-system)
3245 (native-inputs
3246 `(("pkg-config" ,pkg-config)))
3247 (propagated-inputs `() )
3248 (inputs `(("obs" ,obs)
3249 ("libx11" ,libx11 "out")
3250 ("wayland" ,wayland)
3251 ("wayland-protocols" ,wayland-protocols)))
3252 (home-page "https://hg.sr.ht/~scoopta/wlrobs")
3253 (synopsis "OBS plugin for Wayland (wlroots) screen capture")
3254 (description
3255 "This OBS plugin allows you to capture the screen on wlroots-based
3256 Wayland compositors.")
3257 (license license:gpl3+)))
3258
3259 (define-public libvdpau
3260 (package
3261 (name "libvdpau")
3262 (version "1.4")
3263 (source
3264 (origin
3265 (method git-fetch)
3266 (uri (git-reference
3267 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
3268 (commit version)))
3269 (file-name (git-file-name name version))
3270 (sha256
3271 (base32
3272 "1hc4mcrbr1yhfiy4zfd8wc2iiqbp90z6jswap0jia20vmyk5lqld"))))
3273 (build-system meson-build-system)
3274 (native-inputs
3275 `(("pkg-config" ,pkg-config)))
3276 (inputs
3277 `(("libx11" ,libx11 "out")
3278 ("libxext" ,libxext)
3279 ("xorgproto" ,xorgproto)))
3280 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3281 (synopsis "Video Decode and Presentation API")
3282 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
3283 provides an interface to video decode acceleration and presentation hardware
3284 present in modern GPUs.")
3285 (license (license:x11-style "file://COPYING"))))
3286
3287 (define-public vdpauinfo
3288 (package
3289 (name "vdpauinfo")
3290 (version "1.4")
3291 (source
3292 (origin
3293 (method git-fetch)
3294 (uri (git-reference
3295 (url "https://gitlab.freedesktop.org/vdpau/vdpauinfo")
3296 (commit version)))
3297 (file-name (git-file-name name version))
3298 (sha256
3299 (base32 "0s84bavxr39w0r7zfaac7kpbfsg88hgymqyzcr0yvbj1yry3liz2"))))
3300 (build-system gnu-build-system)
3301 (arguments
3302 `(#:phases
3303 (modify-phases %standard-phases
3304 (replace 'bootstrap
3305 ;; ./autogen.sh runs ./configure too soon.
3306 (lambda _
3307 (invoke "autoreconf" "-fiv"))))))
3308 (native-inputs
3309 `(("autoconf" ,autoconf)
3310 ("automake" ,automake)
3311 ("libx11" ,libx11)
3312 ("pkg-config" ,pkg-config)))
3313 (propagated-inputs
3314 `(("libvdpau" ,libvdpau)))
3315 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3316 (synopsis "Tool to query the capabilities of a VDPAU implementation")
3317 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
3318 implementation.")
3319 (license (license:x11-style "file://COPYING"))))
3320
3321 (define-public libvdpau-va-gl
3322 (package
3323 (name "libvdpau-va-gl")
3324 (version "0.4.2")
3325 (source
3326 (origin
3327 (method url-fetch)
3328 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
3329 "releases/download/v" version "/libvdpau-va-gl-"
3330 version ".tar.gz"))
3331 (sha256
3332 (base32
3333 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
3334 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
3335 (modules '((guix build utils)))
3336 (snippet '(begin (delete-file-recursively "3rdparty")
3337 #t))))
3338 (build-system cmake-build-system)
3339 (arguments
3340 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
3341 (native-inputs
3342 `(("libvdpau" ,libvdpau)
3343 ("pkg-config" ,pkg-config)))
3344 (inputs
3345 `(("libva" ,libva)
3346 ("mesa" ,mesa)))
3347 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
3348 (synopsis "VDPAU driver with VA-API/OpenGL backend")
3349 (description
3350 "Many applications can use VDPAU to accelerate portions of the video
3351 decoding process and video post-processing to the GPU video hardware. Since
3352 there is no VDPAU available on Intel chips, they fall back to different drawing
3353 techniques. This driver uses OpenGL under the hood to accelerate drawing and
3354 scaling and VA-API (if available) to accelerate video decoding.")
3355 (license license:expat)))
3356
3357 (define-public recordmydesktop
3358 (package
3359 (name "recordmydesktop")
3360 (version "0.3.8.1")
3361 (source (origin
3362 (method url-fetch)
3363 (uri (string-append "mirror://sourceforge/" name "/" name "/"
3364 version "/recordmydesktop-" version ".tar.gz"))
3365 (sha256
3366 (base32
3367 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
3368 (build-system gnu-build-system)
3369 (inputs `(("popt" ,popt)
3370 ("zlib" ,zlib)
3371 ("libx11" ,libx11)
3372 ("libice" ,libice)
3373 ("libsm" ,libsm)
3374 ("libxfixes" ,libxfixes)
3375 ("libxdamage" ,libxdamage)
3376 ("libxext" ,libxext)
3377 ("alsa-lib" ,alsa-lib)
3378 ("libvorbis" ,libvorbis)
3379 ("libtheora" ,libtheora)))
3380 (home-page "http://recordmydesktop.sourceforge.net/")
3381 (synopsis "Desktop session video recorder")
3382 (description
3383 "recordMyDesktop is a command-line tool that captures the activity in
3384 your graphical desktop and encodes it as a video. This is a useful tool for
3385 making @dfn{screencasts}.")
3386 (license license:gpl2+)))
3387
3388 (define-public simplescreenrecorder
3389 (package
3390 (name "simplescreenrecorder")
3391 (version "0.4.2")
3392 (source
3393 (origin
3394 (method git-fetch)
3395 (uri (git-reference
3396 (url "https://github.com/MaartenBaert/ssr")
3397 (commit version)))
3398 (file-name (git-file-name name version))
3399 (sha256
3400 (base32
3401 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
3402 (build-system cmake-build-system)
3403 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
3404 ;; README.md, the program builds and functions properly without them.
3405 ;; As a result, they are omitted. Please add them back if problems appear.
3406 (inputs
3407 `(("alsa-lib" ,alsa-lib)
3408 ("ffmpeg" ,ffmpeg)
3409 ("glu" ,glu)
3410 ("jack" ,jack-1)
3411 ("libxi" ,libxi)
3412 ("libxinerama" ,libxinerama)
3413 ("pulseaudio" ,pulseaudio)
3414 ("qtbase" ,qtbase)
3415 ("qtx11extras" ,qtx11extras)))
3416 (native-inputs `(("pkg-config" ,pkg-config)))
3417 (arguments
3418 `(#:configure-flags
3419 (list "-DWITH_QT5=TRUE")
3420 #:tests? #f)) ; no test suite
3421 ;; Using HTTPS causes part of the page to be displayed improperly.
3422 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
3423 (synopsis "Screen recorder")
3424 (description "SimpleScreenRecorder is an easy to use screen recorder with
3425 a graphical user interface. It supports recording the entire screen, or a
3426 part of it, and allows encoding in many different codecs and file formats.
3427 Other features include a live preview and live streaming.")
3428 (license (list license:gpl3+ ; most files
3429 license:zlib ; glinject/elfhacks.*
3430 license:isc ; glinject/*
3431 license:x11)))) ; build-aux/install-sh
3432
3433 (define-public libsmpeg
3434 (package
3435 (name "libsmpeg")
3436 (version "0.4.5-401")
3437 (source (origin
3438 (method svn-fetch)
3439 (uri (svn-reference
3440 (url "svn://svn.icculus.org/smpeg/trunk/")
3441 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
3442 (file-name (string-append name "-" version "-checkout"))
3443 (sha256
3444 (base32
3445 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
3446 (build-system gnu-build-system)
3447 (arguments
3448 ;; libsmpeg fails to build with -std=c++11, which is the default with
3449 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
3450 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
3451 (native-inputs
3452 `(("autoconf" ,autoconf)
3453 ("automake" ,automake)))
3454 (inputs
3455 `(("sdl" ,sdl2)))
3456 (home-page "https://icculus.org/smpeg/")
3457 (synopsis "SDL MPEG decoding library")
3458 (description
3459 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
3460 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
3461 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
3462 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
3463 and MPEG system streams.")
3464 (license (list license:expat
3465 license:lgpl2.1
3466 license:lgpl2.1+
3467 license:gpl2))))
3468
3469 ;; for btanks
3470 (define-public libsmpeg-with-sdl1
3471 (package (inherit libsmpeg)
3472 (name "libsmpeg")
3473 (version "0.4.5-399")
3474 (source (origin
3475 (method svn-fetch)
3476 (uri (svn-reference
3477 (url "svn://svn.icculus.org/smpeg/trunk/")
3478 (revision 399))) ; tagged release 0.4.5
3479 (file-name (string-append name "-" version "-checkout"))
3480 (sha256
3481 (base32
3482 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
3483 (inputs
3484 `(("sdl" ,sdl)))))
3485
3486 (define-public libbdplus
3487 (package
3488 (name "libbdplus")
3489 (version "0.1.2")
3490 (source
3491 (origin
3492 (method url-fetch)
3493 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
3494 version "/" name "-" version ".tar.bz2"))
3495 (sha256
3496 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
3497 (inputs
3498 `(("libgcrypt" ,libgcrypt)))
3499 (build-system gnu-build-system)
3500 (home-page "https://www.videolan.org/developers/libbdplus.html")
3501 (synopsis "Library for decrypting certain Blu-Ray discs")
3502 (description "libbdplus is a library which implements the BD+ System
3503 specifications.")
3504 (license license:lgpl2.1+)))
3505
3506 (define-public libaacs
3507 (package
3508 (name "libaacs")
3509 (version "0.11.0")
3510 (source
3511 (origin
3512 (method url-fetch)
3513 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
3514 version "/libaacs-" version ".tar.bz2"))
3515 (sha256
3516 (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d"))))
3517 (inputs
3518 `(("libgcrypt" ,libgcrypt)))
3519 (native-inputs
3520 `(("bison" ,bison)
3521 ("flex" ,flex)))
3522 (build-system gnu-build-system)
3523 (home-page "https://www.videolan.org/developers/libaacs.html")
3524 (synopsis "Library for decrypting certain Blu-Ray discs")
3525 (description "libaacs is a library which implements the Advanced Access
3526 Content System specification.")
3527 (license license:lgpl2.1+)))
3528
3529 (define-public mps-youtube
3530 (package
3531 (name "mps-youtube")
3532 (version "0.2.8")
3533 (source
3534 (origin
3535 (method git-fetch)
3536 (uri (git-reference
3537 (url "https://github.com/mps-youtube/mps-youtube")
3538 (commit (string-append "v" version))))
3539 (file-name (git-file-name name version))
3540 (sha256
3541 (base32
3542 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
3543 (build-system python-build-system)
3544 (arguments
3545 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
3546 ;; test suite results differ depending on the country and also introduce
3547 ;; non-determinism in the tests.
3548 ;; https://github.com/mps-youtube/mps-youtube/issues/556
3549 `(#:tests? #f))
3550 (propagated-inputs
3551 `(("python-pafy" ,python-pafy)
3552 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
3553 (home-page "https://github.com/mps-youtube/mps-youtube")
3554 (synopsis "Terminal based YouTube player and downloader")
3555 (description
3556 "@code{mps-youtube} is based on mps, a terminal based program to
3557 search, stream and download music. This implementation uses YouTube as
3558 a source of content and can play and download video as well as audio.
3559 It can use either mpv or mplayer for playback, and for conversion of
3560 formats ffmpeg or libav is used. Users should install one of the
3561 supported players in addition to this package.")
3562 (license license:gpl3+)))
3563
3564 (define-public handbrake
3565 (package
3566 (name "handbrake")
3567 (version "1.3.3")
3568 (source (origin
3569 (method url-fetch)
3570 (uri (string-append "https://github.com/HandBrake/HandBrake/"
3571 "releases/download/" version "/"
3572 "HandBrake-" version "-source.tar.bz2"))
3573 (sha256
3574 (base32
3575 "11bzhyp052bmng5119x74xvdj5632smx6qsk537ygda8bzckg2i1"))
3576 (modules '((guix build utils)))
3577 (snippet
3578 ;; Remove "contrib" and source not necessary for
3579 ;; building/running under a GNU environment.
3580 '(begin
3581 (for-each delete-file-recursively
3582 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
3583 (substitute* "make/include/main.defs"
3584 ;; Disable unconditional inclusion of "contrib" libraries
3585 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
3586 ;; which would lead to fetching and building of these
3587 ;; libraries. Use our own instead.
3588 (("MODULES \\+= contrib") "# MODULES += contrib"))
3589 #t))))
3590 (build-system glib-or-gtk-build-system)
3591 (native-inputs
3592 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
3593 ("autoconf" ,autoconf)
3594 ("intltool" ,intltool)
3595 ("libtool" ,libtool)
3596 ("pkg-config" ,pkg-config)
3597 ("python" ,python-2))) ; For configuration
3598 (inputs
3599 `(("bzip2" ,bzip2)
3600 ("dbus-glib" ,dbus-glib)
3601 ("ffmpeg" ,ffmpeg)
3602 ("fontconfig" ,fontconfig)
3603 ("freetype" ,freetype)
3604 ("glib" ,glib)
3605 ("gstreamer" ,gstreamer)
3606 ("gst-plugins-base" ,gst-plugins-base)
3607 ("gtk+" ,gtk+)
3608 ("jansson" ,jansson)
3609 ("lame" ,lame)
3610 ("libass" ,libass)
3611 ("libbluray" ,libbluray)
3612 ("libdav1d" ,dav1d)
3613 ("libdvdnav" ,libdvdnav)
3614 ("libdvdread" ,libdvdread)
3615 ("libgudev" ,libgudev)
3616 ("libmpeg2" ,libmpeg2)
3617 ("libnotify" ,libnotify)
3618 ("libnuma" ,numactl)
3619 ("libogg" ,libogg)
3620 ("libopus" ,opus)
3621 ("libsamplerate" ,libsamplerate)
3622 ("libtheora" ,libtheora)
3623 ("libvorbis" ,libvorbis)
3624 ("libvpx" ,libvpx)
3625 ("libxml2" ,libxml2)
3626 ("libx264" ,libx264)
3627 ("speex" ,speex)
3628 ("x265" ,x265)
3629 ("zlib" ,zlib)))
3630 (arguments
3631 `(#:tests? #f ;tests require Ruby and claim to be unsupported
3632 #:configure-flags
3633 (list "--disable-gtk-update-checks"
3634 "--disable-nvenc"
3635 (string-append "CPPFLAGS=-I"
3636 (assoc-ref %build-inputs "libxml2")
3637 "/include/libxml2")
3638 "LDFLAGS=-lx265")
3639 #:phases
3640 (modify-phases %standard-phases
3641 (replace 'bootstrap
3642 ;; Run bootstrap ahead of time so that shebangs get patched.
3643 (lambda _
3644 (setenv "CONFIG_SHELL" (which "sh"))
3645 ;; Patch the Makefile so that it doesn't bootstrap again.
3646 (substitute* "gtk/module.rules"
3647 ((".*autoreconf.*") ""))
3648 (with-directory-excursion "gtk"
3649 (invoke "autoreconf" "-fiv"))))
3650 (add-before 'configure 'patch-SHELL
3651 (lambda _
3652 (substitute* "gtk/po/Makefile.in.in"
3653 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
3654 #t))
3655 (add-before 'configure 'relax-reqs
3656 (lambda _
3657 (substitute* "make/configure.py"
3658 ;; cmake is checked for so that it can be used to build
3659 ;; contrib/harfbuzz and contrib/x265, but we get these as
3660 ;; inputs, so don't abort if it's not found. Similarly, meson
3661 ;; and ninja are only needed for contrib/libdav1d, and nasm
3662 ;; only for libvpx
3663 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
3664 (string-append & "False")))
3665 #t))
3666 (replace 'configure
3667 (lambda* (#:key outputs configure-flags #:allow-other-keys)
3668 ;; 'configure' is not an autoconf-generated script, and
3669 ;; errors on unrecognized arguments,
3670 ;; e.g. --enable-fast-install
3671 (let ((out (assoc-ref outputs "out")))
3672 (apply invoke "./configure"
3673 (string-append "--prefix=" out)
3674 (or configure-flags '())))))
3675 (add-after 'configure 'chdir-build
3676 (lambda _ (chdir "./build") #t)))))
3677 (home-page "https://handbrake.fr")
3678 (synopsis "Video transcoder")
3679 (description
3680 "HandBrake is a tool for converting video from any format to a selection
3681 of modern, widely supported codecs.")
3682 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
3683 ;; Combination under GPLv2. See LICENSE.
3684 (license license:gpl2)))
3685
3686 (define-public intel-vaapi-driver
3687 (package
3688 (name "intel-vaapi-driver")
3689 (version "2.4.1")
3690 (source
3691 (origin
3692 (method git-fetch)
3693 (uri (git-reference
3694 (url "https://github.com/intel/intel-vaapi-driver")
3695 (commit version)))
3696 (sha256
3697 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
3698 (file-name (git-file-name name version))))
3699 (build-system gnu-build-system)
3700 (native-inputs
3701 `(("autoconf" ,autoconf)
3702 ("automake" ,automake)
3703 ("libtool" ,libtool)
3704 ("pkg-config" ,pkg-config)))
3705 (inputs
3706 `(("libdrm" ,libdrm)
3707 ("libva" ,libva)
3708 ("libx11" ,libx11)))
3709 (arguments
3710 `(#:phases
3711 (modify-phases %standard-phases
3712 (add-before 'configure 'set-target-directory
3713 (lambda* (#:key outputs #:allow-other-keys)
3714 (let ((out (assoc-ref outputs "out")))
3715 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
3716 #t))))))
3717 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
3718 ;; this to all VA-API back ends instead of once to libva.
3719 (native-search-paths
3720 (list (search-path-specification
3721 (variable "LIBVA_DRIVERS_PATH")
3722 (files '("lib/dri")))))
3723 (supported-systems '("i686-linux" "x86_64-linux"))
3724 (home-page "https://01.org/linuxmedia/vaapi")
3725 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
3726 (description
3727 "This is the @acronym{VA-API, Video Acceleration API} back end required for
3728 hardware-accelerated video processing on Intel GEN Graphics devices supported by
3729 the i915 driver, such as integrated Intel HD Graphics. It provides access to
3730 both hardware and shader functionality for faster encoding, decoding, and
3731 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
3732 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
3733 license:expat)))) ; the rest, excluding the test suite
3734
3735 (define-public openh264
3736 (package
3737 (name "openh264")
3738 (version "2.1.1")
3739 (source (origin
3740 (method git-fetch)
3741 (uri (git-reference
3742 (url "https://github.com/cisco/openh264")
3743 (commit (string-append "v" version))))
3744 (file-name (git-file-name name version))
3745 (sha256
3746 (base32
3747 "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s"))))
3748 (build-system gnu-build-system)
3749 (native-inputs
3750 `(("nasm" ,nasm)
3751 ("python" ,python)))
3752 (arguments
3753 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3754 "CC=gcc")
3755 #:test-target "test"
3756 #:phases (modify-phases %standard-phases
3757 ;; no configure script
3758 (delete 'configure))))
3759 (home-page "https://www.openh264.org/")
3760 (synopsis "H264 decoder library")
3761 (description
3762 "Openh264 is a library which can decode H264 video streams.")
3763 (license license:bsd-2)))
3764
3765 (define-public libmp4v2
3766 (package
3767 (name "libmp4v2")
3768 (version "2.0.0")
3769 (source
3770 (origin
3771 (method url-fetch)
3772 ;; XXX: The new location of upstream is uncertain and will become relevant the
3773 ;; moment when the googlecode archive shuts down. It is past the date it
3774 ;; should've been turned off. I tried to communicate with upstream, but this
3775 ;; wasn't very responsive and not very helpful. The short summary is, it is
3776 ;; chaos when it comes to the amount of forks and only time will tell where
3777 ;; the new upstream location is.
3778 (uri (string-append "https://storage.googleapis.com/google-"
3779 "code-archive-downloads/v2/"
3780 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
3781 (file-name (string-append name "-" version ".tar.bz2"))
3782 (patches (search-patches "libmp4v2-c++11.patch"))
3783 (sha256
3784 (base32
3785 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
3786 (build-system gnu-build-system)
3787 (outputs '("out"
3788 "static")) ; 3.7MiB .a file
3789 (arguments
3790 `(#:phases
3791 (modify-phases %standard-phases
3792 (add-after 'unpack 'remove-dates
3793 (lambda _
3794 ;; Make the build reproducible.
3795 (substitute* "configure"
3796 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
3797 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
3798 #t))
3799 (add-after 'install 'move-static-libraries
3800 (lambda* (#:key outputs #:allow-other-keys)
3801 ;; Move static libraries to the "static" output.
3802 (let* ((out (assoc-ref outputs "out"))
3803 (lib (string-append out "/lib"))
3804 (static (assoc-ref outputs "static"))
3805 (slib (string-append static "/lib")))
3806 (mkdir-p slib)
3807 (for-each (lambda (file)
3808 (install-file file slib)
3809 (delete-file file))
3810 (find-files lib "\\.a$"))
3811 #t))))))
3812 (native-inputs
3813 `(("help2man" ,help2man)
3814 ("dejagnu" ,dejagnu)))
3815 (home-page "https://code.google.com/archive/p/mp4v2/")
3816 (synopsis "API to create and modify mp4 files")
3817 (description
3818 "The MP4v2 library provides an API to create and modify mp4 files as defined by
3819 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
3820 file format that has been used as a multimedia file format in a variety of platforms and
3821 applications. It is a very powerful and extensible format that can accommodate
3822 practically any type of media.")
3823 (license license:mpl1.1)))
3824
3825 (define-public libmediainfo
3826 (package
3827 (name "libmediainfo")
3828 (version "21.03")
3829 (source (origin
3830 (method url-fetch)
3831 (uri (string-append "https://mediaarea.net/download/source/"
3832 name "/" version "/"
3833 name "_" version ".tar.xz"))
3834 (sha256
3835 (base32
3836 "1jm4mk539wf3crgpcddgwdixshwdzm37mkb5441lifhcz2mykdsn"))))
3837 ;; TODO add a Big Buck Bunny webm for tests.
3838 (native-inputs
3839 `(("autoconf" ,autoconf)
3840 ("automake" ,automake)
3841 ("libtool" ,libtool)
3842 ("pkg-config" ,pkg-config)
3843 ("zlib" ,zlib)
3844 ("tinyxml2" ,tinyxml2)
3845 ("curl" ,curl)
3846 ("libzen" ,libzen)))
3847 (build-system gnu-build-system)
3848 (arguments
3849 '(#:tests? #f ; see above TODO
3850 #:phases
3851 ;; build scripts not in root of archive
3852 (modify-phases %standard-phases
3853 (add-after 'unpack 'change-to-build-dir
3854 (lambda _
3855 (chdir "Project/GNU/Library")
3856 #t)))))
3857 (home-page "https://mediaarea.net/en/MediaInfo")
3858 (synopsis "Library for retrieving media metadata")
3859 (description "MediaInfo is a library used for retrieving technical
3860 information and other metadata about audio or video files. A non-exhaustive
3861 list of the information MediaInfo can retrieve from media files include:
3862
3863 @itemize
3864 @item General: title, author, director, album, track number, date, duration...
3865 @item Video: codec, aspect, fps, bitrate...
3866 @item Audio: codec, sample rate, channels, language, bitrate...
3867 @item Text: language of subtitle
3868 @item Chapters: number of chapters, list of chapters
3869 @end itemize
3870
3871 MediaInfo supports the following formats:
3872
3873 @itemize
3874 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
3875 MPEG-2, MPEG-4, DVD (VOB)...
3876 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
3877 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3878 @item Subtitles: SRT, SSA, ASS, SAMI...
3879 @end itemize\n")
3880 (license license:bsd-2)))
3881
3882 ;; TODO also have a GUI version available
3883 (define-public mediainfo
3884 (package
3885 (name "mediainfo")
3886 (version "21.03")
3887 (source (origin
3888 (method url-fetch)
3889 ;; Warning: This source has proved unreliable 1 time at least.
3890 ;; Consider an alternate source or report upstream if this
3891 ;; happens again.
3892 (uri (string-append "https://mediaarea.net/download/source/"
3893 name "/" version "/"
3894 name "_" version ".tar.xz"))
3895 (sha256
3896 (base32
3897 "07h2a1lbw5ak6c9bcn8qydchl0wpgk945rf9sfcqjyv05h5wll6y"))))
3898 (native-inputs
3899 `(("autoconf" ,autoconf)
3900 ("automake" ,automake)
3901 ("libtool" ,libtool)
3902 ("pkg-config" ,pkg-config)
3903 ("zlib" ,zlib)
3904 ("libmediainfo" ,libmediainfo)
3905 ("libzen" ,libzen)))
3906 (build-system gnu-build-system)
3907 (arguments
3908 '(#:tests? #f ; lacks tests
3909 #:phases
3910 ;; build scripts not in root of archive
3911 (modify-phases %standard-phases
3912 (add-after 'unpack 'change-to-build-dir
3913 (lambda _
3914 (chdir "Project/GNU/CLI")
3915 #t)))))
3916 (home-page "https://mediaarea.net/en/MediaInfo")
3917 (synopsis "Utility for reading media metadata")
3918 (description "MediaInfo is a utility used for retrieving technical
3919 information and other metadata about audio or video files. It supports the
3920 many codecs and formats supported by libmediainfo.")
3921 (license license:bsd-2)))
3922
3923 (define-public atomicparsley
3924 (package
3925 (name "atomicparsley")
3926 (version "20200701.154658.b0d6223")
3927 (source (origin
3928 (method git-fetch)
3929 (uri (git-reference
3930 (url "https://github.com/wez/atomicparsley")
3931 (commit version)))
3932 (file-name (git-file-name name version))
3933 (sha256
3934 (base32
3935 "1kym2l5y34nmbrrlkfmxsf1cwrvch64kb34jp0hpa0b89idbhwqh"))))
3936 (build-system cmake-build-system)
3937 (arguments
3938 `(#:tests? #f ;; no tests included
3939 #:phases
3940 (modify-phases %standard-phases
3941 (add-before 'configure 'set-cmake-version
3942 (lambda* _
3943 (substitute* "CMakeLists.txt"
3944 ;; At the time of writing, Guix has CMake at 3.16, but
3945 ;; AtomicParsley uses 3.17. This brings the required CMake
3946 ;; version down to what Guix can afford.
3947 (("VERSION 3.17") "VERSION 3.16"))
3948 #t))
3949 (replace 'install
3950 (lambda* (#:key outputs #:allow-other-keys)
3951 (let* ((out (assoc-ref outputs "out"))
3952 (bin (string-append out "/bin")))
3953 (install-file "AtomicParsley" bin))
3954 #t)))))
3955 (inputs
3956 `(("zlib" ,zlib)))
3957 (synopsis "Metadata editor for MPEG-4 files")
3958 (description "AtomicParsley is a lightweight command line program for
3959 reading, parsing and setting metadata into MPEG-4 files, in particular,
3960 iTunes-style metadata.")
3961 (home-page "https://github.com/wez/atomicparsley")
3962 (license license:gpl2+)))
3963
3964 (define-public livemedia-utils
3965 (package
3966 (name "livemedia-utils")
3967 (version "2020.11.19")
3968 (source (origin
3969 (method url-fetch)
3970 (uri (string-append
3971 "https://download.videolan.org/contrib/live555/live."
3972 version ".tar.gz"))
3973 (sha256
3974 (base32
3975 "16w6yxdbmjdhvffnrb752dn4llf3l0wb00dgdkyia0vqsv2qqyn7"))))
3976 (build-system gnu-build-system)
3977 (arguments
3978 `(#:tests? #f ; no tests
3979 #:make-flags (list (string-append "CC=" ,(cc-for-target))
3980 (string-append "CXX=" ,(cxx-for-target))
3981 (string-append "LDFLAGS=-Wl,-rpath="
3982 (assoc-ref %outputs "out") "/lib")
3983 (string-append "PREFIX="
3984 (assoc-ref %outputs "out")))
3985 #:phases (modify-phases %standard-phases
3986 (add-before 'configure 'fix-makefiles-generation
3987 (lambda _
3988 (substitute* "genMakefiles"
3989 (("/bin/rm") "rm"))
3990 #t))
3991 (replace 'configure
3992 (lambda _
3993 (invoke "./genMakefiles"
3994 "linux-with-shared-libraries"))))))
3995 (inputs
3996 `(("openssl" ,openssl)))
3997 (home-page "http://www.live555.com/liveMedia/")
3998 (synopsis "Set of C++ libraries for multimedia streaming")
3999 (description "This code forms a set of C++ libraries for multimedia
4000 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
4001 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
4002 JPEG video, and several audio codecs. They can easily be extended to support
4003 additional (audio and/or video) codecs, and can also be used to build basic
4004 RTSP or SIP clients and servers.")
4005 (license license:lgpl3+)))
4006
4007 (define-public libdvbpsi
4008 (package
4009 (name "libdvbpsi")
4010 (version "1.3.3")
4011 (source (origin
4012 (method url-fetch)
4013 (uri (string-append
4014 "https://download.videolan.org/pub/libdvbpsi/"
4015 version "/libdvbpsi-" version ".tar.bz2"))
4016 (sha256
4017 (base32
4018 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
4019 (build-system gnu-build-system)
4020 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
4021 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
4022 tables")
4023 (description "libdvbpsi is a simple library designed for decoding and
4024 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
4025 and ITU-T H.222.0.")
4026 (license license:lgpl2.1)))
4027
4028 (define-public ffms2
4029 (package
4030 (name "ffms2")
4031 (version "2.23")
4032 (home-page "https://github.com/FFMS/ffms2")
4033 (source (origin
4034 (method git-fetch)
4035 (uri (git-reference
4036 (url "https://github.com/FFMS/ffms2")
4037 (commit version)))
4038 (file-name (git-file-name name version))
4039 (sha256
4040 (base32
4041 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
4042 (build-system gnu-build-system)
4043 (arguments
4044 '(#:configure-flags
4045 (list "--enable-avresample")))
4046 (inputs
4047 `(("zlib" ,zlib)))
4048 (propagated-inputs
4049 `(("ffmpeg" ,ffmpeg)))
4050 (native-inputs
4051 `(("pkg-config" ,pkg-config)))
4052 (synopsis "Cross-platform wrapper around ffmpeg/libav")
4053 (description
4054 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
4055 programmers to access a standard API to open and decompress media files.")
4056 ;; sources are distributed under a different license that the binary.
4057 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
4058 (license license:gpl2+))); inherits from ffmpeg
4059
4060 (define-public aegisub
4061 (package
4062 (name "aegisub")
4063 (version "3.2.2")
4064 (source (origin
4065 (method url-fetch)
4066 (uri (string-append
4067 "http://ftp.aegisub.org/pub/archives/releases/source/"
4068 name "-" version ".tar.xz"))
4069 (sha256
4070 (base32
4071 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
4072 (patches (search-patches "aegisub-icu59-include-unistr.patch"
4073 "aegisub-make43.patch"
4074 "aegisub-boost68.patch"))))
4075 (build-system gnu-build-system)
4076 (arguments
4077 `(#:configure-flags
4078 (list "--disable-update-checker"
4079 "--without-portaudio"
4080 "--without-openal"
4081 "--without-oss"
4082 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
4083 ;; tests require busted, a lua package we don't have yet
4084 #:tests? #f
4085 #:phases
4086 (modify-phases %standard-phases
4087 (add-before 'configure 'fix-ldflags
4088 (lambda _
4089 (setenv "LDFLAGS" "-pthread")
4090 #t))
4091 (add-after 'unpack 'fix-boost-headers
4092 (lambda _
4093 (substitute*
4094 '("src/subtitles_provider_libass.cpp"
4095 "src/colour_button.cpp"
4096 "src/video_provider_dummy.cpp"
4097 "./src/video_frame.cpp")
4098 (("#include <boost/gil/gil_all.hpp>")
4099 "#include <boost/gil.hpp>"))
4100 #t)))))
4101 (inputs
4102 `(("boost" ,boost)
4103 ("ffms2" ,ffms2)
4104 ("fftw" ,fftw)
4105 ("hunspell" ,hunspell)
4106 ("mesa" ,mesa)
4107 ("libass" ,libass)
4108 ("alsa-lib" ,alsa-lib)
4109 ("pulseaudio" ,pulseaudio)
4110 ("libx11" ,libx11)
4111 ("freetype" ,freetype)
4112 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
4113 (native-inputs
4114 `(("intltool" ,intltool)
4115 ("desktop-file-utils" ,desktop-file-utils)
4116 ("pkg-config" ,pkg-config)))
4117 (home-page "http://www.aegisub.org/")
4118 (synopsis "Subtitle engine")
4119 (description
4120 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
4121 it quick and easy to time subtitles to audio, and features many powerful
4122 tools for styling them, including a built-in real-time video preview.")
4123 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
4124 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
4125 license:expat)))) ; and src/gl that is under a license similar
4126 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
4127 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
4128 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
4129
4130 (define-public pitivi
4131 ;; Pitivi switched to a non-semantic versioning scheme close before 1.0
4132 (let ((latest-semver "0.999.0")
4133 (%version "2021.01.0"))
4134 (package
4135 (name "pitivi")
4136 (version (string-append latest-semver "-" %version))
4137 (source
4138 (origin
4139 (method git-fetch)
4140 (uri (git-reference
4141 (url "https://gitlab.gnome.org/GNOME/pitivi.git")
4142 (commit %version)))
4143 (file-name (git-file-name name version))
4144 (sha256
4145 (base32 "1jics10l16ismi5br6wxi4jxz3dd4p0c0xv8l0l3nvksvda4aafi"))))
4146 (build-system meson-build-system)
4147 (inputs
4148 `(("glib" ,glib)
4149 ("gst-editing-services" ,gst-editing-services)
4150 ("gstreamer" ,gstreamer)
4151 ("gst-plugins-base" ,gst-plugins-base)
4152 ("gst-plugins-good" ,gst-plugins-good)
4153 ("gst-plugins-bad"
4154 ,(gst-plugins/selection gst-plugins-bad
4155 #:plugins '("debugutils" "transcoder")
4156 #:configure-flags '("-Dintrospection=enabled")))
4157 ("gst-libav" ,gst-libav)
4158 ("gsound" ,gsound)
4159 ("gtk+" ,gtk+)
4160 ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
4161 ("libpeas" ,libpeas)
4162 ("libnotify" ,libnotify)
4163 ("pango" ,pango)
4164 ("python-gst" ,python-gst)
4165 ("python-numpy" ,python-numpy)
4166 ("python-matplotlib" ,python-matplotlib)
4167 ("python-pycairo" ,python-pycairo)
4168 ("python-pygobject" ,python-pygobject)))
4169 (native-inputs
4170 `(("gettext" ,gettext-minimal)
4171 ("glib:bin" ,glib "bin")
4172 ("itstool" ,itstool)
4173 ("pkg-config" ,pkg-config)))
4174 (arguments
4175 `(#:glib-or-gtk? #t
4176 #:phases
4177 (modify-phases %standard-phases
4178 (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
4179 (lambda* (#:key outputs #:allow-other-keys)
4180 (let ((prog (string-append (assoc-ref outputs "out")
4181 "/bin/pitivi")))
4182 (wrap-program prog
4183 `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
4184 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
4185 ;; We've only added inputs for what Pitivi deems either
4186 ;; necessary or optional. Let the user's packages take
4187 ;; precedence in case they have e.g. the full gst-plugins-bad.
4188 `("GST_PLUGIN_SYSTEM_PATH" suffix
4189 (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))
4190 #t)))))
4191 (home-page "http://www.pitivi.org")
4192 (synopsis "Video editor based on GStreamer Editing Services")
4193 (description "Pitivi is a video editor built upon the GStreamer Editing
4194 Services. It aims to be an intuitive and flexible application that can appeal
4195 to newbies and professionals alike.")
4196 (license license:lgpl2.1+))))
4197
4198 (define-public gavl
4199 (package
4200 (name "gavl")
4201 (version "1.4.0")
4202 (source
4203 (origin
4204 (method url-fetch)
4205 (uri (string-append "mirror://sourceforge/gmerlin/"
4206 name "/" version "/"
4207 name "-" version ".tar.gz"))
4208 (file-name (string-append name "-" version ".tar.gz"))
4209 (sha256
4210 (base32
4211 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
4212 (build-system gnu-build-system)
4213 (arguments
4214 '(#:configure-flags '("LIBS=-lm")))
4215 (native-inputs
4216 `(("pkg-config" ,pkg-config)
4217 ("doxygen" ,doxygen)))
4218 (home-page "http://gmerlin.sourceforge.net")
4219 (synopsis "Low level library for multimedia API building")
4220 (description
4221 "Gavl is short for Gmerlin Audio Video Library. It is a low level
4222 library, upon which multimedia APIs can be built. Gavl handles all the
4223 details of audio and video formats like colorspaces, sample rates,
4224 multichannel configurations, etc. It provides standardized definitions for
4225 those formats as well as container structures for carrying audio samples or
4226 video images inside an application.
4227
4228 In addition, it handles the sometimes ugly task of converting between all
4229 these formats and provides some elementary operations (copying, scaling,
4230 alpha blending etc).")
4231 (license license:gpl3)))
4232
4233 (define-public frei0r-plugins
4234 (package
4235 (name "frei0r-plugins")
4236 (version "1.7.0")
4237 (source
4238 (origin
4239 (method url-fetch)
4240 (uri (string-append "https://files.dyne.org/frei0r/"
4241 "frei0r-plugins-" version ".tar.gz"))
4242 (sha256
4243 (base32
4244 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
4245 (build-system gnu-build-system)
4246 (arguments
4247 `(#:phases
4248 (modify-phases %standard-phases
4249 (add-after 'unpack 'patch-Makefile
4250 (lambda _
4251 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
4252 ;; names in the tarball. Try removing this for future versions.
4253 (substitute* "Makefile.in"
4254 (("README\\.md ChangeLog TODO AUTHORS")
4255 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
4256 #t)))))
4257 ;; TODO: opencv for additional face detection filters.
4258 (inputs
4259 `(("gavl" ,gavl)
4260 ("cairo" ,cairo)))
4261 (native-inputs
4262 `(("pkg-config" ,pkg-config)))
4263 (home-page "https://www.dyne.org/software/frei0r/")
4264 (synopsis "Minimalistic plugin API for video effects")
4265 (description
4266 "Frei0r is a minimalistic plugin API for video effects.
4267 The main emphasis is on simplicity for an API that will round up
4268 the most common video effects into simple filters, sources and
4269 mixers that can be controlled by parameters. Frei0r wants to
4270 provide a way to share these simple effects between many
4271 applications, avoiding their reimplementation by different projects.
4272 It counts more than 100 plugins.")
4273 (license (list license:gpl2+
4274 ;; The following files are licensed as LGPL2.1+:
4275 ;; src/generator/ising0r/ising0r.c
4276 ;; src/generator/onecol0r/onecol0r.cpp
4277 ;; src/generator/nois0r/nois0r.cpp
4278 ;; src/generator/lissajous0r/lissajous0r.cpp
4279 ;; src/filter/ndvi/gradientlut.hpp
4280 ;; src/filter/ndvi/ndvi.cpp
4281 ;; src/filter/facedetect/facedetect.cpp
4282 license:lgpl2.1+))))
4283
4284 (define-public motion
4285 (package
4286 (name "motion")
4287 (version "4.3.2")
4288 (home-page "https://motion-project.github.io/")
4289 (source (origin
4290 (method git-fetch)
4291 (uri (git-reference
4292 (url "https://github.com/Motion-Project/motion")
4293 (commit (string-append "release-" version))))
4294 (sha256
4295 (base32
4296 "09xs815jsivcilpmnrx2jkcxirj4lg5kp99fkr0p2sdxw03myi95"))
4297 (file-name (git-file-name name version))))
4298 (build-system gnu-build-system)
4299 (native-inputs
4300 `(("autoconf" ,autoconf)
4301 ("automake" ,automake)
4302 ("gettext" ,gettext-minimal)
4303 ("pkg-config" ,pkg-config)))
4304 (inputs
4305 `(("libjpeg" ,libjpeg-turbo)
4306 ("ffmpeg" ,ffmpeg)
4307 ("libmicrohttpd" ,libmicrohttpd)
4308 ("sqlite" ,sqlite)))
4309 (arguments
4310 '(#:phases (modify-phases %standard-phases
4311 (replace 'bootstrap
4312 (lambda _
4313 (patch-shebang "scripts/version.sh")
4314 (invoke "autoreconf" "-vfi"))))
4315 #:configure-flags '("--sysconfdir=/etc")
4316 #:make-flags (list (string-append "sysconfdir="
4317 (assoc-ref %outputs "out")
4318 "/etc"))
4319
4320 #:tests? #f)) ; no 'check' target
4321 (synopsis "Detect motion from video signals")
4322 (description
4323 "Motion is a program that monitors the video signal from one or more
4324 cameras and is able to detect if a significant part of the picture has
4325 changed. Or in other words, it can detect motion.")
4326
4327 ;; Some files say "version 2" and others "version 2 or later".
4328 (license license:gpl2)))
4329
4330 (define-public subdl
4331 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
4332 (revision "1"))
4333 (package
4334 (name "subdl")
4335 (version (git-version "1.0.3" revision commit))
4336 (source (origin
4337 (method git-fetch)
4338 (uri (git-reference
4339 (url "https://github.com/alexanderwink/subdl")
4340 (commit commit)))
4341 (file-name (git-file-name name version))
4342 (sha256
4343 (base32
4344 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
4345 (build-system trivial-build-system)
4346 (arguments
4347 `(#:modules ((guix build utils))
4348 #:builder (begin
4349 (use-modules (guix build utils))
4350 (let* ((out (assoc-ref %outputs "out"))
4351 (bin (string-append out "/bin"))
4352 (source (assoc-ref %build-inputs "source"))
4353 (python (assoc-ref %build-inputs "python")))
4354 (install-file (string-append source "/subdl") bin)
4355 (patch-shebang (string-append bin "/subdl")
4356 (list (string-append python "/bin")))))))
4357 (inputs `(("python" ,python)))
4358 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
4359 (description "Subdl is a command-line tool for downloading subtitles from
4360 opensubtitles.org. By default, it will search for English subtitles, display
4361 the results, download the highest-rated result in the requested language and
4362 save it to the appropriate filename.")
4363 (license license:gpl3+)
4364 (home-page "https://github.com/alexanderwink/subdl"))))
4365
4366 (define-public l-smash
4367 (package
4368 (name "l-smash")
4369 (version "2.14.5")
4370 (source (origin
4371 (method git-fetch)
4372 (uri (git-reference
4373 (url "https://github.com/l-smash/l-smash")
4374 (commit (string-append "v" version))))
4375 (file-name (git-file-name name version))
4376 (sha256
4377 (base32
4378 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
4379 (build-system gnu-build-system)
4380 (arguments
4381 `(#:tests? #f ;no tests
4382 #:make-flags
4383 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
4384 (assoc-ref %outputs "out") "/lib"))
4385 #:phases
4386 (modify-phases %standard-phases
4387 ;; configure fails if it is followed by CONFIG_SHELL
4388 (replace 'configure
4389 (lambda* (#:key outputs #:allow-other-keys)
4390 (let ((out (assoc-ref outputs "out")))
4391 (invoke "./configure" (string-append "--prefix=" out)
4392 "--disable-static")))))))
4393 (native-inputs
4394 `(("which" ,which)))
4395 (home-page "https://l-smash.github.io/l-smash/")
4396 (synopsis "MP4 multiplexer and demultiplexer library")
4397 (description
4398 "L-SMASH is a cross-platform library that handles the ISO base media file
4399 format and some of its derived file formats, including MP4. It operates as a
4400 multiplexer and demultiplexer, and can mux video and audio in several formats
4401 using standalone executable files.")
4402 (license license:isc)))
4403
4404 (define-public qtfaststart
4405 (package
4406 (name "qtfaststart")
4407 (version "1.8")
4408 (source (origin
4409 (method url-fetch)
4410 (uri (pypi-uri "qtfaststart" version))
4411 (sha256
4412 (base32
4413 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
4414 (build-system python-build-system)
4415 (arguments
4416 '(#:tests? #f)) ; no test suite
4417 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
4418 (description "qtfaststart enables streaming and pseudo-streaming of
4419 QuickTime and MP4 files by moving metadata and offset information to the
4420 beginning of the file. It can also print some useful information about the
4421 structure of the file. This program is based on qt-faststart.c from the FFmpeg
4422 project, which is released into the public domain, as well as ISO 14496-12:2005
4423 (the official spec for MP4), which can be obtained from the ISO or found
4424 online.")
4425 (home-page "https://github.com/danielgtaylor/qtfaststart")
4426 (license license:expat)))
4427
4428 (define-public vidstab
4429 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
4430 (revision "0"))
4431 (package
4432 (name "vidstab")
4433 (version (git-version "1.1.0" revision commit))
4434 (source (origin
4435 (method git-fetch)
4436 (uri (git-reference
4437 (url "https://github.com/georgmartius/vid.stab")
4438 (commit commit)))
4439 (file-name (git-file-name name version))
4440 (sha256
4441 (base32
4442 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
4443 (build-system cmake-build-system)
4444 (arguments
4445 '(#:tests? #f)) ; tests are not run as part of standard build process
4446 (home-page "http://public.hronopik.de/vid.stab/")
4447 (synopsis "Video stabilization library")
4448 (description "Vidstab is a video stabilization library which can be used
4449 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
4450 vehicle typically suffers from undesirable shakes and jitters. Activities such
4451 as surfing, skiing, riding and walking while shooting videos are especially
4452 prone to erratic camera shakes. Vidstab targets these video contents to help
4453 create smoother and stable videos.")
4454 (license license:gpl2+))))
4455
4456 (define-public libopenshot
4457 (package
4458 (name "libopenshot")
4459 (version "0.2.5")
4460 (source (origin
4461 (method git-fetch)
4462 (uri (git-reference
4463 (url "https://github.com/OpenShot/libopenshot")
4464 (commit (string-append "v" version))))
4465 (file-name (git-file-name name version))
4466 (sha256
4467 (base32
4468 "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp"))
4469 (modules '((guix build utils)))
4470 (snippet '(begin
4471 ;; Allow overriding of the python installation dir
4472 (substitute* "src/bindings/python/CMakeLists.txt"
4473 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
4474 (string-append set " CACHE PATH "
4475 "\"Python bindings directory\")")))
4476 (delete-file-recursively "thirdparty")
4477 #t))))
4478 (build-system cmake-build-system)
4479 (native-inputs
4480 `(("pkg-config" ,pkg-config)
4481 ("python" ,python)
4482 ("swig" ,swig)
4483 ("unittest++" ,unittest-cpp)))
4484 (propagated-inputs ;all referenced in installed headers
4485 `(("cppzmq" ,cppzmq)
4486 ("ffmpeg" ,ffmpeg)
4487 ("imagemagick" ,imagemagick)
4488 ("jsoncpp" ,jsoncpp)
4489 ("libopenshot-audio" ,libopenshot-audio)
4490 ("qtbase" ,qtbase)
4491 ("qtmultimedia" ,qtmultimedia)
4492 ("zeromq" ,zeromq)))
4493 (arguments
4494 `(#:configure-flags
4495 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
4496 ,(version-major+minor (package-version python))
4497 "/site-packages")
4498 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
4499 #:phases
4500 (modify-phases %standard-phases
4501 (add-before 'configure 'set-vars
4502 (lambda* (#:key inputs #:allow-other-keys)
4503 (setenv "LIBOPENSHOT_AUDIO_DIR"
4504 (assoc-ref inputs "libopenshot-audio"))
4505 (setenv "ZMQDIR"
4506 (assoc-ref inputs "zeromq"))
4507 (setenv "UNITTEST_DIR"
4508 (string-append (assoc-ref inputs "unittest++")
4509 "/include/UnitTest++"))
4510 #t)))))
4511 (home-page "https://openshot.org")
4512 (synopsis "Video-editing, animation, and playback library")
4513 (description "OpenShot Library (libopenshot) is a powerful C++ video
4514 editing library with a multi-threaded and feature rich video editing
4515 API. It includes bindings for Python, Ruby, and other languages.")
4516 (license license:lgpl3+)))
4517
4518 (define-public openshot
4519 (package
4520 (name "openshot")
4521 (version "2.5.1")
4522 (source (origin
4523 (method git-fetch)
4524 (uri (git-reference
4525 (url "https://github.com/OpenShot/openshot-qt")
4526 (commit (string-append "v" version))))
4527 (file-name (git-file-name name version))
4528 (sha256
4529 (base32
4530 "0qc5i0ay6j2wab1whl41sjb71cj02pg6y79drf7asrprq8b2rmfq"))
4531 (modules '((guix build utils)))
4532 (snippet
4533 '(begin
4534 ;; TODO: Unbundle jquery and others from src/timeline/media
4535 (delete-file-recursively "src/images/fonts") #t))))
4536 (build-system python-build-system)
4537 (inputs
4538 `(("ffmpeg" ,ffmpeg)
4539 ("font-dejavu" ,font-dejavu)
4540 ("libopenshot" ,libopenshot)
4541 ("python" ,python)
4542 ("python-pyqt" ,python-pyqt)
4543 ("python-pyzmq" ,python-pyzmq)
4544 ("python-requests" ,python-requests)
4545 ("qtsvg" ,qtsvg)))
4546 (arguments
4547 `(#:modules ((guix build python-build-system)
4548 (guix build qt-utils)
4549 (guix build utils))
4550 #:imported-modules (,@%python-build-system-modules
4551 (guix build qt-utils))
4552 #:phases (modify-phases %standard-phases
4553 (delete 'build) ;install phase does all the work
4554 (replace 'check
4555 (lambda _
4556 (setenv "QT_QPA_PLATFORM" "offscreen")
4557 (invoke "python" "src/tests/query_tests.py")))
4558 (add-after 'unpack 'patch-font-location
4559 (lambda* (#:key inputs #:allow-other-keys)
4560 (let ((font (assoc-ref inputs "font-dejavu")))
4561 (substitute* "src/classes/app.py"
4562 (("info.IMAGES_PATH") (string-append "\"" font "\""))
4563 (("fonts") "share/fonts/truetype")
4564 (("[A-Za-z_-]+.ttf") "DejaVuSans.ttf")))
4565 #t))
4566 (add-before 'install 'set-tmp-home
4567 (lambda _
4568 ;; src/classes/info.py "needs" to create several
4569 ;; directories in $HOME when loaded during build
4570 (setenv "HOME" "/tmp")
4571 #t))
4572 (add-after 'install 'wrap-program
4573 (lambda* (#:key outputs #:allow-other-keys)
4574 (let ((out (assoc-ref outputs "out")))
4575 (wrap-qt-program out "openshot-qt"))
4576 #t)))))
4577 (home-page "https://www.openshot.org/")
4578 (synopsis "Video editor")
4579 (description "OpenShot takes your videos, photos, and music files and
4580 helps you create the film you have always dreamed of. Easily add sub-titles,
4581 transitions, and effects and then export your film to many common formats.")
4582 (license license:gpl3+)))
4583
4584 (define-public dav1d
4585 (package
4586 (name "dav1d")
4587 (version "0.9.0")
4588 (source
4589 (origin
4590 (method git-fetch)
4591 (uri (git-reference
4592 (url "https://code.videolan.org/videolan/dav1d.git")
4593 (commit version)))
4594 (file-name (git-file-name name version))
4595 (sha256
4596 (base32 "0ki3wlyaqr80gl1srbbd18dd5bs1sl9icxym8ar62abpvgzxl5yk"))))
4597 (build-system meson-build-system)
4598 (native-inputs `(("nasm" ,nasm)))
4599 (home-page "https://code.videolan.org/videolan/dav1d")
4600 (synopsis "AV1 decoder")
4601 (description "dav1d is a new AV1 cross-platform decoder, and focused on
4602 speed and correctness.")
4603 (license license:bsd-2)))
4604
4605 (define-public wlstream
4606 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
4607 (revision "1"))
4608 (package
4609 (name "wlstream")
4610 (version (git-version "0.0" revision commit))
4611 (source
4612 (origin
4613 (method git-fetch)
4614 (uri (git-reference
4615 (url "https://github.com/atomnuker/wlstream")
4616 (commit commit)))
4617 (file-name (git-file-name name version))
4618 (sha256
4619 (base32
4620 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
4621 (build-system meson-build-system)
4622 (native-inputs `(("libdrm" ,libdrm)
4623 ("pkg-config" ,pkg-config)))
4624 (inputs `(("ffmpeg" ,ffmpeg)
4625 ("pulseaudio" ,pulseaudio)
4626 ("wayland" ,wayland)
4627 ("wayland-protocols" ,wayland-protocols)))
4628 (home-page "https://github.com/atomnuker/wlstream")
4629 (synopsis "Screen capture tool for Wayland sessions")
4630 (description "Wlstream is a screen capture tool for recording audio and
4631 video from a Wayland session.")
4632 (license license:lgpl2.1+))))
4633
4634 (define-public gaupol
4635 (package
4636 (name "gaupol")
4637 (version "1.9")
4638 (source (origin
4639 (method git-fetch)
4640 (uri (git-reference
4641 (url "https://github.com/otsaloma/gaupol/")
4642 (commit version)))
4643 (file-name (git-file-name name version))
4644 (sha256
4645 (base32
4646 "1mmjg8nwhif2hmmp8i11643izwzdf839brqdai3ksfg0qkh8rnxk"))))
4647 (build-system python-build-system)
4648 (native-inputs
4649 `(("gettext" ,gettext-minimal)
4650 ("pkg-config" ,pkg-config)))
4651 (inputs
4652 `(("python-pygobject" ,python-pygobject)
4653 ("gtk+" ,gtk+)
4654 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
4655 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
4656 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
4657 ("iso-codes" ,iso-codes) ; Optional: Translations.
4658 ("gstreamer" ,gstreamer)
4659 ("gst-libav" ,gst-libav)
4660 ("gst-plugins-base" ,gst-plugins-base)
4661 ("gst-plugins-good" ,gst-plugins-good)
4662 ("gst-plugins-bad" ,gst-plugins-bad)
4663 ("gst-plugins-ugly" ,gst-plugins-ugly)))
4664 (arguments
4665 `(#:tests? #f ; Tests seem to require networking.
4666 #:phases
4667 (modify-phases %standard-phases
4668 ;; gaupol's setup.py script does not support one of the Python build
4669 ;; system's default flags, "--single-version-externally-managed".
4670 (replace 'install
4671 (lambda* (#:key outputs #:allow-other-keys)
4672 (invoke "python" "setup.py" "install"
4673 (string-append "--prefix=" (assoc-ref outputs "out"))
4674 "--root=/")))
4675 (add-after 'install 'wrap-gaupol
4676 (lambda* (#:key outputs #:allow-other-keys)
4677 (let ((out (assoc-ref outputs "out"))
4678 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
4679 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
4680 (wrap-program (string-append out "/bin/gaupol")
4681 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
4682 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
4683 #t))
4684 (add-after 'unpack 'patch-data-dir
4685 ;; Fix some path variables that setup.py seems to garble.
4686 (lambda* (#:key outputs #:allow-other-keys)
4687 (let ((out (assoc-ref outputs "out")))
4688 (substitute* "setup.py"
4689 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
4690 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
4691 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
4692 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
4693 #t))))))
4694 (synopsis "Editor for text-based subtitles")
4695 (description
4696 "Gaupol supports multiple subtitle file formats and provides means of
4697 creating subtitles, editing texts and timing subtitles to match video. The
4698 user interface features a builtin video player and is designed with attention
4699 to convenience of translating and batch processing of multiple documents.")
4700 (home-page "https://otsaloma.io/gaupol/")
4701 (license license:gpl3+)))
4702
4703 (define-public theorafile
4704 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
4705 (package
4706 (name "theorafile")
4707 (version (git-version "0.0.0" "1" commit))
4708 (source
4709 (origin
4710 (method git-fetch)
4711 (uri (git-reference
4712 (url "https://github.com/FNA-XNA/Theorafile")
4713 (commit commit)))
4714 (file-name (git-file-name name version))
4715 (sha256
4716 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
4717 (build-system gnu-build-system)
4718 (arguments
4719 '(#:make-flags '("CC=gcc")
4720 #:phases
4721 (modify-phases %standard-phases
4722 (delete 'configure)
4723 (replace 'check
4724 (lambda _
4725 (setenv "CC" "gcc")
4726 (invoke "make" "test")))
4727 (replace 'install
4728 (lambda* (#:key outputs #:allow-other-keys)
4729 (let ((out (assoc-ref outputs "out")))
4730 (install-file "libtheorafile.so" (string-append out "/lib"))
4731 (install-file "theorafile.h" (string-append out "/include")))
4732 #t)))))
4733 (native-inputs
4734 ;; For tests.
4735 `(("sdl2" ,sdl2)))
4736 (home-page "https://github.com/FNA-XNA/Theorafile")
4737 (synopsis "Ogg Theora Video Decoder Library")
4738 (description "Theorafile is a library for quickly and easily decoding Ogg
4739 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
4740 (license license:zlib))))
4741
4742 (define-public dvdbackup
4743 (package
4744 (name "dvdbackup")
4745 (version "0.4.2")
4746 (source
4747 (origin
4748 (method url-fetch)
4749 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
4750 "dvdbackup-" version "/"
4751 "dvdbackup-" version ".tar.xz"))
4752 (sha256
4753 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
4754 (build-system gnu-build-system)
4755 (inputs
4756 `(("libdvdcss" ,libdvdcss)
4757 ("libdvdread" ,libdvdread)))
4758 (home-page "http://dvdbackup.sourceforge.net")
4759 (synopsis "DVD video ripper")
4760 (description
4761 "A simple command line tool to backup video from a DVD. Decrypts the
4762 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
4763 transcode or reformat the videos in any way, producing perfect backups.")
4764 (license license:gpl3+)))
4765
4766 (define-public svt-av1
4767 (package
4768 (name "svt-av1")
4769 (version "0.8.7")
4770 (source
4771 (origin
4772 (method git-fetch)
4773 (uri (git-reference
4774 (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git")
4775 (commit (string-append "v" version))))
4776 (file-name (git-file-name name version))
4777 (sha256
4778 (base32 "1xlxb6kn6hqz9dxz0nd905m4i2mwjwq1330rbabwzmg4b66cdslg"))))
4779 (build-system cmake-build-system)
4780 ;; SVT-AV1 only supports 64-bit Intel-compatible CPUs.
4781 (supported-systems '("x86_64-linux"))
4782 (arguments
4783 ;; The test suite tries to download test data and git clone a 3rd-party
4784 ;; fork of libaom. Skip it.
4785 `(#:tests? #f
4786 #:phases
4787 (modify-phases %standard-phases
4788 (add-after 'install 'install-documentation
4789 (lambda* (#:key outputs #:allow-other-keys)
4790 (let* ((out (assoc-ref %outputs "out"))
4791 (doc (string-append out "/share/doc/svt-av1-" ,version)))
4792 (copy-recursively "../source/Docs" doc)
4793 #t))))))
4794 (native-inputs
4795 `(("yasm" ,yasm)))
4796 (synopsis "AV1 video codec")
4797 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
4798 work-in-progress, aiming to support video-on-demand and live streaming
4799 applications. It only supports Intel-compatible CPUs (x86).")
4800 (home-page "https://gitlab.com/AOMediaCodec/SVT-AV1")
4801 (license license:bsd-2)))
4802
4803 (define-public svt-vp9
4804 (package
4805 (name "svt-vp9")
4806 (version "0.3.0")
4807 (source (origin
4808 (method git-fetch)
4809 (uri (git-reference
4810 (url "https://github.com/OpenVisualCloud/SVT-VP9")
4811 (commit (string-append "v" version))))
4812 (file-name (git-file-name name version))
4813 (sha256
4814 (base32
4815 "1ypdiw4cq22llvm8jyszxdq6r1aydkj80dsxjarjn5b7c1f2q3ar"))))
4816 ;; SVT-VP9 only supports 64-bit Intel-compatible CPUs.
4817 (supported-systems '("x86_64-linux"))
4818 (build-system cmake-build-system)
4819 (arguments
4820 `(#:tests? #f ; No test suite
4821 #:phases
4822 (modify-phases %standard-phases
4823 (add-after 'install 'install-documentation
4824 (lambda* (#:key outputs #:allow-other-keys)
4825 (let* ((out (assoc-ref %outputs "out"))
4826 (doc (string-append out "/share/doc/" ,name "-" ,version)))
4827 (copy-recursively "../source/Docs" doc)
4828 #t))))))
4829 (native-inputs
4830 `(("yasm" ,yasm)))
4831 (home-page "https://github.com/OpenVisualCloud/SVT-VP9")
4832 (synopsis "VP9 video encoder")
4833 (description "SVT-VP9 is a VP9 video encoder implementation. It is focused
4834 on supporting video-on-demand and live encoding on Intel Xeon processors.")
4835 (license license:bsd-2)))
4836
4837 (define-public w-scan
4838 (package
4839 (name "w-scan")
4840 (version "20170107")
4841 (source
4842 (origin
4843 (method url-fetch)
4844 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
4845 version ".tar.bz2"))
4846 (sha256
4847 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
4848 (build-system gnu-build-system)
4849 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
4850 (description
4851 "This is a small command line utility used to perform frequency scans for
4852 DVB and ATSC transmissions without initial tuning data. It can print the
4853 result in several formats:
4854 @itemize
4855 @item VDR channels.conf,
4856 @item czap/tzap/xine/mplayer channels.conf,
4857 @item Gstreamer dvbsrc plugin,
4858 @item VLC xspf playlist,
4859 @item XML,
4860 @item initial tuning data for scan or dvbv5-scan.
4861 @end itemize\n")
4862 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
4863 (license license:gpl2+)))
4864
4865 (define-public rav1e
4866 (package
4867 (name "rav1e")
4868 (version "0.4.1")
4869 (source
4870 (origin
4871 (method url-fetch)
4872 (uri (crate-uri "rav1e" version))
4873 (file-name
4874 (string-append name "-" version ".tar.gz"))
4875 (sha256
4876 (base32
4877 "00rjil6qbrwfxhhlq9yvidxm0gp9qdbywhf5zvkj85lykbhyff09"))))
4878 (build-system cargo-build-system)
4879 (arguments
4880 `(#:cargo-inputs
4881 (("rust-aom-sys" ,rust-aom-sys-0.2)
4882 ("rust-arbitrary" ,rust-arbitrary-0.4)
4883 ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
4884 ("rust-arrayvec" ,rust-arrayvec-0.5)
4885 ("rust-av-metrics" ,rust-av-metrics-0.6)
4886 ("rust-backtrace" ,rust-backtrace-0.3)
4887 ("rust-bitstream-io" ,rust-bitstream-io-1)
4888 ("rust-byteorder" ,rust-byteorder-1)
4889 ("rust-cfg-if" ,rust-cfg-if-1)
4890 ("rust-clap" ,rust-clap-2)
4891 ("rust-console" ,rust-console-0.14)
4892 ("rust-crossbeam" ,rust-crossbeam-0.8)
4893 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
4894 ("rust-fern" ,rust-fern-0.6)
4895 ("rust-image" ,rust-image-0.23)
4896 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
4897 ("rust-itertools" ,rust-itertools-0.10)
4898 ("rust-ivf" ,rust-ivf-0.1)
4899 ("rust-libc" ,rust-libc-0.2)
4900 ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
4901 ("rust-log" ,rust-log-0.4)
4902 ("rust-nasm-rs" ,rust-nasm-rs-0.2)
4903 ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
4904 ("rust-num-derive" ,rust-num-derive-0.3)
4905 ("rust-num-traits" ,rust-num-traits-0.2)
4906 ("rust-paste" ,rust-paste-1)
4907 ("rust-rand" ,rust-rand-0.8)
4908 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
4909 ("rust-rayon" ,rust-rayon-1)
4910 ("rust-regex" ,rust-regex-1)
4911 ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
4912 ("rust-rustc-version" ,rust-rustc-version-0.3)
4913 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
4914 ("rust-serde" ,rust-serde-1)
4915 ("rust-signal-hook" ,rust-signal-hook-0.3)
4916 ("rust-simd-helpers" ,rust-simd-helpers-0.1)
4917 ("rust-thiserror" ,rust-thiserror-1)
4918 ("rust-toml" ,rust-toml-0.5)
4919 ("rust-v-frame" ,rust-v-frame-0.2)
4920 ("rust-vergen" ,rust-vergen-3)
4921 ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
4922 ("rust-y4m" ,rust-y4m-0.7))
4923 #:cargo-development-inputs
4924 (("rust-assert-cmd" ,rust-assert-cmd-1)
4925 ("rust-cc" ,rust-cc-1)
4926 ("rust-criterion" ,rust-criterion-0.3)
4927 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
4928 ("rust-pretty-assertions" ,rust-pretty-assertions-0.6)
4929 ("rust-rand" ,rust-rand-0.8)
4930 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
4931 ("rust-semver" ,rust-semver-0.11))
4932 #:phases
4933 (modify-phases %standard-phases
4934 (replace 'build
4935 (lambda* (#:key outputs #:allow-other-keys)
4936 (let ((out (assoc-ref outputs "out")))
4937 (invoke "cargo" "cinstall" "--release"
4938 (string-append "--prefix=" out))))))))
4939 (native-inputs
4940 `(("cargo-c" ,rust-cargo-c)
4941 ("nasm" ,nasm)))
4942 (home-page "https://github.com/xiph/rav1e/")
4943 (synopsis "Fast and safe AV1 encoder")
4944 (description "@code{rav1e} is an AV1 video encoder. It is designed to
4945 eventually cover all use cases, though in its current form it is most suitable
4946 for cases where libaom (the reference encoder) is too slow.")
4947 (license license:bsd-2)))
4948
4949 (define-public peek
4950 (package
4951 (name "peek")
4952 (version "1.5.1")
4953 (source
4954 (origin
4955 (method git-fetch)
4956 (uri (git-reference
4957 (url "https://github.com/phw/peek")
4958 (commit version)))
4959 (file-name (git-file-name name version))
4960 (sha256
4961 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
4962 (build-system meson-build-system)
4963 (arguments '(#:glib-or-gtk? #t))
4964 (inputs
4965 `(("gtk+" ,gtk+)))
4966 (native-inputs
4967 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
4968 ("gettext" ,gettext-minimal)
4969 ("glib:bin" ,glib "bin") ; for glib-compile-resources
4970 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
4971 ("pkg-config" ,pkg-config)
4972 ("vala" ,vala)))
4973 (home-page "https://github.com/phw/peek")
4974 (synopsis "Simple animated GIF screen recorder")
4975 (description
4976 "Peek makes it easy to create short screencasts of a screen area. It was
4977 built for the specific use case of recording screen areas, e.g. for easily
4978 showing UI features of your own apps or for showing a bug in bug reports.
4979 With Peek, you simply place the Peek window over the area you want to record
4980 and press \"Record\". Peek is optimized for generating animated GIFs, but you
4981 can also directly record to WebM or MP4 if you prefer.")
4982 (license license:gpl3+)))
4983
4984 (define-public wf-recorder
4985 (package
4986 (name "wf-recorder")
4987 (version "0.2.1")
4988 (source (origin
4989 (method git-fetch)
4990 (uri (git-reference
4991 (url "https://github.com/ammen99/wf-recorder")
4992 (commit (string-append "v" version))))
4993 (file-name (git-file-name name version))
4994 (sha256
4995 (base32
4996 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
4997 (build-system meson-build-system)
4998 (native-inputs
4999 `(("pkg-config" ,pkg-config)))
5000 (inputs
5001 `(("ffmpeg" ,ffmpeg)
5002 ("pulseaudio" ,pulseaudio)
5003 ("wayland" ,wayland)
5004 ("wayland-protocols" ,wayland-protocols)
5005 ("libx264" ,libx264)))
5006 (home-page "https://github.com/ammen99/wf-recorder")
5007 (synopsis "Screen recorder for wlroots-based compositors")
5008 (description
5009 "@code{wf-recorder} is a utility program for screen recording of
5010 wlroots-based compositors. More specifically, those that support
5011 @code{wlr-screencopy-v1} and @code{xdg-output}.")
5012 (license license:expat)))
5013
5014 (define-public guvcview
5015 (package
5016 (name "guvcview")
5017 (version "2.0.6")
5018 (source (origin
5019 (method url-fetch)
5020 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
5021 "src-" version ".tar.gz"))
5022 (sha256
5023 (base32
5024 "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m"))))
5025 (build-system gnu-build-system)
5026 (arguments
5027 ;; There are no tests and "make check" would fail on an intltool error.
5028 '(#:tests? #f))
5029 (native-inputs
5030 `(("pkg-config" ,pkg-config)
5031 ("intltool" ,intltool)))
5032 (inputs
5033 `(("gtk+" ,gtk+)
5034 ("eudev" ,eudev)
5035 ("libusb" ,libusb)
5036 ("v4l-utils" ,v4l-utils) ;libv4l2
5037 ("ffmpeg" ,ffmpeg) ;libavcodec, libavutil
5038 ("sdl2" ,sdl2)
5039 ("gsl" ,gsl)
5040 ("portaudio" ,portaudio)
5041 ("alsa-lib" ,alsa-lib)))
5042 (home-page "http://guvcview.sourceforge.net/")
5043 (synopsis "Control your webcam and capture videos and images")
5044 (description
5045 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
5046 webcam accessible with Video4Linux (V4L2) and to capture videos and images.
5047 It provides control over precise settings of the webcam such as exposure,
5048 brightness, contrast, and frame rate.")
5049
5050 ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
5051 (license license:gpl2+)))
5052
5053 (define-public get-iplayer
5054 (package
5055 (name "get-iplayer")
5056 (version "3.27")
5057 (source
5058 (origin
5059 (method git-fetch)
5060 (uri (git-reference
5061 (url "https://github.com/get-iplayer/get_iplayer")
5062 (commit (string-append "v" version))))
5063 (file-name (git-file-name name version))
5064 (sha256
5065 (base32 "077y31gg020wjpx5pcivqgkqawcjxh5kjnvq97x2gd7i3wwc30qi"))))
5066 (build-system perl-build-system)
5067 (arguments
5068 `(#:tests? #f ; no tests
5069 #:phases
5070 (modify-phases %standard-phases
5071 (delete 'configure)
5072 (delete 'build)
5073 (replace 'install
5074 (lambda* (#:key outputs #:allow-other-keys)
5075 (let* ((out (assoc-ref outputs "out"))
5076 (bin (string-append out "/bin"))
5077 (man (string-append out "/share/man/man1")))
5078 (install-file "get_iplayer" bin)
5079 (install-file "get_iplayer.cgi" bin)
5080 (install-file "get_iplayer.1" man))
5081 #t))
5082 (add-after 'install 'wrap-program
5083 (lambda* (#:key inputs outputs #:allow-other-keys)
5084 (let* ((out (assoc-ref outputs "out"))
5085 (perllib (string-append out "/lib/perl5/site_perl/"
5086 ,(package-version perl))))
5087 (wrap-program (string-append out "/bin/get_iplayer")
5088 `("PERL5LIB" ":"
5089 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5090 (wrap-program (string-append out "/bin/get_iplayer.cgi")
5091 `("PERL5LIB" ":"
5092 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5093 #t))))))
5094 (inputs
5095 `(("perl-mojolicious" ,perl-mojolicious)
5096 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
5097 ("perl-xml-libxml" ,perl-xml-libxml)))
5098 (home-page "https://github.com/get-iplayer/get_iplayer")
5099 (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
5100 (description "@code{get_iplayer} lists, searches and records BBC iPlayer
5101 TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
5102 @code{get_iplayer} has three modes: recording a complete programme for later
5103 playback, streaming a programme directly to a playback application, such as
5104 mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
5105 terms and recording programmes automatically. It can also stream or record live
5106 BBC iPlayer output.")
5107 (license license:gpl3+)))
5108
5109 (define-public ogmtools
5110 (package
5111 (name "ogmtools")
5112 (version "1.5")
5113 (source (origin
5114 (method url-fetch)
5115 (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-"
5116 version
5117 ".tar.bz2"))
5118 (sha256
5119 (base32
5120 "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"))))
5121 (build-system gnu-build-system)
5122 (inputs
5123 `(("libvorbis" ,libvorbis)
5124 ("libdvdread" ,libdvdread)))
5125 (synopsis "Information, extraction or creation for OGG media streams")
5126 (description
5127 "These tools allow information about (@code{ogminfo}) or extraction from
5128 \(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It
5129 includes @code{dvdxchap} tool for extracting chapter information from DVD.")
5130 (license license:gpl2)
5131 (home-page "https://www.bunkus.org/videotools/ogmtools/")))
5132
5133 (define-public libcaption
5134 (package
5135 (name "libcaption")
5136 (version "0.7")
5137 (source (origin
5138 (method git-fetch)
5139 (uri (git-reference
5140 (url "https://github.com/szatmary/libcaption")
5141 (commit version)))
5142 (file-name (git-file-name name version))
5143 (sha256
5144 (base32
5145 "16mhw8wpl7wdjj4n7rd1c294p1r8r322plj7z91crla5aah726rq"))))
5146 (build-system cmake-build-system)
5147 (arguments
5148 `(#:tests? #f ; Cannot figure out how to run the unit tests
5149 #:configure-flags '("-DENABLE_RE2C=ON")))
5150 (native-inputs
5151 `(("re2c" ,re2c)))
5152 (synopsis "CEA608 / CEA708 closed-caption codec")
5153 (description "Libcaption creates and parses closed-caption data,
5154 providing an encoder / decoder for the EIA608 and CEA708 closed-caption
5155 standards.
5156
5157 608 support is currently limited to encoding and decoding the necessary control
5158 and preamble codes as well as support for the Basic North American, Special
5159 North American and Extended Western European character sets.
5160
5161 708 support is limited to encoding the 608 data in NTSC field 1 user data type
5162 structure.
5163
5164 In addition, utility functions to create h.264 SEI (Supplementary enhancement
5165 information) NALUs (Network Abstraction Layer Unit) for inclusion into an h.264
5166 elementary stream are provided.")
5167 (home-page "https://github.com/szatmary/libcaption")
5168 (license license:expat)))