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