gnu: openh264: Fix building on armhf and aarch64.
[jackhill/guix/guix.git] / gnu / packages / video.scm
index e3f9f36..816fb9d 100644 (file)
@@ -17,6 +17,9 @@
 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
 ;;; Copyright © 2017 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>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,6 +60,7 @@
   #:use-module (gnu packages cdrom)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dejagnu)
@@ -75,6 +79,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages assembly)
-  #:use-module (gnu packages zip))
+  #:use-module (gnu packages assembly))
 
 (define-public aalib
   (package
@@ -271,7 +275,7 @@ H.264 (MPEG-4 AVC) video streams.")
 (define-public x265
   (package
     (name "x265")
-    (version "2.3")
+    (version "2.4")
     (source
       (origin
         (method url-fetch)
@@ -279,7 +283,7 @@ H.264 (MPEG-4 AVC) video streams.")
                             "x265_" version ".tar.gz"))
         (sha256
          (base32
-          "07z4ydxg0lk6j43h0wlh2xddb91cy4y4mny2ln71d4278b1hllj7"))
+          "0afp0xlk0fb4q6j4sh3hyvjnjccdp61sn21zg3fyqvwgswcafalw"))
         (modules '((guix build utils)))
         (snippet
          '(delete-file-recursively "source/compat/getopt"))))
@@ -306,7 +310,7 @@ designed to encode video or images into an H.265 / HEVC encoded bitstream.")
 (define-public libass
   (package
     (name "libass")
-    (version "0.13.6")
+    (version "0.13.7")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -314,7 +318,7 @@ designed to encode video or images into an H.265 / HEVC encoded bitstream.")
                     version "/libass-" version ".tar.xz"))
               (sha256
                (base32
-                "0b9cj5xfsa7zwlk5m146fhv102v51iqs3rapq0n2xrz30k8p9a7q"))))
+                "17byv926w1mxn56n896sxvdq4m0yv1l7qbm688h6zr3nzgsyarbh"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -406,7 +410,7 @@ SMPTE 314M.")
 (define-public libva
   (package
     (name "libva")
-    (version "1.8.1")
+    (version "1.8.2")
     (source
      (origin
        (method url-fetch)
@@ -414,7 +418,7 @@ SMPTE 314M.")
              "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
              version".tar.bz2"))
        (sha256
-        (base32 "0wswfznj93jpnxhc3jwdk5j3pmyki0rs6k9vk4vnzds0dddximf1"))))
+        (base32 "1pnfl3q7dzxs26l3jk9xi97gr0qwnaz6dhvf9ifp2yplr3fy7lwy"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -456,14 +460,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.3")
+    (version "3.3.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "17anx7rnbi63if1ndr61836lf76dpn47n0y424hc48bj05y7z7jr"))))
+               "11974vcfsy8w0i6f4lfwqmg80xkfybqw7vw6zzrcn5i6ncddx60r"))))
     (build-system gnu-build-system)
     (inputs
      `(("fontconfig" ,fontconfig)
@@ -477,6 +481,7 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
        ("libcaca" ,libcaca)
        ("libcdio-paranoia" ,libcdio-paranoia)
        ("libtheora" ,libtheora)
+       ("libva" ,libva)
        ("libvdpau" ,libvdpau)
        ("libvorbis" ,libvorbis)
        ("libvpx" ,libvpx)
@@ -624,14 +629,14 @@ audio/video codec library.")
 (define-public ffmpeg-2.8
   (package
     (inherit ffmpeg)
-    (version "2.8.11")
+    (version "2.8.12")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1rhz7rhmhhh8bjcj3dc82haisn3qjbzqlr7k6d6v7064jgn3maiq"))))
+               "1gc32akvdms3rywphnap94lqqici8l5898a09ir1ad5rif5g24v2"))))
     (arguments
      (substitute-keyword-arguments (package-arguments ffmpeg)
        ((#:configure-flags flags)
@@ -644,7 +649,7 @@ audio/video codec library.")
 (define-public vlc
   (package
     (name "vlc")
-    (version "2.2.4")
+    (version "2.2.6")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -652,17 +657,13 @@ audio/video codec library.")
                    version "/vlc-" version ".tar.xz"))
              (sha256
               (base32
-               "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
-             (modules '((guix build utils)))
-             (snippet
-              ;; There are two occurrences where __DATE__ and __TIME__ are
-              ;; used to capture the build time and show it to the user.
-              '(substitute* (find-files "." "help\\.c(pp)?$")
-                 (("__DATE__") "\"2016\"")
-                 (("__TIME__") "\"00:00\"")))))
+               "1a22b913p2227ljz89c4fgjlyln5gcz8z58w32r0wh4srnnd60y4"))))
     (build-system gnu-build-system)
     (native-inputs
-     `(("git" ,git) ; needed for a test
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("git" ,git) ; needed for a test
+       ("libtool" ,libtool)
        ("pkg-config" ,pkg-config)))
     ;; FIXME: Add optional inputs once available.
     (inputs
@@ -676,6 +677,7 @@ audio/video codec library.")
        ("gnutls" ,gnutls)
        ("liba52" ,liba52)
        ("libcddb" ,libcddb)
+       ("libdvbpsi" ,libdvbpsi)
        ("libgcrypt" ,libgcrypt)
        ("libkate" ,libkate)
        ("libmad" ,libmad)
@@ -690,6 +692,7 @@ audio/video codec library.")
        ("libxinerama" ,libxinerama)
        ("libxml2" ,libxml2)
        ("libxpm" ,libxpm)
+       ("livemedia-utils" ,livemedia-utils)
        ("lua" ,lua-5.1)
        ("mesa" ,mesa)
        ("opus" ,opus)
@@ -717,6 +720,15 @@ audio/video codec library.")
 
        #:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'bootstrap
+           (lambda _ (zero? (system* "sh" "bootstrap"))))
+         (add-before 'bootstrap 'fix-livemedia-utils-prefix
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
+               (substitute* "configure.ac"
+                 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
+                  (string-append "LIVE555_PREFIX=" livemedia-utils)))
+               #t)))
          (add-before 'configure 'remove-visual-tests
            ;; Some of the tests require using the display to test out VLC,
            ;; which fails in our sandboxed build system
@@ -989,7 +1001,7 @@ access to mpv's powerful playback capabilities.")
 (define-public youtube-dl
   (package
     (name "youtube-dl")
-    (version "2017.04.28")
+    (version "2017.06.23")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://yt-dl.org/downloads/"
@@ -997,7 +1009,7 @@ access to mpv's powerful playback capabilities.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "0d3mgf8qxb07b7bjf79ppaxhcl4f47q0zjpshp6y2q0lalfskh3j"))))
+                "09x11k69imfx6j2dj3p8bckk8f59q276hy65q5qr8qc41s80j8b3"))))
     (build-system python-build-system)
     (arguments
      ;; The problem here is that the directory for the man page and completion
@@ -1131,7 +1143,7 @@ audio, images) from the Web.  It can use either mpv or vlc for playback.")
 (define-public libbluray
   (package
     (name "libbluray")
-    (version "1.0.0")
+    (version "1.0.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.videolan.org/videolan/"
@@ -1139,10 +1151,10 @@ audio, images) from the Web.  It can use either mpv or vlc for playback.")
                                   name "-" version ".tar.bz2"))
               (sha256
                (base32
-                "1k3lag4lxi2jjd3zh4wcb5l3hadzm54j5kagh92yzfy76p9svqzp"))))
+                "0fl5cxfj870rwqmmz3s04wh7wnabb7rnynfj1v3sz37ln8frm7qg"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags '("--disable-bdjava")
+     `(#:configure-flags '("--disable-bdjava-jar")
        #:phases
        (modify-phases %standard-phases
          (add-before 'build 'fix-dlopen-paths
@@ -1193,6 +1205,33 @@ authentication and descrambling (if an external libdvdcss library is
 installed).")
     (license license:gpl2+)))
 
+(define-public dvdauthor
+  (package
+    (name "dvdauthor")
+    (version "0.7.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libdvdread" ,libdvdread)
+       ("libpng" ,libpng)
+       ("imagemagick" ,imagemagick)
+       ("libxml2" ,libxml2)
+       ("freetype" ,freetype)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
+    (description "@command{dvdauthor} will generate a DVD-Video movie from a
+MPEG-2 stream containing VOB packets.")
+    (home-page "http://dvdauthor.sourceforge.net")
+    (license license:gpl3+)))
+
 (define-public libdvdnav
   (package
     (name "libdvdnav")
@@ -1410,6 +1449,7 @@ filtering and encoding tasks.  It supports many file types, including AVI,
 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs.  Tasks
 can be automated using projects, job queue and powerful scripting
 capabilities.")
+    (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
     ;; Software with various licenses is included, see License.txt.
     (license license:gpl2+)))
 
@@ -1570,14 +1610,14 @@ tools, XML authoring components, and an extensible plug-in based API.")
 (define-public v4l-utils
   (package
     (name "v4l-utils")
-    (version "1.12.3")
+    (version "1.12.5")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
                                   "/v4l-utils-" version ".tar.bz2"))
               (sha256
                (base32
-                "0vpl3jl0x441y7b5cn7zhdsyi954hp9h2p30jhnr1zkx1rpxsiss"))))
+                "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
@@ -1605,7 +1645,7 @@ be used for realtime video capture via Linux-specific APIs.")
 (define-public obs
   (package
     (name "obs")
-    (version "18.0.1")
+    (version "18.0.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/jp9000/obs-studio"
@@ -1613,7 +1653,7 @@ be used for realtime video capture via Linux-specific APIs.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "043f8mfdh4ll0hpivpyg3iniirckwsgri0gzamyrba1yhf2c2ibr"))))
+                "02pbiyvf5x0zh448h5rpmyn33qnsqk694xxlyns83mdi74savyqw"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f)) ; no tests
@@ -1787,14 +1827,14 @@ specifications.")
 (define-public libaacs
   (package
     (name "libaacs")
-    (version "0.8.1")
+    (version "0.9.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libaacs/"
                            version "/" name "-" version ".tar.bz2"))
        (sha256
-        (base32 "1s5v075hnbs57995r6lljm79wgrip3gnyf55a0y7bja75jh49hwm"))))
+        (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
     (inputs
      `(("libgcrypt" ,libgcrypt)))
     (native-inputs
@@ -1961,7 +2001,8 @@ of modern, widely supported codecs.")
      `(("nasm" ,nasm)
        ("python" ,python)))
     (arguments
-     '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+     '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+                          "CC=gcc")
        #:test-target "test"
        #:phases (modify-phases %standard-phases
                   ;; no configure script
@@ -2030,3 +2071,163 @@ file format that has been used as a multimedia file format in a variety of platf
 applications.  It is a very powerful and extensible format that can accommodate
 practically any type of media.")
     (license license:mpl1.1)))
+
+(define-public libmediainfo
+  (package
+    (name "libmediainfo")
+    (version "0.7.95")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://mediaarea.net/download/source/"
+                                  name "/" version"/"
+                                  name "_" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
+    ;; TODO add a Big Buck Bunny webm for tests.
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)
+       ("zlib" ,zlib)
+       ("tinyxml2" ,tinyxml2)
+       ("curl" ,curl)
+       ("libzen" ,libzen)))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; see above TODO
+       #:phases
+       ;; build scripts not in root of archive
+       (modify-phases %standard-phases
+         (add-before 'configure 'pre-configure
+           (lambda _
+             (chdir "Project/GNU/Library")))
+         (add-before 'configure 'autogen
+           (lambda _
+             (zero? (system* "./autogen.sh")))))))
+    (home-page "https://mediaarea.net/en/MediaInfo")
+    (synopsis "Library for retrieving media metadata")
+    (description "MediaInfo is a library used for retrieving technical
+information and other metadata about audio or video files.  A non-exhaustive
+list of the information MediaInfo can retrieve from media files include:
+
+@itemize
+@item General: title, author, director, album, track number, date, duration...
+@item Video: codec, aspect, fps, bitrate...
+@item Audio: codec, sample rate, channels, language, bitrate...
+@item Text: language of subtitle
+@item Chapters: number of chapters, list of chapters
+@end itemize
+
+MediaInfo supports the following formats:
+
+@itemize
+@item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
+MPEG-2, MPEG-4, DVD (VOB)...
+@item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
+@item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
+@item  Subtitles: SRT, SSA, ASS, SAMI...
+@end itemize\n")
+    (license license:bsd-2)))
+
+;; TODO also have a GUI version available
+(define-public mediainfo
+  (package
+    (name "mediainfo")
+    (version "0.7.95")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://mediaarea.net/download/source/"
+                                  name "/" version "/"
+                                  name "_" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)
+       ("zlib" ,zlib)
+       ("libmediainfo", libmediainfo)
+       ("libzen" ,libzen)))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; lacks tests
+       #:phases
+       ;; build scripts not in root of archive
+       (modify-phases %standard-phases
+         (add-before 'configure 'pre-configure
+           (lambda _
+             (chdir "Project/GNU/CLI")))
+         (add-before 'configure 'autogen
+           (lambda _
+             (zero? (system* "./autogen.sh")))))))
+    (home-page "https://mediaarea.net/en/MediaInfo")
+    (synopsis "Utility for reading media metadata")
+    (description "MediaInfo is a utility used for retrieving technical
+information and other metadata about audio or video files.  It supports the
+many codecs and formats supported by libmediainfo.")
+    (license license:bsd-2)))
+
+(define-public livemedia-utils
+  (package
+    (name "livemedia-utils")
+    (version "2017.06.04")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://download.videolan.org/contrib/live555/live."
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "0xf3vynxqpxpd762zni0jkblnjlgbqxjx99m83m7gqx6zriph271"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; no tests
+       #:make-flags (list "CC=gcc"
+                          (string-append "LDFLAGS=-Wl,-rpath="
+                                         (assoc-ref %outputs "out") "/lib")
+                          (string-append "PREFIX="
+                                         (assoc-ref %outputs "out")))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'configure 'fix-makefiles-generation
+                    (lambda _
+                      (substitute* "genMakefiles"
+                        (("/bin/rm") "rm"))
+                      #t))
+                  (replace 'configure
+                    (lambda _
+                      (zero? (system* "./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
+streaming, using open standard protocols (RTP/RTCP, RTSP, SIP).  The libraries
+can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
+JPEG video, and several audio codecs.  They can easily be extended to support
+additional (audio and/or video) codecs, and can also be used to build basic
+RTSP or SIP clients and servers.")
+    (license license:lgpl3+)))
+
+(define-public libdvbpsi
+  (package
+    (name "libdvbpsi")
+    (version "1.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://download.videolan.org/pub/libdvbpsi/"
+                    version "/libdvbpsi-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0824r08kaspbrrg2dd5d46s475zb7j59brqkm2y6x3mdsnpng0yn"))))
+    (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
+tables")
+    (description "libdvbpsi is a simple library designed for decoding and
+generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
+and ITU-T H.222.0.")
+    (license license:lgpl2.1)))