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