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