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