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