gnu: mplayer: Return #t from all phases.
[jackhill/guix/guix.git] / gnu / packages / video.scm
index d9718e8..af45f0f 100644 (file)
@@ -1,27 +1,30 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
-;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
-;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015, 2016, 2017 Alex Vong <alexvong1995@gmail.com>
+;;; Copyright © 2015, 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
-;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
+;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
-;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
-;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
+;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,6 +44,7 @@
 (define-module (gnu packages video)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-26)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system meson)
+  #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
   #:use-module (guix build-system waf)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages avahi)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
@@ -88,6 +95,8 @@
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
+  #:use-module (gnu packages iso-codes)
+  #:use-module (gnu packages libidn)
   #:use-module (gnu packages libreoffice)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages rdesktop)
   #:use-module (gnu packages ruby)
+  #:use-module (gnu packages samba)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages upnp)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages vulkan)
   #:use-module (gnu packages web)
   #:use-module (gnu packages webkit)
   #:use-module (gnu packages wxwidgets)
                     (let ((out     (assoc-ref outputs "out"))
                           (ncurses (assoc-ref inputs "ncurses")))
                       (setenv "CONFIG_SHELL" (which "bash"))
-                      (zero? (system* "./configure"
-                                      (string-append "--prefix=" out)
-                                      (string-append "--build=" build)
-                                      ;; The ancient config.guess is unable to
-                                      ;; guess the host triplet on mips64el.
-                                      ,@(if (string=? "mips64el-linux"
-                                                      (%current-system))
-                                            '("--host=mips64el-unknown-linux-gnu")
-                                            '())
-                                      ;; The same is also true with aarch64.
-                                      ,@(if (string=? "aarch64-linux"
-                                                      (%current-system))
-                                            '("--host=aarch64-unknown-linux-gnu")
-                                            '())
-                                      (string-append "--with-ncurses="
-                                                     ncurses)))))))))
+                      (invoke "./configure"
+                              (string-append "--prefix=" out)
+                              (string-append "--build=" build)
+                              ;; The ancient config.guess is unable to
+                              ;; guess the host triplet on mips64el.
+                              ,@(if (string=? "mips64el-linux"
+                                              (%current-system))
+                                    '("--host=mips64el-unknown-linux-gnu")
+                                    '())
+                              ;; The same is also true with aarch64.
+                              ,@(if (string=? "aarch64-linux"
+                                              (%current-system))
+                                    '("--host=aarch64-unknown-linux-gnu")
+                                    '())
+                              (string-append "--with-ncurses="
+                                             ncurses))))))))
     (home-page "http://aa-project.sourceforge.net/aalib/")
     (synopsis "ASCII-art library")
     (description
@@ -200,9 +214,8 @@ old-fashioned output methods with powerful ascii-art renderer.")
                  (modify-phases %standard-phases
                    ;; XXX We need to run ./bootstrap because of the build
                    ;; system fixes above.
-                   (add-after
-                    'unpack 'bootstrap
-                    (lambda _ (zero? (system* "sh" "bootstrap")))))))
+                   (replace 'bootstrap
+                     (lambda _ (invoke "sh" "bootstrap"))))))
     (home-page "http://liba52.sourceforge.net/")
     (synopsis "ATSC A/52 stream decoder")
     (description "liba52 is a library for decoding ATSC A/52 streams.  The
@@ -240,18 +253,18 @@ television and DVD.  It is also known as AC-3.")
 (define-public libx264
   (package
     (name "libx264")
-    (version "20170316-2245")
+    (version "20180219-2245")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
-                                  "x264-snapshot-" version ".tar.bz2"))
+                                  "x264-snapshot-" version "-stable.tar.bz2"))
               (sha256
                (base32
-                "1s1nnvl3axz38sv4g09skijl6k9mbbngbb1nsh26w4dr2w2gyzad"))))
+                "1x0cg8l30wp84mr7q0ddp06jclm0kjrszazrx87d4k7js3qxjy8m"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("yasm" ,yasm)))
+       ("nasm" ,nasm)))
     ;; TODO: Add gpac input
     (arguments
      `(#:tests? #f  ;no check target
@@ -298,15 +311,15 @@ H.264 (MPEG-4 AVC) video streams.")
         (base32
          "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
        (modules '((guix build utils)))
-       (snippet
-        '(begin
-           ;; Delete bundled libraries.
-           (for-each delete-file-recursively
-                     '("lib/libebml"
-                       "lib/libmatroska"
-                       "lib/nlohmann-json"
-                       "lib/pugixml"
-                       "lib/utf8-cpp"))))))
+       (snippet '(begin
+                   ;; Delete bundled libraries.
+                   (for-each delete-file-recursively
+                             '("lib/libebml"
+                               "lib/libmatroska"
+                               "lib/nlohmann-json"
+                               "lib/pugixml"
+                               "lib/utf8-cpp"))
+                   #t))))
     (build-system gnu-build-system)
     (inputs
      `(("boost" ,boost)
@@ -354,13 +367,13 @@ H.264 (MPEG-4 AVC) video streams.")
          (replace 'build
            (lambda _
              (let ((-j (list "-j" (number->string (parallel-job-count)))))
-               (zero? (apply system* "rake" -j)))))
+               (apply invoke "rake" -j))))
          (replace 'check
            (lambda _
-             (zero? (system* "rake" "tests/unit"))))
+             (invoke "rake" "tests/unit")))
          (replace 'install
            (lambda _
-             (zero? (system* "rake" "install")))))))
+             (invoke "rake" "install"))))))
     (home-page "https://mkvtoolnix.download")
     (synopsis "Tools to create, alter and inspect Matroska files")
     (description
@@ -372,7 +385,7 @@ and creating Matroska files from other media files (@code{mkvmerge}).")
 (define-public x265
   (package
     (name "x265")
-    (version "2.4")
+    (version "2.8")
     (source
       (origin
         (method url-fetch)
@@ -380,15 +393,19 @@ and creating Matroska files from other media files (@code{mkvmerge}).")
                             "x265_" version ".tar.gz"))
         (sha256
          (base32
-          "0afp0xlk0fb4q6j4sh3hyvjnjccdp61sn21zg3fyqvwgswcafalw"))
+          "0qx8mavwdzdpkkby7n29i9av7zsnklavacwfz537mf62q2pzjnbf"))
+        (patches (search-patches "x265-fix-ppc64le-build.patch"))
         (modules '((guix build utils)))
-        (snippet
-         '(delete-file-recursively "source/compat/getopt"))))
+        (snippet '(begin
+                    (delete-file-recursively "source/compat/getopt")
+                    #t))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
-       ;; Currently the source code doesn't check for aarch64
-       ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
+       ;; Currently the source code doesn't check for aarch64.
+       ,@(if (any (cute string-prefix? <> (or (%current-system)
+                                              (%current-target-system)))
+                  '("armhf" "aarch64"))
            '(#:configure-flags '("-DENABLE_PIC=TRUE"))
            '())
        #:phases
@@ -464,7 +481,7 @@ canvas operations.")
 (define-public libdca
   (package
     (name "libdca")
-    (version "0.0.5")
+    (version "0.0.6")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -472,7 +489,7 @@ canvas operations.")
                     version "/libdca-" version ".tar.bz2"))
               (sha256
                (base32
-                "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
+                "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
     (build-system gnu-build-system)
     (home-page "https://www.videolan.org/developers/libdca.html")
     (synopsis "DTS Coherent Acoustics decoder")
@@ -507,25 +524,27 @@ SMPTE 314M.")
 (define-public libmatroska
   (package
     (name "libmatroska")
-    (version "1.4.7")
+    (version "1.4.9")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://dl.matroska.org/downloads/"
-                           name "/" name "-" version ".tar.bz2"))
+                           name "/" name "-" version ".tar.xz"))
        (sha256
         (base32
-         "1yi5cnv13nhl27xyqayd5l3sf0j3swfj3apzibv71yg9pariwi26"))))
-    (build-system gnu-build-system)
-    (native-inputs
-     `(("pkg-config" ,pkg-config)))
+         "1j4mjzx6mjzfjf9hz8g4w84krf5jccmr5cyynll0j1vwv3aiv9iq"))))
+    (build-system cmake-build-system)
     (inputs
      `(("libebml" ,libebml)))
+    (arguments
+     `(#:configure-flags
+       (list "-DBUILD_SHARED_LIBS=YES")
+       #:tests? #f))                    ; no test suite
     (home-page "https://www.matroska.org")
-    (synopsis "C++ libary to parse Matroska files (.mkv and .mka)")
+    (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
     (description
      "Matroska aims to become the standard of multimedia container formats.
-It is based on EBML (Extensible Binary Meta Language), a binary derivative
+It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
 of XML.  EBML enables the Matroska Development Team to gain significant
 advantages in terms of future format extensibility, without breaking file
 support in old parsers.
@@ -535,7 +554,7 @@ libebml is a C++ library to read and write EBML files.")
 (define-public libva
   (package
     (name "libva")
-    (version "1.8.3")
+    (version "2.1.0")
     (source
      (origin
        (method url-fetch)
@@ -547,7 +566,7 @@ libebml is a C++ library to read and write EBML files.")
              (string-append "https://www.freedesktop.org/software/vaapi/releases/"
                             "libva/libva-" version "/libva-" version ".tar.bz2")))
        (sha256
-        (base32 "16xbk0awl7wp0vy0nyjvxk11spbw25mp8kwd9bmhd6x9xffi5vjn"))))
+        (base32 "03sb1b3fxw8myf9kz6rxw5f3v1p0vfmk34779qx0q8fk24x9bypk"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -556,7 +575,8 @@ libebml is a C++ library to read and write EBML files.")
        ("libx11" ,libx11)
        ("libxext" ,libxext)
        ("libxfixes" ,libxfixes)
-       ("mesa" ,mesa)))
+       ("mesa" ,mesa)
+       ("wayland" ,wayland)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -566,7 +586,8 @@ libebml is a C++ library to read and write EBML files.")
             (let ((out (assoc-ref outputs "out")))
               (substitute* "va/drm/va_drm_auth_x11.c"
                 (("\"libva-x11\\.so\\.%d\"")
-                 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
+                 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
+              #t))))
        ;; Most drivers are in mesa's $prefix/lib/dri, so use that.  (Can be
        ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
        #:configure-flags
@@ -589,14 +610,14 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
 (define-public ffmpeg
   (package
     (name "ffmpeg")
-    (version "3.4.1")
+    (version "4.0.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1h4iz7q10wj04awr2wvmp60n7b09pfwrgwbbw9sgl7klcf52fxss"))))
+               "1vn04n0n46zdxq14cma3w8ml2ckh5jxwlybsc4xmvcqdqq0mqpv0"))))
     (build-system gnu-build-system)
     (inputs
      `(("fontconfig" ,fontconfig)
@@ -738,13 +759,13 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
                 (("#! /bin/sh") (string-append "#!" (which "sh"))))
               (setenv "SHELL" (which "bash"))
               (setenv "CONFIG_SHELL" (which "bash"))
-              (zero? (apply system*
-                            "./configure"
-                            (string-append "--prefix=" out)
-                            ;; Add $libdir to the RUNPATH of all the binaries.
-                            (string-append "--extra-ldflags=-Wl,-rpath="
-                                           out "/lib")
-                            configure-flags)))))
+              (apply invoke
+                     "./configure"
+                     (string-append "--prefix=" out)
+                     ;; Add $libdir to the RUNPATH of all the binaries.
+                     (string-append "--extra-ldflags=-Wl,-rpath="
+                                    out "/lib")
+                     configure-flags))))
          (add-before
           'check 'set-ld-library-path
           (lambda _
@@ -762,17 +783,29 @@ convert and stream audio and video.  It includes the libavcodec
 audio/video codec library.")
     (license license:gpl2+)))
 
