c02938db0888c3466b6d64e32588670d80896429
[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
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 gnu-build-system)
3031 (arguments
3032 `(#:tests? #f ; no tests
3033 #:make-flags '(,(string-append "CC=" (cc-for-target))
3034 ,(string-append "CXX=" (cxx-for-target)))
3035 #:configure-flags
3036 (list "--enable-gpl3"
3037 "--enable-gpl")
3038 #:phases
3039 (modify-phases %standard-phases
3040 (add-after
3041 'configure 'override-LDFLAGS
3042 (lambda* (#:key outputs #:allow-other-keys)
3043 (substitute* "config.mak"
3044 (("LDFLAGS\\+=")
3045 (string-append "LDFLAGS+=-Wl,-rpath="
3046 (assoc-ref outputs "out")
3047 "/lib ")))
3048 #t)))))
3049 (inputs
3050 `(("alsa-lib" ,alsa-lib)
3051 ("alsa-plugins" ,alsa-plugins "pulseaudio")
3052 ("ffmpeg" ,ffmpeg)
3053 ("fftw" ,fftw)
3054 ("frei0r-plugins" ,frei0r-plugins)
3055 ("gdk-pixbuf" ,gdk-pixbuf)
3056 ("gtk+" ,gtk+-2)
3057 ("libxml2" ,libxml2)
3058 ("jack" ,jack-1)
3059 ("ladspa" ,ladspa)
3060 ("libebur128" ,libebur128)
3061 ("libexif" ,libexif)
3062 ("libvorbis" ,libvorbis)
3063 ("rubberband" ,rubberband)
3064 ("libsamplerate" ,libsamplerate)
3065 ("pulseaudio" ,pulseaudio)
3066 ("qtbase" ,qtbase-5)
3067 ("qtsvg" ,qtsvg)
3068 ("rtaudio" ,rtaudio)
3069 ("sdl2" ,sdl2)
3070 ("sdl2-image" ,sdl2-image)
3071 ("sox" ,sox)
3072 ("vidstab" ,vidstab)))
3073 (native-inputs
3074 `(("pkg-config" ,pkg-config)))
3075 (home-page "https://www.mltframework.org/")
3076 (synopsis "Author, manage, and run multitrack audio/video compositions")
3077 (description
3078 "MLT is a multimedia framework, designed and developed for television
3079 broadcasting. It provides a toolkit for broadcasters, video editors, media
3080 players, transcoders, web streamers and many more types of applications. The
3081 functionality of the system is provided via an assortment of ready to use
3082 tools, XML authoring components, and an extensible plug-in based API.")
3083 (license license:lgpl2.1+)))
3084
3085 (define-public v4l-utils
3086 (package
3087 (name "v4l-utils")
3088 (version "1.20.0")
3089 (source (origin
3090 (method url-fetch)
3091 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
3092 "/v4l-utils-" version ".tar.bz2"))
3093 (sha256
3094 (base32
3095 "1xr66y6w422hil6s7n8d61a2vhwh4im8l267amf41jvw7xqihqcm"))))
3096 (build-system gnu-build-system)
3097 ;; Separate graphical tools in order to save almost 1 GiB on the closure
3098 ;; for the common case.
3099 (outputs '("out" "gui"))
3100 (arguments
3101 '(#:configure-flags
3102 (list "--disable-static"
3103 (string-append "--with-udevdir="
3104 (assoc-ref %outputs "out")
3105 "/lib/udev"))
3106 #:phases
3107 (modify-phases %standard-phases
3108 (add-after 'install 'split
3109 (lambda* (#:key outputs #:allow-other-keys)
3110 (let ((out (assoc-ref outputs "out"))
3111 (gui (assoc-ref outputs "gui")))
3112 (mkdir-p (string-append gui "/bin"))
3113 (mkdir-p (string-append gui "/share/man/man1"))
3114 (mkdir-p (string-append gui "/share/applications"))
3115 (for-each
3116 (lambda (prog)
3117 (for-each
3118 (lambda (file)
3119 (rename-file (string-append out file)
3120 (string-append gui file)))
3121 (list
3122 (string-append "/bin/" prog)
3123 (string-append "/share/man/man1/" prog ".1")
3124 (string-append "/share/applications/" prog ".desktop"))))
3125 '("qv4l2" "qvidcap"))
3126 (copy-recursively (string-append out "/share/icons")
3127 (string-append gui "/share/icons"))
3128 (delete-file-recursively (string-append out "/share/icons"))
3129 (rmdir (string-append out "/share/applications"))
3130 #t))))))
3131 (native-inputs
3132 `(("perl" ,perl)
3133 ("pkg-config" ,pkg-config)))
3134 (inputs
3135 `(("alsa-lib" ,alsa-lib)
3136 ("glu" ,glu)
3137 ("libjpeg" ,libjpeg-turbo)
3138 ("libx11" ,libx11)
3139 ("qtbase" ,qtbase-5)
3140 ("eudev" ,eudev)))
3141 (synopsis "Realtime video capture utilities for Linux")
3142 (description "The v4l-utils provide a series of libraries and utilities to
3143 be used for realtime video capture via Linux-specific APIs.")
3144 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
3145 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
3146 (license (list license:lgpl2.1+ license:gpl2))))
3147
3148 (define-public obs
3149 (package
3150 (name "obs")
3151 (version "27.0.1")
3152 (source (origin
3153 (method git-fetch)
3154 (uri (git-reference
3155 (url "https://github.com/obsproject/obs-studio")
3156 (commit version)
3157 (recursive? #t)))
3158 (file-name (git-file-name name version))
3159 (sha256
3160 (base32
3161 "04fzsr9yizmxy0r7z2706crvnsnybpnv5kgfn77znknxxjacfhkn"))
3162 (patches
3163 (search-patches "obs-modules-location.patch"))))
3164 (build-system cmake-build-system)
3165 (arguments
3166 `(#:configure-flags
3167 (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version)
3168 "-DENABLE_UNIT_TESTS=TRUE"
3169 ;; Browser plugin requires cef, but it is not packaged yet.
3170 ;; <https://bitbucket.org/chromiumembedded/cef/src/master/>
3171 "-DBUILD_BROWSER=FALSE")
3172 #:phases
3173 (modify-phases %standard-phases
3174 (add-after 'install 'wrap-executable
3175 (lambda* (#:key outputs #:allow-other-keys)
3176 (let ((out (assoc-ref outputs "out"))
3177 (plugin-path (getenv "QT_PLUGIN_PATH")))
3178 (wrap-program (string-append out "/bin/obs")
3179 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
3180 #t)))))
3181 (native-search-paths
3182 (list (search-path-specification
3183 (variable "OBS_PLUGINS_DIRECTORY")
3184 (separator #f) ;single entry
3185 (files '("lib/obs-plugins")))
3186 (search-path-specification
3187 (variable "OBS_PLUGINS_DATA_DIRECTORY")
3188 (separator #f) ;single entry
3189 (files '("share/obs/obs-plugins")))))
3190 (native-inputs
3191 `(("cmocka" ,cmocka)
3192 ("pkg-config" ,pkg-config)))
3193 (inputs
3194 `(("alsa-lib" ,alsa-lib)
3195 ("curl" ,curl)
3196 ("eudev" ,eudev)
3197 ("ffmpeg" ,ffmpeg)
3198 ("fontconfig" ,fontconfig)
3199 ("freetype" ,freetype)
3200 ("glib" ,glib)
3201 ("jack" ,jack-1)
3202 ("jansson" ,jansson)
3203 ("libx264" ,libx264)
3204 ("libxcomposite" ,libxcomposite)
3205 ("mbedtls" ,mbedtls-apache)
3206 ("mesa" ,mesa)
3207 ("pipewire" ,pipewire-0.3)
3208 ("pulseaudio" ,pulseaudio)
3209 ("qtbase" ,qtbase-5)
3210 ("qtsvg" ,qtsvg)
3211 ("qtx11extras" ,qtx11extras)
3212 ("speexdsp" ,speexdsp)
3213 ("v4l-utils" ,v4l-utils)
3214 ("wayland" ,wayland)
3215 ("wayland-protocols" ,wayland-protocols)
3216 ("zlib" ,zlib)))
3217 (synopsis "Live streaming software")
3218 (description "Open Broadcaster Software provides a graphical interface for
3219 video recording and live streaming. OBS supports capturing audio and video
3220 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
3221 and JACK.")
3222 (home-page "https://obsproject.com")
3223 (license license:gpl2+)))
3224
3225 (define-public obs-spectralizer
3226 (package
3227 (name "obs-spectralizer")
3228 (version "1.3.3")
3229 (source
3230 (origin
3231 (method git-fetch)
3232 (uri (git-reference
3233 (url "https://github.com/univrsal/spectralizer")
3234 (commit (string-append "v" version))))
3235 (file-name (git-file-name name version))
3236
3237 ;; Remove bundled Windows DLLs.
3238 (snippet '(delete-file-recursively "fftw3"))
3239 (modules '((guix build utils)))
3240
3241 (sha256
3242 (base32
3243 "0q75cnyqydpvfda51zm9gxqj3wqr99ad0lxzjhw0ld67qvj1ag6i"))))
3244 (build-system cmake-build-system)
3245 (arguments
3246 `(#:tests? #f
3247 #:configure-flags
3248 (list "-DGLOBAL_INSTALLATION=ON" "-DUSE_CMAKE_LIBDIR=ON")))
3249 (inputs `(("obs" ,obs)
3250 ("fftw" ,fftw)))
3251 (home-page "https://github.com/univrsal/spectralizer")
3252 (synopsis "OBS plugin for audio visualization")
3253 (description "This OBS plugins allows you to vizualize MPD and internal
3254 OBS audio sources.")
3255 (license license:gpl2)))
3256
3257 (define-public obs-websocket
3258 (package
3259 (name "obs-websocket")
3260 (version "4.9.0")
3261 (source
3262 (origin
3263 (method git-fetch)
3264 (uri (git-reference
3265 (url "https://github.com/Palakis/obs-websocket")
3266 (commit version)
3267 (recursive? #t)))
3268 (file-name (git-file-name name version))
3269 (sha256
3270 (base32 "1r47861ma1s3998clahbnbc216wcf706b1ps514k5p28h511l5w0"))))
3271 (build-system cmake-build-system)
3272 (arguments
3273 `(#:tests? #f ;no tests
3274 #:phases
3275 (modify-phases %standard-phases
3276 (add-after 'unpack 'remove-permission-change
3277 (lambda* _
3278 (substitute* "CMakeLists.txt"
3279 ;; Remove lines that set writeable permissions on outputs.
3280 (("set\\(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS") "")
3281 (("OWNER_READ.*\\)") "")
3282 (("PERMISSIONS") ")"))
3283 #t)))))
3284 (inputs
3285 `(("obs" ,obs)
3286 ("qtbase" ,qtbase-5)))
3287 (home-page "https://github.com/Palakis/obs-websocket")
3288 (synopsis "OBS plugin for remote control via WebSockets")
3289 (description "This OBS plugin allows you to establish a WebSocket channel
3290 from within your running OBS instance so that you can control it remotely from
3291 programs on your current machine or on other machines.")
3292 (license license:gpl2+)))
3293
3294 (define-public obs-wlrobs
3295 (package
3296 (name "obs-wlrobs")
3297 (version "1.0")
3298 (source
3299 (origin
3300 (method hg-fetch)
3301 (uri (hg-reference
3302 (url "https://hg.sr.ht/~scoopta/wlrobs")
3303 (changeset (string-append "v" version))))
3304 (file-name (git-file-name name version))
3305 (sha256
3306 (base32
3307 "1faiq2gdb7qis3m1hilm4pz8lkmkab75vzm608dbiazahhybf96p"))))
3308 (build-system meson-build-system)
3309 (native-inputs
3310 `(("pkg-config" ,pkg-config)))
3311 (propagated-inputs `() )
3312 (inputs `(("obs" ,obs)
3313 ("libx11" ,libx11 "out")
3314 ("wayland" ,wayland)
3315 ("wayland-protocols" ,wayland-protocols)))
3316 (home-page "https://hg.sr.ht/~scoopta/wlrobs")
3317 (synopsis "OBS plugin for Wayland (wlroots) screen capture")
3318 (description
3319 "This OBS plugin allows you to capture the screen on wlroots-based
3320 Wayland compositors.")
3321 (license license:gpl3+)))
3322
3323 (define-public libvdpau
3324 (package
3325 (name "libvdpau")
3326 (version "1.4")
3327 (source
3328 (origin
3329 (method git-fetch)
3330 (uri (git-reference
3331 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
3332 (commit version)))
3333 (file-name (git-file-name name version))
3334 (sha256
3335 (base32
3336 "1hc4mcrbr1yhfiy4zfd8wc2iiqbp90z6jswap0jia20vmyk5lqld"))))
3337 (build-system meson-build-system)
3338 (native-inputs
3339 `(("pkg-config" ,pkg-config)))
3340 (inputs
3341 `(("libx11" ,libx11 "out")
3342 ("libxext" ,libxext)
3343 ("xorgproto" ,xorgproto)))
3344 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3345 (synopsis "Video Decode and Presentation API")
3346 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
3347 provides an interface to video decode acceleration and presentation hardware
3348 present in modern GPUs.")
3349 (license (license:x11-style "file://COPYING"))))
3350
3351 (define-public vdpauinfo
3352 (package
3353 (name "vdpauinfo")
3354 (version "1.4")
3355 (source
3356 (origin
3357 (method git-fetch)
3358 (uri (git-reference
3359 (url "https://gitlab.freedesktop.org/vdpau/vdpauinfo")
3360 (commit version)))
3361 (file-name (git-file-name name version))
3362 (sha256
3363 (base32 "0s84bavxr39w0r7zfaac7kpbfsg88hgymqyzcr0yvbj1yry3liz2"))))
3364 (build-system gnu-build-system)
3365 (arguments
3366 `(#:phases
3367 (modify-phases %standard-phases
3368 (replace 'bootstrap
3369 ;; ./autogen.sh runs ./configure too soon.
3370 (lambda _
3371 (invoke "autoreconf" "-fiv"))))))
3372 (native-inputs
3373 `(("autoconf" ,autoconf)
3374 ("automake" ,automake)
3375 ("libx11" ,libx11)
3376 ("pkg-config" ,pkg-config)))
3377 (propagated-inputs
3378 `(("libvdpau" ,libvdpau)))
3379 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3380 (synopsis "Tool to query the capabilities of a VDPAU implementation")
3381 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
3382 implementation.")
3383 (license (license:x11-style "file://COPYING"))))
3384
3385 (define-public libvdpau-va-gl
3386 (package
3387 (name "libvdpau-va-gl")
3388 (version "0.4.2")
3389 (source
3390 (origin
3391 (method url-fetch)
3392 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
3393 "releases/download/v" version "/libvdpau-va-gl-"
3394 version ".tar.gz"))
3395 (sha256
3396 (base32
3397 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
3398 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
3399 (modules '((guix build utils)))
3400 (snippet '(begin (delete-file-recursively "3rdparty")
3401 #t))))
3402 (build-system cmake-build-system)
3403 (arguments
3404 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
3405 (native-inputs
3406 `(("libvdpau" ,libvdpau)
3407 ("pkg-config" ,pkg-config)))
3408 (inputs
3409 `(("libva" ,libva)
3410 ("mesa" ,mesa)))
3411 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
3412 (synopsis "VDPAU driver with VA-API/OpenGL backend")
3413 (description
3414 "Many applications can use VDPAU to accelerate portions of the video
3415 decoding process and video post-processing to the GPU video hardware. Since
3416 there is no VDPAU available on Intel chips, they fall back to different drawing
3417 techniques. This driver uses OpenGL under the hood to accelerate drawing and
3418 scaling and VA-API (if available) to accelerate video decoding.")
3419 (license license:expat)))
3420
3421 (define-public recordmydesktop
3422 (package
3423 (name "recordmydesktop")
3424 (version "0.3.8.1")
3425 (source (origin
3426 (method url-fetch)
3427 (uri (string-append "mirror://sourceforge/" name "/" name "/"
3428 version "/recordmydesktop-" version ".tar.gz"))
3429 (sha256
3430 (base32
3431 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
3432 (build-system gnu-build-system)
3433 (inputs `(("popt" ,popt)
3434 ("zlib" ,zlib)
3435 ("libx11" ,libx11)
3436 ("libice" ,libice)
3437 ("libsm" ,libsm)
3438 ("libxfixes" ,libxfixes)
3439 ("libxdamage" ,libxdamage)
3440 ("libxext" ,libxext)
3441 ("alsa-lib" ,alsa-lib)
3442 ("libvorbis" ,libvorbis)
3443 ("libtheora" ,libtheora)))
3444 (home-page "http://recordmydesktop.sourceforge.net/")
3445 (synopsis "Desktop session video recorder")
3446 (description
3447 "recordMyDesktop is a command-line tool that captures the activity in
3448 your graphical desktop and encodes it as a video. This is a useful tool for
3449 making @dfn{screencasts}.")
3450 (license license:gpl2+)))
3451
3452 (define-public simplescreenrecorder
3453 (package
3454 (name "simplescreenrecorder")
3455 (version "0.4.2")
3456 (source
3457 (origin
3458 (method git-fetch)
3459 (uri (git-reference
3460 (url "https://github.com/MaartenBaert/ssr")
3461 (commit version)))
3462 (file-name (git-file-name name version))
3463 (sha256
3464 (base32
3465 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
3466 (build-system cmake-build-system)
3467 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
3468 ;; README.md, the program builds and functions properly without them.
3469 ;; As a result, they are omitted. Please add them back if problems appear.
3470 (inputs
3471 `(("alsa-lib" ,alsa-lib)
3472 ("ffmpeg" ,ffmpeg)
3473 ("glu" ,glu)
3474 ("jack" ,jack-1)
3475 ("libxi" ,libxi)
3476 ("libxinerama" ,libxinerama)
3477 ("pulseaudio" ,pulseaudio)
3478 ("qtbase" ,qtbase-5)
3479 ("qtx11extras" ,qtx11extras)))
3480 (native-inputs `(("pkg-config" ,pkg-config)))
3481 (arguments
3482 `(#:configure-flags
3483 (list "-DWITH_QT5=TRUE")
3484 #:tests? #f)) ; no test suite
3485 ;; Using HTTPS causes part of the page to be displayed improperly.
3486 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
3487 (synopsis "Screen recorder")
3488 (description "SimpleScreenRecorder is an easy to use screen recorder with
3489 a graphical user interface. It supports recording the entire screen, or a
3490 part of it, and allows encoding in many different codecs and file formats.
3491 Other features include a live preview and live streaming.")
3492 (license (list license:gpl3+ ; most files
3493 license:zlib ; glinject/elfhacks.*
3494 license:isc ; glinject/*
3495 license:x11)))) ; build-aux/install-sh
3496
3497 (define-public libsmpeg
3498 (package
3499 (name "libsmpeg")
3500 (version "0.4.5-401")
3501 (source (origin
3502 (method svn-fetch)
3503 (uri (svn-reference
3504 (url "svn://svn.icculus.org/smpeg/trunk/")
3505 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
3506 (file-name (string-append name "-" version "-checkout"))
3507 (sha256
3508 (base32
3509 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
3510 (build-system gnu-build-system)
3511 (arguments
3512 ;; libsmpeg fails to build with -std=c++11, which is the default with
3513 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
3514 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
3515 (native-inputs
3516 `(("autoconf" ,autoconf)
3517 ("automake" ,automake)))
3518 (inputs
3519 `(("sdl" ,sdl2)))
3520 (home-page "https://icculus.org/smpeg/")
3521 (synopsis "SDL MPEG decoding library")
3522 (description
3523 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
3524 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
3525 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
3526 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
3527 and MPEG system streams.")
3528 (license (list license:expat
3529 license:lgpl2.1
3530 license:lgpl2.1+
3531 license:gpl2))))
3532
3533 ;; for btanks
3534 (define-public libsmpeg-with-sdl1
3535 (package (inherit libsmpeg)
3536 (name "libsmpeg")
3537 (version "0.4.5-399")
3538 (source (origin
3539 (method svn-fetch)
3540 (uri (svn-reference
3541 (url "svn://svn.icculus.org/smpeg/trunk/")
3542 (revision 399))) ; tagged release 0.4.5
3543 (file-name (string-append name "-" version "-checkout"))
3544 (sha256
3545 (base32
3546 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
3547 (inputs
3548 `(("sdl" ,sdl)))))
3549
3550 (define-public libbdplus
3551 (package
3552 (name "libbdplus")
3553 (version "0.1.2")
3554 (source
3555 (origin
3556 (method url-fetch)
3557 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
3558 version "/" name "-" version ".tar.bz2"))
3559 (sha256
3560 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
3561 (inputs
3562 `(("libgcrypt" ,libgcrypt)))
3563 (build-system gnu-build-system)
3564 (home-page "https://www.videolan.org/developers/libbdplus.html")
3565 (synopsis "Library for decrypting certain Blu-Ray discs")
3566 (description "libbdplus is a library which implements the BD+ System
3567 specifications.")
3568 (license license:lgpl2.1+)))
3569
3570 (define-public libaacs
3571 (package
3572 (name "libaacs")
3573 (version "0.11.0")
3574 (source
3575 (origin
3576 (method url-fetch)
3577 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
3578 version "/libaacs-" version ".tar.bz2"))
3579 (sha256
3580 (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d"))))
3581 (inputs
3582 `(("libgcrypt" ,libgcrypt)))
3583 (native-inputs
3584 `(("bison" ,bison)
3585 ("flex" ,flex)))
3586 (build-system gnu-build-system)
3587 (home-page "https://www.videolan.org/developers/libaacs.html")
3588 (synopsis "Library for decrypting certain Blu-Ray discs")
3589 (description "libaacs is a library which implements the Advanced Access
3590 Content System specification.")
3591 (license license:lgpl2.1+)))
3592
3593 (define-public mps-youtube
3594 (package
3595 (name "mps-youtube")
3596 (version "0.2.8")
3597 (source
3598 (origin
3599 (method git-fetch)
3600 (uri (git-reference
3601 (url "https://github.com/mps-youtube/mps-youtube")
3602 (commit (string-append "v" version))))
3603 (file-name (git-file-name name version))
3604 (sha256
3605 (base32
3606 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
3607 (build-system python-build-system)
3608 (arguments
3609 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
3610 ;; test suite results differ depending on the country and also introduce
3611 ;; non-determinism in the tests.
3612 ;; https://github.com/mps-youtube/mps-youtube/issues/556
3613 `(#:tests? #f))
3614 (propagated-inputs
3615 `(("python-pafy" ,python-pafy)
3616 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
3617 (home-page "https://github.com/mps-youtube/mps-youtube")
3618 (synopsis "Terminal based YouTube player and downloader")
3619 (description
3620 "@code{mps-youtube} is based on mps, a terminal based program to
3621 search, stream and download music. This implementation uses YouTube as
3622 a source of content and can play and download video as well as audio.
3623 It can use either mpv or mplayer for playback, and for conversion of
3624 formats ffmpeg or libav is used. Users should install one of the
3625 supported players in addition to this package.")
3626 (license license:gpl3+)))
3627
3628 (define-public handbrake
3629 (package
3630 (name "handbrake")
3631 (version "1.3.3")
3632 (source (origin
3633 (method url-fetch)
3634 (uri (string-append "https://github.com/HandBrake/HandBrake/"
3635 "releases/download/" version "/"
3636 "HandBrake-" version "-source.tar.bz2"))
3637 (sha256
3638 (base32
3639 "11bzhyp052bmng5119x74xvdj5632smx6qsk537ygda8bzckg2i1"))
3640 (modules '((guix build utils)))
3641 (snippet
3642 ;; Remove "contrib" and source not necessary for
3643 ;; building/running under a GNU environment.
3644 '(begin
3645 (for-each delete-file-recursively
3646 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
3647 (substitute* "make/include/main.defs"
3648 ;; Disable unconditional inclusion of "contrib" libraries
3649 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
3650 ;; which would lead to fetching and building of these
3651 ;; libraries. Use our own instead.
3652 (("MODULES \\+= contrib") "# MODULES += contrib"))
3653 #t))))
3654 (build-system glib-or-gtk-build-system)
3655 (native-inputs
3656 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
3657 ("autoconf" ,autoconf)
3658 ("intltool" ,intltool)
3659 ("libtool" ,libtool)
3660 ("pkg-config" ,pkg-config)
3661 ("python" ,python-2))) ; For configuration
3662 (inputs
3663 `(("bzip2" ,bzip2)
3664 ("dbus-glib" ,dbus-glib)
3665 ("ffmpeg" ,ffmpeg)
3666 ("fontconfig" ,fontconfig)
3667 ("freetype" ,freetype)
3668 ("glib" ,glib)
3669 ("gstreamer" ,gstreamer)
3670 ("gst-plugins-base" ,gst-plugins-base)
3671 ("gtk+" ,gtk+)
3672 ("jansson" ,jansson)
3673 ("lame" ,lame)
3674 ("libass" ,libass)
3675 ("libbluray" ,libbluray)
3676 ("libdav1d" ,dav1d)
3677 ("libdvdnav" ,libdvdnav)
3678 ("libdvdread" ,libdvdread)
3679 ("libgudev" ,libgudev)
3680 ("libmpeg2" ,libmpeg2)
3681 ("libnotify" ,libnotify)
3682 ("libnuma" ,numactl)
3683 ("libogg" ,libogg)
3684 ("libopus" ,opus)
3685 ("libsamplerate" ,libsamplerate)
3686 ("libtheora" ,libtheora)
3687 ("libvorbis" ,libvorbis)
3688 ("libvpx" ,libvpx)
3689 ("libxml2" ,libxml2)
3690 ("libx264" ,libx264)
3691 ("speex" ,speex)
3692 ("x265" ,x265)
3693 ("zlib" ,zlib)))
3694 (arguments
3695 `(#:tests? #f ;tests require Ruby and claim to be unsupported
3696 #:configure-flags
3697 (list "--disable-gtk-update-checks"
3698 "--disable-nvenc"
3699 (string-append "CPPFLAGS=-I"
3700 (assoc-ref %build-inputs "libxml2")
3701 "/include/libxml2")
3702 "LDFLAGS=-lx265")
3703 #:phases
3704 (modify-phases %standard-phases
3705 (replace 'bootstrap
3706 ;; Run bootstrap ahead of time so that shebangs get patched.
3707 (lambda _
3708 (setenv "CONFIG_SHELL" (which "sh"))
3709 ;; Patch the Makefile so that it doesn't bootstrap again.
3710 (substitute* "gtk/module.rules"
3711 ((".*autoreconf.*") ""))
3712 (with-directory-excursion "gtk"
3713 (invoke "autoreconf" "-fiv"))))
3714 (add-before 'configure 'patch-SHELL
3715 (lambda _
3716 (substitute* "gtk/po/Makefile.in.in"
3717 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
3718 #t))
3719 (add-before 'configure 'relax-reqs
3720 (lambda _
3721 (substitute* "make/configure.py"
3722 ;; cmake is checked for so that it can be used to build
3723 ;; contrib/harfbuzz and contrib/x265, but we get these as
3724 ;; inputs, so don't abort if it's not found. Similarly, meson
3725 ;; and ninja are only needed for contrib/libdav1d, and nasm
3726 ;; only for libvpx
3727 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
3728 (string-append & "False")))
3729 #t))
3730 (replace 'configure
3731 (lambda* (#:key outputs configure-flags #:allow-other-keys)
3732 ;; 'configure' is not an autoconf-generated script, and
3733 ;; errors on unrecognized arguments,
3734 ;; e.g. --enable-fast-install
3735 (let ((out (assoc-ref outputs "out")))
3736 (apply invoke "./configure"
3737 (string-append "--prefix=" out)
3738 (or configure-flags '())))))
3739 (add-after 'configure 'chdir-build
3740 (lambda _ (chdir "./build") #t)))))
3741 (home-page "https://handbrake.fr")
3742 (synopsis "Video transcoder")
3743 (description
3744 "HandBrake is a tool for converting video from any format to a selection
3745 of modern, widely supported codecs.")
3746 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
3747 ;; Combination under GPLv2. See LICENSE.
3748 (license license:gpl2)))
3749
3750 (define-public intel-vaapi-driver
3751 (package
3752 (name "intel-vaapi-driver")
3753 (version "2.4.1")
3754 (source
3755 (origin
3756 (method git-fetch)
3757 (uri (git-reference
3758 (url "https://github.com/intel/intel-vaapi-driver")
3759 (commit version)))
3760 (sha256
3761 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
3762 (file-name (git-file-name name version))))
3763 (build-system gnu-build-system)
3764 (native-inputs
3765 `(("autoconf" ,autoconf)
3766 ("automake" ,automake)
3767 ("libtool" ,libtool)
3768 ("pkg-config" ,pkg-config)))
3769 (inputs
3770 `(("libdrm" ,libdrm)
3771 ("libva" ,libva)
3772 ("libx11" ,libx11)))
3773 (arguments
3774 `(#:phases
3775 (modify-phases %standard-phases
3776 (add-before 'configure 'set-target-directory
3777 (lambda* (#:key outputs #:allow-other-keys)
3778 (let ((out (assoc-ref outputs "out")))
3779 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
3780 #t))))))
3781 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
3782 ;; this to all VA-API back ends instead of once to libva.
3783 (native-search-paths
3784 (list (search-path-specification
3785 (variable "LIBVA_DRIVERS_PATH")
3786 (files '("lib/dri")))))
3787 (supported-systems '("i686-linux" "x86_64-linux"))
3788 (home-page "https://01.org/linuxmedia/vaapi")
3789 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
3790 (description
3791 "This is the @acronym{VA-API, Video Acceleration API} back end required for
3792 hardware-accelerated video processing on Intel GEN Graphics devices supported by
3793 the i915 driver, such as integrated Intel HD Graphics. It provides access to
3794 both hardware and shader functionality for faster encoding, decoding, and
3795 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
3796 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
3797 license:expat)))) ; the rest, excluding the test suite
3798
3799 (define-public openh264
3800 (package
3801 (name "openh264")
3802 (version "2.1.1")
3803 (source (origin
3804 (method git-fetch)
3805 (uri (git-reference
3806 (url "https://github.com/cisco/openh264")
3807 (commit (string-append "v" version))))
3808 (file-name (git-file-name name version))
3809 (sha256
3810 (base32
3811 "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s"))))
3812 (build-system gnu-build-system)
3813 (native-inputs
3814 `(("nasm" ,nasm)
3815 ("python" ,python)))
3816 (arguments
3817 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3818 "CC=gcc")
3819 #:test-target "test"
3820 #:phases (modify-phases %standard-phases
3821 ;; no configure script
3822 (delete 'configure))))
3823 (home-page "https://www.openh264.org/")
3824 (synopsis "H264 decoder library")
3825 (description
3826 "Openh264 is a library which can decode H264 video streams.")
3827 (license license:bsd-2)))
3828
3829 (define-public libmp4v2
3830 (package
3831 (name "libmp4v2")
3832 (version "2.0.0")
3833 (source
3834 (origin
3835 (method url-fetch)
3836 ;; XXX: The new location of upstream is uncertain and will become relevant the
3837 ;; moment when the googlecode archive shuts down. It is past the date it
3838 ;; should've been turned off. I tried to communicate with upstream, but this
3839 ;; wasn't very responsive and not very helpful. The short summary is, it is
3840 ;; chaos when it comes to the amount of forks and only time will tell where
3841 ;; the new upstream location is.
3842 (uri (string-append "https://storage.googleapis.com/google-"
3843 "code-archive-downloads/v2/"
3844 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
3845 (file-name (string-append name "-" version ".tar.bz2"))
3846 (patches (search-patches "libmp4v2-c++11.patch"))
3847 (sha256
3848 (base32
3849 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
3850 (build-system gnu-build-system)
3851 (outputs '("out"
3852 "static")) ; 3.7MiB .a file
3853 (arguments
3854 `(#:phases
3855 (modify-phases %standard-phases
3856 (add-after 'unpack 'remove-dates
3857 (lambda _
3858 ;; Make the build reproducible.
3859 (substitute* "configure"
3860 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
3861 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
3862 #t))
3863 (add-after 'install 'move-static-libraries
3864 (lambda* (#:key outputs #:allow-other-keys)
3865 ;; Move static libraries to the "static" output.
3866 (let* ((out (assoc-ref outputs "out"))
3867 (lib (string-append out "/lib"))
3868 (static (assoc-ref outputs "static"))
3869 (slib (string-append static "/lib")))
3870 (mkdir-p slib)
3871 (for-each (lambda (file)
3872 (install-file file slib)
3873 (delete-file file))
3874 (find-files lib "\\.a$"))
3875 #t))))))
3876 (native-inputs
3877 `(("help2man" ,help2man)
3878 ("dejagnu" ,dejagnu)))
3879 (home-page "https://code.google.com/archive/p/mp4v2/")
3880 (synopsis "API to create and modify mp4 files")
3881 (description
3882 "The MP4v2 library provides an API to create and modify mp4 files as defined by
3883 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
3884 file format that has been used as a multimedia file format in a variety of platforms and
3885 applications. It is a very powerful and extensible format that can accommodate
3886 practically any type of media.")
3887 (license license:mpl1.1)))
3888
3889 (define-public libmediainfo
3890 (package
3891 (name "libmediainfo")
3892 (version "21.03")
3893 (source (origin
3894 (method url-fetch)
3895 (uri (string-append "https://mediaarea.net/download/source/"
3896 name "/" version "/"
3897 name "_" version ".tar.xz"))
3898 (sha256
3899 (base32
3900 "1jm4mk539wf3crgpcddgwdixshwdzm37mkb5441lifhcz2mykdsn"))))
3901 ;; TODO add a Big Buck Bunny webm for tests.
3902 (native-inputs
3903 `(("autoconf" ,autoconf)
3904 ("automake" ,automake)
3905 ("libtool" ,libtool)
3906 ("pkg-config" ,pkg-config)))
3907 (propagated-inputs
3908 `(("zlib" ,zlib)
3909 ("tinyxml2" ,tinyxml2)
3910 ("curl" ,curl) ; In Requires.private of libmediainfo.pc.
3911 ("libzen" ,libzen)))
3912 (build-system gnu-build-system)
3913 (arguments
3914 '(#:tests? #f ; see above TODO
3915 #:configure-flags
3916 (list "--with-libcurl" "--with-libtinyxml2")
3917 #:phases
3918 ;; build scripts not in root of archive
3919 (modify-phases %standard-phases
3920 (add-after 'unpack 'change-to-build-dir
3921 (lambda _
3922 (chdir "Project/GNU/Library")
3923 #t)))))
3924 (home-page "https://mediaarea.net/en/MediaInfo")
3925 (synopsis "Library for retrieving media metadata")
3926 (description "MediaInfo is a library used for retrieving technical
3927 information and other metadata about audio or video files. A non-exhaustive
3928 list of the information MediaInfo can retrieve from media files include:
3929
3930 @itemize
3931 @item General: title, author, director, album, track number, date, duration...
3932 @item Video: codec, aspect, fps, bitrate...
3933 @item Audio: codec, sample rate, channels, language, bitrate...
3934 @item Text: language of subtitle
3935 @item Chapters: number of chapters, list of chapters
3936 @end itemize
3937
3938 MediaInfo supports the following formats:
3939
3940 @itemize
3941 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
3942 MPEG-2, MPEG-4, DVD (VOB)...
3943 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
3944 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3945 @item Subtitles: SRT, SSA, ASS, SAMI...
3946 @end itemize\n")
3947 (license license:bsd-2)))
3948
3949 ;; TODO also have a GUI version available
3950 (define-public mediainfo
3951 (package
3952 (name "mediainfo")
3953 (version "21.03")
3954 (source (origin
3955 (method url-fetch)
3956 ;; Warning: This source has proved unreliable 1 time at least.
3957 ;; Consider an alternate source or report upstream if this
3958 ;; happens again.
3959 (uri (string-append "https://mediaarea.net/download/source/"
3960 name "/" version "/"
3961 name "_" version ".tar.xz"))
3962 (sha256
3963 (base32
3964 "07h2a1lbw5ak6c9bcn8qydchl0wpgk945rf9sfcqjyv05h5wll6y"))))
3965 (native-inputs
3966 `(("autoconf" ,autoconf)
3967 ("automake" ,automake)
3968 ("libtool" ,libtool)
3969 ("pkg-config" ,pkg-config)))
3970 (inputs
3971 `(("libmediainfo" ,libmediainfo)))
3972 (build-system gnu-build-system)
3973 (arguments
3974 '(#:tests? #f ; lacks tests
3975 #:phases
3976 ;; build scripts not in root of archive
3977 (modify-phases %standard-phases
3978 (add-after 'unpack 'change-to-build-dir
3979 (lambda _
3980 (chdir "Project/GNU/CLI")
3981 #t)))))
3982 (home-page "https://mediaarea.net/en/MediaInfo")
3983 (synopsis "Utility for reading media metadata")
3984 (description "MediaInfo is a utility used for retrieving technical
3985 information and other metadata about audio or video files. It supports the
3986 many codecs and formats supported by libmediainfo.")
3987 (license license:bsd-2)))
3988
3989 (define-public atomicparsley
3990 (package
3991 (name "atomicparsley")
3992 (version "20200701.154658.b0d6223")
3993 (source (origin
3994 (method git-fetch)
3995 (uri (git-reference
3996 (url "https://github.com/wez/atomicparsley")
3997 (commit version)))
3998 (file-name (git-file-name name version))
3999 (sha256
4000 (base32
4001 "1kym2l5y34nmbrrlkfmxsf1cwrvch64kb34jp0hpa0b89idbhwqh"))))
4002 (build-system cmake-build-system)
4003 (arguments
4004 `(#:tests? #f ;; no tests included
4005 #:phases
4006 (modify-phases %standard-phases
4007 (add-before 'configure 'set-cmake-version
4008 (lambda* _
4009 (substitute* "CMakeLists.txt"
4010 ;; At the time of writing, Guix has CMake at 3.16, but
4011 ;; AtomicParsley uses 3.17. This brings the required CMake
4012 ;; version down to what Guix can afford.
4013 (("VERSION 3.17") "VERSION 3.16"))
4014 #t))
4015 (replace 'install
4016 (lambda* (#:key outputs #:allow-other-keys)
4017 (let* ((out (assoc-ref outputs "out"))
4018 (bin (string-append out "/bin")))
4019 (install-file "AtomicParsley" bin))
4020 #t)))))
4021 (inputs
4022 `(("zlib" ,zlib)))
4023 (synopsis "Metadata editor for MPEG-4 files")
4024 (description "AtomicParsley is a lightweight command line program for
4025 reading, parsing and setting metadata into MPEG-4 files, in particular,
4026 iTunes-style metadata.")
4027 (home-page "https://github.com/wez/atomicparsley")
4028 (license license:gpl2+)))
4029
4030 (define-public livemedia-utils
4031 (package
4032 (name "livemedia-utils")
4033 (version "2020.11.19")
4034 (source (origin
4035 (method url-fetch)
4036 (uri (string-append
4037 "https://download.videolan.org/contrib/live555/live."
4038 version ".tar.gz"))
4039 (sha256
4040 (base32
4041 "16w6yxdbmjdhvffnrb752dn4llf3l0wb00dgdkyia0vqsv2qqyn7"))))
4042 (build-system gnu-build-system)
4043 (arguments
4044 `(#:tests? #f ; no tests
4045 #:make-flags (list (string-append "CC=" ,(cc-for-target))
4046 (string-append "CXX=" ,(cxx-for-target))
4047 (string-append "LDFLAGS=-Wl,-rpath="
4048 (assoc-ref %outputs "out") "/lib")
4049 (string-append "PREFIX="
4050 (assoc-ref %outputs "out")))
4051 #:phases (modify-phases %standard-phases
4052 (add-before 'configure 'fix-makefiles-generation
4053 (lambda _
4054 (substitute* "genMakefiles"
4055 (("/bin/rm") "rm"))
4056 #t))
4057 (replace 'configure
4058 (lambda _
4059 (invoke "./genMakefiles"
4060 "linux-with-shared-libraries"))))))
4061 (inputs
4062 `(("openssl" ,openssl)))
4063 (home-page "http://www.live555.com/liveMedia/")
4064 (synopsis "Set of C++ libraries for multimedia streaming")
4065 (description "This code forms a set of C++ libraries for multimedia
4066 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
4067 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
4068 JPEG video, and several audio codecs. They can easily be extended to support
4069 additional (audio and/or video) codecs, and can also be used to build basic
4070 RTSP or SIP clients and servers.")
4071 (license license:lgpl3+)))
4072
4073 (define-public libdvbpsi
4074 (package
4075 (name "libdvbpsi")
4076 (version "1.3.3")
4077 (source (origin
4078 (method url-fetch)
4079 (uri (string-append
4080 "https://download.videolan.org/pub/libdvbpsi/"
4081 version "/libdvbpsi-" version ".tar.bz2"))
4082 (sha256
4083 (base32
4084 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
4085 (build-system gnu-build-system)
4086 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
4087 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
4088 tables")
4089 (description "libdvbpsi is a simple library designed for decoding and
4090 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
4091 and ITU-T H.222.0.")
4092 (license license:lgpl2.1)))
4093
4094 (define-public ffms2
4095 (package
4096 (name "ffms2")
4097 (version "2.23")
4098 (home-page "https://github.com/FFMS/ffms2")
4099 (source (origin
4100 (method git-fetch)
4101 (uri (git-reference
4102 (url "https://github.com/FFMS/ffms2")
4103 (commit version)))
4104 (file-name (git-file-name name version))
4105 (sha256
4106 (base32
4107 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
4108 (build-system gnu-build-system)
4109 (arguments
4110 '(#:configure-flags
4111 (list "--enable-avresample")))
4112 (inputs
4113 `(("zlib" ,zlib)))
4114 (propagated-inputs
4115 `(("ffmpeg" ,ffmpeg)))
4116 (native-inputs
4117 `(("pkg-config" ,pkg-config)))
4118 (synopsis "Cross-platform wrapper around ffmpeg/libav")
4119 (description
4120 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
4121 programmers to access a standard API to open and decompress media files.")
4122 ;; sources are distributed under a different license that the binary.
4123 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
4124 (license license:gpl2+))); inherits from ffmpeg
4125
4126 (define-public aegisub
4127 (package
4128 (name "aegisub")
4129 (version "3.2.2")
4130 (source (origin
4131 (method url-fetch)
4132 (uri (string-append
4133 "http://ftp.aegisub.org/pub/archives/releases/source/"
4134 name "-" version ".tar.xz"))
4135 (sha256
4136 (base32
4137 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
4138 (patches (search-patches "aegisub-icu59-include-unistr.patch"
4139 "aegisub-make43.patch"
4140 "aegisub-boost68.patch"))))
4141 (build-system gnu-build-system)
4142 (arguments
4143 `(#:configure-flags
4144 (list "--disable-update-checker"
4145 "--without-portaudio"
4146 "--without-openal"
4147 "--without-oss"
4148 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
4149 ;; tests require busted, a lua package we don't have yet
4150 #:tests? #f
4151 #:phases
4152 (modify-phases %standard-phases
4153 (add-before 'configure 'fix-ldflags
4154 (lambda _
4155 (setenv "LDFLAGS" "-pthread")
4156 #t))
4157 (add-after 'unpack 'fix-boost-headers
4158 (lambda _
4159 (substitute*
4160 '("src/subtitles_provider_libass.cpp"
4161 "src/colour_button.cpp"
4162 "src/video_provider_dummy.cpp"
4163 "./src/video_frame.cpp")
4164 (("#include <boost/gil/gil_all.hpp>")
4165 "#include <boost/gil.hpp>"))
4166 #t)))))
4167 (inputs
4168 `(("boost" ,boost)
4169 ("ffms2" ,ffms2)
4170 ("fftw" ,fftw)
4171 ("hunspell" ,hunspell)
4172 ("mesa" ,mesa)
4173 ("libass" ,libass)
4174 ("alsa-lib" ,alsa-lib)
4175 ("pulseaudio" ,pulseaudio)
4176 ("libx11" ,libx11)
4177 ("freetype" ,freetype)
4178 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
4179 (native-inputs
4180 `(("intltool" ,intltool)
4181 ("desktop-file-utils" ,desktop-file-utils)
4182 ("pkg-config" ,pkg-config)))
4183 (home-page "http://www.aegisub.org/")
4184 (synopsis "Subtitle engine")
4185 (description
4186 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
4187 it quick and easy to time subtitles to audio, and features many powerful
4188 tools for styling them, including a built-in real-time video preview.")
4189 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
4190 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
4191 license:expat)))) ; and src/gl that is under a license similar
4192 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
4193 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
4194 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
4195
4196 (define-public pitivi
4197 ;; Pitivi switched to a non-semantic versioning scheme close before 1.0
4198 (let ((latest-semver "0.999.0")
4199 (%version "2021.01.0"))
4200 (package
4201 (name "pitivi")
4202 (version (string-append latest-semver "-" %version))
4203 (source
4204 (origin
4205 (method git-fetch)
4206 (uri (git-reference
4207 (url "https://gitlab.gnome.org/GNOME/pitivi.git")
4208 (commit %version)))
4209 (file-name (git-file-name name version))
4210 (sha256
4211 (base32 "1jics10l16ismi5br6wxi4jxz3dd4p0c0xv8l0l3nvksvda4aafi"))))
4212 (build-system meson-build-system)
4213 (inputs
4214 `(("glib" ,glib)
4215 ("gst-editing-services" ,gst-editing-services)
4216 ("gstreamer" ,gstreamer)
4217 ("gst-plugins-base" ,gst-plugins-base)
4218 ("gst-plugins-good" ,gst-plugins-good)
4219 ("gst-plugins-bad"
4220 ,(gst-plugins/selection gst-plugins-bad
4221 #:plugins '("debugutils" "transcoder")
4222 #:configure-flags '("-Dintrospection=enabled")))
4223 ("gst-libav" ,gst-libav)
4224 ("gsound" ,gsound)
4225 ("gtk+" ,gtk+)
4226 ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
4227 ("libpeas" ,libpeas)
4228 ("libnotify" ,libnotify)
4229 ("pango" ,pango)
4230 ("python-gst" ,python-gst)
4231 ("python-numpy" ,python-numpy)
4232 ("python-matplotlib" ,python-matplotlib)
4233 ("python-pycairo" ,python-pycairo)
4234 ("python-pygobject" ,python-pygobject)))
4235 (native-inputs
4236 `(("gettext" ,gettext-minimal)
4237 ("glib:bin" ,glib "bin")
4238 ("itstool" ,itstool)
4239 ("pkg-config" ,pkg-config)))
4240 (arguments
4241 `(#:glib-or-gtk? #t
4242 #:phases
4243 (modify-phases %standard-phases
4244 (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
4245 (lambda* (#:key outputs #:allow-other-keys)
4246 (let ((prog (string-append (assoc-ref outputs "out")
4247 "/bin/pitivi")))
4248 (wrap-program prog
4249 `("PYTHONPATH" = (,(getenv "PYTHONPATH")))
4250 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
4251 ;; We've only added inputs for what Pitivi deems either
4252 ;; necessary or optional. Let the user's packages take
4253 ;; precedence in case they have e.g. the full gst-plugins-bad.
4254 `("GST_PLUGIN_SYSTEM_PATH" suffix
4255 (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))
4256 #t)))))
4257 (home-page "http://www.pitivi.org")
4258 (synopsis "Video editor based on GStreamer Editing Services")
4259 (description "Pitivi is a video editor built upon the GStreamer Editing
4260 Services. It aims to be an intuitive and flexible application that can appeal
4261 to newbies and professionals alike.")
4262 (license license:lgpl2.1+))))
4263
4264 (define-public gavl
4265 (package
4266 (name "gavl")
4267 (version "1.4.0")
4268 (source
4269 (origin
4270 (method url-fetch)
4271 (uri (string-append "mirror://sourceforge/gmerlin/"
4272 name "/" version "/"
4273 name "-" version ".tar.gz"))
4274 (file-name (string-append name "-" version ".tar.gz"))
4275 (sha256
4276 (base32
4277 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
4278 (build-system gnu-build-system)
4279 (arguments
4280 '(#:configure-flags '("LIBS=-lm")))
4281 (native-inputs
4282 `(("pkg-config" ,pkg-config)
4283 ("doxygen" ,doxygen)))
4284 (home-page "http://gmerlin.sourceforge.net")
4285 (synopsis "Low level library for multimedia API building")
4286 (description
4287 "Gavl is short for Gmerlin Audio Video Library. It is a low level
4288 library, upon which multimedia APIs can be built. Gavl handles all the
4289 details of audio and video formats like colorspaces, sample rates,
4290 multichannel configurations, etc. It provides standardized definitions for
4291 those formats as well as container structures for carrying audio samples or
4292 video images inside an application.
4293
4294 In addition, it handles the sometimes ugly task of converting between all
4295 these formats and provides some elementary operations (copying, scaling,
4296 alpha blending etc).")
4297 (license license:gpl3)))
4298
4299 (define-public frei0r-plugins
4300 (package
4301 (name "frei0r-plugins")
4302 (version "1.7.0")
4303 (source
4304 (origin
4305 (method url-fetch)
4306 (uri (string-append "https://files.dyne.org/frei0r/"
4307 "frei0r-plugins-" version ".tar.gz"))
4308 (sha256
4309 (base32
4310 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
4311 (build-system gnu-build-system)
4312 (arguments
4313 `(#:phases
4314 (modify-phases %standard-phases
4315 (add-after 'unpack 'patch-Makefile
4316 (lambda _
4317 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
4318 ;; names in the tarball. Try removing this for future versions.
4319 (substitute* "Makefile.in"
4320 (("README\\.md ChangeLog TODO AUTHORS")
4321 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
4322 #t)))))
4323 ;; TODO: opencv for additional face detection filters.
4324 (inputs
4325 `(("gavl" ,gavl)
4326 ("cairo" ,cairo)))
4327 (native-inputs
4328 `(("pkg-config" ,pkg-config)))
4329 (home-page "https://www.dyne.org/software/frei0r/")
4330 (synopsis "Minimalistic plugin API for video effects")
4331 (description
4332 "Frei0r is a minimalistic plugin API for video effects.
4333 The main emphasis is on simplicity for an API that will round up
4334 the most common video effects into simple filters, sources and
4335 mixers that can be controlled by parameters. Frei0r wants to
4336 provide a way to share these simple effects between many
4337 applications, avoiding their reimplementation by different projects.
4338 It counts more than 100 plugins.")
4339 (license (list license:gpl2+
4340 ;; The following files are licensed as LGPL2.1+:
4341 ;; src/generator/ising0r/ising0r.c
4342 ;; src/generator/onecol0r/onecol0r.cpp
4343 ;; src/generator/nois0r/nois0r.cpp
4344 ;; src/generator/lissajous0r/lissajous0r.cpp
4345 ;; src/filter/ndvi/gradientlut.hpp
4346 ;; src/filter/ndvi/ndvi.cpp
4347 ;; src/filter/facedetect/facedetect.cpp
4348 license:lgpl2.1+))))
4349
4350 (define-public motion
4351 (package
4352 (name "motion")
4353 (version "4.3.2")
4354 (home-page "https://motion-project.github.io/")
4355 (source (origin
4356 (method git-fetch)
4357 (uri (git-reference
4358 (url "https://github.com/Motion-Project/motion")
4359 (commit (string-append "release-" version))))
4360 (sha256
4361 (base32
4362 "09xs815jsivcilpmnrx2jkcxirj4lg5kp99fkr0p2sdxw03myi95"))
4363 (file-name (git-file-name name version))))
4364 (build-system gnu-build-system)
4365 (native-inputs
4366 `(("autoconf" ,autoconf)
4367 ("automake" ,automake)
4368 ("gettext" ,gettext-minimal)
4369 ("pkg-config" ,pkg-config)))
4370 (inputs
4371 `(("libjpeg" ,libjpeg-turbo)
4372 ("ffmpeg" ,ffmpeg)
4373 ("libmicrohttpd" ,libmicrohttpd)
4374 ("sqlite" ,sqlite)))
4375 (arguments
4376 '(#:phases (modify-phases %standard-phases
4377 (replace 'bootstrap
4378 (lambda _
4379 (patch-shebang "scripts/version.sh")
4380 (invoke "autoreconf" "-vfi"))))
4381 #:configure-flags '("--sysconfdir=/etc")
4382 #:make-flags (list (string-append "sysconfdir="
4383 (assoc-ref %outputs "out")
4384 "/etc"))
4385
4386 #:tests? #f)) ; no 'check' target
4387 (synopsis "Detect motion from video signals")
4388 (description
4389 "Motion is a program that monitors the video signal from one or more
4390 cameras and is able to detect if a significant part of the picture has
4391 changed. Or in other words, it can detect motion.")
4392
4393 ;; Some files say "version 2" and others "version 2 or later".
4394 (license license:gpl2)))
4395
4396 (define-public subdl
4397 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
4398 (revision "1"))
4399 (package
4400 (name "subdl")
4401 (version (git-version "1.0.3" revision commit))
4402 (source (origin
4403 (method git-fetch)
4404 (uri (git-reference
4405 (url "https://github.com/alexanderwink/subdl")
4406 (commit commit)))
4407 (file-name (git-file-name name version))
4408 (sha256
4409 (base32
4410 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
4411 (build-system trivial-build-system)
4412 (arguments
4413 `(#:modules ((guix build utils))
4414 #:builder (begin
4415 (use-modules (guix build utils))
4416 (let* ((out (assoc-ref %outputs "out"))
4417 (bin (string-append out "/bin"))
4418 (source (assoc-ref %build-inputs "source"))
4419 (python (assoc-ref %build-inputs "python")))
4420 (install-file (string-append source "/subdl") bin)
4421 (patch-shebang (string-append bin "/subdl")
4422 (list (string-append python "/bin")))))))
4423 (inputs `(("python" ,python)))
4424 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
4425 (description "Subdl is a command-line tool for downloading subtitles from
4426 opensubtitles.org. By default, it will search for English subtitles, display
4427 the results, download the highest-rated result in the requested language and
4428 save it to the appropriate filename.")
4429 (license license:gpl3+)
4430 (home-page "https://github.com/alexanderwink/subdl"))))
4431
4432 (define-public l-smash
4433 (package
4434 (name "l-smash")
4435 (version "2.14.5")
4436 (source (origin
4437 (method git-fetch)
4438 (uri (git-reference
4439 (url "https://github.com/l-smash/l-smash")
4440 (commit (string-append "v" version))))
4441 (file-name (git-file-name name version))
4442 (sha256
4443 (base32
4444 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
4445 (build-system gnu-build-system)
4446 (arguments
4447 `(#:tests? #f ;no tests
4448 #:make-flags
4449 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
4450 (assoc-ref %outputs "out") "/lib"))
4451 #:phases
4452 (modify-phases %standard-phases
4453 ;; configure fails if it is followed by CONFIG_SHELL
4454 (replace 'configure
4455 (lambda* (#:key outputs #:allow-other-keys)
4456 (let ((out (assoc-ref outputs "out")))
4457 (invoke "./configure" (string-append "--prefix=" out)
4458 "--disable-static")))))))
4459 (native-inputs
4460 `(("which" ,which)))
4461 (home-page "https://l-smash.github.io/l-smash/")
4462 (synopsis "MP4 multiplexer and demultiplexer library")
4463 (description
4464 "L-SMASH is a cross-platform library that handles the ISO base media file
4465 format and some of its derived file formats, including MP4. It operates as a
4466 multiplexer and demultiplexer, and can mux video and audio in several formats
4467 using standalone executable files.")
4468 (license license:isc)))
4469
4470 (define-public qtfaststart
4471 (package
4472 (name "qtfaststart")
4473 (version "1.8")
4474 (source (origin
4475 (method url-fetch)
4476 (uri (pypi-uri "qtfaststart" version))
4477 (sha256
4478 (base32
4479 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
4480 (build-system python-build-system)
4481 (arguments
4482 '(#:tests? #f)) ; no test suite
4483 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
4484 (description "qtfaststart enables streaming and pseudo-streaming of
4485 QuickTime and MP4 files by moving metadata and offset information to the
4486 beginning of the file. It can also print some useful information about the
4487 structure of the file. This program is based on qt-faststart.c from the FFmpeg
4488 project, which is released into the public domain, as well as ISO 14496-12:2005
4489 (the official spec for MP4), which can be obtained from the ISO or found
4490 online.")
4491 (home-page "https://github.com/danielgtaylor/qtfaststart")
4492 (license license:expat)))
4493
4494 (define-public vidstab
4495 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
4496 (revision "0"))
4497 (package
4498 (name "vidstab")
4499 (version (git-version "1.1.0" revision commit))
4500 (source (origin
4501 (method git-fetch)
4502 (uri (git-reference
4503 (url "https://github.com/georgmartius/vid.stab")
4504 (commit commit)))
4505 (file-name (git-file-name name version))
4506 (sha256
4507 (base32
4508 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
4509 (build-system cmake-build-system)
4510 (arguments
4511 '(#:tests? #f)) ; tests are not run as part of standard build process
4512 (home-page "http://public.hronopik.de/vid.stab/")
4513 (synopsis "Video stabilization library")
4514 (description "Vidstab is a video stabilization library which can be used
4515 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
4516 vehicle typically suffers from undesirable shakes and jitters. Activities such
4517 as surfing, skiing, riding and walking while shooting videos are especially
4518 prone to erratic camera shakes. Vidstab targets these video contents to help
4519 create smoother and stable videos.")
4520 (license license:gpl2+))))
4521
4522 (define-public libopenshot
4523 (package
4524 (name "libopenshot")
4525 (version "0.2.5")
4526 (source (origin
4527 (method git-fetch)
4528 (uri (git-reference
4529 (url "https://github.com/OpenShot/libopenshot")
4530 (commit (string-append "v" version))))
4531 (file-name (git-file-name name version))
4532 (sha256
4533 (base32
4534 "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp"))
4535 (modules '((guix build utils)))
4536 (snippet '(begin
4537 ;; Allow overriding of the python installation dir
4538 (substitute* "src/bindings/python/CMakeLists.txt"
4539 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
4540 (string-append set " CACHE PATH "
4541 "\"Python bindings directory\")")))
4542 (delete-file-recursively "thirdparty")
4543 #t))))
4544 (build-system cmake-build-system)
4545 (native-inputs
4546 `(("pkg-config" ,pkg-config)
4547 ("python" ,python)
4548 ("swig" ,swig)
4549 ("unittest++" ,unittest-cpp)))
4550 (propagated-inputs ;all referenced in installed headers
4551 `(("cppzmq" ,cppzmq)
4552 ;; libopenshot doesn't yet build with ffmpeg 4.4 (see:
4553 ;; https://github.com/OpenShot/libopenshot/issues/676).
4554 ("ffmpeg" ,ffmpeg-4.3)
4555 ("imagemagick" ,imagemagick)
4556 ("jsoncpp" ,jsoncpp)
4557 ("libopenshot-audio" ,libopenshot-audio)
4558 ("qtbase" ,qtbase-5)
4559 ("qtmultimedia" ,qtmultimedia)
4560 ("zeromq" ,zeromq)))
4561 (arguments
4562 `(#:configure-flags
4563 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
4564 ,(version-major+minor (package-version python))
4565 "/site-packages")
4566 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
4567 #:phases
4568 (modify-phases %standard-phases
4569 (add-before 'configure 'set-vars
4570 (lambda* (#:key inputs #:allow-other-keys)
4571 (setenv "LIBOPENSHOT_AUDIO_DIR"
4572 (assoc-ref inputs "libopenshot-audio"))
4573 (setenv "ZMQDIR"
4574 (assoc-ref inputs "zeromq"))
4575 (setenv "UNITTEST_DIR"
4576 (string-append (assoc-ref inputs "unittest++")
4577 "/include/UnitTest++"))
4578 #t)))))
4579 (home-page "https://openshot.org")
4580 (synopsis "Video-editing, animation, and playback library")
4581 (description "OpenShot Library (libopenshot) is a powerful C++ video
4582 editing library with a multi-threaded and feature rich video editing
4583 API. It includes bindings for Python, Ruby, and other languages.")
4584 (license license:lgpl3+)))
4585
4586 (define-public openshot
4587 (package
4588 (name "openshot")
4589 (version "2.5.1")
4590 (source (origin
4591 (method git-fetch)
4592 (uri (git-reference
4593 (url "https://github.com/OpenShot/openshot-qt")
4594 (commit (string-append "v" version))))
4595 (file-name (git-file-name name version))
4596 (sha256
4597 (base32
4598 "0qc5i0ay6j2wab1whl41sjb71cj02pg6y79drf7asrprq8b2rmfq"))
4599 (modules '((guix build utils)))
4600 (snippet
4601 '(begin
4602 ;; TODO: Unbundle jquery and others from src/timeline/media
4603 (delete-file-recursively "src/images/fonts") #t))))
4604 (build-system python-build-system)
4605 (inputs
4606 `(("ffmpeg" ,ffmpeg)
4607 ("font-dejavu" ,font-dejavu)
4608 ("libopenshot" ,libopenshot)
4609 ("python" ,python)
4610 ("python-pyqt" ,python-pyqt)
4611 ("python-pyzmq" ,python-pyzmq)
4612 ("python-requests" ,python-requests)
4613 ("qtsvg" ,qtsvg)))
4614 (arguments
4615 `(#:modules ((guix build python-build-system)
4616 (guix build qt-utils)
4617 (guix build utils))
4618 #:imported-modules (,@%python-build-system-modules
4619 (guix build qt-utils))
4620 #:phases (modify-phases %standard-phases
4621 (delete 'build) ;install phase does all the work
4622 (replace 'check
4623 (lambda _
4624 (setenv "QT_QPA_PLATFORM" "offscreen")
4625 (invoke "python" "src/tests/query_tests.py")))
4626 (add-after 'unpack 'patch-font-location
4627 (lambda* (#:key inputs #:allow-other-keys)
4628 (let ((font (assoc-ref inputs "font-dejavu")))
4629 (substitute* "src/classes/app.py"
4630 (("info.IMAGES_PATH") (string-append "\"" font "\""))
4631 (("fonts") "share/fonts/truetype")
4632 (("[A-Za-z_-]+.ttf") "DejaVuSans.ttf")))
4633 #t))
4634 (add-before 'install 'set-tmp-home
4635 (lambda _
4636 ;; src/classes/info.py "needs" to create several
4637 ;; directories in $HOME when loaded during build
4638 (setenv "HOME" "/tmp")
4639 #t))
4640 (add-after 'install 'wrap-program
4641 (lambda* (#:key outputs inputs #:allow-other-keys)
4642 (let ((out (assoc-ref outputs "out")))
4643 (wrap-qt-program "openshot-qt"
4644 #:output out #:inputs inputs))
4645 #t)))))
4646 (home-page "https://www.openshot.org/")
4647 (synopsis "Video editor")
4648 (description "OpenShot takes your videos, photos, and music files and
4649 helps you create the film you have always dreamed of. Easily add sub-titles,
4650 transitions, and effects and then export your film to many common formats.")
4651 (license license:gpl3+)))
4652
4653 (define-public shotcut
4654 (package
4655 (name "shotcut")
4656 (version "21.03.21")
4657 (source
4658 (origin
4659 (method git-fetch)
4660 (uri (git-reference
4661 (url "https://github.com/mltframework/shotcut")
4662 (commit (string-append "v" version))))
4663 (file-name (git-file-name name version))
4664 (sha256
4665 (base32 "0jb488vynn0vmq22z51bg4hb4617732nva9rg52lzl89v5n8gmsi"))))
4666 (build-system qt-build-system)
4667 (arguments
4668 `(#:tests? #f ;there are no tests
4669 #:phases
4670 (modify-phases %standard-phases
4671 (replace 'configure
4672 (lambda* (#:key outputs #:allow-other-keys)
4673 (let* ((out (assoc-ref outputs "out")))
4674 (invoke "qmake"
4675 (string-append "PREFIX=" out)
4676 "QMAKE_LRELEASE=lrelease"
4677 "QMAKE_LUPDATE=lupdate"
4678 "shotcut.pro"))))
4679 (add-after 'install 'wrap-executable
4680 (lambda* (#:key inputs outputs #:allow-other-keys)
4681 (let* ((out (assoc-ref outputs "out"))
4682 (frei0r (assoc-ref inputs "frei0r-plugins"))
4683 (ffmpeg (assoc-ref inputs "ffmpeg"))
4684 (jack (assoc-ref inputs "jack"))
4685 (sdl2 (assoc-ref inputs "sdl2")))
4686 (wrap-program (string-append out "/bin/shotcut")
4687 `("PATH" ":" prefix
4688 ,(list (string-append ffmpeg "/bin")))
4689 `("LD_LIBRARY_PATH" ":" prefix
4690 ,(list (string-append jack "/lib" ":" sdl2 "/lib")))
4691 `("FREI0R_PATH" ":" =
4692 (,(string-append frei0r "/lib/frei0r-1/")))
4693 `("MLT_PREFIX" ":" =
4694 (,(assoc-ref inputs "mlt")))))
4695 #t)))))
4696 (native-inputs
4697 `(("pkg-config" ,pkg-config)
4698 ("python" ,python-wrapper)
4699 ("qttools" ,qttools)))
4700 (inputs
4701 `(("ffmpeg" ,ffmpeg)
4702 ("frei0r-plugins" ,frei0r-plugins)
4703 ("jack" ,jack-1)
4704 ("ladspa" ,ladspa)
4705 ("lame" ,lame)
4706 ("libvpx" ,libvpx)
4707 ("libx264" ,libx264)
4708 ("mlt" ,mlt)
4709 ("pulseaudio" ,pulseaudio)
4710 ("qtbase" ,qtbase-5)
4711 ("qtdeclarative" ,qtdeclarative)
4712 ("qtgraphicaleffects" ,qtgraphicaleffects)
4713 ("qtmultimedia" ,qtmultimedia)
4714 ("qtquickcontrols" ,qtquickcontrols)
4715 ("qtquickcontrols2" ,qtquickcontrols2)
4716 ("qtsvg" ,qtsvg)
4717 ("qtwebkit" ,qtwebkit)
4718 ("qtwebsockets" ,qtwebsockets)
4719 ("qtx11extras" ,qtx11extras)
4720 ("sdl2" ,sdl2)))
4721 (home-page "https://www.shotcut.org/")
4722 (synopsis "Video editor built on the MLT framework")
4723 (description
4724 "Shotcut is a video editor built on the MLT framework. Features include
4725 a wide range of formats through @code{ffmpeg}, 4k resolution support, webcam
4726 and audio capture, network stream playback, and many more.")
4727 (license license:gpl3+)))
4728
4729 (define-public dav1d
4730 (package
4731 (name "dav1d")
4732 (version "0.9.0")
4733 (source
4734 (origin
4735 (method git-fetch)
4736 (uri (git-reference
4737 (url "https://code.videolan.org/videolan/dav1d.git")
4738 (commit version)))
4739 (file-name (git-file-name name version))
4740 (sha256
4741 (base32 "0ki3wlyaqr80gl1srbbd18dd5bs1sl9icxym8ar62abpvgzxl5yk"))))
4742 (build-system meson-build-system)
4743 (native-inputs `(("nasm" ,nasm)))
4744 (home-page "https://code.videolan.org/videolan/dav1d")
4745 (synopsis "AV1 decoder")
4746 (description "dav1d is a new AV1 cross-platform decoder, and focused on
4747 speed and correctness.")
4748 (license license:bsd-2)))
4749
4750 (define-public wlstream
4751 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
4752 (revision "1"))
4753 (package
4754 (name "wlstream")
4755 (version (git-version "0.0" revision commit))
4756 (source
4757 (origin
4758 (method git-fetch)
4759 (uri (git-reference
4760 (url "https://github.com/atomnuker/wlstream")
4761 (commit commit)))
4762 (file-name (git-file-name name version))
4763 (sha256
4764 (base32
4765 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
4766 (build-system meson-build-system)
4767 (native-inputs `(("libdrm" ,libdrm)
4768 ("pkg-config" ,pkg-config)))
4769 (inputs `(("ffmpeg" ,ffmpeg)
4770 ("pulseaudio" ,pulseaudio)
4771 ("wayland" ,wayland)
4772 ("wayland-protocols" ,wayland-protocols)))
4773 (home-page "https://github.com/atomnuker/wlstream")
4774 (synopsis "Screen capture tool for Wayland sessions")
4775 (description "Wlstream is a screen capture tool for recording audio and
4776 video from a Wayland session.")
4777 (license license:lgpl2.1+))))
4778
4779 (define-public gaupol
4780 (package
4781 (name "gaupol")
4782 (version "1.9")
4783 (source (origin
4784 (method git-fetch)
4785 (uri (git-reference
4786 (url "https://github.com/otsaloma/gaupol/")
4787 (commit version)))
4788 (file-name (git-file-name name version))
4789 (sha256
4790 (base32
4791 "1mmjg8nwhif2hmmp8i11643izwzdf839brqdai3ksfg0qkh8rnxk"))))
4792 (build-system python-build-system)
4793 (native-inputs
4794 `(("gettext" ,gettext-minimal)
4795 ("pkg-config" ,pkg-config)))
4796 (inputs
4797 `(("python-pygobject" ,python-pygobject)
4798 ("gtk+" ,gtk+)
4799 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
4800 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
4801 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
4802 ("iso-codes" ,iso-codes) ; Optional: Translations.
4803 ("gstreamer" ,gstreamer)
4804 ("gst-libav" ,gst-libav)
4805 ("gst-plugins-base" ,gst-plugins-base)
4806 ("gst-plugins-good" ,gst-plugins-good)
4807 ("gst-plugins-bad" ,gst-plugins-bad)
4808 ("gst-plugins-ugly" ,gst-plugins-ugly)))
4809 (arguments
4810 `(#:tests? #f ; Tests seem to require networking.
4811 #:phases
4812 (modify-phases %standard-phases
4813 ;; gaupol's setup.py script does not support one of the Python build
4814 ;; system's default flags, "--single-version-externally-managed".
4815 (replace 'install
4816 (lambda* (#:key outputs #:allow-other-keys)
4817 (invoke "python" "setup.py" "install"
4818 (string-append "--prefix=" (assoc-ref outputs "out"))
4819 "--root=/")))
4820 (add-after 'install 'wrap-gaupol
4821 (lambda* (#:key outputs #:allow-other-keys)
4822 (let ((out (assoc-ref outputs "out"))
4823 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
4824 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
4825 (wrap-program (string-append out "/bin/gaupol")
4826 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
4827 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
4828 #t))
4829 (add-after 'unpack 'patch-data-dir
4830 ;; Fix some path variables that setup.py seems to garble.
4831 (lambda* (#:key outputs #:allow-other-keys)
4832 (let ((out (assoc-ref outputs "out")))
4833 (substitute* "setup.py"
4834 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
4835 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
4836 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
4837 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
4838 #t))))))
4839 (synopsis "Editor for text-based subtitles")
4840 (description
4841 "Gaupol supports multiple subtitle file formats and provides means of
4842 creating subtitles, editing texts and timing subtitles to match video. The
4843 user interface features a builtin video player and is designed with attention
4844 to convenience of translating and batch processing of multiple documents.")
4845 (home-page "https://otsaloma.io/gaupol/")
4846 (license license:gpl3+)))
4847
4848 (define-public theorafile
4849 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
4850 (package
4851 (name "theorafile")
4852 (version (git-version "0.0.0" "1" commit))
4853 (source
4854 (origin
4855 (method git-fetch)
4856 (uri (git-reference
4857 (url "https://github.com/FNA-XNA/Theorafile")
4858 (commit commit)))
4859 (file-name (git-file-name name version))
4860 (sha256
4861 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
4862 (build-system gnu-build-system)
4863 (arguments
4864 '(#:make-flags '("CC=gcc")
4865 #:phases
4866 (modify-phases %standard-phases
4867 (delete 'configure)
4868 (replace 'check
4869 (lambda _
4870 (setenv "CC" "gcc")
4871 (invoke "make" "test")))
4872 (replace 'install
4873 (lambda* (#:key outputs #:allow-other-keys)
4874 (let ((out (assoc-ref outputs "out")))
4875 (install-file "libtheorafile.so" (string-append out "/lib"))
4876 (install-file "theorafile.h" (string-append out "/include")))
4877 #t)))))
4878 (native-inputs
4879 ;; For tests.
4880 `(("sdl2" ,sdl2)))
4881 (home-page "https://github.com/FNA-XNA/Theorafile")
4882 (synopsis "Ogg Theora Video Decoder Library")
4883 (description "Theorafile is a library for quickly and easily decoding Ogg
4884 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
4885 (license license:zlib))))
4886
4887 (define-public dvdbackup
4888 (package
4889 (name "dvdbackup")
4890 (version "0.4.2")
4891 (source
4892 (origin
4893 (method url-fetch)
4894 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
4895 "dvdbackup-" version "/"
4896 "dvdbackup-" version ".tar.xz"))
4897 (sha256
4898 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
4899 (build-system gnu-build-system)
4900 (inputs
4901 `(("libdvdcss" ,libdvdcss)
4902 ("libdvdread" ,libdvdread)))
4903 (home-page "http://dvdbackup.sourceforge.net")
4904 (synopsis "DVD video ripper")
4905 (description
4906 "A simple command line tool to backup video from a DVD. Decrypts the
4907 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
4908 transcode or reformat the videos in any way, producing perfect backups.")
4909 (license license:gpl3+)))
4910
4911 (define-public svt-av1
4912 (package
4913 (name "svt-av1")
4914 (version "0.8.7")
4915 (source
4916 (origin
4917 (method git-fetch)
4918 (uri (git-reference
4919 (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git")
4920 (commit (string-append "v" version))))
4921 (file-name (git-file-name name version))
4922 (sha256
4923 (base32 "1xlxb6kn6hqz9dxz0nd905m4i2mwjwq1330rbabwzmg4b66cdslg"))))
4924 (build-system cmake-build-system)
4925 ;; SVT-AV1 only supports 64-bit Intel-compatible CPUs.
4926 (supported-systems '("x86_64-linux"))
4927 (arguments
4928 ;; The test suite tries to download test data and git clone a 3rd-party
4929 ;; fork of libaom. Skip it.
4930 `(#:tests? #f
4931 #:phases
4932 (modify-phases %standard-phases
4933 (add-after 'install 'install-documentation
4934 (lambda* (#:key outputs #:allow-other-keys)
4935 (let* ((out (assoc-ref %outputs "out"))
4936 (doc (string-append out "/share/doc/svt-av1-" ,version)))
4937 (copy-recursively "../source/Docs" doc)
4938 #t))))))
4939 (native-inputs
4940 `(("yasm" ,yasm)))
4941 (synopsis "AV1 video codec")
4942 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
4943 work-in-progress, aiming to support video-on-demand and live streaming
4944 applications. It only supports Intel-compatible CPUs (x86).")
4945 (home-page "https://gitlab.com/AOMediaCodec/SVT-AV1")
4946 (license license:bsd-2)))
4947
4948 (define-public svt-vp9
4949 (package
4950 (name "svt-vp9")
4951 (version "0.3.0")
4952 (source (origin
4953 (method git-fetch)
4954 (uri (git-reference
4955 (url "https://github.com/OpenVisualCloud/SVT-VP9")
4956 (commit (string-append "v" version))))
4957 (file-name (git-file-name name version))
4958 (sha256
4959 (base32
4960 "1ypdiw4cq22llvm8jyszxdq6r1aydkj80dsxjarjn5b7c1f2q3ar"))))
4961 ;; SVT-VP9 only supports 64-bit Intel-compatible CPUs.
4962 (supported-systems '("x86_64-linux"))
4963 (build-system cmake-build-system)
4964 (arguments
4965 `(#:tests? #f ; No test suite
4966 #:phases
4967 (modify-phases %standard-phases
4968 (add-after 'install 'install-documentation
4969 (lambda* (#:key outputs #:allow-other-keys)
4970 (let* ((out (assoc-ref %outputs "out"))
4971 (doc (string-append out "/share/doc/" ,name "-" ,version)))
4972 (copy-recursively "../source/Docs" doc)
4973 #t))))))
4974 (native-inputs
4975 `(("yasm" ,yasm)))
4976 (home-page "https://github.com/OpenVisualCloud/SVT-VP9")
4977 (synopsis "VP9 video encoder")
4978 (description "SVT-VP9 is a VP9 video encoder implementation. It is focused
4979 on supporting video-on-demand and live encoding on Intel Xeon processors.")
4980 (license license:bsd-2)))
4981
4982 (define-public w-scan
4983 (package
4984 (name "w-scan")
4985 (version "20170107")
4986 (source
4987 (origin
4988 (method url-fetch)
4989 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
4990 version ".tar.bz2"))
4991 (sha256
4992 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
4993 (build-system gnu-build-system)
4994 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
4995 (description
4996 "This is a small command line utility used to perform frequency scans for
4997 DVB and ATSC transmissions without initial tuning data. It can print the
4998 result in several formats:
4999 @itemize
5000 @item VDR channels.conf,
5001 @item czap/tzap/xine/mplayer channels.conf,
5002 @item Gstreamer dvbsrc plugin,
5003 @item VLC xspf playlist,
5004 @item XML,
5005 @item initial tuning data for scan or dvbv5-scan.
5006 @end itemize\n")
5007 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
5008 (license license:gpl2+)))
5009
5010 (define-public rav1e
5011 (package
5012 (name "rav1e")
5013 (version "0.4.1")
5014 (source
5015 (origin
5016 (method url-fetch)
5017 (uri (crate-uri "rav1e" version))
5018 (file-name
5019 (string-append name "-" version ".tar.gz"))
5020 (sha256
5021 (base32
5022 "00rjil6qbrwfxhhlq9yvidxm0gp9qdbywhf5zvkj85lykbhyff09"))))
5023 (build-system cargo-build-system)
5024 (arguments
5025 `(#:cargo-inputs
5026 (("rust-aom-sys" ,rust-aom-sys-0.2)
5027 ("rust-arbitrary" ,rust-arbitrary-0.4)
5028 ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
5029 ("rust-arrayvec" ,rust-arrayvec-0.5)
5030 ("rust-av-metrics" ,rust-av-metrics-0.6)
5031 ("rust-backtrace" ,rust-backtrace-0.3)
5032 ("rust-bitstream-io" ,rust-bitstream-io-1)
5033 ("rust-byteorder" ,rust-byteorder-1)
5034 ("rust-cfg-if" ,rust-cfg-if-1)
5035 ("rust-clap" ,rust-clap-2)
5036 ("rust-console" ,rust-console-0.14)
5037 ("rust-crossbeam" ,rust-crossbeam-0.8)
5038 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
5039 ("rust-fern" ,rust-fern-0.6)
5040 ("rust-image" ,rust-image-0.23)
5041 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5042 ("rust-itertools" ,rust-itertools-0.10)
5043 ("rust-ivf" ,rust-ivf-0.1)
5044 ("rust-libc" ,rust-libc-0.2)
5045 ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
5046 ("rust-log" ,rust-log-0.4)
5047 ("rust-nasm-rs" ,rust-nasm-rs-0.2)
5048 ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
5049 ("rust-num-derive" ,rust-num-derive-0.3)
5050 ("rust-num-traits" ,rust-num-traits-0.2)
5051 ("rust-paste" ,rust-paste-1)
5052 ("rust-rand" ,rust-rand-0.8)
5053 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5054 ("rust-rayon" ,rust-rayon-1)
5055 ("rust-regex" ,rust-regex-1)
5056 ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
5057 ("rust-rustc-version" ,rust-rustc-version-0.3)
5058 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
5059 ("rust-serde" ,rust-serde-1)
5060 ("rust-signal-hook" ,rust-signal-hook-0.3)
5061 ("rust-simd-helpers" ,rust-simd-helpers-0.1)
5062 ("rust-thiserror" ,rust-thiserror-1)
5063 ("rust-toml" ,rust-toml-0.5)
5064 ("rust-v-frame" ,rust-v-frame-0.2)
5065 ("rust-vergen" ,rust-vergen-3)
5066 ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
5067 ("rust-y4m" ,rust-y4m-0.7))
5068 #:cargo-development-inputs
5069 (("rust-assert-cmd" ,rust-assert-cmd-1)
5070 ("rust-cc" ,rust-cc-1)
5071 ("rust-criterion" ,rust-criterion-0.3)
5072 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5073 ("rust-pretty-assertions" ,rust-pretty-assertions-0.6)
5074 ("rust-rand" ,rust-rand-0.8)
5075 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5076 ("rust-semver" ,rust-semver-0.11))
5077 #:phases
5078 (modify-phases %standard-phases
5079 (replace 'build
5080 (lambda* (#:key outputs #:allow-other-keys)
5081 (let ((out (assoc-ref outputs "out")))
5082 (invoke "cargo" "cinstall" "--release"
5083 (string-append "--prefix=" out))))))))
5084 (native-inputs
5085 `(("cargo-c" ,rust-cargo-c)
5086 ("nasm" ,nasm)))
5087 (home-page "https://github.com/xiph/rav1e/")
5088 (synopsis "Fast and safe AV1 encoder")
5089 (description "@code{rav1e} is an AV1 video encoder. It is designed to
5090 eventually cover all use cases, though in its current form it is most suitable
5091 for cases where libaom (the reference encoder) is too slow.")
5092 (license license:bsd-2)))
5093
5094 (define-public peek
5095 (package
5096 (name "peek")
5097 (version "1.5.1")
5098 (source
5099 (origin
5100 (method git-fetch)
5101 (uri (git-reference
5102 (url "https://github.com/phw/peek")
5103 (commit version)))
5104 (file-name (git-file-name name version))
5105 (sha256
5106 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
5107 (build-system meson-build-system)
5108 (arguments '(#:glib-or-gtk? #t))
5109 (inputs
5110 `(("gtk+" ,gtk+)))
5111 (native-inputs
5112 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
5113 ("gettext" ,gettext-minimal)
5114 ("glib:bin" ,glib "bin") ; for glib-compile-resources
5115 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
5116 ("pkg-config" ,pkg-config)
5117 ("vala" ,vala)))
5118 (home-page "https://github.com/phw/peek")
5119 (synopsis "Simple animated GIF screen recorder")
5120 (description
5121 "Peek makes it easy to create short screencasts of a screen area. It was
5122 built for the specific use case of recording screen areas, e.g. for easily
5123 showing UI features of your own apps or for showing a bug in bug reports.
5124 With Peek, you simply place the Peek window over the area you want to record
5125 and press \"Record\". Peek is optimized for generating animated GIFs, but you
5126 can also directly record to WebM or MP4 if you prefer.")
5127 (license license:gpl3+)))
5128
5129 (define-public wf-recorder
5130 (package
5131 (name "wf-recorder")
5132 (version "0.2.1")
5133 (source (origin
5134 (method git-fetch)
5135 (uri (git-reference
5136 (url "https://github.com/ammen99/wf-recorder")
5137 (commit (string-append "v" version))))
5138 (file-name (git-file-name name version))
5139 (sha256
5140 (base32
5141 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
5142 (build-system meson-build-system)
5143 (native-inputs
5144 `(("pkg-config" ,pkg-config)))
5145 (inputs
5146 `(("ffmpeg" ,ffmpeg)
5147 ("pulseaudio" ,pulseaudio)
5148 ("wayland" ,wayland)
5149 ("wayland-protocols" ,wayland-protocols)
5150 ("libx264" ,libx264)))
5151 (home-page "https://github.com/ammen99/wf-recorder")
5152 (synopsis "Screen recorder for wlroots-based compositors")
5153 (description
5154 "@code{wf-recorder} is a utility program for screen recording of
5155 wlroots-based compositors. More specifically, those that support
5156 @code{wlr-screencopy-v1} and @code{xdg-output}.")
5157 (license license:expat)))
5158
5159 (define-public guvcview
5160 (package
5161 (name "guvcview")
5162 (version "2.0.6")
5163 (source (origin
5164 (method url-fetch)
5165 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
5166 "src-" version ".tar.gz"))
5167 (sha256
5168 (base32
5169 "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m"))))
5170 (build-system gnu-build-system)
5171 (arguments
5172 ;; There are no tests and "make check" would fail on an intltool error.
5173 '(#:tests? #f))
5174 (native-inputs
5175 `(("pkg-config" ,pkg-config)
5176 ("intltool" ,intltool)))
5177 (inputs
5178 `(("gtk+" ,gtk+)
5179 ("eudev" ,eudev)
5180 ("libusb" ,libusb)
5181 ("v4l-utils" ,v4l-utils) ;libv4l2
5182 ("ffmpeg" ,ffmpeg) ;libavcodec, libavutil
5183 ("sdl2" ,sdl2)
5184 ("gsl" ,gsl)
5185 ("portaudio" ,portaudio)
5186 ("alsa-lib" ,alsa-lib)))
5187 (home-page "http://guvcview.sourceforge.net/")
5188 (synopsis "Control your webcam and capture videos and images")
5189 (description
5190 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
5191 webcam accessible with Video4Linux (V4L2) and to capture videos and images.
5192 It provides control over precise settings of the webcam such as exposure,
5193 brightness, contrast, and frame rate.")
5194
5195 ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
5196 (license license:gpl2+)))
5197
5198 (define-public get-iplayer
5199 (package
5200 (name "get-iplayer")
5201 (version "3.27")
5202 (source
5203 (origin
5204 (method git-fetch)
5205 (uri (git-reference
5206 (url "https://github.com/get-iplayer/get_iplayer")
5207 (commit (string-append "v" version))))
5208 (file-name (git-file-name name version))
5209 (sha256
5210 (base32 "077y31gg020wjpx5pcivqgkqawcjxh5kjnvq97x2gd7i3wwc30qi"))))
5211 (build-system perl-build-system)
5212 (arguments
5213 `(#:tests? #f ; no tests
5214 #:phases
5215 (modify-phases %standard-phases
5216 (delete 'configure)
5217 (delete 'build)
5218 (replace 'install
5219 (lambda* (#:key outputs #:allow-other-keys)
5220 (let* ((out (assoc-ref outputs "out"))
5221 (bin (string-append out "/bin"))
5222 (man (string-append out "/share/man/man1")))
5223 (install-file "get_iplayer" bin)
5224 (install-file "get_iplayer.cgi" bin)
5225 (install-file "get_iplayer.1" man))
5226 #t))
5227 (add-after 'install 'wrap-program
5228 (lambda* (#:key inputs outputs #:allow-other-keys)
5229 (let* ((out (assoc-ref outputs "out"))
5230 (perllib (string-append out "/lib/perl5/site_perl/"
5231 ,(package-version perl))))
5232 (wrap-program (string-append out "/bin/get_iplayer")
5233 `("PERL5LIB" ":"
5234 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5235 (wrap-program (string-append out "/bin/get_iplayer.cgi")
5236 `("PERL5LIB" ":"
5237 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5238 #t))))))
5239 (inputs
5240 `(("perl-mojolicious" ,perl-mojolicious)
5241 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
5242 ("perl-xml-libxml" ,perl-xml-libxml)))
5243 (home-page "https://github.com/get-iplayer/get_iplayer")
5244 (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
5245 (description "@code{get_iplayer} lists, searches and records BBC iPlayer
5246 TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
5247 @code{get_iplayer} has three modes: recording a complete programme for later
5248 playback, streaming a programme directly to a playback application, such as
5249 mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
5250 terms and recording programmes automatically. It can also stream or record live
5251 BBC iPlayer output.")
5252 (license license:gpl3+)))
5253
5254 (define-public ogmtools
5255 (package
5256 (name "ogmtools")
5257 (version "1.5")
5258 (source (origin
5259 (method url-fetch)
5260 (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-"
5261 version
5262 ".tar.bz2"))
5263 (sha256
5264 (base32
5265 "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"))))
5266 (build-system gnu-build-system)
5267 (inputs
5268 `(("libvorbis" ,libvorbis)
5269 ("libdvdread" ,libdvdread)))
5270 (synopsis "Information, extraction or creation for OGG media streams")
5271 (description
5272 "These tools allow information about (@code{ogminfo}) or extraction from
5273 \(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It
5274 includes @code{dvdxchap} tool for extracting chapter information from DVD.")
5275 (license license:gpl2)
5276 (home-page "https://www.bunkus.org/videotools/ogmtools/")))
5277
5278 (define-public libcaption
5279 (package
5280 (name "libcaption")
5281 (version "0.7")
5282 (source (origin
5283 (method git-fetch)
5284 (uri (git-reference
5285 (url "https://github.com/szatmary/libcaption")
5286 (commit version)))
5287 (file-name (git-file-name name version))
5288 (sha256
5289 (base32
5290 "16mhw8wpl7wdjj4n7rd1c294p1r8r322plj7z91crla5aah726rq"))))
5291 (build-system cmake-build-system)
5292 (arguments
5293 `(#:tests? #f ; Cannot figure out how to run the unit tests
5294 #:configure-flags '("-DENABLE_RE2C=ON")))
5295 (native-inputs
5296 `(("re2c" ,re2c)))
5297 (synopsis "CEA608 / CEA708 closed-caption codec")
5298 (description "Libcaption creates and parses closed-caption data,
5299 providing an encoder / decoder for the EIA608 and CEA708 closed-caption
5300 standards.
5301
5302 608 support is currently limited to encoding and decoding the necessary control
5303 and preamble codes as well as support for the Basic North American, Special
5304 North American and Extended Western European character sets.
5305
5306 708 support is limited to encoding the 608 data in NTSC field 1 user data type
5307 structure.
5308
5309 In addition, utility functions to create h.264 SEI (Supplementary enhancement
5310 information) NALUs (Network Abstraction Layer Unit) for inclusion into an h.264
5311 elementary stream are provided.")
5312 (home-page "https://github.com/szatmary/libcaption")
5313 (license license:expat)))