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