+(define-public ffmpeg-3.4
+  (package
+    (inherit ffmpeg)
+    (version "3.4.2")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "0h6prjn1ijkzzhkyj8mazp0wpx7m0n9ycadjxagf9czqirbyk4ib"))))))
+
 (define-public ffmpeg-2.8
   (package
     (inherit ffmpeg)
-    (version "2.8.13")
+    (version "2.8.14")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "0hyqr391pika4vgynv90bacz11wdpqcqfgj5h7g5jrmgvz6hgj68"))))
+               "05m1272r5qa2r0ym5vq4figdfnpvcys1fgb1026n5s6xdjd1s1pg"))))
     (arguments
      (substitute-keyword-arguments (package-arguments ffmpeg)
        ((#:configure-flags flags)
@@ -782,29 +815,10 @@ audio/video codec library.")
                     flag))
               ,flags))))))
 
-;; Annoyingly enough, the latest mpv release does not build with the stable
-;; release of ffmpeg. Use a git commit until the situation is fixed.
-(define-public ffmpeg-git
-  (let ((commit "3f887440677328c9cfed97ad81d14051ffa32aae")
-        (revision "1"))
-    (package
-     (inherit ffmpeg)
-     (name "ffmpeg-git")
-     (version (string-append "3.4-" revision "." (string-take commit 9)))
-     (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/FFmpeg/FFmpeg.git")
-                    (commit commit)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1b7n3g4m2rbvrwsgbfl8wl91z42g1ld42clwxs8qpl9ny5rwz6sq")))))))
-
 (define-public vlc
   (package
     (name "vlc")
-    (version "2.2.8")
+    (version "3.0.3")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -812,55 +826,90 @@ audio/video codec library.")
                    version "/vlc-" version ".tar.xz"))
              (sha256
               (base32
-               "1v32snw46rkgbdqdy3dssl2y13i8p2cr1cw1i18r6vdmiy24dw4v"))))
+               "0lavzly8l0ll1d9iris9cnirgcs77g48lxj14058dxqkvd5v1a4v"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("git" ,git) ; needed for a test
+     `(("flex" ,flex)
+       ("bison" ,bison)
+       ("gettext" ,gettext-minimal)
+       ("git" ,git) ; needed for a test
        ("pkg-config" ,pkg-config)))
     ;; FIXME: Add optional inputs once available.
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("avahi" ,avahi)
        ("dbus" ,dbus)
+       ("eudev" ,eudev)
        ("flac" ,flac)
-       ("ffmpeg" ,ffmpeg-2.8)               ;fails to build against ffmpeg 3.0
+       ("ffmpeg" ,ffmpeg)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
+       ("fribidi" ,fribidi)
        ("gnutls" ,gnutls)
        ("liba52" ,liba52)
+       ("libarchive" ,libarchive)
+       ("libass" ,libass)
+       ("libavc1394" ,libavc1394)
+       ("libbluray" ,libbluray)
+       ("libcaca" ,libcaca)
        ("libcddb" ,libcddb)
+       ("libdca" ,libdca)
        ("libdvbpsi" ,libdvbpsi)
+       ("libdvdnav" ,libdvdnav)
+       ("libdvdread" ,libdvdread)
+       ("libebml" ,libebml)
        ("libgcrypt" ,libgcrypt)
+       ("libidn" ,libidn)
        ("libkate" ,libkate)
        ("libmad" ,libmad)
+       ("libmatroska" ,libmatroska)
+       ("libmodplug" ,libmodplug)
+       ("libmpeg2" ,libmpeg2)
        ("libogg" ,libogg)
        ("libpng" ,libpng)
+       ("libraw1394" ,libraw1394)
+       ("librsvg" ,librsvg)
        ("libsamplerate" ,libsamplerate)
+       ("libsecret" ,libsecret)
        ("libssh2" ,libssh2)
+       ("libupnp" ,libupnp)
+       ("libva" ,libva)
+       ("libvdpau" ,libvdpau)
        ("libvorbis" ,libvorbis)
+       ("libvpx" ,libvpx)
        ("libtheora" ,libtheora)
+       ("libx264" ,libx264)
        ("libxext" ,libxext)
        ("libxi" ,libxi)
        ("libxinerama" ,libxinerama)
        ("libxml2" ,libxml2)
        ("libxpm" ,libxpm)
        ("livemedia-utils" ,livemedia-utils)
-       ("lua" ,lua-5.1)
+       ("lua" ,lua-5.2)
        ("mesa" ,mesa)
        ("opus" ,opus)
        ("perl" ,perl)
        ("pulseaudio" ,pulseaudio)
        ("python" ,python-wrapper)
        ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
        ("qtx11extras" ,qtx11extras)
+       ("samba" ,samba)
        ("sdl" ,sdl)
        ("sdl-image" ,sdl-image)
        ("speex" ,speex)
+       ("speexdsp" ,speexdsp)
+       ("taglib" ,taglib)
+       ("twolame" ,twolame)
+       ("unzip" ,unzip)
+       ("wayland" ,wayland)
+       ("wayland-protocols" ,wayland-protocols)
        ("x265" ,x265)
        ("xcb-util-keysyms" ,xcb-util-keysyms)))
     (arguments
      `(#:configure-flags
        `("CXXFLAGS=-std=gnu++11"
+         "BUILDCC=gcc"
          ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
                          (assoc-ref %build-inputs "ffmpeg")
                          "/lib"))                 ;needed for the tests
@@ -877,11 +926,24 @@ audio/video codec library.")
                ;; which fails in our sandboxed build system
                (substitute* "test/run_vlc.sh"
                  (("./vlc --ignore-config") "echo"))
-               ;; XXX Likely not needed for >2.2.6.
-               (substitute* "modules/gui/qt4/components/interface_widgets.cpp"
-                 (("<qx11info_x11.h>") "<QtX11Extras/qx11info_x11.h>"))
+
+               ;; modules/text_renderer/freetype/text_layout.c uses a
+               ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
+               ;; from fribidi.h, so for now we enable the use of deprecated
+               ;; fribidi interfaces from this file.
+               ;; FIXME: Try removing this for vlc >= 3.0.3.
+               (substitute* "modules/text_renderer/freetype/text_layout.c"
+                 (("# define FRIBIDI_NO_DEPRECATED 1") ""))
+
+               ;; Fix build against Qt 5.11.
+               (substitute* "modules/gui/qt/actions_manager.cpp"
+                 (("#include <vlc_keys.h>") "#include <vlc_keys.h>
+#include <QAction>"))
+               (substitute* "modules/gui/qt/components/simple_preferences.cpp"
+                 (("#include <QFont>") "#include <QFont>
+#include <QButtonGroup>"))
                #t)))
-         (add-after 'install 'regenerate-plugin-cache
+         (add-after 'strip 'regenerate-plugin-cache
            (lambda* (#:key outputs #:allow-other-keys)
              ;; The 'install-exec-hook' rule in the top-level Makefile.am
              ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
@@ -898,9 +960,16 @@ audio/video codec library.")
                (for-each (lambda (file)
                            (let ((s (lstat file)))
                              (unless (eq? (stat:type s) 'symlink)
-                               (utime file 0 0 0 0))))
+                               (utime file 1 1))))
                          (find-files plugindir))
-               (zero? (system* cachegen plugindir))))))))
+               (invoke cachegen plugindir))))
+         (add-after 'install 'wrap-executable
+           (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out"))
+                  (plugin-path (getenv "QT_PLUGIN_PATH")))
+              (wrap-program (string-append out "/bin/vlc")
+                `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
+            #t)))))
     (home-page "https://www.videolan.org/")
     (synopsis "Audio and video framework")
     (description "VLC is a cross-platform multimedia player and framework
@@ -970,8 +1039,7 @@ treaming protocols.")
                 (("#! /bin/sh") (string-append "#!" (which "sh"))))
               (setenv "SHELL" (which "bash"))
               (setenv "CONFIG_SHELL" (which "bash"))
-              (zero? (system*
-                      "./configure"
+              (invoke "./configure"
                       (string-append "--extra-cflags=-I"
                                      libx11 "/include") ; to detect libx11
                       "--disable-ffmpeg_a" ; disables bundled ffmpeg
@@ -993,7 +1061,7 @@ treaming protocols.")
                                     (or (%current-target-system)
                                         (nix-system->gnu-triplet
                                          (%current-system)))))))
-                      "--disable-iwmmxt"))))))))
+                      "--disable-iwmmxt")))))))
     (home-page "https://www.mplayerhq.hu/design7/news.html")
     (synopsis "Audio and video player")
     (description "MPlayer is a movie player.  It plays most MPEG/VOB, AVI,
@@ -1005,7 +1073,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
 (define-public mpv
   (package
     (name "mpv")
-    (version "0.28.0")
+    (version "0.28.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1013,7 +1081,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
                     ".tar.gz"))
               (sha256
                (base32
-                "1d2p6k3y9lqx8bpdal4grrj8ljy7pvd8qgdq8004fmr38afmbb7f"))
+                "15fp4sa5glqhgidd54vs6knf9dp809wszzsqiqz5nyri4ph19nma"))
               (file-name (string-append name "-" version ".tar.gz"))))
     (build-system waf-build-system)
     (native-inputs
@@ -1024,7 +1092,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("enca" ,enca)
-       ("ffmpeg" ,ffmpeg-git)
+       ("ffmpeg" ,ffmpeg)
        ("jack" ,jack-1)
        ("ladspa" ,ladspa)
        ("lcms" ,lcms)
@@ -1051,10 +1119,12 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
        ("mpg123" ,mpg123)
        ("pulseaudio" ,pulseaudio)
        ("rsound" ,rsound)
+       ("shaderc" ,shaderc)
+       ("vulkan-loader" ,vulkan-loader)
        ("waf" ,python-waf)
        ("wayland" ,wayland)
        ("wayland-protocols" ,wayland-protocols)
-       ("libxkbcommon"libxkbcommon)
+       ("libxkbcommon" ,libxkbcommon)
        ("youtube-dl" ,youtube-dl)
        ("zlib" ,zlib)))
     (arguments
@@ -1064,7 +1134,8 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
           'configure 'setup-waf
           (lambda* (#:key inputs #:allow-other-keys)
             (copy-file (assoc-ref inputs "waf") "waf")
-            (setenv "CC" "gcc"))))
+            (setenv "CC" "gcc")
+            #t)))
        #:configure-flags (list "--enable-libmpv-shared"
                                "--enable-cdda"
                                "--enable-dvdread"
