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