gnu: libbluray: Update to 1.0.2.
[jackhill/guix/guix.git] / gnu / packages / video.scm
index ddd5672..d149cc5 100644 (file)
 ;;; 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 Gregor Giesen <giesen@zaehlwerk.net>
+;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -87,6 +89,7 @@
   #: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 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 ruby)
   #:use-module (gnu packages sdl)
@@ -405,7 +410,7 @@ designed to encode video or images into an H.265 / HEVC encoded bitstream.")
 (define-public libass
   (package
     (name "libass")
-    (version "0.13.7")
+    (version "0.14.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -413,11 +418,11 @@ designed to encode video or images into an H.265 / HEVC encoded bitstream.")
                     version "/libass-" version ".tar.xz"))
               (sha256
                (base32
-                "17byv926w1mxn56n896sxvdq4m0yv1l7qbm688h6zr3nzgsyarbh"))))
+                "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("yasm" ,yasm)))
+       ("nasm" ,nasm)))
     (propagated-inputs
      `(("freetype" ,freetype)
        ("fribidi" ,fribidi)
@@ -505,25 +510,25 @@ SMPTE 314M.")
 (define-public libmatroska
   (package
     (name "libmatroska")
-    (version "1.4.7")
+    (version "1.4.8")
     (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"))))
+         "14n9sw974prr3yp4yjb7aadi6x2yz5a0hjw8fs3qigy5shh2piyq"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
      `(("libebml" ,libebml)))
     (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.
@@ -587,18 +592,19 @@ 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")
+    (version "3.4.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1vzvpx8ixy8m44f8qwp833hv253hpghybgzbc4n8b3div3j0dvmf"))))
+               "1h4iz7q10wj04awr2wvmp60n7b09pfwrgwbbw9sgl7klcf52fxss"))))
     (build-system gnu-build-system)
     (inputs
      `(("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
+       ("frei0r-plugins" ,frei0r-plugins)
        ("gnutls" ,gnutls)
        ("opus" ,opus)
        ("ladspa" ,ladspa)
@@ -638,7 +644,6 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
        ;; possible additional inputs:
        ;;   --enable-avisynth        enable reading of AviSynth script
        ;;                            files [no]
-       ;;   --enable-frei0r          enable frei0r video filtering
        ;;   --enable-libaacplus      enable AAC+ encoding via libaacplus [no]
        ;;   --enable-libcelt         enable CELT decoding via libcelt [no]
        ;;   --enable-libdc1394       enable IIDC-1394 grabbing using libdc1394
@@ -686,6 +691,7 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
        '("--enable-avresample"
          "--enable-gpl" ; enable optional gpl licensed parts
          "--enable-shared"
+         "--enable-frei0r"
          "--enable-fontconfig"
          "--enable-gnutls"
          "--enable-ladspa"
@@ -711,6 +717,12 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
 
          "--enable-runtime-cpudetect"
 
+         ;; The HTML pages take 7.2 MiB
+         "--disable-htmlpages"
+
+         ;; The static libraries are 23 MiB
+         "--disable-static"
+
          ;; Runtime cpu detection is not implemented on
          ;; MIPS, so we disable some features.
          "--disable-mips32r2"
@@ -753,19 +765,6 @@ convert and stream audio and video.  It includes the libavcodec
 audio/video codec library.")
     (license license:gpl2+)))
 
-;; XXX: Remove this when gst-libav and qtox supports 3.4.
-(define-public ffmpeg-3.3
-  (package
-    (inherit ffmpeg)
-    (version "3.3.5")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
-                                 version ".tar.xz"))
-             (sha256
-              (base32
-               "00nq8ng2p16yb48acargaz1hlp9kq24vfwvkqjlslz4a7864k4x8"))))))
-
 (define-public ffmpeg-2.8
   (package
     (inherit ffmpeg)
@@ -786,10 +785,29 @@ 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.6")
+    (version "2.2.8")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -797,7 +815,7 @@ audio/video codec library.")
                    version "/vlc-" version ".tar.xz"))
              (sha256
               (base32
-               "1a22b913p2227ljz89c4fgjlyln5gcz8z58w32r0wh4srnnd60y4"))))
+               "1v32snw46rkgbdqdy3dssl2y13i8p2cr1cw1i18r6vdmiy24dw4v"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("git" ,git) ; needed for a test
@@ -990,7 +1008,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
 (define-public mpv
   (package
     (name "mpv")
-    (version "0.27.0")
+    (version "0.28.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -998,18 +1016,18 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
                     ".tar.gz"))
               (sha256
                (base32
-                "1754371fkva8aqxgbm50jxyvij7mnysq0538bf6zghbmigqqn79l"))
+                "1d2p6k3y9lqx8bpdal4grrj8ljy7pvd8qgdq8004fmr38afmbb7f"))
               (file-name (string-append name "-" version ".tar.gz"))))
     (build-system waf-build-system)
     (native-inputs
      `(("perl" ,perl) ; for zsh completion file
        ("pkg-config" ,pkg-config)
        ("python-docutils" ,python-docutils)))