@@ -1083,7 +1154,7 @@ projects while introducing many more.")
 (define-public gnome-mpv
   (package
     (name "gnome-mpv")
-    (version "0.13")
+    (version "0.14")
     (source
      (origin
        (method url-fetch)
@@ -1092,7 +1163,7 @@ projects while introducing many more.")
                            ".tar.xz"))
        (sha256
         (base32
-         "1w944ymyssgfcjiczrq4saig90crw9b9hhdsnchfbjsw173qi8n5"))))
+         "03kjwd5jq0i5ajnvhjwf5019bjjaa16xkdrhdkiz1k58ipjvvj93"))))
     (native-inputs
      `(("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
@@ -1111,32 +1182,33 @@ access to mpv's powerful playback capabilities.")
 (define-public libvpx
   (package
     (name "libvpx")
-    (version "1.6.1")
+    (version "1.7.0")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "http://storage.googleapis.com/"
-                                  "downloads.webmproject.org/releases/webm/"
-                                  name "-" version ".tar.bz2"))
+              ;; XXX: Upstream does not provide tarballs for > 1.6.1.
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://chromium.googlesource.com/webm/libvpx")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "06d8hqjkfs6wl45qf4pwh1kpbvkx6cwywd5y8d4lgagvjwm0qb0w"))
+                "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
               (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
-             (setenv "CONFIG_SHELL" (which "bash"))
-             (let ((out (assoc-ref outputs "out")))
-               (setenv "LDFLAGS"
-                       (string-append "-Wl,-rpath=" out "/lib"))
-               (zero? (system* "./configure"
-                               "--enable-shared"
+     `(#:configure-flags (list "--enable-shared"
                                "--as=yasm"
                                ;; Limit size to avoid CVE-2015-1258
                                "--size-limit=16384x16384"
-                               (string-append "--prefix=" out)))))))
+                               (string-append "--prefix=" (assoc-ref %outputs "out")))
+       #:make-flags  (list (string-append "LDFLAGS=-Wl,-rpath="
+                                          (assoc-ref %outputs "out") "/lib"))
+       #:phases (modify-phases %standard-phases
+                  (replace 'configure
+                    (lambda* (#:key configure-flags #:allow-other-keys)
+                      ;; The configure script does not understand some of the GNU
+                      ;; options, so we only add the flags specified above.
+                      (apply invoke  "./configure" configure-flags))))
        #:tests? #f)) ; no check target
     (native-inputs
      `(("perl" ,perl)
@@ -1144,12 +1216,12 @@ access to mpv's powerful playback capabilities.")
     (synopsis "VP8/VP9 video codec")
     (description "libvpx is a codec for the VP8/VP9 video compression format.")
     (license license:bsd-3)
-    (home-page "http://www.webmproject.org/")))
+    (home-page "https://www.webmproject.org/")))
 
 (define-public youtube-dl
   (package
     (name "youtube-dl")
-    (version "2017.12.31")
+    (version "2018.06.19")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://yt-dl.org/downloads/"
@@ -1157,7 +1229,7 @@ access to mpv's powerful playback capabilities.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0cq10ii96lpq3z7l1js0s59sqb4h4yqwdqinl2yf7cdjynvj62xi"))))
+                "0ys2mc84r7mjpn7rykb57sn3ii1kp3divjdn2ivwqknj8jrzg3z6"))))
     (build-system python-build-system)
     (arguments
      ;; The problem here is that the directory for the man page and completion
@@ -1180,11 +1252,12 @@ access to mpv's powerful playback capabilities.")
                           (("'etc/")
                            (string-append "'" prefix "/etc/"))
                           (("'share/")
-                           (string-append "'" prefix "/share/")))))))))
+                           (string-append "'" prefix "/share/")))
+                        #t))))))
     (synopsis "Download videos from YouTube.com and other sites")
     (description
      "Youtube-dl is a small command-line program to download videos from
-YouTube.com and a few more sites.")
+YouTube.com and many more sites.")
     (home-page "https://yt-dl.org")
     (license license:public-domain)))
 
@@ -1266,7 +1339,7 @@ other site that youtube-dl supports.")
 (define-public you-get
   (package
     (name "you-get")
-    (version "0.4.1011")
+    (version "0.4.1077")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1275,7 +1348,7 @@ other site that youtube-dl supports.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "0cdbh5w0chw3dlrwizm91l6sgkkzy7p6h0072dai4xbw5zgld31k"))))
+                "04vxc91k627qgsqs8dhqajrb6vpj4pw21jlwbha28qakfiz2x11k"))))
     (build-system python-build-system)
     (inputs
      `(("ffmpeg" ,ffmpeg)))             ; for multi-part and >=1080p videos
