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