You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1334 lines
53 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
  3. ;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
  4. ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
  5. ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
  6. ;;;
  7. ;;; This file is part of GNU Guix.
  8. ;;;
  9. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  10. ;;; under the terms of the GNU General Public License as published by
  11. ;;; the Free Software Foundation; either version 3 of the License, or (at
  12. ;;; your option) any later version.
  13. ;;;
  14. ;;; GNU Guix is distributed in the hope that it will be useful, but
  15. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ;;; GNU General Public License for more details.
  18. ;;;
  19. ;;; You should have received a copy of the GNU General Public License
  20. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  21. (define-module (gnu packages video)
  22. #:use-module (ice-9 match)
  23. #:use-module ((guix licenses) #:prefix license:)
  24. #:use-module (guix utils)
  25. #:use-module (guix packages)
  26. #:use-module (guix download)
  27. #:use-module (guix git-download)
  28. #:use-module (guix build-system cmake)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (guix build-system python)
  31. #:use-module (guix build-system waf)
  32. #:use-module (gnu packages)
  33. #:use-module (gnu packages algebra)
  34. #:use-module (gnu packages audio)
  35. #:use-module (gnu packages autotools)
  36. #:use-module (gnu packages avahi)
  37. #:use-module (gnu packages base)
  38. #:use-module (gnu packages cdrom)
  39. #:use-module (gnu packages compression)
  40. #:use-module (gnu packages databases)
  41. #:use-module (gnu packages doxygen)
  42. #:use-module (gnu packages elf)
  43. #:use-module (gnu packages fontutils)
  44. #:use-module (gnu packages fribidi)
  45. #:use-module (gnu packages gettext)
  46. #:use-module (gnu packages ghostscript)
  47. #:use-module (gnu packages gl)
  48. #:use-module (gnu packages glib)
  49. #:use-module (gnu packages guile)
  50. #:use-module (gnu packages gnupg)
  51. #:use-module (gnu packages gnutls)
  52. #:use-module (gnu packages gtk)
  53. #:use-module (gnu packages image)
  54. #:use-module (gnu packages linux)
  55. #:use-module (gnu packages lua)
  56. #:use-module (gnu packages mp3)
  57. #:use-module (gnu packages ncurses)
  58. #:use-module (gnu packages ocr)
  59. #:use-module (gnu packages openssl)
  60. #:use-module (gnu packages perl)
  61. #:use-module (gnu packages pkg-config)
  62. #:use-module (gnu packages pulseaudio)
  63. #:use-module (gnu packages python)
  64. #:use-module (gnu packages qt)
  65. #:use-module (gnu packages samba)
  66. #:use-module (gnu packages sdl)
  67. #:use-module (gnu packages ssh)
  68. #:use-module (gnu packages texinfo)
  69. #:use-module (gnu packages texlive)
  70. #:use-module (gnu packages textutils)
  71. #:use-module (gnu packages version-control)
  72. #:use-module (gnu packages web)
  73. #:use-module (gnu packages xdisorg)
  74. #:use-module (gnu packages xiph)
  75. #:use-module (gnu packages xml)
  76. #:use-module (gnu packages xorg)
  77. #:use-module (gnu packages yasm)
  78. #:use-module (gnu packages zip))
  79. (define-public aalib
  80. (package
  81. (name "aalib")
  82. (version "1.4rc5")
  83. (source (origin
  84. (method url-fetch)
  85. (uri (string-append "mirror://sourceforge/aa-project/"
  86. name "-" version ".tar.gz"))
  87. (sha256
  88. (base32
  89. "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
  90. (build-system gnu-build-system)
  91. (native-inputs
  92. `(("makeinfo" ,texinfo)))
  93. (inputs
  94. `(("ncurses" ,ncurses)))
  95. (arguments
  96. '(#:phases
  97. (modify-phases %standard-phases
  98. (replace 'configure
  99. (lambda* (#:key inputs outputs #:allow-other-keys)
  100. ;; This old `configure' script doesn't support
  101. ;; variables passed as arguments.
  102. (let ((out (assoc-ref outputs "out"))
  103. (ncurses (assoc-ref inputs "ncurses")))
  104. (setenv "CONFIG_SHELL" (which "bash"))
  105. (zero? (system* "./configure"
  106. (string-append "--prefix=" out)
  107. (string-append "--with-ncurses="
  108. ncurses)))))))))
  109. (home-page "http://aa-project.sourceforge.net/aalib/")
  110. (synopsis "ASCII-art library")
  111. (description
  112. "AA-lib is a low level gfx library which does not require graphics device.
  113. In fact, there is no graphical output possible. AA-lib replaces those
  114. old-fashioned output methods with powerful ascii-art renderer.")
  115. (license license:lgpl2.0+)))
  116. (define-public liba52
  117. (package
  118. (name "liba52")
  119. (version "0.7.4")
  120. (source (origin
  121. (method url-fetch)
  122. (uri (string-append
  123. ;; A mirror://sourceforge URI doesn't work, presumably
  124. ;; because the SourceForge project is misconfigured.
  125. "http://liba52.sourceforge.net/files/a52dec-" version
  126. ".tar.gz"))
  127. (sha256
  128. (base32
  129. "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))))
  130. (build-system gnu-build-system)
  131. (arguments `(#:configure-flags
  132. '(;; FIXME: liba52-0.7.4's config.guess fails on mips64el.
  133. ,@(if (%current-target-system)
  134. '()
  135. (let ((triplet
  136. (nix-system->gnu-triplet (%current-system))))
  137. (list (string-append "--build=" triplet)))))))
  138. (home-page "http://liba52.sourceforge.net/")
  139. (synopsis "ATSC A/52 stream decoder")
  140. (description "liba52 is a library for decoding ATSC A/52 streams. The
  141. A/52 standard is used in a variety of applications, including digital
  142. television and DVD. It is also known as AC-3.")
  143. (license license:gpl2+)))
  144. (define-public libass
  145. (package
  146. (name "libass")
  147. (version "0.12.1")
  148. (source (origin
  149. (method url-fetch)
  150. (uri (string-append
  151. "https://github.com/libass/libass/releases/download/"
  152. version "/libass-" version ".tar.xz"))
  153. (sha256
  154. (base32
  155. "1mwj2nk9g6cq6f8m1hf0ijg1299rghhy9naahqq43sc2whblb1l7"))))
  156. (build-system gnu-build-system)
  157. (native-inputs
  158. `(("pkg-config" ,pkg-config)
  159. ("yasm" ,yasm)))
  160. (propagated-inputs
  161. `(("freetype" ,freetype)
  162. ("fribidi" ,fribidi)
  163. ("fontconfig" ,fontconfig)
  164. ("harfbuzz" ,harfbuzz)
  165. ("enca" ,enca)))
  166. (home-page "https://github.com/libass/libass")
  167. (synopsis "Subtitle rendering library for the ASS/SSA format")
  168. (description "libass is a subtitle rendering library for the
  169. ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
  170. (license license:isc)))
  171. (define-public libcaca
  172. (package
  173. (name "libcaca")
  174. (version "0.99.beta19")
  175. (source (origin
  176. (method url-fetch)
  177. (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
  178. version ".tar.gz"))
  179. (sha256
  180. (base32
  181. "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
  182. (build-system gnu-build-system)
  183. (native-inputs `(("pkg-config" ,pkg-config)))
  184. (inputs
  185. `(("freeglut" ,freeglut)
  186. ("ftgl" ,ftgl)
  187. ("libx11" ,libx11)
  188. ("mesa" ,mesa)
  189. ("ncurses" ,ncurses)
  190. ("zlib" ,zlib)))
  191. (home-page "http://caca.zoy.org/wiki/libcaca")
  192. (synopsis "Colour ASCII-art library")
  193. (description "libcaca is a graphics library that outputs text instead of
  194. pixels, so that it can work on older video cards or text terminals. It
  195. supports Unicode, 2048 colors, dithering of color images, and advanced text
  196. canvas operations.")
  197. (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
  198. (define-public libdca
  199. (package
  200. (name "libdca")
  201. (version "0.0.5")
  202. (source (origin
  203. (method url-fetch)
  204. (uri (string-append
  205. "http://download.videolan.org/pub/videolan/libdca/"
  206. version "/libdca-" version ".tar.bz2"))
  207. (sha256
  208. (base32
  209. "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
  210. (build-system gnu-build-system)
  211. (home-page "http://www.videolan.org/developers/libdca.html")
  212. (synopsis "DTS Coherent Acoustics decoder")
  213. (description "libdca is a library for decoding DTS Coherent Acoustics
  214. streams.")
  215. (license license:gpl2+)))
  216. (define-public libdv
  217. (package
  218. (name "libdv")
  219. (version "1.0.0")
  220. (source (origin
  221. (method url-fetch)
  222. (uri (string-append
  223. "mirror://sourceforge/libdv/libdv-" version ".tar.gz"))
  224. (sha256
  225. (base32
  226. "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
  227. (build-system gnu-build-system)
  228. (native-inputs `(("pkg-config" ,pkg-config)))
  229. (inputs `(("libxv" ,libxv)))
  230. (home-page "http://libdv.sourceforge.net/")
  231. (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
  232. (description "The Quasar DV codec (libdv) is a software codec for DV
  233. video, the encoding format used by most digital camcorders, typically those
  234. that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
  235. developed according to the official standards for DV video: IEC 61834 and
  236. SMPTE 314M.")
  237. (license license:lgpl2.1+)))
  238. (define-public libva
  239. (package
  240. (name "libva")
  241. (version "1.5.1")
  242. (source
  243. (origin
  244. (method url-fetch)
  245. (uri (string-append
  246. "http://www.freedesktop.org/software/vaapi/releases/libva/libva-"
  247. version".tar.bz2"))
  248. (sha256
  249. (base32 "01d01mm9fgpwzqycmjjcj3in3vvzcibi3f64icsw2sksmmgb4495"))))
  250. (build-system gnu-build-system)
  251. (native-inputs
  252. `(("pkg-config" ,pkg-config)))
  253. (inputs
  254. `(("libdrm" ,libdrm)
  255. ("libx11" ,libx11)
  256. ("libxext" ,libxext)
  257. ("libxfixes" ,libxfixes)
  258. ("mesa" ,mesa)))
  259. (arguments
  260. `(#:phases
  261. (modify-phases %standard-phases
  262. (add-before
  263. 'build 'fix-dlopen-paths
  264. (lambda* (#:key outputs #:allow-other-keys)
  265. (let ((out (assoc-ref outputs "out")))
  266. (substitute* "va/drm/va_drm_auth_x11.c"
  267. (("\"libva-x11\\.so\\.%d\"")
  268. (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
  269. ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
  270. ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
  271. #:configure-flags
  272. (list (string-append "--with-drivers-path="
  273. (assoc-ref %build-inputs "mesa") "/lib/dri"))
  274. ;; However, we can't write to mesa's store directory, so override the
  275. ;; following make variable to install the dummy driver to libva's
  276. ;; $prefix/lib/dri directory.
  277. #:make-flags
  278. (list (string-append "dummy_drv_video_ladir="
  279. (assoc-ref %outputs "out") "/lib/dri"))))
  280. (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
  281. (synopsis "Video acceleration library")
  282. (description "The main motivation for VA-API (Video Acceleration API) is
  283. to enable hardware accelerated video decode/encode at various
  284. entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
  285. standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
  286. (license license:expat)))
  287. (define-public ffmpeg
  288. (package
  289. (name "ffmpeg")
  290. (version "2.6.2")
  291. (source (origin
  292. (method url-fetch)
  293. (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-"
  294. version ".tar.bz2"))
  295. (sha256
  296. (base32
  297. "1fi93zy98wmls7x3jpr2yvckk2ia6a1yyygwrfaxq95pd6h3m7l8"))))
  298. (build-system gnu-build-system)
  299. (inputs
  300. `(("fontconfig" ,fontconfig)
  301. ("freetype" ,freetype)
  302. ("opus" ,opus)
  303. ("ladspa" ,ladspa)
  304. ("lame" ,lame)
  305. ("libass" ,libass)
  306. ("libbluray" ,libbluray)
  307. ("libcaca" ,libcaca)
  308. ("libcdio-paranoia" ,libcdio-paranoia)
  309. ("libquvi" ,libquvi)
  310. ("libtheora" ,libtheora)
  311. ("libvorbis" ,libvorbis)
  312. ("libvpx" ,libvpx)
  313. ("openal" ,openal)
  314. ("pulseaudio" ,pulseaudio)
  315. ("soxr" ,soxr)
  316. ("speex" ,speex)
  317. ("twolame" ,twolame)
  318. ("xvid" ,xvid)
  319. ("zlib", zlib)))
  320. (native-inputs
  321. `(("bc" ,bc)
  322. ("bzip2" ,bzip2)
  323. ("perl" ,perl)
  324. ("pkg-config" ,pkg-config)
  325. ("python" ,python-2) ; scripts use interpreter python2
  326. ("speex" ,speex)
  327. ("yasm" ,yasm)))
  328. (arguments
  329. `(#:test-target "fate"
  330. #:phases
  331. (modify-phases %standard-phases
  332. (replace
  333. 'configure
  334. ;; configure does not work followed by "SHELL=..." and
  335. ;; "CONFIG_SHELL=..."; set environment variables instead
  336. (lambda* (#:key outputs configure-flags #:allow-other-keys)
  337. (let ((out (assoc-ref outputs "out")))
  338. (substitute* "configure"
  339. (("#! /bin/sh") (string-append "#!" (which "bash"))))
  340. (setenv "SHELL" (which "bash"))
  341. (setenv "CONFIG_SHELL" (which "bash"))
  342. ;; possible additional inputs:
  343. ;; --enable-avisynth enable reading of AviSynth script files [no]
  344. ;; --enable-frei0r enable frei0r video filtering
  345. ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
  346. ;; --enable-libcelt enable CELT decoding via libcelt [no]
  347. ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
  348. ;; and libraw1394 [no]
  349. ;; --enable-libfaac enable AAC encoding via libfaac [no]
  350. ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
  351. ;; --enable-libflite enable flite (voice synthesis) support via libflite [no]
  352. ;; --enable-libgme enable Game Music Emu via libgme [no]
  353. ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
  354. ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
  355. ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
  356. ;; --enable-libmodplug enable ModPlug via libmodplug [no]
  357. ;; --enable-libnut enable NUT (de)muxing via libnut,
  358. ;; native (de)muxer exists [no]
  359. ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
  360. ;; --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
  361. ;; --enable-libopencv enable video filtering via libopencv [no]
  362. ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
  363. ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
  364. ;; --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
  365. ;; --enable-libshine enable fixed-point MP3 encoding via libshine [no]
  366. ;; --enable-libssh enable SFTP protocol via libssh [no]
  367. ;; (libssh2 does not work)
  368. ;; --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no]
  369. ;; --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no]
  370. ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
  371. ;; --enable-libvidstab enable video stabilization using vid.stab [no]
  372. ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
  373. ;; --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
  374. ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
  375. ;; --enable-libx264 enable H.264 encoding via x264 [no]
  376. ;; --enable-libxavs enable AVS encoding via xavs [no]
  377. ;; --enable-libzmq enable message passing via libzmq [no]
  378. ;; --enable-libzvbi enable teletext support via libzvbi [no]
  379. ;; --enable-opencl enable OpenCL code
  380. ;; --enable-x11grab enable X11 grabbing [no]
  381. (zero? (system*
  382. "./configure"
  383. (string-append "--prefix=" out)
  384. ;; Add $libdir to the RUNPATH of all the binaries.
  385. (string-append "--extra-ldflags=-Wl,-rpath="
  386. %output "/lib")
  387. "--enable-avresample"
  388. "--enable-gpl" ; enable optional gpl licensed parts
  389. "--enable-shared"
  390. "--enable-fontconfig"
  391. ;; "--enable-gnutls" ; causes test failures
  392. "--enable-ladspa"
  393. "--enable-libass"
  394. "--enable-libbluray"
  395. "--enable-libcaca"
  396. "--enable-libcdio"
  397. "--enable-libfreetype"
  398. "--enable-libmp3lame"
  399. "--enable-libopus"
  400. "--enable-libpulse"
  401. "--enable-libquvi"
  402. "--enable-libsoxr"
  403. "--enable-libspeex"
  404. "--enable-libtheora"
  405. "--enable-libtwolame"
  406. "--enable-libvorbis"
  407. "--enable-libvpx"
  408. "--enable-libxvid"
  409. "--enable-openal"
  410. "--enable-runtime-cpudetect"
  411. ;; Runtime cpu detection is not implemented on
  412. ;; MIPS, so we disable some features.
  413. "--disable-mips32r2"
  414. "--disable-mipsdspr1"
  415. "--disable-mipsdspr2"
  416. "--disable-mipsfpu")))))
  417. (add-before
  418. 'check 'set-ld-library-path
  419. (lambda _
  420. ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
  421. ;; running tests.
  422. (let* ((dso (find-files "." "\\.so$"))
  423. (path (string-join (map dirname dso) ":")))
  424. (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
  425. (setenv "LD_LIBRARY_PATH" path)
  426. #t))))))
  427. (home-page "http://www.ffmpeg.org/")
  428. (synopsis "Audio and video framework")
  429. (description "FFmpeg is a complete, cross-platform solution to record,
  430. convert and stream audio and video. It includes the libavcodec
  431. audio/video codec library.")
  432. (license license:gpl2+)))
  433. (define-public vlc
  434. (package
  435. (name "vlc")
  436. (version "2.2.0")
  437. (source (origin
  438. (method url-fetch)
  439. (uri (string-append
  440. "http://download.videolan.org/pub/videolan/vlc/"
  441. version "/vlc-" version ".tar.xz"))
  442. (sha256
  443. (base32
  444. "05smn9hqdp7iscc1dj4cxp1mrlad7b50lhlnlqisfzf493i2f2jy"))))
  445. (build-system gnu-build-system)
  446. (native-inputs
  447. `(("git" ,git) ; needed for a test
  448. ("pkg-config" ,pkg-config)))
  449. ;; FIXME: Add optional inputs once available.
  450. (inputs
  451. `(("alsa-lib" ,alsa-lib)
  452. ("avahi" ,avahi)
  453. ("dbus" ,dbus)
  454. ("flac" ,flac)
  455. ("ffmpeg" ,ffmpeg)
  456. ("fontconfig" ,fontconfig)
  457. ("freetype" ,freetype)
  458. ("gnutls" ,gnutls)
  459. ("libcddb" ,libcddb)
  460. ("libgcrypt" ,libgcrypt)
  461. ("libkate" ,libkate)
  462. ("libmad" ,libmad)
  463. ("libogg" ,libogg)
  464. ("libpng" ,libpng)
  465. ("libsamplerate" ,libsamplerate)
  466. ("libssh2" ,libssh2)
  467. ("libvorbis" ,libvorbis)
  468. ("libtheora" ,libtheora)
  469. ("libxext" ,libxext)
  470. ("libxinerama" ,libxinerama)
  471. ("libxml2" ,libxml2)
  472. ("libxpm" ,libxpm)
  473. ("lua" ,lua-5.1)
  474. ("mesa" ,mesa)
  475. ("opus" ,opus)
  476. ("perl" ,perl)
  477. ("pulseaudio" ,pulseaudio)
  478. ("python" ,python-wrapper)
  479. ("qt" ,qt-4)
  480. ("sdl" ,sdl)
  481. ("sdl-image" ,sdl-image)
  482. ("speex" ,speex)
  483. ("xcb-util-keysyms" ,xcb-util-keysyms)))
  484. (arguments
  485. `(#:configure-flags
  486. `("--disable-a52" ; FIXME: reenable once available
  487. ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
  488. (assoc-ref %build-inputs "ffmpeg")
  489. "/lib")))) ; needed for the tests
  490. (home-page "https://www.videolan.org/")
  491. (synopsis "Audio and video framework")
  492. (description "VLC is a cross-platform multimedia player and framework
  493. that plays most multimedia files as well as DVD, Audio CD, VCD, and various
  494. treaming protocols.")
  495. (license license:gpl2+)))
  496. (define-public mplayer
  497. (package
  498. (name "mplayer")
  499. (version "1.1.1")
  500. (source (origin
  501. (method url-fetch)
  502. (uri (string-append
  503. "http://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
  504. version ".tar.xz"))
  505. (sha256
  506. (base32
  507. "0xlcg7rszrwmw29wqr0plsw5d1rq0hb7vjsq7bmmfsly2z1wg3yf"))))
  508. (build-system gnu-build-system)
  509. ;; FIXME: Add additional inputs once available.
  510. (native-inputs
  511. `(("pkg-config" ,pkg-config)))
  512. (inputs
  513. `(("alsa-lib" ,alsa-lib)
  514. ("cdparanoia" ,cdparanoia)
  515. ("fontconfig" ,fontconfig)
  516. ("freetype" ,freetype)
  517. ("lame" ,lame)
  518. ("libmpg123" ,mpg123) ; audio codec for MP3
  519. ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
  520. ("libjpeg" ,libjpeg)
  521. ("libpng" ,libpng)
  522. ("libtheora" ,libtheora)
  523. ("libvorbis" ,libvorbis)
  524. ("libx11" ,libx11)
  525. ("libxxf86dga" ,libxxf86dga)
  526. ("libxinerama" ,libxinerama)
  527. ("libxv" ,libxv)
  528. ("mesa" ,mesa)
  529. ("perl" ,perl)
  530. ("pulseaudio" ,pulseaudio)
  531. ("python" ,python-wrapper)
  532. ("sdl" ,sdl)
  533. ("speex" ,speex)
  534. ("yasm" ,yasm)
  535. ("zlib" ,zlib)))
  536. (arguments
  537. `(#:tests? #f ; no test target
  538. #:phases
  539. (alist-replace
  540. 'configure
  541. ;; configure does not work followed by "SHELL=..." and
  542. ;; "CONFIG_SHELL=..."; set environment variables instead
  543. (lambda* (#:key inputs outputs #:allow-other-keys)
  544. (let ((out (assoc-ref outputs "out"))
  545. (libx11 (assoc-ref inputs "libx11")))
  546. (substitute* "configure"
  547. (("#! /bin/sh") (string-append "#!" (which "bash"))))
  548. (setenv "SHELL" (which "bash"))
  549. (setenv "CONFIG_SHELL" (which "bash"))
  550. (zero? (system*
  551. "./configure"
  552. (string-append "--extra-cflags=-I"
  553. libx11 "/include") ; to detect libx11
  554. "--disable-tremor-internal" ; forces external libvorbis
  555. (string-append "--prefix=" out)
  556. ;; Enable runtime cpu detection where supported,
  557. ;; and choose a suitable target.
  558. ,@(match (or (%current-target-system)
  559. (%current-system))
  560. ("x86_64-linux"
  561. '("--enable-runtime-cpudetection"
  562. "--target=x86_64-linux"))
  563. ("i686-linux"
  564. '("--enable-runtime-cpudetection"
  565. "--target=i686-linux"))
  566. ("mips64el-linux"
  567. '("--target=mips3-linux"))
  568. (_ (list (string-append
  569. "--target="
  570. (or (%current-target-system)
  571. (nix-system->gnu-triplet
  572. (%current-system)))))))
  573. "--disable-neon"
  574. "--disable-iwmmxt"))))
  575. %standard-phases)))
  576. (home-page "http://www.mplayerhq.hu/design7/news.html")
  577. (synopsis "Audio and video player")
  578. (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
  579. Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
  580. NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
  581. SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
  582. (license license:gpl2)))
  583. ;;; This is not version 2; it's a fork literally named "mplayer2".
  584. (define-public mplayer2
  585. (package
  586. (name "mplayer2")
  587. ;; There are no tarballs. The 2.0 git tag, which is actually the first
  588. ;; release is from 2011. The latest commit is from 2013 October, so we
  589. ;; use that commit.
  590. (version "201310")
  591. (source (origin
  592. (method git-fetch)
  593. (uri (git-reference
  594. ;; XXX Change this if mplayer2.org goes up again.
  595. (url "http://repo.or.cz/mplayer2.git")
  596. (commit "2c378c71a4d9b1df382db9aa787b646628b4e3f9")))
  597. (sha256
  598. (base32
  599. "0s8554sanj6cvnf0h148nsmjgy5v0568nmcza7grpv6fnmddpfam"))
  600. (file-name (string-append name "-" version "-checkout"))
  601. ;; Warning: after using this patch, one must pass the -ltheora
  602. ;; linker flag manually to configure; see below.
  603. (patches (list (search-patch "mplayer2-theora-fix.patch")))))
  604. (build-system gnu-build-system)
  605. (native-inputs
  606. `(("pkg-config" ,pkg-config)
  607. ("perl" ,perl)
  608. ("python" ,python)
  609. ("python-2" ,python-2)
  610. ("python-docutils" ,python-docutils)
  611. ;; ./configure uses which(1) to find rst2man.py.
  612. ("which" ,which)))
  613. ;; Missing features: DirectFB, Xss screensaver extensions, VDPAU, MNG,
  614. ;; libnut, DirectShow TV interface, Radio interfaces of all kinds, vstream
  615. ;; client, XMSS inputplugin support, joystick, lirc/lircc, and openal.
  616. ;; OpenAL support is experimental and causes compilation to fail with
  617. ;; linker errors.
  618. (inputs
  619. `(("alsa-lib" ,alsa-lib)
  620. ("faad2" ,faad2)
  621. ("ffmpeg" ,ffmpeg)
  622. ("gettext" ,gnu-gettext)
  623. ("jack" ,jack-2)
  624. ("ladspa" ,ladspa)
  625. ("lcms" ,lcms)
  626. ("liba52" ,liba52)
  627. ("libass" ,libass)
  628. ("libbluray" ,libbluray)
  629. ("libbs2b" ,libbs2b)
  630. ("libcaca" ,libcaca)
  631. ("libcdio-paranoia" ,libcdio-paranoia)
  632. ("libdca" ,libdca)
  633. ("libdv" ,libdv)
  634. ("libdvdread" ,libdvdread)
  635. ("libdvdnav" ,libdvdnav-4)
  636. ("libjpeg" ,libjpeg)
  637. ("libmad" ,libmad)
  638. ("libpng" ,libpng)
  639. ("libquvi" ,libquvi)
  640. ("libtheora" ,libtheora)
  641. ("libungif" ,libungif)
  642. ("libvorbis" ,libvorbis)
  643. ("libx11" ,libx11)
  644. ("libxinerama" ,libxinerama)
  645. ("libxv" ,libxv)
  646. ("mesa" ,mesa)
  647. ("mpg123" ,mpg123)
  648. ("ncurses" ,ncurses)
  649. ("portaudio" ,portaudio)
  650. ("pulseaudio" ,pulseaudio)
  651. ("rsound" ,rsound)
  652. ("samba" ,samba)
  653. ("sdl" ,sdl)
  654. ("speex" ,speex)
  655. ("xvid" ,xvid)))
  656. (arguments
  657. '(#:phases
  658. (alist-replace
  659. 'configure
  660. ;; ./configure does not work followed by "SHELL=..." and
  661. ;; "CONFIG_SHELL=..."; set environment variables instead.
  662. (lambda* (#:key inputs outputs #:allow-other-keys)
  663. (setenv "SHELL" (which "bash"))
  664. (setenv "CONFIG_SHELL" (which "bash"))
  665. (substitute* "configure"
  666. (("/usr/X11") (assoc-ref inputs "libx11")))
  667. (zero?
  668. (system* "./configure"
  669. (string-append "--prefix=" (assoc-ref outputs "out"))
  670. "--enable-translation"
  671. "--enable-runtime-cpudetection"
  672. ;; This is needed in accordance with the theora patch.
  673. "--extra-libs=-ltheoradec")))
  674. (alist-cons-before
  675. 'build 'fix-TOOLS-shebangs
  676. (lambda _
  677. (substitute* (find-files "TOOLS" "\\.(sh|pl|py)$")
  678. (("/usr/bin/env") (which "env"))
  679. (("/usr/bin/perl") (which "perl"))
  680. (("/usr/bin/python3") (which "python3"))
  681. (("/usr/bin/python") (which "python"))))
  682. (alist-cons-before
  683. 'build 'fix-input-buffer-padding-size
  684. (lambda _
  685. (substitute* "libmpdemux/demuxer.h"
  686. ;; This has to match with FFmpeg's FF_INPUT_BUFFER_PADDING_SIZE,
  687. ;; which has changed at some point.
  688. (("(#define MP_INPUT_BUFFER_PADDING_SIZE )[0-9]*" all)
  689. (string-append all "32"))))
  690. %standard-phases)))
  691. ;; No 'check' target.
  692. #:tests? #f))
  693. ;; XXX Change this if mplayer2.org goes up again.
  694. (home-page "http://repo.or.cz/w/mplayer2.git")
  695. (synopsis "Audio and video player")
  696. (description "mplayer2 is a general-purpose audio and video player. It's
  697. a fork of the original MPlayer project, and contains further development in
  698. several areas.")
  699. ;; See file Copyright. Most files are gpl2+ or compatible, but talloc.c
  700. ;; is under lgpl3+, thus the whole project becomes gpl3+.
  701. (license license:gpl3+)))
  702. (define-public mpv
  703. (package
  704. (name "mpv")
  705. (version "0.9.0")
  706. (source (origin
  707. (method url-fetch)
  708. (uri (string-append
  709. "https://github.com/mpv-player/mpv/archive/v" version
  710. ".tar.gz"))
  711. (sha256
  712. (base32
  713. "08nx0g6ji2d90f5w62g327szhkb7id7jzwgf3x069rc5id1x3bx7"))
  714. (file-name (string-append name "-" version ".tar.gz"))))
  715. (build-system waf-build-system)
  716. (native-inputs
  717. `(("perl" ,perl)
  718. ("pkg-config" ,pkg-config)
  719. ("python-docutils" ,python-docutils)))
  720. ;; Missing features: libguess, Wayland, VDPAU, V4L2
  721. (inputs
  722. `(("alsa-lib" ,alsa-lib)
  723. ("enca" ,enca)
  724. ("ffmpeg" ,ffmpeg)
  725. ("jack" ,jack-2)
  726. ("ladspa" ,ladspa)
  727. ("lcms" ,lcms)
  728. ("libass" ,libass)
  729. ("libbluray" ,libbluray)
  730. ("libcaca" ,libcaca)
  731. ("libbs2b" ,libbs2b)
  732. ("libcdio-paranoia" ,libcdio-paranoia)
  733. ("libdvdread" ,libdvdread)
  734. ("libdvdnav" ,libdvdnav)
  735. ("libjpeg" ,libjpeg)
  736. ("libva" ,libva)
  737. ("libx11" ,libx11)
  738. ("libxext" ,libxext)
  739. ("libxinerama" ,libxinerama)
  740. ("libxrandr" ,libxrandr)
  741. ("libxscrnsaver" ,libxscrnsaver)
  742. ("libxv" ,libxv)
  743. ("lua" ,lua)
  744. ("mesa" ,mesa)
  745. ("mpg123" ,mpg123)
  746. ("pulseaudio" ,pulseaudio)
  747. ("rsound" ,rsound)
  748. ("samba" ,samba)
  749. ("vapoursynth" ,vapoursynth)
  750. ("waf" ,(origin
  751. (method url-fetch)
  752. ;; Keep this in sync with the version in the bootstrap.py
  753. ;; script of the source tarball.
  754. (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.4")
  755. (sha256
  756. (base32
  757. "1a7skwgpl91adhcwlmdr76xzdpidh91hvcmj34zz6548bpx3a87h"))))
  758. ("youtube-dl" ,youtube-dl)
  759. ("zlib" ,zlib)))
  760. (arguments
  761. '(#:phases
  762. (modify-phases %standard-phases
  763. (add-before
  764. 'configure 'setup-waf
  765. (lambda* (#:key inputs #:allow-other-keys)
  766. (copy-file (assoc-ref inputs "waf") "waf")
  767. (setenv "CC" "gcc")))
  768. (add-before
  769. 'configure 'patch-wscript
  770. (lambda* (#:key inputs #:allow-other-keys)
  771. (substitute* "wscript"
  772. ;; XXX Remove this when our Samba package provides a .pc file.
  773. (("check_pkg_config\\('smbclient'\\)")
  774. "check_cc(lib='smbclient')")
  775. ;; XXX Remove this when our Lua package provides a .pc file.
  776. (("check_lua")
  777. "check_cc(lib='lua')")))))
  778. ;; No check function defined.
  779. #:tests? #f))
  780. (home-page "http://mpv.io/")
  781. (synopsis "Audio and video player")
  782. (description "mpv is a general-purpose audio and video player. It is a
  783. fork of mplayer2 and MPlayer. It shares some features with the former
  784. projects while introducing many more.")
  785. (license license:gpl2+)))
  786. (define-public libvpx
  787. (package
  788. (name "libvpx")
  789. (version "1.3.0")
  790. (source (origin
  791. (method url-fetch)
  792. (uri (string-append "http://webm.googlecode.com/files/libvpx-v"
  793. version ".tar.bz2"))
  794. (sha256
  795. (base32
  796. "1aai0h0z1bhp89pxmg4fkrwpmqq24k39fhr15cw6q77m9bccip6k"))
  797. (patches
  798. (list (search-patch "libvpx-vp9-out-of-bounds-access.patch")
  799. (search-patch "libvpx-fix-ssse3-quantize.patch")
  800. (search-patch "libvpx-fix-armhf-link.patch")))))
  801. (build-system gnu-build-system)
  802. (arguments
  803. `(#:phases (alist-replace
  804. 'configure
  805. (lambda* (#:key outputs #:allow-other-keys)
  806. (setenv "CONFIG_SHELL" (which "bash"))
  807. (let ((out (assoc-ref outputs "out")))
  808. (setenv "LDFLAGS"
  809. (string-append "-Wl,-rpath=" out "/lib"))
  810. (zero? (system* "./configure"
  811. "--enable-shared"
  812. "--as=yasm"
  813. ,@(if (and (not (%current-target-system))
  814. (string-prefix?
  815. "armhf-"
  816. (%current-system)))
  817. ;; When building on ARMv7, libvpx
  818. ;; assumes that NEON will be
  819. ;; available. On Guix, armhf
  820. ;; does not require NEON, so we
  821. ;; build for ARMv6 and -marm (since
  822. ;; no thumb2 on ARMv6) to ensure
  823. ;; compatibility with all ARMv7
  824. ;; cores we support. Based on
  825. ;; the Debian libvpx package.
  826. '("--target=armv6-linux-gcc"
  827. "--extra-cflags=-marm"
  828. "--enable-small")
  829. '())
  830. (string-append "--prefix=" out)))))
  831. %standard-phases)
  832. #:tests? #f)) ; no check target
  833. (native-inputs
  834. `(("perl" ,perl)
  835. ("yasm" ,yasm)))
  836. (synopsis "VP8/VP9 video codec")
  837. (description "libvpx is a codec for the VP8/VP9 video compression format.")
  838. (license license:bsd-3)
  839. (home-page "http://www.webmproject.org/")))
  840. (define-public youtube-dl
  841. (package
  842. (name "youtube-dl")
  843. (version "2015.06.04.1")
  844. (source (origin
  845. (method url-fetch)
  846. (uri (string-append "http://youtube-dl.org/downloads/"
  847. version "/youtube-dl-"
  848. version ".tar.gz"))
  849. (sha256
  850. (base32
  851. "0rk5c2m19x119bly38yjbizkr99ayn265lm15rm2x5ipjvdixyyg"))))
  852. (build-system python-build-system)
  853. (inputs `(("setuptools" ,python-setuptools)))
  854. (home-page "http://youtube-dl.org")
  855. (synopsis "Download videos from YouTube.com and other sites")
  856. (description
  857. "youtube-dl is a small command-line program to download videos from
  858. YouTube.com and a few more sites.")
  859. (license license:public-domain)))
  860. (define-public libbluray
  861. (package
  862. (name "libbluray")
  863. (version "0.7.0")
  864. (source (origin
  865. (method url-fetch)
  866. (uri (string-append "http://download.videolan.org/videolan/"
  867. name "/" version "/"
  868. name "-" version ".tar.bz2"))
  869. (sha256
  870. (base32
  871. "13dngs4b4cv29f6b825dq14n77mfhvk1kjb42axpq494pfgyp6zp"))))
  872. (build-system gnu-build-system)
  873. (native-inputs `(("pkg-config" ,pkg-config)))
  874. (inputs
  875. `(("doxygen" ,doxygen)
  876. ("fontconfig" ,fontconfig)
  877. ("freetype" ,freetype)
  878. ("libxml2" ,libxml2)
  879. ("perl" ,perl) ;for doxygen
  880. ("texlive" ,texlive)))
  881. (home-page "http://www.videolan.org/developers/libbluray.html")
  882. (synopsis "Blu-Ray Disc playback library")
  883. (description
  884. "libbluray is a library designed for Blu-Ray Disc playback for media
  885. players, like VLC or MPlayer.")
  886. (license license:lgpl2.1+)))
  887. (define-public libdvdread
  888. (package
  889. (name "libdvdread")
  890. (version "5.0.0")
  891. (source (origin
  892. (method url-fetch)
  893. (uri (string-append "http://download.videolan.org/videolan/"
  894. name "/" version "/"
  895. name "-" version ".tar.bz2"))
  896. (sha256
  897. (base32
  898. "052z62l3x8ka5jpf5bi1mzp5p323n1z9rxj74nq5c35a88x1myv6"))))
  899. (build-system gnu-build-system)
  900. (home-page "http://dvdnav.mplayerhq.hu/")
  901. (synopsis "Library for reading video DVDs")
  902. (description
  903. "Libdvdread provides a simple foundation for reading DVD video
  904. disks. It provides the functionality that is required to access many
  905. DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
  906. authentication and descrambling (if an external libdvdcss library is
  907. installed).")
  908. (license license:gpl2+)))
  909. (define-public libdvdnav
  910. (package
  911. (name "libdvdnav")
  912. (version "5.0.1")
  913. (source (origin
  914. (method url-fetch)
  915. (uri (string-append "http://download.videolan.org/videolan/"
  916. name "/" version "/"
  917. name "-" version ".tar.bz2"))
  918. (sha256
  919. (base32
  920. "1ad2lkkiydgwiyqfysra9lkwjv9yqnvcg4hv92hx8qzics1cpcbj"))))
  921. (build-system gnu-build-system)
  922. (native-inputs
  923. `(("pkg-config" ,pkg-config)))
  924. (inputs
  925. `(("libdvdread" ,libdvdread)))
  926. (home-page "http://dvdnav.mplayerhq.hu/")
  927. (synopsis "Library for video DVD navigation features")
  928. (description
  929. "Libdvdnav is a library for developers of multimedia
  930. applications. It allows easy use of sophisticated DVD navigation features
  931. such as DVD menus, multiangle playback and even interactive DVD games. All
  932. this functionality is provided through a simple API which provides the DVD
  933. playback as a single logical stream of blocks, intermitted by special
  934. dvdnav events to report certain conditions. The main usage of libdvdnav is
  935. a loop regularly calling a function to get the next block, surrounded by
  936. additional calls to tell the library of user interaction. The whole
  937. DVD virtual machine and internal playback states are completely
  938. encapsulated.")
  939. (license license:gpl2+)))
  940. (define-public libdvdnav-4
  941. (package
  942. (inherit libdvdnav)
  943. (version "4.2.1")
  944. (source (origin
  945. (method url-fetch)
  946. (uri
  947. (string-append
  948. "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
  949. version ".tar.xz"))
  950. (sha256
  951. (base32
  952. "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
  953. (native-inputs
  954. `(("pkg-config" ,pkg-config)
  955. ("autoconf" ,autoconf)
  956. ("automake" ,automake)
  957. ("libtool" ,libtool)))
  958. (arguments
  959. '(#:phases
  960. (alist-cons-after
  961. 'unpack 'autoreconf
  962. (lambda _
  963. (zero? (system* "autoreconf" "-vif")))
  964. %standard-phases)))))
  965. (define-public libdvdcss
  966. (package
  967. (name "libdvdcss")
  968. (version "1.3.0")
  969. (source (origin
  970. (method url-fetch)
  971. (uri (string-append "http://download.videolan.org/videolan/"
  972. name "/" version "/"
  973. name "-" version ".tar.bz2"))
  974. (sha256
  975. (base32
  976. "158k9zagmbk5bkbz96l6lwhh7xcgfcnzflkr4vblskhcab6llhbw"))))
  977. (build-system gnu-build-system)
  978. (home-page "http://www.videolan.org/developers/libdvdcss.html")
  979. (synopsis "Library for accessing DVDs as block devices")
  980. (description
  981. "libdvdcss is a simple library designed for accessing DVDs like a block
  982. device without having to bother about the decryption.")
  983. (license license:gpl2+)))
  984. (define-public srt2vtt
  985. (package
  986. (name "srt2vtt")
  987. (version "0.1")
  988. (source (origin
  989. (method url-fetch)
  990. (uri (string-append
  991. "http://dthompson.us/releases/srt2vtt/srt2vtt-"
  992. version ".tar.gz"))
  993. (sha256
  994. (base32
  995. "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
  996. (build-system gnu-build-system)
  997. (inputs
  998. `(("guile" ,guile-2.0)))
  999. (synopsis "SubRip to WebVTT subtitle converter")
  1000. (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
  1001. for use with HTML5 video.")
  1002. (home-page "http://dthompson.us/pages/software/srt2vtt")
  1003. (license license:gpl3+)))
  1004. (define-public avidemux
  1005. (package
  1006. (name "avidemux")
  1007. (version "2.6.8")
  1008. (source (origin
  1009. (method url-fetch)
  1010. (uri (string-append
  1011. "mirror://sourceforge/avidemux/avidemux_"
  1012. version ".tar.gz"))
  1013. (sha256
  1014. (base32
  1015. "10p60wjkzf1bxqcb6i7bx4hbqy3vqg598p3l9lc4v2c9b8iqr682"))))
  1016. (build-system cmake-build-system)
  1017. (native-inputs
  1018. `(("pkg-config" ,pkg-config)))
  1019. ;; FIXME: Once packaged, add libraries not found during the build.
  1020. (inputs
  1021. `(("alsa-lib" ,alsa-lib)
  1022. ("fontconfig" ,fontconfig)
  1023. ("freetype" ,freetype)
  1024. ("fribidi" ,fribidi)
  1025. ("glu" ,glu)
  1026. ("gtk+" ,gtk+)
  1027. ("jack" ,jack-1)
  1028. ("lame" ,lame)
  1029. ("libvorbis" ,libvorbis)
  1030. ("libvpx" ,libvpx)
  1031. ("libxv" ,libxv)
  1032. ("perl" ,perl)
  1033. ("pulseaudio" ,pulseaudio)
  1034. ("python" ,python-wrapper)
  1035. ("qt" ,qt-4)
  1036. ("sdl" ,sdl)
  1037. ("sqlite" ,sqlite)
  1038. ("yasm" ,yasm)
  1039. ("zlib" ,zlib)))
  1040. (arguments
  1041. `(#:tests? #f ; no check target
  1042. #:phases
  1043. ;; Make sure files inside the included ffmpeg tarball are
  1044. ;; patch-shebanged.
  1045. (alist-cons-before
  1046. 'patch-source-shebangs 'unpack-ffmpeg
  1047. (lambda _
  1048. (with-directory-excursion "avidemux_core/ffmpeg_package"
  1049. (system* "tar" "xf" "ffmpeg-1.2.1.tar.bz2")
  1050. (delete-file "ffmpeg-1.2.1.tar.bz2")))
  1051. (alist-cons-after
  1052. 'patch-source-shebangs 'repack-ffmpeg
  1053. (lambda _
  1054. (with-directory-excursion "avidemux_core/ffmpeg_package"
  1055. (substitute* "ffmpeg-1.2.1/configure"
  1056. (("#! /bin/sh") (string-append "#!" (which "bash"))))
  1057. (system* "tar" "cjf" "ffmpeg-1.2.1.tar.bz2" "ffmpeg-1.2.1")
  1058. (delete-file-recursively "ffmpeg-1.2.1")))
  1059. (alist-replace 'configure
  1060. (lambda _
  1061. ;; Copy-paste settings from the cmake build system.
  1062. (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
  1063. (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))
  1064. (alist-replace 'build
  1065. (lambda* (#:key inputs outputs #:allow-other-keys)
  1066. (let*
  1067. ((out (assoc-ref outputs "out"))
  1068. (lib (string-append out "/lib64"))
  1069. (top (getcwd))
  1070. (sdl (assoc-ref inputs "sdl"))
  1071. (build_component
  1072. (lambda* (component srcdir #:optional (args '()))
  1073. (let ((builddir (string-append "build_" component)))
  1074. (mkdir builddir)
  1075. (with-directory-excursion builddir
  1076. (zero? (and
  1077. (apply system* "cmake"
  1078. "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
  1079. (string-append "-DCMAKE_INSTALL_PREFIX=" out)
  1080. (string-append "-DCMAKE_INSTALL_RPATH=" lib)
  1081. (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
  1082. "\"-Wl,-rpath=" lib "\"")
  1083. (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
  1084. (string-append "-DSDL_INCLUDE_DIR="
  1085. sdl "/include/SDL")
  1086. (string-append "../" srcdir)
  1087. args)
  1088. (system* "make" "-j"
  1089. (number->string (parallel-job-count)))
  1090. (system* "make" "install"))))))))
  1091. (mkdir out)
  1092. (and (build_component "core" "avidemux_core")
  1093. (build_component "cli" "avidemux/cli")
  1094. (build_component "qt4" "avidemux/qt4")
  1095. (build_component "gtk" "avidemux/gtk")
  1096. (build_component "plugins_common" "avidemux_plugins"
  1097. '("-DPLUGIN_UI=COMMON"))
  1098. (build_component "plugins_cli" "avidemux_plugins"
  1099. '("-DPLUGIN_UI=CLI"))
  1100. (build_component "plugins_qt4" "avidemux_plugins"
  1101. '("-DPLUGIN_UI=QT4"))
  1102. (build_component "plugins_gtk" "avidemux_plugins"
  1103. '("-DPLUGIN_UI=GTK"))
  1104. (build_component "plugins_settings" "avidemux_plugins"
  1105. '("-DPLUGIN_UI=SETTINGS")))
  1106. ;; Remove .exe and .dll file.
  1107. (delete-file-recursively
  1108. (string-append out "/share/ADM6_addons"))))
  1109. (alist-delete 'install
  1110. %standard-phases)))))))
  1111. (home-page "http://fixounet.free.fr/avidemux/")
  1112. (synopsis "Video editor")
  1113. (description "Avidemux is a video editor designed for simple cutting,
  1114. filtering and encoding tasks. It supports many file types, including AVI,
  1115. DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
  1116. can be automated using projects, job queue and powerful scripting
  1117. capabilities.")
  1118. ;; Software with various licenses is included, see License.txt.
  1119. (license license:gpl2+)))
  1120. (define-public avidemux-2.5
  1121. (package (inherit avidemux)
  1122. (version "2.5.6")
  1123. (source (origin
  1124. (method url-fetch)
  1125. (uri (string-append
  1126. "mirror://sourceforge/avidemux/avidemux_"
  1127. version ".tar.gz"))
  1128. (sha256
  1129. (base32
  1130. "12wvxz0n2g85f079d8mdkkp2zm279d34m9v7qgcqndh48cn7znnn"))))
  1131. (native-inputs
  1132. `(("pkg-config" ,pkg-config)))
  1133. (inputs
  1134. `(("alsa-lib" ,alsa-lib)
  1135. ("gettext" ,gnu-gettext)
  1136. ("gtk+" ,gtk+-2)
  1137. ("jack" ,jack-1)
  1138. ("lame" ,lame)
  1139. ("libvorbis" ,libvorbis)
  1140. ("libvpx" ,libvpx)
  1141. ("libxml2" ,libxml2)
  1142. ("libxslt" ,libxslt)
  1143. ("libxv" ,libxv)
  1144. ("perl" ,perl)
  1145. ("pulseaudio" ,pulseaudio)
  1146. ("qt" ,qt-4)
  1147. ("sdl" ,sdl)
  1148. ("yasm" ,yasm)
  1149. ("zlib" ,zlib)))
  1150. (arguments
  1151. `(#:tests? #f
  1152. #:phases
  1153. (alist-cons-before
  1154. 'patch-source-shebangs 'unpack-ffmpeg
  1155. (lambda _
  1156. (with-directory-excursion "avidemux/ADM_libraries"
  1157. (system* "tar" "xf" "ffmpeg-0.9.tar.bz2")
  1158. (delete-file "ffmpeg-0.9.tar.bz2")))
  1159. (alist-cons-after
  1160. 'patch-source-shebangs 'repack-ffmpeg
  1161. (lambda _
  1162. (with-directory-excursion "avidemux/ADM_libraries"
  1163. (substitute* "ffmpeg-0.9/configure"
  1164. (("#! /bin/sh") (string-append "#!" (which "bash"))))
  1165. (system* "tar" "cjf" "ffmpeg-0.9.tar.bz2" "ffmpeg-0.9")
  1166. (delete-file-recursively "ffmpeg-0.9")))
  1167. (alist-replace 'configure
  1168. (lambda _
  1169. (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
  1170. (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))
  1171. (alist-replace 'build
  1172. (lambda* (#:key inputs outputs #:allow-other-keys)
  1173. (let*
  1174. ((out (assoc-ref outputs "out"))
  1175. (lib (string-append out "/lib"))
  1176. (top (getcwd))
  1177. (sdl (assoc-ref inputs "sdl"))
  1178. (build_component
  1179. (lambda* (component srcdir)
  1180. (let ((builddir (string-append "build_" component)))
  1181. (mkdir builddir)
  1182. (with-directory-excursion builddir
  1183. (zero? (and
  1184. (system* "cmake"
  1185. "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
  1186. (string-append "-DCMAKE_INSTALL_PREFIX="
  1187. out)
  1188. (string-append "-DCMAKE_INSTALL_RPATH="
  1189. lib)
  1190. (string-append "-DAVIDEMUX_SOURCE_DIR="
  1191. top)
  1192. (string-append "-DAVIDEMUX_CORECONFIG_DIR="
  1193. top "/build_main/config")
  1194. (string-append "-DAVIDEMUX_INSTALL_PREFIX="
  1195. out)
  1196. (string-append "-DSDL_INCLUDE_DIR="
  1197. sdl "/include/SDL")
  1198. (string-append "../" srcdir))
  1199. (system* "make" "-j"
  1200. (number->string (parallel-job-count)))
  1201. (system* "make" "install"))))))))
  1202. (mkdir out)
  1203. (and (build_component "main" ".")
  1204. (build_component "plugins" "plugins"))
  1205. (delete-file-recursively
  1206. (string-append out "/share/ADM_addons"))))
  1207. (alist-delete 'install
  1208. %standard-phases)))))))))
  1209. (define-public vapoursynth
  1210. (package
  1211. (name "vapoursynth")
  1212. (version "26")
  1213. (source (origin
  1214. (method url-fetch)
  1215. (uri (string-append
  1216. "https://github.com/vapoursynth/vapoursynth/archive/R"
  1217. version ".tar.gz"))
  1218. (sha256
  1219. (base32
  1220. "1qbg5kg0kgrxldd0ckn1s7vy7vx2ig8nqzv6djp38fxccpzw3x9k"))))
  1221. (build-system gnu-build-system)
  1222. (native-inputs
  1223. `(("autoconf" ,autoconf)
  1224. ("automake" ,automake)
  1225. ("cython" ,python-cython)
  1226. ("libtool" ,libtool)
  1227. ("pkg-config" ,pkg-config)
  1228. ("python" ,python)
  1229. ("yasm" ,yasm)))
  1230. (inputs
  1231. `(("ffmpeg" ,ffmpeg)
  1232. ("libass" ,libass)
  1233. ("tesseract-ocr" ,tesseract-ocr)))
  1234. (arguments
  1235. '(#:phases
  1236. (modify-phases %standard-phases
  1237. (add-after
  1238. 'unpack 'autogen
  1239. (lambda _
  1240. (zero? (system* "sh" "autogen.sh")))))))
  1241. (home-page "http://www.vapoursynth.com/")
  1242. (synopsis "Video processing framework")
  1243. (description "VapourSynth is a C++ library and Python module for video
  1244. manipulation. It aims to be a modern rewrite of Avisynth, supporting
  1245. multithreading, generalized colorspaces, per frame properties, and videos with
  1246. format changes.")
  1247. ;; As seen from the source files.
  1248. (license license:lgpl2.1+)))
  1249. (define-public xvid
  1250. (package
  1251. (name "xvid")
  1252. (version "1.3.3")
  1253. (source (origin
  1254. (method url-fetch)
  1255. (uri (string-append
  1256. "http://downloads.xvid.org/downloads/xvidcore-"
  1257. version ".tar.bz2"))
  1258. (sha256
  1259. (base32
  1260. "0m5g75qvapr7xpywg6a83v5x19kw1nm9l2q48lg7jvvpba0bmqdh"))))
  1261. (build-system gnu-build-system)
  1262. (native-inputs `(("yasm" ,yasm)))
  1263. (arguments
  1264. '(#:phases
  1265. (alist-cons-before
  1266. 'configure 'pre-configure
  1267. (lambda _
  1268. (chdir "build/generic")
  1269. (substitute* "configure"
  1270. (("#! /bin/sh") (string-append "#!" (which "sh")))))
  1271. %standard-phases)
  1272. ;; No 'check' target.
  1273. #:tests? #f))
  1274. (home-page "https://www.xvid.com/")
  1275. (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
  1276. (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
  1277. codec library. It uses ASP features such as b-frames, global and quarter
  1278. pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
  1279. and custom quantization matrices.")
  1280. (license license:gpl2+)))
  1281. (define-public livestreamer
  1282. (package
  1283. (name "livestreamer")
  1284. (version "1.12.1")
  1285. (source (origin
  1286. (method url-fetch)
  1287. (uri (string-append
  1288. "https://github.com/chrippa/livestreamer/archive/v"
  1289. version ".tar.gz"))
  1290. (file-name (string-append "livestreamer-" version ".tar.gz"))
  1291. (sha256
  1292. (base32
  1293. "1dhgk8v8q1h3km4g5jc0cmjsxdaa2d456fvdb2wk7hmxmmwbqm9j"))))
  1294. (build-system python-build-system)
  1295. (arguments
  1296. '(#:tests? #f)) ; tests rely on external web servers
  1297. (native-inputs
  1298. `(("python-setuptools" ,python-setuptools)))
  1299. (propagated-inputs
  1300. `(("python-requests" ,python-requests)
  1301. ("python-singledispatch" ,python-singledispatch)))
  1302. (synopsis "Internet video stream viewer")
  1303. (description "Livestreamer is a command-line utility that extracts streams
  1304. from various services and pipes them into a video playing application.")
  1305. (home-page "http://livestreamer.io/")
  1306. (license license:bsd-2)))