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