-    ;; Missing features: libguess, Wayland, V4L2
+    ;; Missing features: libguess, V4L2
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("enca" ,enca)
-       ("ffmpeg" ,ffmpeg)
+       ("ffmpeg" ,ffmpeg-git)
        ("jack" ,jack-1)
        ("ladspa" ,ladspa)
        ("lcms" ,lcms)
@@ -1037,6 +1055,9 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
        ("pulseaudio" ,pulseaudio)
        ("rsound" ,rsound)
        ("waf" ,python-waf)
+       ("wayland" ,wayland)
+       ("wayland-protocols" ,wayland-protocols)
+       ("libxkbcommon", libxkbcommon)
        ("youtube-dl" ,youtube-dl)
        ("zlib" ,zlib)))
     (arguments
@@ -1065,7 +1086,7 @@ projects while introducing many more.")
 (define-public gnome-mpv
   (package
     (name "gnome-mpv")
-    (version "0.12")
+    (version "0.13")
     (source
      (origin
        (method url-fetch)
@@ -1074,7 +1095,7 @@ projects while introducing many more.")
                            ".tar.xz"))
        (sha256
         (base32
-         "0dcnz9vlf791v8d15j7hpymv87h6nb15alww6xjq0zpal5hi44kc"))))
+         "1w944ymyssgfcjiczrq4saig90crw9b9hhdsnchfbjsw173qi8n5"))))
     (native-inputs
      `(("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
@@ -1126,12 +1147,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.10.20")
+    (version "2018.01.21")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://yt-dl.org/downloads/"
@@ -1139,7 +1160,7 @@ access to mpv's powerful playback capabilities.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0npr8b1xg1dylz717kfllw433h1y16251npzch48lchq69bhm4iy"))))
+                "14ggjxnhc2sxc93h7d5k3z4n35n5q3ffsif97np0ar93x5z3zgn5"))))
     (build-system python-build-system)
     (arguments
      ;; The problem here is that the directory for the man page and completion
@@ -1162,11 +1183,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)))
 
@@ -1248,7 +1270,7 @@ other site that youtube-dl supports.")
 (define-public you-get
   (package
     (name "you-get")
-    (version "0.4.915")
+    (version "0.4.1011")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1257,14 +1279,27 @@ other site that youtube-dl supports.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "147qf8kdxjv9003fgx50ws0rmjjq98sv11q6c3sdwd29zylaj1ql"))))
+                "0cdbh5w0chw3dlrwizm91l6sgkkzy7p6h0072dai4xbw5zgld31k"))))
     (build-system python-build-system)
-    (arguments
-     ;; no tests
-     '(#:tests? #f))
     (inputs
-     `(("ffmpeg" ,ffmpeg)))
-    (synopsis "Download videos, audios, or images from Web sites")
+     `(("ffmpeg" ,ffmpeg)))             ; for multi-part and >=1080p videos
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'qualify-input-references
+           ;; Explicitly invoke the input ffmpeg, instead of whichever one
+           ;; happens to be in the user's $PATH at run time.
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
+                                          "/bin/ffmpeg")))
+               (substitute* "src/you_get/processor/ffmpeg.py"
+                 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
+                 ;; same string is also used when sniffing ffmpeg's output.
+                 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
+                  (string-append prefix "'" ffmpeg "'")))
+               #t))))
+       #:tests? #f))                    ; XXX some tests need Internet access
+    (synopsis "Download videos, audio, or images from Web sites")
     (description
      "You-Get is a command-line utility to download media contents (videos,
 audio, images) from the Web.  It can use either mpv or vlc for playback.")
@@ -1274,7 +1309,7 @@ audio, images) from the Web.  It can use either mpv or vlc for playback.")
 (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/"
@@ -1282,12 +1317,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"))
@@ -1326,6 +1372,12 @@ players, like VLC or MPlayer.")
                (base32
                 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
     (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
@@ -1686,6 +1738,35 @@ from various services and pipes them into a video playing application.")
     (home-page "http://livestreamer.io/")
     (license license:bsd-2)))
 
+(define-public streamlink
+  (package
+    (name "streamlink")
+    (version "0.10.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "streamlink" version))
+       (sha256
+        (base32
+         "17299xnd9jzi7m1d2rr4xdlj47q64bzj2957nlsrhw0hskds1s6h"))))
+    (build-system python-build-system)
+    (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-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)))
+    (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 mlt
   (package
     (name "mlt")
@@ -1718,6 +1799,7 @@ from various services and pipes them into a video playing application.")
             #t)))))
     (inputs
      `(("alsa-lib" ,alsa-lib)
+       ("ffmpeg" ,ffmpeg)
        ("fftw" ,fftw)
        ("libxml2" ,libxml2)
        ("jack" ,jack-1)
@@ -1736,7 +1818,7 @@ broadcasting.  It provides a toolkit for broadcasters, video editors, media
 players, transcoders, web streamers and many more types of applications.  The
 functionality of the system is provided via an assortment of ready to use
 tools, XML authoring components, and an extensible plug-in based API.")
-    (license license:lgpl2.1+)))
+    (license license:gpl3)))
 
 (define-public v4l-utils
   (package
@@ -1776,7 +1858,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"
@@ -1784,7 +1866,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
@@ -1867,6 +1949,41 @@ present in modern GPUs.")
 implementation.")
     (license (license:x11-style "file://COPYING"))))
 