@@ -1302,10 +1375,65 @@ audio, images) from the Web.  It can use either mpv or vlc for playback.")
     (home-page "https://you-get.org/")
     (license license:expat)))
 
+(define-public youtube-viewer
+  (package
+    (name "youtube-viewer")
+    (version "3.3.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/trizen/youtube-viewer/archive/"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1dqaxkz5svv0lmxds6lppcpzhkq6gar2raw9gx6imrd7yz02fpgn"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-module-build" ,perl-module-build)))
+    ;; FIXME: Add optional dependencies once available:
+    ;; perl-lwp-useragent-cached and perl-term-readline-gnu
+    (inputs
+     `(("perl-data-dump" ,perl-data-dump)
+       ("perl-file-sharedir" ,perl-file-sharedir)
+       ("perl-gtk2" ,perl-gtk2)
+       ("perl-json" ,perl-json)
+       ("perl-libwww" ,perl-libwww)
+       ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
+       ("perl-mozilla-ca" ,perl-mozilla-ca)
+       ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
+    (arguments
+     `(#:modules ((guix build perl-build-system)
+                  (guix build utils)
+                  (srfi srfi-26))
+       #:module-build-flags '("--gtk")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-program
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin-dir (string-append out "/bin/"))
+                    (site-dir (string-append out "/lib/perl5/site_perl/"))
+                    (lib-path (getenv "PERL5LIB")))
+               (for-each (cut wrap-program <>
+                              `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
+                         (find-files bin-dir))
+               #t))))))
+    (synopsis
+     "Lightweight application for searching and streaming videos from YouTube")
+    (description
+     "Youtube-viewer searches and plays YouTube videos in a native player.
+It comes with various search options; it can search for videos, playlists
+and/or channels.  The videos are streamed directly in a selected video player
+at the best resolution (customizable) and with closed-captions (if available).
+Both command-line and GTK2 interface are available.")
+    (home-page "https://github.com/trizen/youtube-viewer")
+    (license license:perl-license)))
+
 (define-public libbluray
   (package
     (name "libbluray")
-    (version "1.0.1")
+    (version "1.0.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.videolan.org/videolan/"
@@ -1313,12 +1441,23 @@ audio, images) from the Web.  It can use either mpv or vlc for playback.")
                                   name "-" version ".tar.bz2"))
               (sha256
                (base32
-                "0fl5cxfj870rwqmmz3s04wh7wnabb7rnynfj1v3sz37ln8frm7qg"))))
+                "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--disable-bdjava-jar")
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'refer-to-libxml2-in-.pc-file
+           ;; Avoid the need to propagate libxml2 by referring to it
+           ;; directly, as is already done for fontconfig & freetype.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((libxml2 (assoc-ref inputs "libxml2")))
+               (substitute* "configure"
+                 ((" libxml-2.0") ""))
+               (substitute* "src/libbluray.pc.in"
+                 (("^Libs.private:" field)
+                  (string-append field " -L" libxml2 "/lib -lxml2")))
+               #t)))
          (add-before 'build 'fix-dlopen-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (let ((libaacs (assoc-ref inputs "libaacs"))
@@ -1347,7 +1486,7 @@ players, like VLC or MPlayer.")
 (define-public libdvdread
   (package
     (name "libdvdread")
-    (version "5.0.3")
+    (version "6.0.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.videolan.org/videolan/"
@@ -1355,8 +1494,14 @@ players, like VLC or MPlayer.")
                                   name "-" version ".tar.bz2"))
               (sha256
                (base32
-                "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
+                "0dgr23fzcjhb7ck54xkr9zmf4jcq3ph0dz3fbyvla1c6ni9ijfxk"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags '("--with-libdvdcss=yes")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("libdvdcss" ,libdvdcss)))
     (home-page "http://dvdnav.mplayerhq.hu/")
     (synopsis "Library for reading video DVDs")
     (description
@@ -1397,7 +1542,7 @@ MPEG-2 stream containing VOB packets.")
 (define-public libdvdnav
   (package
     (name "libdvdnav")
-    (version "5.0.3")
+    (version "6.0.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.videolan.org/videolan/"
@@ -1405,7 +1550,7 @@ MPEG-2 stream containing VOB packets.")
                                   name "-" version ".tar.bz2"))
               (sha256
                (base32
-                "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
+                "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -1426,35 +1571,10 @@ DVD virtual machine and internal playback states are completely
 encapsulated.")
     (license license:gpl2+)))
 
-(define-public libdvdnav-4
-  (package
-    (inherit libdvdnav)
-    (version "4.2.1")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append
-                "https://download.videolan.org/videolan/libdvdnav/libdvdnav-"
-                version ".tar.xz"))
-              (sha256
-               (base32
-                "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("libtool" ,libtool)))
-    (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'autoreconf
-           (lambda _
-             (zero? (system* "autoreconf" "-vif")))))))))
-
 (define-public libdvdcss
   (package
     (name "libdvdcss")
-    (version "1.4.0")
+    (version "1.4.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.videolan.org/pub/"
@@ -1462,7 +1582,7 @@ encapsulated.")
                                   name "-" version ".tar.bz2"))
               (sha256
                (base32
-                "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
+                "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
     (build-system gnu-build-system)
     (home-page "https://www.videolan.org/developers/libdvdcss.html")
     (synopsis "Library for accessing DVDs as block devices")
@@ -1644,10 +1764,9 @@ capabilities.")
     (arguments
      '(#:phases
        (modify-phases %standard-phases
-         (add-after
-          'unpack 'autogen
-          (lambda _
-            (zero? (system* "sh" "autogen.sh")))))))
+         (add-after 'unpack 'autogen
+           (lambda _
+             (invoke "sh" "autogen.sh"))))))
     (home-page "http://www.vapoursynth.com/")
     (synopsis "Video processing framework")
     (description "VapourSynth is a C++ library and Python module for video
@@ -1693,30 +1812,76 @@ pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
 and custom quantization matrices.")
     (license license:gpl2+)))
 
-(define-public livestreamer
+(define-public streamlink
   (package
-    (name "livestreamer")
-    (version "1.12.2")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/chrippa/livestreamer/archive/v"
-                    version ".tar.gz"))
-              (file-name (string-append "livestreamer-" version ".tar.gz"))
-              (sha256
-               (base32
-                "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
+    (name "streamlink")
+    (version "0.11.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "streamlink" version))
+       (sha256
+        (base32
+         "02h8b3k8l5zz4vjm0nhxvl1pm924jms8y7sjl40fbybrzvsa4mg2"))))
     (build-system python-build-system)
-    (arguments
-     '(#:tests? #f)) ; tests rely on external web servers
+    (home-page "https://github.com/streamlink/streamlink")
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-mock" ,python-mock)
+       ("python-requests-mock" ,python-requests-mock)))
     (propagated-inputs
-     `(("python-requests" ,python-requests)))
-    (synopsis "Internet video stream viewer")
-    (description "Livestreamer is a command-line utility that extracts streams
-from various services and pipes them into a video playing application.")
-    (home-page "http://livestreamer.io/")
+     `(("python-pysocks" ,python-pysocks)
+       ("python-websocket-client" ,python-websocket-client)
+       ("python-iso3166" ,python-iso3166)
+       ("python-iso639" ,python-iso639)
+       ("python-pycryptodome" ,python-pycryptodome)
+       ("python-requests" ,python-requests)
+       ("python-urllib3" ,python-urllib3)))
+    (synopsis "Extract streams from various services")
+    (description "Streamlink is command-line utility that extracts streams
+from sites like Twitch.tv and pipes them into a video player of choice.")
     (license license:bsd-2)))
 
+(define-public livestreamer
+  (deprecated-package "livestreamer" streamlink))
+
+(define-public twitchy
+  (let ((commit "0c0f925b9c7ff2aed4a3b0046561cb794143c398")) ;Fixes tests.
+    (package
+      (name "twitchy")
+      (version (git-version "3.2" "1" commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/BasioMeusPuga/twitchy.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "02aizvsr744sh8bdqvwwsmp2qpczlzn8fy76h5dyd3517n9nlcz9"))))
+      (build-system python-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-before 'check 'check-setup
+             (lambda _
+               (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
+               #t))
+           (add-after 'install 'install-rofi-plugin
+             (lambda* (#:key outputs #:allow-other-keys)
+               (install-file "plugins/rofi-twitchy"
+                             (string-append (assoc-ref outputs "out")
+                                            "/bin")))))))
+      (inputs
+       `(("python-requests" ,python-requests)
+         ("streamlink" ,streamlink)))
+      (home-page "https://github.com/BasioMeusPuga/twitchy")
+      (synopsis "Command-line interface for Twitch.tv")
+      (description
+       "This package provides a command-line interface for Twitch.tv")
+      (license license:gpl3+))))
+
 (define-public mlt
   (package
     (name "mlt")
@@ -1728,7 +1893,13 @@ from various services and pipes them into a video playing application.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
+                "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; As of glibc 2.26, <xlocale.h> no longer is.
+                          (substitute* "src/framework/mlt_property.h"
+                            (("xlocale\\.h") "locale.h"))
+                          #t))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ; no tests
@@ -1749,7 +1920,7 @@ from various services and pipes them into a video playing application.")
             #t)))))
     (inputs
      `(("alsa-lib" ,alsa-lib)
-       ("ffmpeg" ,ffmpeg)
+       ("ffmpeg" ,ffmpeg-3.4)
        ("fftw" ,fftw)
        ("libxml2" ,libxml2)
        ("jack" ,jack-1)
@@ -1808,7 +1979,7 @@ be used for realtime video capture via Linux-specific APIs.")
 (define-public obs
   (package
     (name "obs")
-    (version "18.0.2")
+    (version "20.1.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/jp9000/obs-studio"
@@ -1816,7 +1987,7 @@ be used for realtime video capture via Linux-specific APIs.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "02pbiyvf5x0zh448h5rpmyn33qnsqk694xxlyns83mdi74savyqw"))))
+                "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f)) ; no tests
@@ -1865,9 +2036,9 @@ and JACK.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("dri2proto" ,dri2proto)
-       ("libx11" ,libx11 "out")
-       ("libxext" ,libxext)))
+     `(("libx11" ,libx11 "out")
+       ("libxext" ,libxext)
+       ("xorgproto" ,xorgproto)))
     (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
     (synopsis "Video Decode and Presentation API")
     (description "VDPAU is the Video Decode and Presentation API for UNIX.  It
@@ -1914,7 +2085,8 @@ implementation.")
           "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
         (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
         (modules '((guix build utils)))
-        (snippet '(delete-file-recursively "3rdparty"))))
+        (snippet '(begin (delete-file-recursively "3rdparty")
+                         #t))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
@@ -1968,7 +2140,7 @@ making @dfn{screencasts}.")
 (define-public simplescreenrecorder
   (package
     (name "simplescreenrecorder")
-    (version "0.3.8")
+    (version "0.3.11")
     (source
      (origin
        (method url-fetch)
@@ -1977,8 +2149,8 @@ making @dfn{screencasts}.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0v8w35n8w772s08w7k0icynqdsdakbrcanbgx6j847bfqfsg21gg"))))
-    (build-system gnu-build-system)
+         "0l6irdadqpajvv0dj3ngs1231n559l0y1pykhs2h7526qm4w7xal"))))
+    (build-system cmake-build-system)
     ;; Although libx11, libxfixes, libxext are listed as build dependencies in
     ;; README.md, the program builds and functions properly without them.
     ;; As a result, they are omitted. Please add them back if problems appear.
@@ -1989,8 +2161,12 @@ making @dfn{screencasts}.")
        ("jack" ,jack-1)
        ("libxi" ,libxi)
        ("pulseaudio" ,pulseaudio)
-       ("qt" ,qt-4))) ; README.md: using Qt 5 causes some stability issues
+       ("qt" ,qt)))
     (native-inputs `(("pkg-config" ,pkg-config)))
+    (arguments
+     `(#:configure-flags
+       (list "-DWITH_QT5=TRUE")
+       #:tests? #f))                    ; no test suite
     ;; Using HTTPS causes part of the page to be displayed improperly.
     (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
     (synopsis "Screen recorder")
@@ -2018,10 +2194,11 @@ Other features include a live preview and live streaming.")
                 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (add-after 'unpack 'autogen.sh
-                    (lambda _
-                      (zero? (system* "sh" "autogen.sh")))))))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autogen.sh
+           (lambda _
+             (invoke "sh" "autogen.sh"))))))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)))
@@ -2086,7 +2263,7 @@ Content System specification.")
 (define-public mps-youtube
   (package
     (name "mps-youtube")
-    (version "0.2.7.1")
+    (version "0.2.8")
     (source
      (origin
        (method url-fetch)
@@ -2095,7 +2272,7 @@ Content System specification.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
+         "0x7cmfh199q9j396v7bz81nnvanfllhsg86489i5dw2p3yyc9wnm"))))
     (build-system python-build-system)
     (arguments
      ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
@@ -2177,7 +2354,7 @@ supported players in addition to this package.")
      `(#:tests? #f             ;tests require Ruby and claim to be unsupported
        #:phases
        (modify-phases %standard-phases
-         (add-before 'patch-source-shebangs 'bootstrap-gtk
+         (replace 'bootstrap
            ;; Run bootstrap ahead of time so that shebangs get patched.
            (lambda _
              (setenv "CONFIG_SHELL" (which "sh"))
@@ -2185,7 +2362,7 @@ supported players in addition to this package.")
              ;; Patch the Makefile so that it doesn't bootstrap again.
              (substitute* "gtk/module.rules"
                ((".*autogen\\.sh.*") ""))
-             (zero? (system* "sh" "./gtk/autogen.sh"))))
+             (invoke "sh" "./gtk/autogen.sh")))
          (add-before 'configure 'disable-contrib
            (lambda _
              (substitute* "make/include/main.defs"
@@ -2207,9 +2384,9 @@ supported players in addition to this package.")
              ;; errors on unrecognized arguments,
              ;; e.g. --enable-fast-install
              (let ((out (assoc-ref outputs "out")))
-               (zero? (apply system* "./configure"
-                             (string-append "--prefix=" out)
-                             (or configure-flags '()))))))
+               (apply invoke "./configure"
+                      (string-append "--prefix=" out)
+                      (or configure-flags '())))))
          (add-after 'configure 'chdir-build
            (lambda _ (chdir "./build") #t)))))
     (home-page "https://handbrake.fr")
@@ -2342,7 +2519,7 @@ practically any type of media.")
              #t))
          (add-after 'change-to-build-dir 'autogen
            (lambda _
-             (zero? (system* "sh" "autogen.sh")))))))
+             (invoke "sh" "autogen.sh"))))))
     (home-page "https://mediaarea.net/en/MediaInfo")
     (synopsis "Library for retrieving media metadata")
     (description "MediaInfo is a library used for retrieving technical
@@ -2387,7 +2564,7 @@ MPEG-2, MPEG-4, DVD (VOB)...
        ("libtool" ,libtool)
        ("pkg-config" ,pkg-config)
        ("zlib" ,zlib)
-       ("libmediainfo"libmediainfo)
+       ("libmediainfo" ,libmediainfo)
        ("libzen" ,libzen)))
     (build-system gnu-build-system)
     (arguments
@@ -2401,7 +2578,7 @@ MPEG-2, MPEG-4, DVD (VOB)...
              #t))
          (add-after 'change-to-build-dir 'autogen
            (lambda _
-             (zero? (system* "sh" "autogen.sh")))))))
+             (invoke "sh" "autogen.sh"))))))
     (home-page "https://mediaarea.net/en/MediaInfo")
     (synopsis "Utility for reading media metadata")
     (description "MediaInfo is a utility used for retrieving technical
@@ -2412,7 +2589,7 @@ many codecs and formats supported by libmediainfo.")
 (define-public livemedia-utils
   (package
     (name "livemedia-utils")
-    (version "2017.06.04")
+    (version "2017.10.28")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2420,7 +2597,13 @@ many codecs and formats supported by libmediainfo.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "0xf3vynxqpxpd762zni0jkblnjlgbqxjx99m83m7gqx6zriph271"))))
+                "0f5kxpayqn3yhabqrd2cqlc74i6x2xr01jfkank1lcilxnfyrsnq"))
+              (modules '((guix build utils)))
+              (snippet '(begin
+                          ;; As of glibc 2.26, <xlocale.h> no longer is.
+                          (substitute* "liveMedia/include/Locale.hh"
+                            (("xlocale\\.h") "locale.h"))
+                          #t))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f ; no tests
@@ -2437,8 +2620,8 @@ many codecs and formats supported by libmediainfo.")
                       #t))
                   (replace 'configure
                     (lambda _
-                      (zero? (system* "./genMakefiles"
-                                      "linux-with-shared-libraries")))))))
+                      (invoke "./genMakefiles"
+                              "linux-with-shared-libraries"))))))
     (home-page "http://www.live555.com/liveMedia/")
     (synopsis "Set of C++ libraries for multimedia streaming")
     (description "This code forms a set of C++ libraries for multimedia
@@ -2452,7 +2635,7 @@ RTSP or SIP clients and servers.")
 (define-public libdvbpsi
   (package
     (name "libdvbpsi")
-    (version "1.3.1")
+    (version "1.3.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -2460,7 +2643,7 @@ RTSP or SIP clients and servers.")
                     version "/libdvbpsi-" version ".tar.bz2"))
               (sha256
                (base32
-                "0824r08kaspbrrg2dd5d46s475zb7j59brqkm2y6x3mdsnpng0yn"))))
+                "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
     (build-system gnu-build-system)
     (home-page "https://www.videolan.org/developers/libdvbpsi.html")
     (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
@@ -2474,10 +2657,10 @@ and ITU-T H.222.0.")
   (package
     (name "ffms2")
     (version "2.23")
-    (home-page "https://github.com/FFMS/ffms2/")
+    (home-page "https://github.com/FFMS/ffms2")
     (source (origin
               (method url-fetch)
-              (uri (string-append home-page "archive/" version ".tar.gz"))
+              (uri (string-append home-page "/archive/" version ".tar.gz"))
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
@@ -2635,8 +2818,8 @@ alpha blending etc).")
        (modify-phases %standard-phases
          (add-after 'unpack 'autotools
            (lambda _
-             (zero? (system* "sh" "autogen.sh")))))))
-    ;; TODO: opencv for additional face detection filters
+             (invoke "sh" "autogen.sh"))))))
+    ;; TODO: opencv for additional face detection filters.
     (inputs
      `(("gavl" ,gavl)
        ("cairo" ,cairo)))