+(define-public libvdpau-va-gl
+  (package
+    (name "libvdpau-va-gl")
+    (version "0.4.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
+                            "releases/download/v" version "/libvdpau-va-gl-"
+                            version ".tar.gz"))
+        (sha256
+         (base32
+          "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
+        (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
+        (modules '((guix build utils)))
+        (snippet '(delete-file-recursively "3rdparty"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
+    (native-inputs
+     `(("libvdpau" ,libvdpau)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libva" ,libva)
+       ("mesa" ,mesa)))
+    (home-page "https://github.com/i-rinat/libvdpau-va-gl")
+    (synopsis "VDPAU driver with VA-API/OpenGL backend")
+    (description
+     "Many applications can use VDPAU to accelerate portions of the video
+decoding process and video post-processing to the GPU video hardware.  Since
+there is no VDPAU available on Intel chips, they fall back to different drawing
+techniques.  This driver uses OpenGL under the hood to accelerate drawing and
+scaling and VA-API (if available) to accelerate video decoding.")
+    (license license:expat)))
+
 (define-public recordmydesktop
   (package
     (name "recordmydesktop")
@@ -1901,7 +2018,7 @@ making @dfn{screencasts}.")
 (define-public simplescreenrecorder
   (package
     (name "simplescreenrecorder")
-    (version "0.3.8")
+    (version "0.3.9")
     (source
      (origin
        (method url-fetch)
@@ -1910,8 +2027,8 @@ making @dfn{screencasts}.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0v8w35n8w772s08w7k0icynqdsdakbrcanbgx6j847bfqfsg21gg"))))
-    (build-system gnu-build-system)
+         "1gnf9wbiq2fcbqcn1a5nfmp8r0nxrrlgh2wly2mfkkwymynhx0pk"))))
+    (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.
@@ -1922,8 +2039,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")
@@ -2328,10 +2449,11 @@ MPEG-2, MPEG-4, DVD (VOB)...
        #:phases
        ;; build scripts not in root of archive
        (modify-phases %standard-phases
-         (add-before 'configure 'pre-configure
+         (add-after 'unpack 'change-to-build-dir
            (lambda _
-             (chdir "Project/GNU/CLI")))
-         (add-after 'unpack 'autogen
+             (chdir "Project/GNU/CLI")
+             #t))
+         (add-after 'change-to-build-dir 'autogen
            (lambda _
              (zero? (system* "sh" "autogen.sh")))))))
     (home-page "https://mediaarea.net/en/MediaInfo")
@@ -2406,10 +2528,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
@@ -2529,6 +2651,8 @@ tools for styling them, including a built-in real-time video preview.")
         (base32
          "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
     (build-system gnu-build-system)
+    (arguments
+     '(#:configure-flags '("LIBS=-lm")))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("doxygen" ,doxygen)))
@@ -2546,3 +2670,96 @@ In addition, it handles the sometimes ugly task of converting between all
 these formats and provides some elementary operations (copying, scaling,
 alpha blending etc).")
     (license license:gpl3)))
+
+(define-public frei0r-plugins
+  (package
+    (name "frei0r-plugins")
+    (version "1.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://files.dyne.org/frei0r/"
+                           "frei0r-plugins-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'autotools
+           (lambda _
+             (zero? (system* "sh" "autogen.sh")))))))
+    ;; TODO: opencv for additional face detection filters
+    (inputs
+     `(("gavl" ,gavl)
+       ("cairo" ,cairo)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("libtool" ,libtool)
+       ("automake" ,automake)
+       ("autoconf" ,autoconf)))
+    (home-page "https://www.dyne.org/software/frei0r/")
+    (synopsis "Minimalistic plugin API for video effects")
+    (description
+     "Frei0r is a minimalistic plugin API for video effects.
+The main emphasis is on simplicity for an API that will round up
+the most common video effects into simple filters, sources and
+mixers that can be controlled by parameters.  Frei0r wants to
+provide a way to share these simple effects between many
+applications, avoiding their reimplementation by different projects.
+It counts more than 100 plugins.")
+    (license (list license:gpl2+
+                   ;; The following files are licensed as LGPL2.1+:
+                   ;; src/generator/ising0r/ising0r.c
+                   ;; src/generator/onecol0r/onecol0r.cpp
+                   ;; src/generator/nois0r/nois0r.cpp
+                   ;; src/generator/lissajous0r/lissajous0r.cpp
+                   ;; src/filter/ndvi/gradientlut.hpp
+                   ;; 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)
+       ("sqlite" ,sqlite)))
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack '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)))