@@ -2665,3 +2848,121 @@ It counts more than 100 plugins.")
                    ;; src/filter/ndvi/ndvi.cpp
                    ;; src/filter/facedetect/facedetect.cpp
                    license:lgpl2.1+))))
+
+(define-public motion
+  (package
+    (name "motion")
+    (version "4.1.1")
+    (home-page "https://motion-project.github.io/")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/Motion-Project/motion/archive/"
+                    "release-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1qm4i8zrqafl60sv2frhixvkd0wh0r5jfcrj5i6gha7yplsvjx10"))
+              (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf-wrapper)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libjpeg" ,libjpeg)
+       ("ffmpeg" ,ffmpeg-3.4)
+       ("sqlite" ,sqlite)))
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (replace 'bootstrap
+                    (lambda _
+                      (patch-shebang "version.sh")
+                      (invoke "autoreconf" "-vfi"))))
+       #:configure-flags '("--sysconfdir=/etc")
+       #:make-flags (list (string-append "sysconfdir="
+                                         (assoc-ref %outputs "out")
+                                         "/etc"))
+
+       #:tests? #f))                              ;no 'check' target
+    (synopsis "Detect motion from video signals")
+    (description
+     "Motion is a program that monitors the video signal from one or more
+cameras and is able to detect if a significant part of the picture has
+changed.  Or in other words, it can detect motion.")
+
+    ;; Some files say "version 2" and others "version 2 or later".
+    (license license:gpl2)))
+
+(define-public subdl
+  (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
+        (revision "1"))
+    (package
+      (name "subdl")
+      (version (git-version "1.0.3" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/alexanderwink/subdl.git")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
+      (build-system trivial-build-system)
+      (arguments
+       `(#:modules ((guix build utils))
+         #:builder (begin
+                     (use-modules (guix build utils))
+                     (let* ((out (assoc-ref %outputs "out"))
+                            (bin (string-append out "/bin"))
+                            (source (assoc-ref %build-inputs "source"))
+                            (python (assoc-ref %build-inputs "python")))
+                       (install-file (string-append source "/subdl") bin)
+                       (patch-shebang (string-append bin "/subdl")
+                                      (list (string-append python "/bin")))))))
+      (inputs `(("python" ,python)))
+      (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
+      (description "Subdl is a command-line tool for downloading subtitles from
+opensubtitles.org.  By default, it will search for English subtitles, display
+the results, download the highest-rated result in the requested language and
+save it to the appropriate filename.")
+      (license license:gpl3+)
+      (home-page "https://github.com/alexanderwink/subdl"))))
+
+(define-public l-smash
+  (package
+    (name "l-smash")
+    (version "2.14.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/" name "/" name "/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0dary0h65kq6sv93iabv25djlvzr5ckdcp3ywagbix44wqfw7xz6"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ;no tests
+       #:make-flags
+       (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
+                            (assoc-ref %outputs "out") "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         ;; configure fails if it is followed by CONFIG_SHELL
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (invoke "./configure" (string-append "--prefix=" out)
+                       "--disable-static")))))))
+    (native-inputs
+     `(("which" ,which)))
+    (home-page "https://l-smash.github.io/l-smash/")
+    (synopsis "MP4 multiplexer and demultiplexer library")
+    (description
+     "L-SMASH is a cross-platform library that handles the ISO base media file
+format and some of its derived file formats, including MP4.  It operates as a
+multiplexer and demultiplexer, and can mux video and audio in several formats
+using standalone executable files.")
+    (license license:isc)))