video.scm 133 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
  3. ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
  4. ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
  5. ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
  6. ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
  7. ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
  8. ;;; Copyright © 2015, 2018 Ricardo Wurmus <rekado@elephly.net>
  9. ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
  10. ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
  11. ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
  12. ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
  13. ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
  14. ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
  15. ;;; Copyright © 2016, 2018, 2019 Eric Bavier <bavier@member.fsf.org>
  16. ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
  17. ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
  18. ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
  19. ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
  20. ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
  21. ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
  22. ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
  23. ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
  24. ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
  25. ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
  26. ;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
  27. ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
  28. ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
  29. ;;; Copyright © 2018 Brendan Tildesley <brendan.tildesley@openmailbox.org>
  30. ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
  31. ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
  32. ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
  33. ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
  34. ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
  35. ;;;
  36. ;;; This file is part of GNU Guix.
  37. ;;;
  38. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  39. ;;; under the terms of the GNU General Public License as published by
  40. ;;; the Free Software Foundation; either version 3 of the License, or (at
  41. ;;; your option) any later version.
  42. ;;;
  43. ;;; GNU Guix is distributed in the hope that it will be useful, but
  44. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  45. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  46. ;;; GNU General Public License for more details.
  47. ;;;
  48. ;;; You should have received a copy of the GNU General Public License
  49. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  50. (define-module (gnu packages video)
  51. #:use-module (ice-9 match)
  52. #:use-module (srfi srfi-1)
  53. #:use-module (srfi srfi-26)
  54. #:use-module ((guix licenses) #:prefix license:)
  55. #:use-module (guix utils)
  56. #:use-module (guix packages)
  57. #:use-module (guix download)
  58. #:use-module (guix git-download)
  59. #:use-module (guix svn-download)
  60. #:use-module (guix build-system cmake)
  61. #:use-module (guix build-system gnu)
  62. #:use-module (guix build-system glib-or-gtk)
  63. #:use-module (guix build-system meson)
  64. #:use-module (guix build-system perl)
  65. #:use-module (guix build-system python)
  66. #:use-module (guix build-system waf)
  67. #:use-module (guix build-system trivial)
  68. #:use-module (gnu packages)
  69. #:use-module (gnu packages algebra)
  70. #:use-module (gnu packages assembly)
  71. #:use-module (gnu packages audio)
  72. #:use-module (gnu packages autotools)
  73. #:use-module (gnu packages avahi)
  74. #:use-module (gnu packages backup)
  75. #:use-module (gnu packages base)
  76. #:use-module (gnu packages bison)
  77. #:use-module (gnu packages boost)
  78. #:use-module (gnu packages cdrom)
  79. #:use-module (gnu packages check)
  80. #:use-module (gnu packages cmake)
  81. #:use-module (gnu packages compression)
  82. #:use-module (gnu packages cpp)
  83. #:use-module (gnu packages curl)
  84. #:use-module (gnu packages dejagnu)
  85. #:use-module (gnu packages dns)
  86. #:use-module (gnu packages docbook)
  87. #:use-module (gnu packages documentation)
  88. #:use-module (gnu packages elf)
  89. #:use-module (gnu packages file)
  90. #:use-module (gnu packages flex)
  91. #:use-module (gnu packages fontutils)
  92. #:use-module (gnu packages freedesktop)
  93. #:use-module (gnu packages fribidi)
  94. #:use-module (gnu packages gettext)
  95. #:use-module (gnu packages ghostscript)
  96. #:use-module (gnu packages gl)
  97. #:use-module (gnu packages glib)
  98. #:use-module (gnu packages guile)
  99. #:use-module (gnu packages gnome)
  100. #:use-module (gnu packages gnunet)
  101. #:use-module (gnu packages gnupg)
  102. #:use-module (gnu packages gstreamer)
  103. #:use-module (gnu packages gtk)
  104. #:use-module (gnu packages image)
  105. #:use-module (gnu packages imagemagick)
  106. #:use-module (gnu packages iso-codes)
  107. #:use-module (gnu packages libidn)
  108. #:use-module (gnu packages libreoffice)
  109. #:use-module (gnu packages linux)
  110. #:use-module (gnu packages lua)
  111. #:use-module (gnu packages m4)
  112. #:use-module (gnu packages man)
  113. #:use-module (gnu packages mp3)
  114. #:use-module (gnu packages ncurses)
  115. #:use-module (gnu packages networking)
  116. #:use-module (gnu packages ocr)
  117. #:use-module (gnu packages perl)
  118. #:use-module (gnu packages pkg-config)
  119. #:use-module (gnu packages popt)
  120. #:use-module (gnu packages protobuf)
  121. #:use-module (gnu packages pulseaudio)
  122. #:use-module (gnu packages python)
  123. #:use-module (gnu packages python-crypto)
  124. #:use-module (gnu packages python-web)
  125. #:use-module (gnu packages python-xyz)
  126. #:use-module (gnu packages qt)
  127. #:use-module (gnu packages rdesktop)
  128. #:use-module (gnu packages ruby)
  129. #:use-module (gnu packages samba)
  130. #:use-module (gnu packages sdl)
  131. #:use-module (gnu packages serialization)
  132. #:use-module (gnu packages shells)
  133. #:use-module (gnu packages sqlite)
  134. #:use-module (gnu packages ssh)
  135. #:use-module (gnu packages swig)
  136. #:use-module (gnu packages texinfo)
  137. #:use-module (gnu packages textutils)
  138. #:use-module (gnu packages tls)
  139. #:use-module (gnu packages time)
  140. #:use-module (gnu packages upnp)
  141. #:use-module (gnu packages version-control)
  142. #:use-module (gnu packages vulkan)
  143. #:use-module (gnu packages web)
  144. #:use-module (gnu packages webkit)
  145. #:use-module (gnu packages wxwidgets)
  146. #:use-module (gnu packages xdisorg)
  147. #:use-module (gnu packages xiph)
  148. #:use-module (gnu packages xml)
  149. #:use-module (gnu packages xorg))
  150. (define-public aalib
  151. (package
  152. (name "aalib")
  153. (version "1.4rc5")
  154. (source (origin
  155. (method url-fetch)
  156. (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
  157. version "/" name "-" version ".tar.gz"))
  158. (sha256
  159. (base32
  160. "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
  161. (build-system gnu-build-system)
  162. (native-inputs
  163. `(("makeinfo" ,texinfo)))
  164. (inputs
  165. `(("ncurses" ,ncurses)))
  166. (arguments
  167. `(#:phases
  168. (modify-phases %standard-phases
  169. (replace 'configure
  170. (lambda* (#:key build inputs outputs #:allow-other-keys)
  171. ;; This old `configure' script doesn't support
  172. ;; variables passed as arguments.
  173. (let ((out (assoc-ref outputs "out"))
  174. (ncurses (assoc-ref inputs "ncurses")))
  175. (setenv "CONFIG_SHELL" (which "bash"))
  176. (invoke "./configure"
  177. (string-append "--prefix=" out)
  178. (string-append "--build=" build)
  179. ;; The ancient config.guess is unable to
  180. ;; guess the host triplet on mips64el.
  181. ,@(if (string=? "mips64el-linux"
  182. (%current-system))
  183. '("--host=mips64el-unknown-linux-gnu")
  184. '())
  185. ;; The same is also true with aarch64.
  186. ,@(if (string=? "aarch64-linux"
  187. (%current-system))
  188. '("--host=aarch64-unknown-linux-gnu")
  189. '())
  190. (string-append "--with-ncurses="
  191. ncurses))))))))
  192. (home-page "http://aa-project.sourceforge.net/aalib/")
  193. (synopsis "ASCII-art library")
  194. (description
  195. "AA-lib is a low level gfx library which does not require graphics device.
  196. In fact, there is no graphical output possible. AA-lib replaces those
  197. old-fashioned output methods with powerful ascii-art renderer.")
  198. (license license:lgpl2.0+)))
  199. (define-public liba52
  200. (package
  201. (name "liba52")
  202. (version "0.7.4")
  203. (source (origin
  204. (method url-fetch)
  205. (uri (string-append
  206. ;; A mirror://sourceforge URI doesn't work, presumably
  207. ;; because the SourceForge project is misconfigured.
  208. "http://liba52.sourceforge.net/files/a52dec-" version
  209. ".tar.gz"))
  210. (sha256
  211. (base32
  212. "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
  213. (patches (search-patches "liba52-enable-pic.patch"
  214. "liba52-set-soname.patch"
  215. "liba52-use-mtune-not-mcpu.patch"
  216. "liba52-link-with-libm.patch"))))
  217. (build-system gnu-build-system)
  218. ;; XXX We need to run ./bootstrap because of the build system fixes above.
  219. (native-inputs
  220. `(("autoconf" ,autoconf)
  221. ("automake" ,automake)
  222. ("libtool" ,libtool)))
  223. (arguments `(#:configure-flags '("--enable-shared")
  224. #:phases
  225. (modify-phases %standard-phases
  226. ;; XXX We need to run ./bootstrap because of the build
  227. ;; system fixes above.
  228. (replace 'bootstrap
  229. (lambda _ (invoke "sh" "bootstrap"))))))
  230. (home-page "http://liba52.sourceforge.net/")
  231. (synopsis "ATSC A/52 stream decoder")
  232. (description "liba52 is a library for decoding ATSC A/52 streams. The
  233. A/52 standard is used in a variety of applications, including digital
  234. television and DVD. It is also known as AC-3.")
  235. (license license:gpl2+)))
  236. (define-public libmpeg2
  237. (package
  238. (name "libmpeg2")
  239. (version "0.5.1")
  240. (source (origin
  241. (method url-fetch)
  242. ;; A mirror://sourceforge URI doesn't work, presumably
  243. ;; because the SourceForge project is misconfigured.
  244. (uri (string-append "http://libmpeg2.sourceforge.net/files/"
  245. name "-" version ".tar.gz"))
  246. (sha256
  247. (base32
  248. "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
  249. (inputs
  250. `(("libx11" ,libx11)
  251. ("libxext" ,libxext)
  252. ("libxv" ,libxv)
  253. ("libsm" ,libsm)
  254. ("libice" ,libice)
  255. ("sdl" ,sdl)))
  256. (build-system gnu-build-system)
  257. (home-page "http://libmpeg2.sourceforge.net/")
  258. (synopsis "MPEG1 and MPEG2 video decoder library")
  259. (description
  260. "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
  261. (license license:gpl2+)))
  262. (define-public libx264
  263. (package
  264. (name "libx264")
  265. (version "20180810-2245")
  266. (source (origin
  267. (method url-fetch)
  268. (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
  269. "x264-snapshot-" version "-stable.tar.bz2"))
  270. (sha256
  271. (base32
  272. "0f25f39imas9pcqm7lnaa0shhjmf42hdx7jxzcnvxc7qsb7lh1bv"))))
  273. (build-system gnu-build-system)
  274. (native-inputs
  275. `(("pkg-config" ,pkg-config)
  276. ("nasm" ,nasm)))
  277. ;; TODO: Add gpac input
  278. (arguments
  279. `(#:tests? #f ;no check target
  280. #:configure-flags '("--enable-shared"
  281. ;; Don't build the command-line program. If we
  282. ;; want it later, we should do so in a different
  283. ;; package to avoid a circular dependency (the x264
  284. ;; program depends on ffmpeg and ffmpeg depends on
  285. ;; libx264).
  286. "--disable-cli"
  287. ;; On MIPS, we must pass "--disable-asm" or else
  288. ;; configure fails after printing: "You specified a
  289. ;; pre-MSA CPU in your CFLAGS. If you really want
  290. ;; to run on such a CPU, configure with
  291. ;; --disable-asm."
  292. ,@(if (string-prefix? "mips"
  293. (or (%current-target-system)
  294. (%current-system)))
  295. '("--disable-asm")
  296. '()))))
  297. (home-page "https://www.videolan.org/developers/x264.html")
  298. (synopsis "H.264 video coding library")
  299. (description "libx264 is an advanced encoding library for creating
  300. H.264 (MPEG-4 AVC) video streams.")
  301. (license (list license:gpl2+ ;most files
  302. license:isc ;common/x86/x86inc.asm
  303. license:lgpl2.1+ ;extras/getopt.c
  304. license:bsd-3 ;extras/inttypes.h
  305. (license:non-copyleft ;extras/cl*.h
  306. "file://extras/cl.h"
  307. "See extras/cl.h in the distribution.")))))
  308. (define-public mkvtoolnix
  309. (package
  310. (name "mkvtoolnix")
  311. (version "13.0.0")
  312. (source
  313. (origin
  314. (method url-fetch)
  315. (uri (string-append "https://mkvtoolnix.download/sources/"
  316. name "-" version ".tar.xz"))
  317. (sha256
  318. (base32
  319. "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
  320. (modules '((guix build utils)))
  321. (snippet '(begin
  322. ;; Delete bundled libraries.
  323. (for-each delete-file-recursively
  324. '("lib/libebml"
  325. "lib/libmatroska"
  326. "lib/nlohmann-json"
  327. "lib/pugixml"
  328. "lib/utf8-cpp"))
  329. #t))))
  330. (build-system gnu-build-system)
  331. (inputs
  332. `(("boost" ,boost)
  333. ("bzip2" ,bzip2)
  334. ("libebml" ,libebml)
  335. ("flac" ,flac)
  336. ("file" ,file)
  337. ("libmatroska" ,libmatroska)
  338. ("libogg" ,libogg)
  339. ("libvorbis" ,libvorbis)
  340. ("lzo" ,lzo)
  341. ("pugixml" ,pugixml)
  342. ("qt" ,qt)
  343. ("utfcpp" ,utfcpp)
  344. ("zlib" ,zlib)))
  345. (native-inputs
  346. `(("docbook-xsl" ,docbook-xsl)
  347. ("gettext" ,gettext-minimal)
  348. ("googletest" ,googletest)
  349. ("libxslt" ,libxslt)
  350. ("nlohmann-json-cpp" ,nlohmann-json-cpp)
  351. ("perl" ,perl)
  352. ("pkg-config" ,pkg-config)
  353. ("po4a" ,po4a)
  354. ("ruby" ,ruby)))
  355. (arguments
  356. `(#:configure-flags
  357. (list (string-append "--with-boost="
  358. (assoc-ref %build-inputs "boost"))
  359. (string-append "--with-docbook-xsl-root="
  360. (assoc-ref %build-inputs "docbook-xsl")
  361. "/xml/xsl/docbook-xsl-"
  362. ,(package-version docbook-xsl))
  363. (string-append "--with-extra-includes="
  364. (assoc-ref %build-inputs "nlohmann-json-cpp")
  365. "/include/nlohmann"))
  366. #:phases
  367. (modify-phases %standard-phases
  368. (add-before 'configure 'add-googletest
  369. (lambda _
  370. (symlink
  371. (string-append (assoc-ref %build-inputs "googletest")
  372. "/include/gtest") "lib/gtest")
  373. #t))
  374. (replace 'build
  375. (lambda _
  376. (let ((-j (list "-j" (number->string (parallel-job-count)))))
  377. (apply invoke "rake" -j))))
  378. (replace 'check
  379. (lambda _
  380. (invoke "rake" "tests/unit")))
  381. (replace 'install
  382. (lambda _
  383. (invoke "rake" "install"))))))
  384. (home-page "https://mkvtoolnix.download")
  385. (synopsis "Tools to create, alter and inspect Matroska files")
  386. (description
  387. "MKVToolNix provides tools for getting information about Matroska files
  388. (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
  389. and creating Matroska files from other media files (@code{mkvmerge}).")
  390. (license license:gpl2)))
  391. (define-public x265
  392. (package
  393. (name "x265")
  394. (version "3.0")
  395. (outputs '("out" "static"))
  396. (source
  397. (origin
  398. (method url-fetch)
  399. (uri (string-append "https://download.videolan.org/videolan/x265/"
  400. "x265_" version ".tar.gz"))
  401. (sha256
  402. (base32
  403. "0qh65wdpasrspkm1y0dlfa123myax568yi0sas0lmg5b1hkgrff5"))
  404. (patches (search-patches "x265-arm-flags.patch"))
  405. (modules '((guix build utils)))
  406. (snippet '(begin
  407. (delete-file-recursively "source/compat/getopt")
  408. #t))))
  409. (build-system cmake-build-system)
  410. (arguments
  411. `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
  412. #:configure-flags
  413. ;; Ensure position independent code for everyone.
  414. (list "-DENABLE_PIC=TRUE"
  415. ,@(if (string-prefix? "armhf" (or (%current-system)
  416. (%current-target-system)))
  417. '("-DENABLE_ASSEMBLY=OFF")
  418. '())
  419. (string-append "-DCMAKE_INSTALL_PREFIX="
  420. (assoc-ref %outputs "out")))
  421. #:phases
  422. (modify-phases %standard-phases
  423. (add-after 'unpack 'prepare-build
  424. (lambda _
  425. (delete-file-recursively "build")
  426. (chdir "source")
  427. ;; recognize armv8 in 32-bit mode as ARM
  428. (substitute* "CMakeLists.txt"
  429. (("armv6l") "armv8l"))
  430. #t))
  431. (add-before 'configure 'build-12-bit
  432. (lambda* (#:key (configure-flags '()) #:allow-other-keys)
  433. (mkdir "../build-12bit")
  434. (with-directory-excursion "../build-12bit"
  435. (apply invoke
  436. "cmake" "../source"
  437. "-DHIGH_BIT_DEPTH=ON"
  438. "-DEXPORT_C_API=OFF"
  439. "-DENABLE_CLI=OFF"
  440. "-DMAIN12=ON"
  441. configure-flags)
  442. (substitute* (cons "cmake_install.cmake"
  443. (append
  444. (find-files "CMakeFiles/x265-shared.dir" ".")
  445. (find-files "CMakeFiles/x265-static.dir" ".")))
  446. (("libx265") "libx265_main12"))
  447. (invoke "make"))))
  448. (add-before 'configure 'build-10-bit
  449. (lambda* (#:key (configure-flags '()) #:allow-other-keys)
  450. (mkdir "../build-10bit")
  451. (with-directory-excursion "../build-10bit"
  452. (apply invoke
  453. "cmake" "../source"
  454. "-DHIGH_BIT_DEPTH=ON"
  455. "-DEXPORT_C_API=OFF"
  456. "-DENABLE_CLI=OFF"
  457. configure-flags)
  458. (substitute* (cons "cmake_install.cmake"
  459. (append
  460. (find-files "CMakeFiles/x265-shared.dir" ".")
  461. (find-files "CMakeFiles/x265-static.dir" ".")))
  462. (("libx265") "libx265_main10"))
  463. (invoke "make"))))
  464. (add-after 'install 'install-more-libs
  465. (lambda _
  466. (with-directory-excursion "../build-12bit"
  467. (invoke "make" "install"))
  468. (with-directory-excursion "../build-10bit"
  469. (invoke "make" "install"))))
  470. (add-before 'strip 'move-static-libs
  471. (lambda* (#:key outputs #:allow-other-keys)
  472. (let ((out (assoc-ref outputs "out"))
  473. (static (assoc-ref outputs "static")))
  474. (mkdir-p (string-append static "/lib"))
  475. (with-directory-excursion
  476. (string-append out "/lib")
  477. (for-each
  478. (lambda (file)
  479. (rename-file file
  480. (string-append static "/lib/" file)))
  481. (find-files "." "\\.a$"))))
  482. #t)))))
  483. (home-page "http://x265.org/")
  484. (synopsis "Library for encoding h.265/HEVC video streams")
  485. (description "x265 is a H.265 / HEVC video encoder application library,
  486. designed to encode video or images into an H.265 / HEVC encoded bitstream.")
  487. (license license:gpl2+)))
  488. (define-public libass
  489. (package
  490. (name "libass")
  491. (version "0.14.0")
  492. (source (origin
  493. (method url-fetch)
  494. (uri (string-append
  495. "https://github.com/libass/libass/releases/download/"
  496. version "/libass-" version ".tar.xz"))
  497. (sha256
  498. (base32
  499. "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
  500. (build-system gnu-build-system)
  501. (native-inputs
  502. `(("pkg-config" ,pkg-config)
  503. ("nasm" ,nasm)))
  504. (propagated-inputs
  505. `(("freetype" ,freetype)
  506. ("fribidi" ,fribidi)
  507. ("fontconfig" ,fontconfig)
  508. ("harfbuzz" ,harfbuzz)
  509. ("enca" ,enca)))
  510. (home-page "https://github.com/libass/libass")
  511. (synopsis "Subtitle rendering library for the ASS/SSA format")
  512. (description "libass is a subtitle rendering library for the
  513. ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
  514. (license license:isc)))
  515. (define-public libcaca
  516. (package
  517. (name "libcaca")
  518. (version "0.99.beta19")
  519. (source (origin
  520. (method url-fetch)
  521. (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
  522. version ".tar.gz"))
  523. (sha256
  524. (base32
  525. "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
  526. (build-system gnu-build-system)
  527. (native-inputs `(("pkg-config" ,pkg-config)))
  528. (inputs
  529. `(("freeglut" ,freeglut)
  530. ("ftgl" ,ftgl)
  531. ("imlib2" ,imlib2)
  532. ("libx11" ,libx11)
  533. ("mesa" ,mesa)
  534. ("ncurses" ,ncurses)
  535. ("zlib" ,zlib)))
  536. (home-page "http://caca.zoy.org/wiki/libcaca")
  537. (synopsis "Colour ASCII-art library")
  538. (description "libcaca is a graphics library that outputs text instead of
  539. pixels, so that it can work on older video cards or text terminals. It
  540. supports Unicode, 2048 colors, dithering of color images, and advanced text
  541. canvas operations.")
  542. (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
  543. (define-public libdca
  544. (package
  545. (name "libdca")
  546. (version "0.0.6")
  547. (source (origin
  548. (method url-fetch)
  549. (uri (string-append
  550. "https://download.videolan.org/pub/videolan/libdca/"
  551. version "/libdca-" version ".tar.bz2"))
  552. (sha256
  553. (base32
  554. "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
  555. (build-system gnu-build-system)
  556. (home-page "https://www.videolan.org/developers/libdca.html")
  557. (synopsis "DTS Coherent Acoustics decoder")
  558. (description "libdca is a library for decoding DTS Coherent Acoustics
  559. streams.")
  560. (license license:gpl2+)))
  561. (define-public libdv
  562. (package
  563. (name "libdv")
  564. (version "1.0.0")
  565. (source (origin
  566. (method url-fetch)
  567. (uri (string-append
  568. "mirror://sourceforge/" name "/" name "/"
  569. version "/" name "-" version ".tar.gz"))
  570. (sha256
  571. (base32
  572. "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
  573. (build-system gnu-build-system)
  574. (native-inputs `(("pkg-config" ,pkg-config)))
  575. (inputs `(("libxv" ,libxv)))
  576. (home-page "http://libdv.sourceforge.net/")
  577. (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
  578. (description "The Quasar DV codec (libdv) is a software codec for DV
  579. video, the encoding format used by most digital camcorders, typically those
  580. that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
  581. developed according to the official standards for DV video: IEC 61834 and
  582. SMPTE 314M.")
  583. (license license:lgpl2.1+)))
  584. (define-public libmatroska
  585. (package
  586. (name "libmatroska")
  587. (version "1.4.9")
  588. (source
  589. (origin
  590. (method url-fetch)
  591. (uri (string-append "https://dl.matroska.org/downloads/"
  592. name "/" name "-" version ".tar.xz"))
  593. (sha256
  594. (base32
  595. "1j4mjzx6mjzfjf9hz8g4w84krf5jccmr5cyynll0j1vwv3aiv9iq"))))
  596. (build-system cmake-build-system)
  597. (inputs
  598. `(("libebml" ,libebml)))
  599. (arguments
  600. `(#:configure-flags
  601. (list "-DBUILD_SHARED_LIBS=YES")
  602. #:tests? #f)) ; no test suite
  603. (home-page "https://www.matroska.org")
  604. (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
  605. (description
  606. "Matroska aims to become the standard of multimedia container formats.
  607. It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
  608. of XML. EBML enables the Matroska Development Team to gain significant
  609. advantages in terms of future format extensibility, without breaking file
  610. support in old parsers.
  611. libebml is a C++ library to read and write EBML files.")
  612. (license license:lgpl2.1)))
  613. (define-public libva
  614. (package
  615. (name "libva")
  616. (version "2.3.0")
  617. (source
  618. (origin
  619. (method url-fetch)
  620. (uri (list
  621. ;; Newer releases are only available on GitHub.
  622. (string-append "https://github.com/01org/libva/releases/download/"
  623. version "/libva-" version ".tar.bz2")
  624. ;; Keep the old URL around for compatibility.
  625. (string-append "https://www.freedesktop.org/software/vaapi/releases/"
  626. "libva/libva-" version "/libva-" version ".tar.bz2")))
  627. (sha256
  628. (base32 "1r6wiw4k044cpb39rfqqdw6qmzw0268whpz124hywck9v980x130"))))
  629. (build-system gnu-build-system)
  630. (native-inputs
  631. `(("pkg-config" ,pkg-config)))
  632. (inputs
  633. `(("libdrm" ,libdrm)
  634. ("libx11" ,libx11)
  635. ("libxext" ,libxext)
  636. ("libxfixes" ,libxfixes)
  637. ("mesa" ,mesa)
  638. ("wayland" ,wayland)))
  639. (arguments
  640. `(#:phases
  641. (modify-phases %standard-phases
  642. (add-before
  643. 'build 'fix-dlopen-paths
  644. (lambda* (#:key outputs #:allow-other-keys)
  645. (let ((out (assoc-ref outputs "out")))
  646. (substitute* "va/drm/va_drm_auth_x11.c"
  647. (("\"libva-x11\\.so\\.%d\"")
  648. (string-append "\"" out "/lib/libva-x11.so.%d\"")))
  649. #t))))
  650. ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
  651. ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
  652. #:configure-flags
  653. (list (string-append "--with-drivers-path="
  654. (assoc-ref %build-inputs "mesa") "/lib/dri"))
  655. ;; However, we can't write to mesa's store directory, so override the
  656. ;; following make variable to install the dummy driver to libva's
  657. ;; $prefix/lib/dri directory.
  658. #:make-flags
  659. (list (string-append "dummy_drv_video_ladir="
  660. (assoc-ref %outputs "out") "/lib/dri"))))
  661. (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
  662. (synopsis "Video acceleration library")
  663. (description "The main motivation for VA-API (Video Acceleration API) is
  664. to enable hardware accelerated video decode/encode at various
  665. entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
  666. standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
  667. (license license:expat)))
  668. (define-public ffmpeg
  669. (package
  670. (name "ffmpeg")
  671. (version "4.1.1")
  672. (source (origin
  673. (method url-fetch)
  674. (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
  675. version ".tar.xz"))
  676. (sha256
  677. (base32
  678. "11id9pm4azfrhpa4vr2yaw31dzgd55kl1zsxwn24sczx9n14jdrp"))))
  679. (build-system gnu-build-system)
  680. (inputs
  681. `(("fontconfig" ,fontconfig)
  682. ("freetype" ,freetype)
  683. ("frei0r-plugins" ,frei0r-plugins)
  684. ("gnutls" ,gnutls)
  685. ("opus" ,opus)
  686. ("ladspa" ,ladspa)
  687. ("lame" ,lame)
  688. ("libass" ,libass)
  689. ("libbluray" ,libbluray)
  690. ("libcaca" ,libcaca)
  691. ("libcdio-paranoia" ,libcdio-paranoia)
  692. ("libdrm" ,libdrm)
  693. ("libtheora" ,libtheora)
  694. ("libva" ,libva)
  695. ("libvdpau" ,libvdpau)
  696. ("libvorbis" ,libvorbis)
  697. ("libvpx" ,libvpx)
  698. ("libx11" ,libx11)
  699. ("libx264" ,libx264)
  700. ("mesa" ,mesa)
  701. ("openal" ,openal)
  702. ("pulseaudio" ,pulseaudio)
  703. ("sdl" ,sdl2)
  704. ("soxr" ,soxr)
  705. ("speex" ,speex)
  706. ("twolame" ,twolame)
  707. ("vidstab" ,vidstab)
  708. ("x265" ,x265)
  709. ("xvid" ,xvid)
  710. ("zlib" ,zlib)))
  711. (native-inputs
  712. `(("bc" ,bc)
  713. ("perl" ,perl)
  714. ("pkg-config" ,pkg-config)
  715. ("texinfo" ,texinfo)
  716. ("python" ,python-2) ; scripts use interpreter python2
  717. ("speex" ,speex)
  718. ("yasm" ,yasm)))
  719. (arguments
  720. `(#:test-target "fate"
  721. #:configure-flags
  722. ;; possible additional inputs:
  723. ;; --enable-avisynth enable reading of AviSynth script
  724. ;; files [no]
  725. ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
  726. ;; --enable-libcelt enable CELT decoding via libcelt [no]
  727. ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
  728. ;; and libraw1394 [no]
  729. ;; --enable-libfaac enable AAC encoding via libfaac [no]
  730. ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
  731. ;; --enable-libflite enable flite (voice synthesis) support via
  732. ;; libflite [no]
  733. ;; --enable-libgme enable Game Music Emu via libgme [no]
  734. ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
  735. ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
  736. ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
  737. ;; --enable-libmodplug enable ModPlug via libmodplug [no]
  738. ;; --enable-libnut enable NUT (de)muxing via libnut,
  739. ;; native (de)muxer exists [no]
  740. ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
  741. ;; libopencore-amrnb [no]
  742. ;; --enable-libopencore-amrwb enable AMR-WB decoding via
  743. ;; libopencore-amrwb [no]
  744. ;; --enable-libopencv enable video filtering via libopencv [no]
  745. ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
  746. ;; OpenJPEG [no]
  747. ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
  748. ;; --enable-libschroedinger enable Dirac de/encoding via
  749. ;; libschroedinger [no]
  750. ;; --enable-libshine enable fixed-point MP3 encoding via
  751. ;; libshine [no]
  752. ;; --enable-libssh enable SFTP protocol via libssh [no]
  753. ;; (libssh2 does not work)
  754. ;; --enable-libstagefright-h264 enable H.264 decoding via
  755. ;; libstagefright [no]
  756. ;; --enable-libutvideo enable Ut Video encoding and decoding via
  757. ;; libutvideo [no]
  758. ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
  759. ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
  760. ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
  761. ;; libvo-amrwbenc [no]
  762. ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
  763. ;; --enable-libxavs enable AVS encoding via xavs [no]
  764. ;; --enable-libzmq enable message passing via libzmq [no]
  765. ;; --enable-libzvbi enable teletext support via libzvbi [no]
  766. ;; --enable-opencl enable OpenCL code
  767. '("--enable-avresample"
  768. "--enable-gpl" ; enable optional gpl licensed parts
  769. "--enable-shared"
  770. "--enable-frei0r"
  771. "--enable-fontconfig"
  772. "--enable-gnutls"
  773. "--enable-ladspa"
  774. "--enable-libass"
  775. "--enable-libbluray"
  776. "--enable-libcaca"
  777. "--enable-libcdio"
  778. "--enable-libfreetype"
  779. "--enable-libmp3lame"
  780. "--enable-libopus"
  781. "--enable-libpulse"
  782. "--enable-libsoxr"
  783. "--enable-libspeex"
  784. "--enable-libtheora"
  785. "--enable-libtwolame"
  786. "--enable-libvidstab"
  787. "--enable-libvorbis"
  788. "--enable-libvpx"
  789. "--enable-libxvid"
  790. "--enable-libx264"
  791. "--enable-libx265"
  792. "--enable-openal"
  793. "--enable-opengl"
  794. "--enable-libdrm"
  795. "--enable-runtime-cpudetect"
  796. ;; The HTML pages take 7.2 MiB
  797. "--disable-htmlpages"
  798. ;; The static libraries are 23 MiB
  799. "--disable-static"
  800. ;; Runtime cpu detection is not implemented on
  801. ;; MIPS, so we disable some features.
  802. "--disable-mips32r2"
  803. "--disable-mipsdsp"
  804. "--disable-mipsdspr2"
  805. "--disable-mipsfpu")
  806. #:phases
  807. (modify-phases %standard-phases
  808. (replace
  809. 'configure
  810. ;; configure does not work followed by "SHELL=..." and
  811. ;; "CONFIG_SHELL=..."; set environment variables instead
  812. (lambda* (#:key outputs configure-flags #:allow-other-keys)
  813. (let ((out (assoc-ref outputs "out")))
  814. (substitute* "configure"
  815. (("#! /bin/sh") (string-append "#!" (which "sh"))))
  816. (setenv "SHELL" (which "bash"))
  817. (setenv "CONFIG_SHELL" (which "bash"))
  818. (apply invoke
  819. "./configure"
  820. (string-append "--prefix=" out)
  821. ;; Add $libdir to the RUNPATH of all the binaries.
  822. (string-append "--extra-ldflags=-Wl,-rpath="
  823. out "/lib")
  824. configure-flags))))
  825. (add-before
  826. 'check 'set-ld-library-path
  827. (lambda _
  828. ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
  829. ;; running tests.
  830. (let* ((dso (find-files "." "\\.so$"))
  831. (path (string-join (map dirname dso) ":")))
  832. (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
  833. (setenv "LD_LIBRARY_PATH" path)
  834. #t))))))
  835. (home-page "https://www.ffmpeg.org/")
  836. (synopsis "Audio and video framework")
  837. (description "FFmpeg is a complete, cross-platform solution to record,
  838. convert and stream audio and video. It includes the libavcodec
  839. audio/video codec library.")
  840. (license license:gpl2+)))
  841. (define-public ffmpeg-3.4
  842. (package
  843. (inherit ffmpeg)
  844. (version "3.4.5")
  845. (source (origin
  846. (method url-fetch)
  847. (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
  848. version ".tar.xz"))
  849. (sha256
  850. (base32
  851. "0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l"))))))
  852. (define-public ffmpeg-for-stepmania
  853. (hidden-package
  854. (package
  855. (inherit ffmpeg)
  856. (version "2.1.3")
  857. (source
  858. (origin
  859. (method git-fetch)
  860. (uri (git-reference
  861. (url "https://github.com/stepmania/ffmpeg.git")
  862. (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
  863. (sha256
  864. (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
  865. (file-name (git-file-name "ffmpeg" version))))
  866. (arguments
  867. (substitute-keyword-arguments (package-arguments ffmpeg)
  868. ((#:configure-flags flags)
  869. '(list "--disable-programs"
  870. "--disable-doc"
  871. "--disable-debug"
  872. "--disable-avdevice"
  873. "--disable-swresample"
  874. "--disable-postproc"
  875. "--disable-avfilter"
  876. "--disable-shared"
  877. "--enable-static"))))
  878. (inputs '()))))
  879. (define-public ffmpegthumbnailer
  880. (package
  881. (name "ffmpegthumbnailer")
  882. (version "2.2.0")
  883. (source (origin
  884. (method git-fetch)
  885. (uri (git-reference
  886. (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
  887. (commit version)))
  888. (file-name (git-file-name name version))
  889. (sha256
  890. (base32
  891. "0kl8aa547icy9b05njps02a8sw4yn4f8fzs228kig247sn09s4cp"))))
  892. (build-system cmake-build-system)
  893. (native-inputs
  894. `(("pkg-config" ,pkg-config)))
  895. (inputs
  896. `(("ffmpeg" ,ffmpeg)
  897. ("libjpeg-turbo" ,libjpeg-turbo)
  898. ("libpng" ,libpng)
  899. ("gvfs" ,gvfs)))
  900. (arguments
  901. `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
  902. (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
  903. (synopsis "Create thumbnails from video files")
  904. (description "FFmpegthumbnailer is a lightweight video thumbnailer that
  905. can be used by file managers to create thumbnails for your video files. The
  906. thumbnailer uses ffmpeg to decode frames from the video files, so supported
  907. videoformats depend on the configuration flags of ffmpeg.")
  908. (license license:gpl2+)))
  909. (define-public vlc
  910. (package
  911. (name "vlc")
  912. (version "3.0.6")
  913. (source (origin
  914. (method url-fetch)
  915. (uri (string-append
  916. "https://download.videolan.org/pub/videolan/vlc/"
  917. (car (string-split version #\-))
  918. "/vlc-" version ".tar.xz"))
  919. (sha256
  920. (base32
  921. "1lvyyahv6g9zv7m5g5qinyrwmw47zdsd5ysimb862j7kw15nvh8q"))))
  922. (build-system gnu-build-system)
  923. (native-inputs
  924. `(("flex" ,flex)
  925. ("bison" ,bison)
  926. ("gettext" ,gettext-minimal)
  927. ("git" ,git) ; needed for a test
  928. ("pkg-config" ,pkg-config)))
  929. ;; FIXME: Add optional inputs once available.
  930. (inputs
  931. `(("alsa-lib" ,alsa-lib)
  932. ("avahi" ,avahi)
  933. ("dbus" ,dbus)
  934. ("eudev" ,eudev)
  935. ("flac" ,flac)
  936. ("ffmpeg" ,ffmpeg)
  937. ("fontconfig" ,fontconfig)
  938. ("freetype" ,freetype)
  939. ("fribidi" ,fribidi)
  940. ("gnutls" ,gnutls)
  941. ("liba52" ,liba52)
  942. ("libarchive" ,libarchive)
  943. ("libass" ,libass)
  944. ("libavc1394" ,libavc1394)
  945. ("libbluray" ,libbluray)
  946. ("libcaca" ,libcaca)
  947. ("libcddb" ,libcddb)
  948. ("libdca" ,libdca)
  949. ("libdvbpsi" ,libdvbpsi)
  950. ("libdvdnav" ,libdvdnav)
  951. ("libdvdread" ,libdvdread)
  952. ("libebml" ,libebml)
  953. ("libgcrypt" ,libgcrypt)
  954. ("libidn" ,libidn)
  955. ("libkate" ,libkate)
  956. ("libmad" ,libmad)
  957. ("libmatroska" ,libmatroska)
  958. ("libmicrodns" ,libmicrodns)
  959. ("libmodplug" ,libmodplug)
  960. ("libmpeg2" ,libmpeg2)
  961. ("libogg" ,libogg)
  962. ("libpng" ,libpng)
  963. ("libraw1394" ,libraw1394)
  964. ("librsvg" ,librsvg)
  965. ("libsamplerate" ,libsamplerate)
  966. ("libsecret" ,libsecret)
  967. ("libssh2" ,libssh2)
  968. ("libupnp" ,libupnp)
  969. ("libva" ,libva)
  970. ("libvdpau" ,libvdpau)
  971. ("libvorbis" ,libvorbis)
  972. ("libvpx" ,libvpx-1.7)
  973. ("libtheora" ,libtheora)
  974. ("libx264" ,libx264)
  975. ("libxext" ,libxext)
  976. ("libxi" ,libxi)
  977. ("libxinerama" ,libxinerama)
  978. ("libxml2" ,libxml2)
  979. ("libxpm" ,libxpm)
  980. ("livemedia-utils" ,livemedia-utils)
  981. ("lua" ,lua-5.2)
  982. ("mesa" ,mesa)
  983. ("opus" ,opus)
  984. ("perl" ,perl)
  985. ("pulseaudio" ,pulseaudio)
  986. ("protobuf" ,protobuf)
  987. ("python" ,python-wrapper)
  988. ("qtbase" ,qtbase)
  989. ("qtsvg" ,qtsvg)
  990. ("qtx11extras" ,qtx11extras)
  991. ("samba" ,samba)
  992. ("sdl" ,sdl)
  993. ("sdl-image" ,sdl-image)
  994. ("speex" ,speex)
  995. ("speexdsp" ,speexdsp)
  996. ("taglib" ,taglib)
  997. ("twolame" ,twolame)
  998. ("unzip" ,unzip)
  999. ("wayland" ,wayland)
  1000. ("wayland-protocols" ,wayland-protocols)
  1001. ("x265" ,x265)
  1002. ("xcb-util-keysyms" ,xcb-util-keysyms)))
  1003. (arguments
  1004. `(#:configure-flags
  1005. `("CXXFLAGS=-std=gnu++11"
  1006. "BUILDCC=gcc"
  1007. ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
  1008. (assoc-ref %build-inputs "ffmpeg")
  1009. "/lib")) ;needed for the tests
  1010. #:phases
  1011. (modify-phases %standard-phases
  1012. (add-after 'unpack 'patch-source
  1013. (lambda* (#:key inputs #:allow-other-keys)
  1014. (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
  1015. (substitute* "configure"
  1016. (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
  1017. (string-append "LIVE555_PREFIX=" livemedia-utils)))
  1018. ;; Some of the tests require using the display to test out VLC,
  1019. ;; which fails in our sandboxed build system
  1020. (substitute* "test/run_vlc.sh"
  1021. (("./vlc --ignore-config") "echo"))
  1022. ;; modules/text_renderer/freetype/text_layout.c uses a
  1023. ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
  1024. ;; from fribidi.h, so for now we enable the use of deprecated
  1025. ;; fribidi interfaces from this file.
  1026. ;; FIXME: Try removing this for vlc >= 3.0.3.
  1027. (substitute* "modules/text_renderer/freetype/text_layout.c"
  1028. (("# define FRIBIDI_NO_DEPRECATED 1") ""))
  1029. ;; Fix build against Qt 5.11.
  1030. (substitute* "modules/gui/qt/actions_manager.cpp"
  1031. (("#include <vlc_keys.h>") "#include <vlc_keys.h>
  1032. #include <QAction>"))
  1033. (substitute* "modules/gui/qt/components/simple_preferences.cpp"
  1034. (("#include <QFont>") "#include <QFont>
  1035. #include <QButtonGroup>"))
  1036. #t)))
  1037. (add-after 'strip 'regenerate-plugin-cache
  1038. (lambda* (#:key outputs #:allow-other-keys)
  1039. ;; The 'install-exec-hook' rule in the top-level Makefile.am
  1040. ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
  1041. ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
  1042. ;; it references. Thus, we first reset the timestamps of all
  1043. ;; these files, and then regenerate the cache such that the
  1044. ;; mtimes it includes are always zero instead of being dependent
  1045. ;; on the build time.
  1046. (let* ((out (assoc-ref outputs "out"))
  1047. (pkglibdir (string-append out "/lib/vlc"))
  1048. (plugindir (string-append pkglibdir "/plugins"))
  1049. (cachegen (string-append pkglibdir "/vlc-cache-gen")))
  1050. ;; TODO: Factorize 'reset-timestamps'.
  1051. (for-each (lambda (file)
  1052. (let ((s (lstat file)))
  1053. (unless (eq? (stat:type s) 'symlink)
  1054. (utime file 1 1))))
  1055. (find-files plugindir))
  1056. (invoke cachegen plugindir))))
  1057. (add-after 'install 'wrap-executable
  1058. (lambda* (#:key outputs #:allow-other-keys)
  1059. (let ((out (assoc-ref outputs "out"))
  1060. (plugin-path (getenv "QT_PLUGIN_PATH")))
  1061. (wrap-program (string-append out "/bin/vlc")
  1062. `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
  1063. #t)))))
  1064. (home-page "https://www.videolan.org/")
  1065. (synopsis "Audio and video framework")
  1066. (description "VLC is a cross-platform multimedia player and framework
  1067. that plays most multimedia files as well as DVD, Audio CD, VCD, and various
  1068. streaming protocols.")
  1069. (license license:gpl2+)))
  1070. (define-public mplayer
  1071. (package
  1072. (name "mplayer")
  1073. (version "1.3.0")
  1074. (source (origin
  1075. (method url-fetch)
  1076. (uri (string-append
  1077. "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
  1078. version ".tar.xz"))
  1079. (sha256
  1080. (base32
  1081. "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
  1082. (build-system gnu-build-system)
  1083. ;; FIXME: Add additional inputs once available.
  1084. (native-inputs
  1085. `(("pkg-config" ,pkg-config)))
  1086. (inputs
  1087. `(("alsa-lib" ,alsa-lib)
  1088. ("cdparanoia" ,cdparanoia)
  1089. ("ffmpeg" ,ffmpeg-3.4)
  1090. ("fontconfig" ,fontconfig)
  1091. ("freetype" ,freetype)
  1092. ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
  1093. ("lame" ,lame)
  1094. ("libass" ,libass)
  1095. ("libdvdcss" ,libdvdcss)
  1096. ("libdvdnav" ,libdvdnav)
  1097. ("libjpeg" ,libjpeg)
  1098. ("libmpeg2" ,libmpeg2)
  1099. ("libmpg123" ,mpg123) ; audio codec for MP3
  1100. ("libpng" ,libpng)
  1101. ("libtheora" ,libtheora)
  1102. ("libvdpau" ,libvdpau)
  1103. ("libvorbis" ,libvorbis)
  1104. ("libx11" ,libx11)
  1105. ("libx264" ,libx264)
  1106. ("libxinerama" ,libxinerama)
  1107. ("libxv" ,libxv)
  1108. ("libxxf86dga" ,libxxf86dga)
  1109. ("mesa" ,mesa)
  1110. ("opus" ,opus)
  1111. ("perl" ,perl)
  1112. ("pulseaudio" ,pulseaudio)
  1113. ("python" ,python-wrapper)
  1114. ("sdl" ,sdl)
  1115. ("speex" ,speex)
  1116. ("yasm" ,yasm)
  1117. ("zlib" ,zlib)))
  1118. (arguments
  1119. `(#:tests? #f ; no test target
  1120. #:phases
  1121. (modify-phases %standard-phases
  1122. (replace 'configure
  1123. ;; configure does not work followed by "SHELL=..." and
  1124. ;; "CONFIG_SHELL=..."; set environment variables instead
  1125. (lambda* (#:key inputs outputs #:allow-other-keys)
  1126. (let ((out (assoc-ref outputs "out"))
  1127. (libx11 (assoc-ref inputs "libx11")))
  1128. (substitute* "configure"
  1129. (("#! /bin/sh") (string-append "#!" (which "sh"))))
  1130. (setenv "SHELL" (which "bash"))
  1131. (setenv "CONFIG_SHELL" (which "bash"))
  1132. (invoke "./configure"
  1133. (string-append "--extra-cflags=-I"
  1134. libx11 "/include") ; to detect libx11
  1135. "--disable-ffmpeg_a" ; disables bundled ffmpeg
  1136. (string-append "--prefix=" out)
  1137. ;; Enable runtime cpu detection where supported,
  1138. ;; and choose a suitable target.
  1139. ,@(match (or (%current-target-system)
  1140. (%current-system))
  1141. ("x86_64-linux"
  1142. '("--enable-runtime-cpudetection"
  1143. "--target=x86_64-linux"))
  1144. ("i686-linux"
  1145. '("--enable-runtime-cpudetection"
  1146. "--target=i686-linux"))
  1147. ("mips64el-linux"
  1148. '("--target=mips3-linux"))
  1149. (_ (list (string-append
  1150. "--target="
  1151. (or (%current-target-system)
  1152. (nix-system->gnu-triplet
  1153. (%current-system)))))))
  1154. "--disable-iwmmxt")))))))
  1155. (home-page "https://www.mplayerhq.hu/design7/news.html")
  1156. (synopsis "Audio and video player")
  1157. (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
  1158. Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
  1159. NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
  1160. SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
  1161. (license license:gpl2)))
  1162. (define-public mpv
  1163. (package
  1164. (name "mpv")
  1165. (version "0.29.1")
  1166. (source (origin
  1167. (method git-fetch)
  1168. (uri (git-reference
  1169. (url "https://github.com/mpv-player/mpv.git")
  1170. (commit (string-append "v" version))))
  1171. (file-name (git-file-name name version))
  1172. (sha256
  1173. (base32
  1174. "138921kx8g6qprim558xin09xximjhsj9ss8b71ifg2m6kclym8m"))))
  1175. (build-system waf-build-system)
  1176. (native-inputs
  1177. `(("perl" ,perl) ; for zsh completion file
  1178. ("pkg-config" ,pkg-config)
  1179. ("python-docutils" ,python-docutils)))
  1180. ;; Missing features: libguess, V4L2
  1181. (inputs
  1182. `(("alsa-lib" ,alsa-lib)
  1183. ("enca" ,enca)
  1184. ("ffmpeg" ,ffmpeg)
  1185. ("jack" ,jack-1)
  1186. ("ladspa" ,ladspa)
  1187. ("lcms" ,lcms)
  1188. ("libass" ,libass)
  1189. ("libbluray" ,libbluray)
  1190. ("libcaca" ,libcaca)
  1191. ("libbs2b" ,libbs2b)
  1192. ("libcdio-paranoia" ,libcdio-paranoia)
  1193. ("libdvdread" ,libdvdread)
  1194. ("libdvdnav" ,libdvdnav)
  1195. ("libjpeg" ,libjpeg)
  1196. ("libva" ,libva)
  1197. ("libvdpau" ,libvdpau)
  1198. ("libx11" ,libx11)
  1199. ("libxext" ,libxext)
  1200. ("libxinerama" ,libxinerama)
  1201. ("libxrandr" ,libxrandr)
  1202. ("libxscrnsaver" ,libxscrnsaver)
  1203. ("libxv" ,libxv)
  1204. ;; XXX: lua > 5.2 is not currently supported; see
  1205. ;; waftools/checks/custom.py
  1206. ("lua" ,lua-5.2)
  1207. ("mesa" ,mesa)
  1208. ("mpg123" ,mpg123)
  1209. ("pulseaudio" ,pulseaudio)
  1210. ("rsound" ,rsound)
  1211. ("shaderc" ,shaderc)
  1212. ("vulkan-headers" ,vulkan-headers)
  1213. ("vulkan-loader" ,vulkan-loader)
  1214. ("waf" ,python-waf)
  1215. ("wayland" ,wayland)
  1216. ("wayland-protocols" ,wayland-protocols)
  1217. ("libxkbcommon" ,libxkbcommon)
  1218. ("youtube-dl" ,youtube-dl)
  1219. ("zlib" ,zlib)))
  1220. (arguments
  1221. '(#:phases
  1222. (modify-phases %standard-phases
  1223. (add-before
  1224. 'configure 'setup-waf
  1225. (lambda* (#:key inputs #:allow-other-keys)
  1226. (let ((waf (assoc-ref inputs "waf")))
  1227. (copy-file (string-append waf "/bin/waf") "waf"))
  1228. (setenv "CC" "gcc")
  1229. #t)))
  1230. #:configure-flags (list "--enable-libmpv-shared"
  1231. "--enable-cdda"
  1232. "--enable-dvdread"
  1233. "--enable-dvdnav"
  1234. "--enable-zsh-comp"
  1235. "--disable-build-date")
  1236. ;; No check function defined.
  1237. #:tests? #f))
  1238. (home-page "https://mpv.io/")
  1239. (synopsis "Audio and video player")
  1240. (description "mpv is a general-purpose audio and video player. It is a
  1241. fork of mplayer2 and MPlayer. It shares some features with the former
  1242. projects while introducing many more.")
  1243. (license license:gpl2+)))
  1244. (define-public gnome-mpv
  1245. (package
  1246. (name "gnome-mpv")
  1247. (version "0.16")
  1248. (source
  1249. (origin
  1250. (method url-fetch)
  1251. (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
  1252. "/download/v" version "/gnome-mpv-" version
  1253. ".tar.xz"))
  1254. (sha256
  1255. (base32
  1256. "0jzdzvhcqp5jp1inwk2466zf7r8iimk3x69066gl8mzaay98mk92"))))
  1257. (native-inputs
  1258. `(("intltool" ,intltool)
  1259. ("pkg-config" ,pkg-config)))
  1260. (inputs
  1261. `(("gtk+" ,gtk+)
  1262. ("libepoxy" ,libepoxy)
  1263. ("mpv" ,mpv)))
  1264. (build-system glib-or-gtk-build-system)
  1265. (home-page "https://github.com/gnome-mpv/gnome-mpv")
  1266. (synopsis "GTK+ frontend for the mpv media player")
  1267. (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
  1268. GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
  1269. access to mpv's powerful playback capabilities.")
  1270. (license license:gpl3+)))
  1271. (define-public libvpx
  1272. (package
  1273. (name "libvpx")
  1274. (version "1.8.0")
  1275. (source (origin
  1276. ;; XXX: Upstream does not provide tarballs for > 1.6.1.
  1277. (method git-fetch)
  1278. (uri (git-reference
  1279. (url "https://chromium.googlesource.com/webm/libvpx")
  1280. (commit (string-append "v" version))))
  1281. (file-name (git-file-name name version))
  1282. (sha256
  1283. (base32
  1284. "079pb80am08lj8y5rx99vdr99mdqis9067f172zq12alkz849n93"))
  1285. (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
  1286. (build-system gnu-build-system)
  1287. (arguments
  1288. `(#:configure-flags (list "--enable-shared"
  1289. "--as=yasm"
  1290. ;; Limit size to avoid CVE-2015-1258
  1291. "--size-limit=16384x16384"
  1292. (string-append "--prefix=" (assoc-ref %outputs "out")))
  1293. #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
  1294. (assoc-ref %outputs "out") "/lib"))
  1295. #:phases (modify-phases %standard-phases
  1296. (replace 'configure
  1297. (lambda* (#:key configure-flags #:allow-other-keys)
  1298. ;; The configure script does not understand some of the GNU
  1299. ;; options, so we only add the flags specified above.
  1300. (apply invoke "./configure" configure-flags))))
  1301. #:tests? #f)) ; no check target
  1302. (native-inputs
  1303. `(("perl" ,perl)
  1304. ("yasm" ,yasm)))
  1305. (synopsis "VP8/VP9 video codec")
  1306. (description "libvpx is a codec for the VP8/VP9 video compression format.")
  1307. (license license:bsd-3)
  1308. (home-page "https://www.webmproject.org/")))
  1309. ;; GNU IceCat fails to build against 1.8.0, so keep this version for now.
  1310. (define-public libvpx-1.7
  1311. (package
  1312. (inherit libvpx)
  1313. (version "1.7.0")
  1314. (source (origin
  1315. (inherit (package-source libvpx))
  1316. (uri (git-reference
  1317. (url "https://chromium.googlesource.com/webm/libvpx")
  1318. (commit (string-append "v" version))))
  1319. (file-name (git-file-name "libvpx" version))
  1320. (sha256
  1321. (base32
  1322. "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
  1323. (patches
  1324. (append
  1325. (origin-patches (package-source libvpx))
  1326. (search-patches "libvpx-use-after-free-in-postproc.patch")))))))
  1327. (define-public youtube-dl
  1328. (package
  1329. (name "youtube-dl")
  1330. (version "2019.02.18")
  1331. (source (origin
  1332. (method url-fetch)
  1333. (uri (string-append "https://github.com/rg3/youtube-dl/releases/"
  1334. "download/" version "/youtube-dl-"
  1335. version ".tar.gz"))
  1336. (sha256
  1337. (base32
  1338. "1sr0f6ixpaqyp3cf29zswx84y3nfabwnk3sljcgvgnmjp73zzfv1"))))
  1339. (build-system python-build-system)
  1340. (arguments
  1341. ;; The problem here is that the directory for the man page and completion
  1342. ;; files is relative, and for some reason, setup.py uses the
  1343. ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
  1344. ;; So, we need pass the prefix directly. In addition, make sure the Bash
  1345. ;; completion file is called 'youtube-dl' rather than
  1346. ;; 'youtube-dl.bash-completion'.
  1347. `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
  1348. #:phases (modify-phases %standard-phases
  1349. (add-before 'install 'fix-the-data-directories
  1350. (lambda* (#:key outputs #:allow-other-keys)
  1351. (let ((prefix (assoc-ref outputs "out")))
  1352. (mkdir "bash-completion")
  1353. (rename-file "youtube-dl.bash-completion"
  1354. "bash-completion/youtube-dl")
  1355. (substitute* "setup.py"
  1356. (("youtube-dl\\.bash-completion")
  1357. "bash-completion/youtube-dl")
  1358. (("'etc/")
  1359. (string-append "'" prefix "/etc/"))
  1360. (("'share/")
  1361. (string-append "'" prefix "/share/")))
  1362. #t))))))
  1363. (synopsis "Download videos from YouTube.com and other sites")
  1364. (description
  1365. "Youtube-dl is a small command-line program to download videos from
  1366. YouTube.com and many more sites.")
  1367. (home-page "https://yt-dl.org")
  1368. (license license:public-domain)))
  1369. (define-public youtube-dl-gui
  1370. (package
  1371. (name "youtube-dl-gui")
  1372. (version "0.3.8")
  1373. (source
  1374. (origin
  1375. (method url-fetch)
  1376. (uri (pypi-uri "Youtube-DLG" version))
  1377. (sha256
  1378. (base32
  1379. "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
  1380. (build-system python-build-system)
  1381. (arguments
  1382. ;; In Guix, wxpython has not yet been packaged for Python 3.
  1383. `(#:python ,python-2
  1384. ;; This package has no tests.
  1385. #:tests? #f
  1386. #:phases
  1387. (modify-phases %standard-phases
  1388. (add-before 'build 'patch-source
  1389. (lambda* (#:key inputs #:allow-other-keys)
  1390. ;; The youtube-dl-gui program lets you configure options. Some of
  1391. ;; them are problematic, so we change their defaults.
  1392. (substitute* "youtube_dl_gui/optionsmanager.py"
  1393. ;; When this is true, the builder process will try (and fail) to
  1394. ;; write logs to the builder user's home directory.
  1395. (("'enable_log': True") "'enable_log': False")
  1396. ;; This determines which youtube-dl program youtube-dl-gui will
  1397. ;; run. If we don't set this, then youtube-dl-gui might download
  1398. ;; an arbitrary copy from the Internet into the user's home
  1399. ;; directory and run it, so let's make sure youtube-dl-gui uses
  1400. ;; the youtube-dl from the inputs by default.
  1401. (("'youtubedl_path': self.config_path")
  1402. (string-append "'youtubedl_path': '"
  1403. (assoc-ref inputs "youtube-dl")
  1404. "/bin'"))
  1405. ;; When this is True, when youtube-dl-gui is finished downloading
  1406. ;; a file, it will try (and possibly fail) to open the directory
  1407. ;; containing the downloaded file. This can fail because it
  1408. ;; assumes that xdg-open is in PATH. Unfortunately, simply
  1409. ;; adding xdg-utils to the propagated inputs is not enough to
  1410. ;; make this work, so for now we set the default to False.
  1411. (("'open_dl_dir': True") "'open_dl_dir': False"))
  1412. ;; The youtube-dl program from the inputs is actually a wrapper
  1413. ;; script written in bash, so attempting to invoke it as a python
  1414. ;; script will fail.
  1415. (substitute* "youtube_dl_gui/downloaders.py"
  1416. (("cmd = \\['python', self\\.youtubedl_path\\]")
  1417. "cmd = [self.youtubedl_path]"))
  1418. ;; Use relative paths for installing data files so youtube-dl-gui
  1419. ;; installs the files relative to its prefix in the store, rather
  1420. ;; than relative to /. Also, instead of installing data files into
  1421. ;; $prefix/usr/share, install them into $prefix/share for
  1422. ;; consistency (see: (standards) Directory Variables).
  1423. (substitute* "setup.py"
  1424. (("= '/usr/share") "= 'share"))
  1425. ;; Update get_locale_file() so it finds the installed localization
  1426. ;; files.
  1427. (substitute* "youtube_dl_gui/utils.py"
  1428. (("os\\.path\\.join\\('/usr', 'share'")
  1429. (string-append "os.path.join('"
  1430. (assoc-ref %outputs "out")
  1431. "', 'share'")))
  1432. #t)))))
  1433. (inputs
  1434. `(("python2-wxpython" ,python2-wxpython)
  1435. ("youtube-dl" ,youtube-dl)))
  1436. (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
  1437. (synopsis
  1438. "GUI (Graphical User Interface) for @command{youtube-dl}")
  1439. (description
  1440. "Youtube-dlG is a GUI (Graphical User Interface) for
  1441. @command{youtube-dl}. You can use it to download videos from YouTube and any
  1442. other site that youtube-dl supports.")
  1443. (license license:unlicense)))
  1444. (define-public you-get
  1445. (package
  1446. (name "you-get")
  1447. (version "0.4.1210")
  1448. (source (origin
  1449. (method git-fetch)
  1450. (uri (git-reference
  1451. (url "https://github.com/soimort/you-get.git")
  1452. (commit (string-append "v" version))))
  1453. (file-name (git-file-name name version))
  1454. (sha256
  1455. (base32
  1456. "1plw518hzpzzcr38phlnsbpq7aqnps8iwrgr68f6d41rppl1qb25"))))
  1457. (build-system python-build-system)
  1458. (inputs
  1459. `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
  1460. (arguments
  1461. `(#:phases
  1462. (modify-phases %standard-phases
  1463. (add-after 'unpack 'qualify-input-references
  1464. ;; Explicitly invoke the input ffmpeg, instead of whichever one
  1465. ;; happens to be in the user's $PATH at run time.
  1466. (lambda* (#:key inputs #:allow-other-keys)
  1467. (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
  1468. "/bin/ffmpeg")))
  1469. (substitute* "src/you_get/processor/ffmpeg.py"
  1470. ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
  1471. ;; same string is also used when sniffing ffmpeg's output.
  1472. (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
  1473. (string-append prefix "'" ffmpeg "'")))
  1474. #t))))
  1475. #:tests? #f)) ; XXX some tests need Internet access
  1476. (synopsis "Download videos, audio, or images from Web sites")
  1477. (description
  1478. "You-Get is a command-line utility to download media contents (videos,
  1479. audio, images) from the Web. It can use either mpv or vlc for playback.")
  1480. (home-page "https://you-get.org/")
  1481. (license license:expat)))
  1482. (define-public youtube-viewer
  1483. (package
  1484. (name "youtube-viewer")
  1485. (version "3.5.2")
  1486. (source (origin
  1487. (method git-fetch)
  1488. (uri (git-reference
  1489. (url "https://github.com/trizen/youtube-viewer.git")
  1490. (commit version)))
  1491. (file-name (git-file-name name version))
  1492. (sha256
  1493. (base32
  1494. "0sx0f7jgc41a4anflw02zqk5yivydn02nn78kxkn3fik6xdmv3yd"))))
  1495. (build-system perl-build-system)
  1496. (native-inputs
  1497. `(("perl-module-build" ,perl-module-build)))
  1498. ;; FIXME: Add optional dependencies once available:
  1499. ;; perl-lwp-useragent-cached and perl-term-readline-gnu
  1500. (inputs
  1501. `(("perl-data-dump" ,perl-data-dump)
  1502. ("perl-file-sharedir" ,perl-file-sharedir)
  1503. ("perl-gtk2" ,perl-gtk2)
  1504. ("perl-json" ,perl-json)
  1505. ("perl-libwww" ,perl-libwww)
  1506. ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
  1507. ("perl-mozilla-ca" ,perl-mozilla-ca)
  1508. ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
  1509. (arguments
  1510. `(#:modules ((guix build perl-build-system)
  1511. (guix build utils)
  1512. (srfi srfi-26))
  1513. #:module-build-flags '("--gtk")
  1514. #:phases
  1515. (modify-phases %standard-phases
  1516. (add-after 'install 'install-desktop
  1517. (lambda* (#:key outputs #:allow-other-keys)
  1518. (let* ((out (assoc-ref outputs "out"))
  1519. (sharedir (string-append out "/share")))
  1520. (install-file "share/gtk-youtube-viewer.desktop"
  1521. (string-append sharedir "/applications"))
  1522. (install-file "share/icons/gtk-youtube-viewer.png"
  1523. (string-append sharedir "/pixmaps"))
  1524. #t)))
  1525. (add-after 'install 'wrap-program
  1526. (lambda* (#:key outputs #:allow-other-keys)
  1527. (let* ((out (assoc-ref outputs "out"))
  1528. (bin-dir (string-append out "/bin/"))
  1529. (site-dir (string-append out "/lib/perl5/site_perl/"))
  1530. (lib-path (getenv "PERL5LIB")))
  1531. (for-each (cut wrap-program <>
  1532. `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
  1533. (find-files bin-dir))
  1534. #t))))))
  1535. (synopsis
  1536. "Lightweight application for searching and streaming videos from YouTube")
  1537. (description
  1538. "Youtube-viewer searches and plays YouTube videos in a native player.
  1539. It comes with various search options; it can search for videos, playlists
  1540. and/or channels. The videos are streamed directly in a selected video player
  1541. at the best resolution (customizable) and with closed-captions (if available).
  1542. Both command-line and GTK2 interface are available.")
  1543. (home-page "https://github.com/trizen/youtube-viewer")
  1544. (license license:perl-license)))
  1545. (define-public libbluray
  1546. (package
  1547. (name "libbluray")
  1548. (version "1.0.2")
  1549. (source (origin
  1550. (method url-fetch)
  1551. (uri (string-append "https://download.videolan.org/videolan/"
  1552. name "/" version "/"
  1553. name "-" version ".tar.bz2"))
  1554. (sha256
  1555. (base32
  1556. "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
  1557. (build-system gnu-build-system)
  1558. (arguments
  1559. `(#:configure-flags '("--disable-bdjava-jar")
  1560. #:phases
  1561. (modify-phases %standard-phases
  1562. (add-after 'unpack 'refer-to-libxml2-in-.pc-file
  1563. ;; Avoid the need to propagate libxml2 by referring to it
  1564. ;; directly, as is already done for fontconfig & freetype.
  1565. (lambda* (#:key inputs #:allow-other-keys)
  1566. (let ((libxml2 (assoc-ref inputs "libxml2")))
  1567. (substitute* "configure"
  1568. ((" libxml-2.0") ""))
  1569. (substitute* "src/libbluray.pc.in"
  1570. (("^Libs.private:" field)
  1571. (string-append field " -L" libxml2 "/lib -lxml2")))
  1572. #t)))
  1573. (add-before 'build 'fix-dlopen-paths
  1574. (lambda* (#:key inputs #:allow-other-keys)
  1575. (let ((libaacs (assoc-ref inputs "libaacs"))
  1576. (libbdplus (assoc-ref inputs "libbdplus")))
  1577. (substitute* "src/libbluray/disc/aacs.c"
  1578. (("\"libaacs\"")
  1579. (string-append "\"" libaacs "/lib/libaacs\"")))
  1580. (substitute* "src/libbluray/disc/bdplus.c"
  1581. (("\"libbdplus\"")
  1582. (string-append "\"" libbdplus "/lib/libbdplus\"")))
  1583. #t))))))
  1584. (native-inputs `(("pkg-config" ,pkg-config)))
  1585. (inputs
  1586. `(("fontconfig" ,fontconfig)
  1587. ("freetype" ,freetype)
  1588. ("libaacs" ,libaacs)
  1589. ("libbdplus" ,libbdplus)
  1590. ("libxml2" ,libxml2)))
  1591. (home-page "https://www.videolan.org/developers/libbluray.html")
  1592. (synopsis "Blu-Ray Disc playback library")
  1593. (description
  1594. "libbluray is a library designed for Blu-Ray Disc playback for media
  1595. players, like VLC or MPlayer.")
  1596. (license license:lgpl2.1+)))
  1597. (define-public libdvdread
  1598. (package
  1599. (name "libdvdread")
  1600. (version "6.0.1")
  1601. (source (origin
  1602. (method url-fetch)
  1603. (uri (string-append "https://download.videolan.org/videolan/"
  1604. "libdvdread/" version "/"
  1605. "libdvdread-" version ".tar.bz2"))
  1606. (sha256
  1607. (base32
  1608. "1gfmh8ii3s2fw1c8vn57piwxc0smd3va4h7xgp9s8g48cc04zki8"))))
  1609. (build-system gnu-build-system)
  1610. (arguments
  1611. `(#:configure-flags '("--with-libdvdcss=yes")))
  1612. (native-inputs
  1613. `(("pkg-config" ,pkg-config)))
  1614. (propagated-inputs
  1615. `(("libdvdcss" ,libdvdcss)))
  1616. (home-page "http://dvdnav.mplayerhq.hu/")
  1617. (synopsis "Library for reading video DVDs")
  1618. (description
  1619. "Libdvdread provides a simple foundation for reading DVD video
  1620. disks. It provides the functionality that is required to access many
  1621. DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
  1622. authentication and descrambling (if an external libdvdcss library is
  1623. installed).")
  1624. (license license:gpl2+)))
  1625. (define-public dvdauthor
  1626. (package
  1627. (name "dvdauthor")
  1628. (version "0.7.2")
  1629. (source
  1630. (origin
  1631. (method url-fetch)
  1632. (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
  1633. version ".tar.gz"))
  1634. (sha256
  1635. (base32
  1636. "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
  1637. (build-system gnu-build-system)
  1638. (inputs
  1639. `(("libdvdread" ,libdvdread)
  1640. ("libpng" ,libpng)
  1641. ("imagemagick" ,imagemagick)
  1642. ("libxml2" ,libxml2)
  1643. ("freetype" ,freetype)))
  1644. (native-inputs
  1645. `(("pkg-config" ,pkg-config)))
  1646. (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
  1647. (description "@command{dvdauthor} will generate a DVD-Video movie from a
  1648. MPEG-2 stream containing VOB packets.")
  1649. (home-page "http://dvdauthor.sourceforge.net")
  1650. (license license:gpl3+)))
  1651. (define-public libdvdnav
  1652. (package
  1653. (name "libdvdnav")
  1654. (version "6.0.0")
  1655. (source (origin
  1656. (method url-fetch)
  1657. (uri (string-append "https://download.videolan.org/videolan/"
  1658. name "/" version "/"
  1659. name "-" version ".tar.bz2"))
  1660. (sha256
  1661. (base32
  1662. "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
  1663. (build-system gnu-build-system)
  1664. (native-inputs
  1665. `(("pkg-config" ,pkg-config)))
  1666. (inputs
  1667. `(("libdvdread" ,libdvdread)))
  1668. (home-page "http://dvdnav.mplayerhq.hu/")
  1669. (synopsis "Library for video DVD navigation features")
  1670. (description
  1671. "Libdvdnav is a library for developers of multimedia
  1672. applications. It allows easy use of sophisticated DVD navigation features
  1673. such as DVD menus, multiangle playback and even interactive DVD games. All
  1674. this functionality is provided through a simple API which provides the DVD
  1675. playback as a single logical stream of blocks, intermitted by special
  1676. dvdnav events to report certain conditions. The main usage of libdvdnav is
  1677. a loop regularly calling a function to get the next block, surrounded by
  1678. additional calls to tell the library of user interaction. The whole
  1679. DVD virtual machine and internal playback states are completely
  1680. encapsulated.")
  1681. (license license:gpl2+)))
  1682. (define-public libdvdcss
  1683. (package
  1684. (name "libdvdcss")
  1685. (version "1.4.2")
  1686. (source (origin
  1687. (method url-fetch)
  1688. (uri (string-append "https://download.videolan.org/pub/"
  1689. name "/" version "/"
  1690. name "-" version ".tar.bz2"))
  1691. (sha256
  1692. (base32
  1693. "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
  1694. (build-system gnu-build-system)
  1695. (home-page "https://www.videolan.org/developers/libdvdcss.html")
  1696. (synopsis "Library for accessing DVDs as block devices")
  1697. (description
  1698. "libdvdcss is a simple library designed for accessing DVDs like a block
  1699. device without having to bother about the decryption.")
  1700. (license license:gpl2+)))
  1701. (define-public srt2vtt
  1702. (package
  1703. (name "srt2vtt")
  1704. (version "0.1")
  1705. (source (origin
  1706. (method url-fetch)
  1707. (uri (string-append
  1708. "https://files.dthompson.us/srt2vtt/srt2vtt-"
  1709. version ".tar.gz"))
  1710. (sha256
  1711. (base32
  1712. "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
  1713. (build-system gnu-build-system)
  1714. (inputs
  1715. `(("guile" ,guile-2.0)))
  1716. (synopsis "SubRip to WebVTT subtitle converter")
  1717. (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
  1718. for use with HTML5 video.")
  1719. (home-page "https://dthompson.us/projects/srt2vtt.html")
  1720. (license license:gpl3+)))
  1721. (define-public avidemux
  1722. (package
  1723. (name "avidemux")
  1724. (version "2.6.12")
  1725. (source (origin
  1726. (method url-fetch)
  1727. (uri (string-append
  1728. "mirror://sourceforge/" name "/" name "/" version "/"
  1729. name "_" version ".tar.gz"))
  1730. (sha256
  1731. (base32
  1732. "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
  1733. (patches (search-patches "avidemux-install-to-lib.patch"))))
  1734. (build-system cmake-build-system)
  1735. (native-inputs
  1736. `(("pkg-config" ,pkg-config)))
  1737. ;; FIXME: Once packaged, add libraries not found during the build.
  1738. (inputs
  1739. `(("alsa-lib" ,alsa-lib)
  1740. ("fontconfig" ,fontconfig)
  1741. ("freetype" ,freetype)
  1742. ("fribidi" ,fribidi)
  1743. ("glu" ,glu)
  1744. ("jack" ,jack-1)
  1745. ("lame" ,lame)
  1746. ("libva" ,libva)
  1747. ("libvdpau" ,libvdpau)
  1748. ("libvorbis" ,libvorbis)
  1749. ("libvpx" ,libvpx)
  1750. ("libxv" ,libxv)
  1751. ("perl" ,perl)
  1752. ("pulseaudio" ,pulseaudio)
  1753. ("python" ,python-wrapper)
  1754. ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
  1755. ;("qtbase" ,qtbase) with -std=gnu++11.
  1756. ;("qttools" ,qttools)
  1757. ("sdl" ,sdl)
  1758. ("sqlite" ,sqlite)
  1759. ("yasm" ,yasm)
  1760. ("zlib" ,zlib)))
  1761. (arguments
  1762. `(#:tests? #f ; no check target
  1763. #:phases
  1764. ;; Make sure files inside the included ffmpeg tarball are
  1765. ;; patch-shebanged.
  1766. (modify-phases %standard-phases
  1767. (add-before 'patch-source-shebangs 'unpack-ffmpeg
  1768. (lambda _
  1769. (with-directory-excursion "avidemux_core/ffmpeg_package"
  1770. (invoke "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
  1771. (delete-file "ffmpeg-2.7.6.tar.bz2"))
  1772. #t))
  1773. (add-after 'patch-source-shebangs 'repack-ffmpeg
  1774. (lambda _
  1775. (with-directory-excursion "avidemux_core/ffmpeg_package"
  1776. (substitute* "ffmpeg-2.7.6/configure"
  1777. (("#! /bin/sh") (string-append "#!" (which "sh"))))
  1778. (invoke "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
  1779. ;; avoid non-determinism in the archive
  1780. "--sort=name" "--mtime=@0"
  1781. "--owner=root:0" "--group=root:0")
  1782. (delete-file-recursively "ffmpeg-2.7.6"))
  1783. #t))
  1784. (replace 'configure
  1785. (lambda _
  1786. ;; Copy-paste settings from the cmake build system.
  1787. (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
  1788. (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
  1789. #t))
  1790. (replace 'build
  1791. (lambda* (#:key inputs outputs #:allow-other-keys)
  1792. (let* ((out (assoc-ref outputs "out"))
  1793. (lib (string-append out "/lib"))
  1794. (top (getcwd))
  1795. (sdl (assoc-ref inputs "sdl"))
  1796. (build_component
  1797. (lambda* (component srcdir #:optional (args '()))
  1798. (let ((builddir (string-append "build_" component)))
  1799. (mkdir builddir)
  1800. (with-directory-excursion builddir
  1801. (apply invoke "cmake"
  1802. "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
  1803. (string-append "-DCMAKE_INSTALL_PREFIX=" out)
  1804. (string-append "-DCMAKE_INSTALL_RPATH=" lib)
  1805. (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
  1806. "\"-Wl,-rpath=" lib "\"")
  1807. (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
  1808. (string-append "-DSDL_INCLUDE_DIR="
  1809. sdl "/include/SDL")
  1810. (string-append "../" srcdir)
  1811. "-DENABLE_QT5=True"
  1812. args)
  1813. (invoke "make" "-j"
  1814. (number->string (parallel-job-count)))
  1815. (invoke "make" "install"))))))
  1816. (mkdir out)
  1817. (build_component "core" "avidemux_core")
  1818. (build_component "cli" "avidemux/cli")
  1819. (build_component "qt4" "avidemux/qt4")
  1820. (build_component "plugins_common" "avidemux_plugins"
  1821. '("-DPLUGIN_UI=COMMON"))
  1822. (build_component "plugins_cli" "avidemux_plugins"
  1823. '("-DPLUGIN_UI=CLI"))
  1824. (build_component "plugins_qt4" "avidemux_plugins"
  1825. '("-DPLUGIN_UI=QT4"))
  1826. (build_component "plugins_settings" "avidemux_plugins"
  1827. '("-DPLUGIN_UI=SETTINGS"))
  1828. ;; Remove .exe and .dll file.
  1829. (delete-file-recursively
  1830. (string-append out "/share/ADM6_addons"))
  1831. #t)))
  1832. (delete 'install))))
  1833. (home-page "http://fixounet.free.fr/avidemux/")
  1834. (synopsis "Video editor")
  1835. (description "Avidemux is a video editor designed for simple cutting,
  1836. filtering and encoding tasks. It supports many file types, including AVI,
  1837. DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
  1838. can be automated using projects, job queue and powerful scripting
  1839. capabilities.")
  1840. (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
  1841. ;; Software with various licenses is included, see License.txt.
  1842. (license license:gpl2+)))
  1843. (define-public vapoursynth
  1844. (package
  1845. (name "vapoursynth")
  1846. (version "37")
  1847. (source (origin
  1848. (method git-fetch)
  1849. (uri (git-reference
  1850. (url "https://github.com/vapoursynth/vapoursynth.git")
  1851. (commit (string-append "R" version))))
  1852. (file-name (git-file-name name version))
  1853. (sha256
  1854. (base32
  1855. "1ma2s7dxk6y6l04qj1jvgwia4xj7999ny3a1yx2vbk5l83giam2p"))))
  1856. (build-system gnu-build-system)
  1857. (native-inputs
  1858. `(("autoconf" ,autoconf)
  1859. ("automake" ,automake)
  1860. ("cython" ,python-cython)
  1861. ("libtool" ,libtool)
  1862. ("pkg-config" ,pkg-config)
  1863. ("python" ,python)
  1864. ("yasm" ,yasm)))
  1865. (inputs
  1866. `(("ffmpeg" ,ffmpeg)
  1867. ("libass" ,libass)
  1868. ("tesseract-ocr" ,tesseract-ocr)
  1869. ("zimg" ,zimg)))
  1870. (arguments
  1871. '(#:phases
  1872. (modify-phases %standard-phases
  1873. (add-after 'unpack 'autogen
  1874. (lambda _
  1875. (invoke "sh" "autogen.sh"))))))
  1876. (home-page "http://www.vapoursynth.com/")
  1877. (synopsis "Video processing framework")
  1878. (description "VapourSynth is a C++ library and Python module for video
  1879. manipulation. It aims to be a modern rewrite of Avisynth, supporting
  1880. multithreading, generalized colorspaces, per frame properties, and videos with
  1881. format changes.")
  1882. ;; src/core/cpufeatures only allows x86, ARM or PPC
  1883. (supported-systems (fold delete %supported-systems
  1884. '("mips64el-linux" "aarch64-linux")))
  1885. ;; As seen from the source files.
  1886. (license license:lgpl2.1+)))
  1887. (define-public xvid
  1888. (package
  1889. (name "xvid")
  1890. (version "1.3.4")
  1891. (source (origin
  1892. (method url-fetch)
  1893. (uri (string-append
  1894. "http://downloads.xvid.org/downloads/xvidcore-"
  1895. version ".tar.bz2"))
  1896. (sha256
  1897. (base32
  1898. "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
  1899. (build-system gnu-build-system)
  1900. (native-inputs `(("yasm" ,yasm)))
  1901. (arguments
  1902. '(#:phases
  1903. (modify-phases %standard-phases
  1904. (add-before
  1905. 'configure 'pre-configure
  1906. (lambda _
  1907. (chdir "build/generic")
  1908. (substitute* "configure"
  1909. (("#! /bin/sh") (string-append "#!" (which "sh"))))
  1910. #t)))
  1911. ;; No 'check' target.
  1912. #:tests? #f))
  1913. (home-page "https://www.xvid.com/")
  1914. (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
  1915. (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
  1916. codec library. It uses ASP features such as b-frames, global and quarter
  1917. pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
  1918. and custom quantization matrices.")
  1919. (license license:gpl2+)))
  1920. (define-public streamlink
  1921. (package
  1922. (name "streamlink")
  1923. (version "0.14.2")
  1924. (source
  1925. (origin
  1926. (method url-fetch)
  1927. (uri (pypi-uri "streamlink" version))
  1928. (sha256
  1929. (base32
  1930. "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8"))
  1931. (patches (search-patches "streamlink-update-test.patch"))))
  1932. (build-system python-build-system)
  1933. (home-page "https://github.com/streamlink/streamlink")
  1934. (native-inputs
  1935. `(("python-freezegun" ,python-freezegun)
  1936. ("python-pytest" ,python-pytest)
  1937. ("python-mock" ,python-mock)
  1938. ("python-requests-mock" ,python-requests-mock)))
  1939. (propagated-inputs
  1940. `(("python-pysocks" ,python-pysocks)
  1941. ("python-websocket-client" ,python-websocket-client)
  1942. ("python-iso3166" ,python-iso3166)
  1943. ("python-iso639" ,python-iso639)
  1944. ("python-isodate" ,python-isodate)
  1945. ("python-pycryptodome" ,python-pycryptodome)
  1946. ("python-requests" ,python-requests)
  1947. ("python-urllib3" ,python-urllib3)))
  1948. (synopsis "Extract streams from various services")
  1949. (description "Streamlink is command-line utility that extracts streams
  1950. from sites like Twitch.tv and pipes them into a video player of choice.")
  1951. (license license:bsd-2)))
  1952. (define-public livestreamer
  1953. (deprecated-package "livestreamer" streamlink))
  1954. (define-public twitchy
  1955. (let ((commit "0c0f925b9c7ff2aed4a3b0046561cb794143c398")) ;Fixes tests.
  1956. (package
  1957. (name "twitchy")
  1958. (version (git-version "3.2" "1" commit))
  1959. (source
  1960. (origin
  1961. (method git-fetch)
  1962. (uri (git-reference
  1963. (url "https://github.com/BasioMeusPuga/twitchy.git")
  1964. (commit commit)))
  1965. (file-name (git-file-name name version))
  1966. (sha256
  1967. (base32
  1968. "02aizvsr744sh8bdqvwwsmp2qpczlzn8fy76h5dyd3517n9nlcz9"))))
  1969. (build-system python-build-system)
  1970. (arguments
  1971. '(#:phases
  1972. (modify-phases %standard-phases
  1973. (add-before 'check 'check-setup
  1974. (lambda _
  1975. (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
  1976. #t))
  1977. (add-after 'install 'install-rofi-plugin
  1978. (lambda* (#:key outputs #:allow-other-keys)
  1979. (install-file "plugins/rofi-twitchy"
  1980. (string-append (assoc-ref outputs "out")
  1981. "/bin"))
  1982. #t)))))
  1983. (inputs
  1984. `(("python-requests" ,python-requests)
  1985. ("streamlink" ,streamlink)))
  1986. (home-page "https://github.com/BasioMeusPuga/twitchy")
  1987. (synopsis "Command-line interface for Twitch.tv")
  1988. (description
  1989. "This package provides a command-line interface for Twitch.tv")
  1990. (license license:gpl3+))))
  1991. (define-public mlt
  1992. (package
  1993. (name "mlt")
  1994. (version "6.12.0")
  1995. (source (origin
  1996. (method git-fetch)
  1997. (uri (git-reference
  1998. (url "https://github.com/mltframework/mlt.git")
  1999. (commit (string-append "v" version))))
  2000. (file-name (git-file-name name version))
  2001. (sha256
  2002. (base32
  2003. "0pzm3mjbbdl2rkbswgyfkx552xlxh2qrwzsi2a4dicfr92rfgq6w"))))
  2004. (build-system gnu-build-system)
  2005. (arguments
  2006. `(#:tests? #f ; no tests
  2007. #:make-flags '("CC=gcc" "CXX=g++ -std=gnu++11")
  2008. #:configure-flags
  2009. (list "--enable-gpl3"
  2010. "--enable-gpl")
  2011. #:phases
  2012. (modify-phases %standard-phases
  2013. (add-after
  2014. 'configure 'override-LDFLAGS
  2015. (lambda* (#:key outputs #:allow-other-keys)
  2016. (substitute* "config.mak"
  2017. (("LDFLAGS\\+=")
  2018. (string-append "LDFLAGS+=-Wl,-rpath="
  2019. (assoc-ref outputs "out")
  2020. "/lib ")))
  2021. #t)))))
  2022. (inputs
  2023. `(("alsa-lib" ,alsa-lib)
  2024. ("ffmpeg" ,ffmpeg-3.4)
  2025. ("fftw" ,fftw)
  2026. ("frei0r-plugins" ,frei0r-plugins)
  2027. ("gdk-pixbuf" ,gdk-pixbuf)
  2028. ("gtk+" ,gtk+-2)
  2029. ("libxml2" ,libxml2)
  2030. ("jack" ,jack-1)
  2031. ("ladspa" ,ladspa)
  2032. ("libsamplerate" ,libsamplerate)
  2033. ("pulseaudio" ,pulseaudio)
  2034. ("qtbase" ,qtbase)
  2035. ("qtsvg" ,qtsvg)
  2036. ("sdl" ,sdl)
  2037. ("sox" ,sox)))
  2038. (native-inputs
  2039. `(("pkg-config" ,pkg-config)))
  2040. (home-page "https://www.mltframework.org/")
  2041. (synopsis "Author, manage, and run multitrack audio/video compositions")
  2042. (description
  2043. "MLT is a multimedia framework, designed and developed for television
  2044. broadcasting. It provides a toolkit for broadcasters, video editors, media
  2045. players, transcoders, web streamers and many more types of applications. The
  2046. functionality of the system is provided via an assortment of ready to use
  2047. tools, XML authoring components, and an extensible plug-in based API.")
  2048. (license license:gpl3)))
  2049. (define-public v4l-utils
  2050. (package
  2051. (name "v4l-utils")
  2052. (version "1.12.5")
  2053. (source (origin
  2054. (method url-fetch)
  2055. (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
  2056. "/v4l-utils-" version ".tar.bz2"))
  2057. (sha256
  2058. (base32
  2059. "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
  2060. (build-system gnu-build-system)
  2061. (arguments
  2062. '(#:configure-flags
  2063. (list (string-append "--with-udevdir="
  2064. (assoc-ref %outputs "out")
  2065. "/lib/udev")
  2066. "CXXFLAGS=-std=gnu++11")))
  2067. (native-inputs
  2068. `(("perl" ,perl)
  2069. ("pkg-config" ,pkg-config)))
  2070. (inputs
  2071. `(("alsa-lib" ,alsa-lib)
  2072. ("glu" ,glu)
  2073. ("libjpeg" ,libjpeg)
  2074. ("libx11" ,libx11)
  2075. ("qtbase" ,qtbase)
  2076. ("eudev" ,eudev)))
  2077. (synopsis "Realtime video capture utilities for Linux")
  2078. (description "The v4l-utils provide a series of libraries and utilities to
  2079. be used for realtime video capture via Linux-specific APIs.")
  2080. (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
  2081. ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
  2082. (license (list license:lgpl2.1+ license:gpl2))))
  2083. (define-public obs
  2084. (package
  2085. (name "obs")
  2086. (version "22.0.3")
  2087. (source (origin
  2088. (method git-fetch)
  2089. (uri (git-reference
  2090. (url "https://github.com/obsproject/obs-studio.git")
  2091. (commit version)))
  2092. (file-name (git-file-name name version))
  2093. (sha256
  2094. (base32
  2095. "0ri9qkqk3h71b1a5bwpjzqdr21bbmfqbykg48l779d20zln23n1i"))))
  2096. (build-system cmake-build-system)
  2097. (arguments
  2098. `(#:tests? #f)) ; no tests
  2099. (native-inputs
  2100. `(("pkg-config" ,pkg-config)))
  2101. (inputs
  2102. `(("alsa-lib" ,alsa-lib)
  2103. ("curl" ,curl)
  2104. ("eudev" ,eudev)
  2105. ("ffmpeg" ,ffmpeg)
  2106. ("fontconfig" ,fontconfig)
  2107. ("freetype" ,freetype)
  2108. ("jack" ,jack-1)
  2109. ("jansson" ,jansson)
  2110. ("libx264" ,libx264)
  2111. ("libxcomposite" ,libxcomposite)
  2112. ("mesa" ,mesa)
  2113. ("pulseaudio" ,pulseaudio)
  2114. ("qtbase" ,qtbase)
  2115. ("qtx11extras" ,qtx11extras)
  2116. ("speex" ,speex)
  2117. ("v4l-utils" ,v4l-utils)
  2118. ("zlib" ,zlib)))
  2119. (synopsis "Live streaming software")
  2120. (description "Open Broadcaster Software provides a graphical interface for
  2121. video recording and live streaming. OBS supports capturing audio and video
  2122. from many input sources such as webcams, X11 (for screencasting), PulseAudio,
  2123. and JACK.")
  2124. (home-page "https://obsproject.com")
  2125. (supported-systems '("x86_64-linux" "i686-linux"))
  2126. (license license:gpl2+)))
  2127. (define-public libvdpau
  2128. (package
  2129. (name "libvdpau")
  2130. (version "1.1.1")
  2131. (source
  2132. (origin
  2133. (method url-fetch)
  2134. (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
  2135. name "-" version ".tar.bz2"))
  2136. (sha256
  2137. (base32
  2138. "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
  2139. (build-system gnu-build-system)
  2140. (native-inputs
  2141. `(("pkg-config" ,pkg-config)))
  2142. (inputs
  2143. `(("libx11" ,libx11 "out")
  2144. ("libxext" ,libxext)
  2145. ("xorgproto" ,xorgproto)))
  2146. (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
  2147. (synopsis "Video Decode and Presentation API")
  2148. (description "VDPAU is the Video Decode and Presentation API for UNIX. It
  2149. provides an interface to video decode acceleration and presentation hardware
  2150. present in modern GPUs.")
  2151. (license (license:x11-style "file://COPYING"))))
  2152. (define-public vdpauinfo
  2153. (package
  2154. (name "vdpauinfo")
  2155. (version "1.0")
  2156. (source
  2157. (origin
  2158. (method url-fetch)
  2159. (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
  2160. name "-" version ".tar.gz"))
  2161. (sha256
  2162. (base32
  2163. "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
  2164. (build-system gnu-build-system)
  2165. (native-inputs
  2166. `(("pkg-config" ,pkg-config)
  2167. ("libx11" ,libx11)))
  2168. (propagated-inputs
  2169. `(("libvdpau" ,libvdpau)))
  2170. (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
  2171. (synopsis "Tool to query the capabilities of a VDPAU implementation")
  2172. (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
  2173. implementation.")
  2174. (license (license:x11-style "file://COPYING"))))
  2175. (define-public libvdpau-va-gl
  2176. (package
  2177. (name "libvdpau-va-gl")
  2178. (version "0.4.2")
  2179. (source
  2180. (origin
  2181. (method url-fetch)
  2182. (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
  2183. "releases/download/v" version "/libvdpau-va-gl-"
  2184. version ".tar.gz"))
  2185. (sha256
  2186. (base32
  2187. "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
  2188. (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
  2189. (modules '((guix build utils)))
  2190. (snippet '(begin (delete-file-recursively "3rdparty")
  2191. #t))))
  2192. (build-system cmake-build-system)
  2193. (arguments
  2194. '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
  2195. (native-inputs
  2196. `(("libvdpau" ,libvdpau)
  2197. ("pkg-config" ,pkg-config)))
  2198. (inputs
  2199. `(("libva" ,libva)
  2200. ("mesa" ,mesa)))
  2201. (home-page "https://github.com/i-rinat/libvdpau-va-gl")
  2202. (synopsis "VDPAU driver with VA-API/OpenGL backend")
  2203. (description
  2204. "Many applications can use VDPAU to accelerate portions of the video
  2205. decoding process and video post-processing to the GPU video hardware. Since
  2206. there is no VDPAU available on Intel chips, they fall back to different drawing
  2207. techniques. This driver uses OpenGL under the hood to accelerate drawing and
  2208. scaling and VA-API (if available) to accelerate video decoding.")
  2209. (license license:expat)))
  2210. (define-public recordmydesktop
  2211. (package
  2212. (name "recordmydesktop")
  2213. (version "0.3.8.1")
  2214. (source (origin
  2215. (method url-fetch)
  2216. (uri (string-append "mirror://sourceforge/" name "/" name "/"
  2217. version "/recordmydesktop-" version ".tar.gz"))
  2218. (sha256
  2219. (base32
  2220. "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
  2221. (build-system gnu-build-system)
  2222. (inputs `(("popt" ,popt)
  2223. ("zlib" ,zlib)
  2224. ("libx11" ,libx11)
  2225. ("libice" ,libice)
  2226. ("libsm" ,libsm)
  2227. ("libxfixes" ,libxfixes)
  2228. ("libxdamage" ,libxdamage)
  2229. ("libxext" ,libxext)
  2230. ("alsa-lib" ,alsa-lib)
  2231. ("libvorbis" ,libvorbis)
  2232. ("libtheora" ,libtheora)))
  2233. (home-page "http://recordmydesktop.sourceforge.net/")
  2234. (synopsis "Desktop session video recorder")
  2235. (description
  2236. "recordMyDesktop is a command-line tool that captures the activity in
  2237. your graphical desktop and encodes it as a video. This is a useful tool for
  2238. making @dfn{screencasts}.")
  2239. (license license:gpl2+)))
  2240. (define-public simplescreenrecorder
  2241. (package
  2242. (name "simplescreenrecorder")
  2243. (version "0.3.11")
  2244. (source
  2245. (origin
  2246. (method git-fetch)
  2247. (uri (git-reference
  2248. (url "https://github.com/MaartenBaert/ssr.git")
  2249. (commit version)))
  2250. (file-name (git-file-name name version))
  2251. (sha256
  2252. (base32
  2253. "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
  2254. (build-system cmake-build-system)
  2255. ;; Although libx11, libxfixes, libxext are listed as build dependencies in
  2256. ;; README.md, the program builds and functions properly without them.
  2257. ;; As a result, they are omitted. Please add them back if problems appear.
  2258. (inputs
  2259. `(("alsa-lib" ,alsa-lib)
  2260. ("ffmpeg" ,ffmpeg)
  2261. ("glu" ,glu)
  2262. ("jack" ,jack-1)
  2263. ("libxi" ,libxi)
  2264. ("pulseaudio" ,pulseaudio)
  2265. ("qtbase" ,qtbase)
  2266. ("qtx11extras" ,qtx11extras)))
  2267. (native-inputs `(("pkg-config" ,pkg-config)))
  2268. (arguments
  2269. `(#:configure-flags
  2270. (list "-DWITH_QT5=TRUE")
  2271. #:tests? #f)) ; no test suite
  2272. ;; Using HTTPS causes part of the page to be displayed improperly.
  2273. (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
  2274. (synopsis "Screen recorder")
  2275. (description "SimpleScreenRecorder is an easy to use screen recorder with
  2276. a graphical user interface. It supports recording the entire screen, or a
  2277. part of it, and allows encoding in many different codecs and file formats.
  2278. Other features include a live preview and live streaming.")
  2279. (license (list license:gpl3+ ; most files
  2280. license:zlib ; glinject/elfhacks.*
  2281. license:isc ; glinject/*
  2282. license:x11)))) ; build-aux/install-sh
  2283. (define-public libsmpeg
  2284. (package
  2285. (name "libsmpeg")
  2286. (version "0.4.5")
  2287. (source (origin
  2288. (method svn-fetch)
  2289. (uri (svn-reference
  2290. (url "svn://svn.icculus.org/smpeg/trunk/")
  2291. (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
  2292. (file-name (string-append name "-" version "-checkout"))
  2293. (sha256
  2294. (base32
  2295. "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
  2296. (build-system gnu-build-system)
  2297. (arguments
  2298. `(#:phases
  2299. (modify-phases %standard-phases
  2300. (add-after 'unpack 'autogen.sh
  2301. (lambda _
  2302. (invoke "sh" "autogen.sh"))))))
  2303. (native-inputs
  2304. `(("autoconf" ,autoconf)
  2305. ("automake" ,automake)))
  2306. (inputs
  2307. `(("sdl" ,sdl2)))
  2308. (home-page "http://icculus.org/smpeg/")
  2309. (synopsis "SDL MPEG decoding library")
  2310. (description
  2311. "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
  2312. with sound support. Video playback is based on the ubiquitous Berkeley MPEG
  2313. player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
  2314. library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
  2315. and MPEG system streams.")
  2316. (license (list license:expat
  2317. license:lgpl2.1
  2318. license:lgpl2.1+
  2319. license:gpl2))))
  2320. (define-public libbdplus
  2321. (package
  2322. (name "libbdplus")
  2323. (version "0.1.2")
  2324. (source
  2325. (origin
  2326. (method url-fetch)
  2327. (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
  2328. version "/" name "-" version ".tar.bz2"))
  2329. (sha256
  2330. (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
  2331. (inputs
  2332. `(("libgcrypt" ,libgcrypt)))
  2333. (build-system gnu-build-system)
  2334. (home-page "https://www.videolan.org/developers/libbdplus.html")
  2335. (synopsis "Library for decrypting certain Blu-Ray discs")
  2336. (description "libbdplus is a library which implements the BD+ System
  2337. specifications.")
  2338. (license license:lgpl2.1+)))
  2339. (define-public libaacs
  2340. (package
  2341. (name "libaacs")
  2342. (version "0.9.0")
  2343. (source
  2344. (origin
  2345. (method url-fetch)
  2346. (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
  2347. version "/" name "-" version ".tar.bz2"))
  2348. (sha256
  2349. (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
  2350. (inputs
  2351. `(("libgcrypt" ,libgcrypt)))
  2352. (native-inputs
  2353. `(("bison" ,bison)
  2354. ("flex" ,flex)))
  2355. (build-system gnu-build-system)
  2356. (home-page "https://www.videolan.org/developers/libaacs.html")
  2357. (synopsis "Library for decrypting certain Blu-Ray discs")
  2358. (description "libaacs is a library which implements the Advanced Access
  2359. Content System specification.")
  2360. (license license:lgpl2.1+)))
  2361. (define-public mps-youtube
  2362. (package
  2363. (name "mps-youtube")
  2364. (version "0.2.8")
  2365. (source
  2366. (origin
  2367. (method git-fetch)
  2368. (uri (git-reference
  2369. (url "https://github.com/mps-youtube/mps-youtube.git")
  2370. (commit (string-append "v" version))))
  2371. (file-name (git-file-name name version))
  2372. (sha256
  2373. (base32
  2374. "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
  2375. (build-system python-build-system)
  2376. (arguments
  2377. ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
  2378. ;; test suite results differ depending on the country and also introduce
  2379. ;; non-determinism in the tests.
  2380. ;; https://github.com/mps-youtube/mps-youtube/issues/556
  2381. `(#:tests? #f))
  2382. (propagated-inputs
  2383. `(("python-pafy" ,python-pafy)
  2384. ("python-pygobject" ,python-pygobject))) ; For mpris2 support
  2385. (home-page "https://github.com/mps-youtube/mps-youtube")
  2386. (synopsis "Terminal based YouTube player and downloader")
  2387. (description
  2388. "@code{mps-youtube} is based on mps, a terminal based program to
  2389. search, stream and download music. This implementation uses YouTube as
  2390. a source of content and can play and download video as well as audio.
  2391. It can use either mpv or mplayer for playback, and for conversion of
  2392. formats ffmpeg or libav is used. Users should install one of the
  2393. supported players in addition to this package.")
  2394. (license license:gpl3+)))
  2395. (define-public handbrake
  2396. (package
  2397. (name "handbrake")
  2398. (version "1.1.2")
  2399. (source (origin
  2400. (method url-fetch)
  2401. (uri (string-append "https://download.handbrake.fr/releases/"
  2402. version "/HandBrake-" version "-source.tar.bz2"))
  2403. (sha256
  2404. (base32
  2405. "0bny0hwlr55g2c69rsamv0xvwmfh1s4a582b9vq20xv5ly84m6ms"))
  2406. (modules '((guix build utils)))
  2407. (snippet
  2408. ;; Remove "contrib" and source not necessary for
  2409. ;; building/running under a GNU environment.
  2410. '(begin
  2411. (for-each delete-file-recursively
  2412. '("contrib" "macosx" "win"))
  2413. (substitute* "make/include/main.defs"
  2414. ;; Disable unconditional inclusion of "contrib" libraries
  2415. ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
  2416. ;; which would lead to fetching and building of these
  2417. ;; libraries. Use our own instead.
  2418. (("MODULES \\+= contrib") "# MODULES += contrib"))
  2419. #t))))
  2420. (build-system glib-or-gtk-build-system)
  2421. (native-inputs
  2422. `(("automake" ,automake) ;gui subpackage must be bootstrapped
  2423. ("autoconf" ,autoconf)
  2424. ("curl" ,curl) ;not actually used, but tested for
  2425. ("intltool" ,intltool)
  2426. ("libtool" ,libtool)
  2427. ("pkg-config" ,pkg-config)
  2428. ("python" ,python-2))) ;for configuration
  2429. (inputs
  2430. `(("bzip2" ,bzip2)
  2431. ("dbus-glib" ,dbus-glib)
  2432. ("ffmpeg" ,ffmpeg)
  2433. ("fontconfig" ,fontconfig)
  2434. ("freetype" ,freetype)
  2435. ("glib" ,glib)
  2436. ("gstreamer" ,gstreamer)
  2437. ("gst-plugins-base" ,gst-plugins-base)
  2438. ("gtk+" ,gtk+)
  2439. ("jansson" ,jansson)
  2440. ("lame" ,lame)
  2441. ("libass" ,libass)
  2442. ("libbluray" ,libbluray)
  2443. ("libdvdnav" ,libdvdnav)
  2444. ("libdvdread" ,libdvdread)
  2445. ("libgudev" ,libgudev)
  2446. ("libmpeg2" ,libmpeg2)
  2447. ("libnotify" ,libnotify)
  2448. ("libogg" ,libogg)
  2449. ("libopus" ,opus)
  2450. ("libsamplerate" ,libsamplerate)
  2451. ("libtheora" ,libtheora)
  2452. ("libvorbis" ,libvorbis)
  2453. ("libvpx" ,libvpx)
  2454. ("libxml2" ,libxml2)
  2455. ("libx264" ,libx264)
  2456. ("x265" ,x265)
  2457. ("zlib" ,zlib)))
  2458. (arguments
  2459. `(#:tests? #f ;tests require Ruby and claim to be unsupported
  2460. #:configure-flags
  2461. (list (string-append "CPPFLAGS=-I"
  2462. (assoc-ref %build-inputs "libxml2")
  2463. "/include/libxml2")
  2464. "LDFLAGS=-lx265")
  2465. #:phases
  2466. (modify-phases %standard-phases
  2467. (replace 'bootstrap
  2468. ;; Run bootstrap ahead of time so that shebangs get patched.
  2469. (lambda _
  2470. (setenv "CONFIG_SHELL" (which "sh"))
  2471. (setenv "NOCONFIGURE" "1")
  2472. ;; Patch the Makefile so that it doesn't bootstrap again.
  2473. (substitute* "gtk/module.rules"
  2474. ((".*autogen\\.sh.*") ""))
  2475. (invoke "sh" "./gtk/autogen.sh")))
  2476. (replace 'configure
  2477. (lambda* (#:key outputs configure-flags #:allow-other-keys)
  2478. ;; 'configure' is not an autoconf-generated script, and
  2479. ;; errors on unrecognized arguments,
  2480. ;; e.g. --enable-fast-install
  2481. (let ((out (assoc-ref outputs "out")))
  2482. (apply invoke "./configure"
  2483. (string-append "--prefix=" out)
  2484. (or configure-flags '())))))
  2485. (add-after 'configure 'chdir-build
  2486. (lambda _ (chdir "./build") #t)))))
  2487. (home-page "https://handbrake.fr")
  2488. (synopsis "Video transcoder")
  2489. (description
  2490. "HandBrake is a tool for converting video from any format to a selection
  2491. of modern, widely supported codecs.")
  2492. ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
  2493. ;; Combination under GPLv2. See LICENSE.
  2494. (license license:gpl2)))
  2495. (define-public openh264
  2496. (package
  2497. (name "openh264")
  2498. (version "1.8.0")
  2499. (source (origin
  2500. (method url-fetch)
  2501. (uri (string-append "https://github.com/cisco/"
  2502. name "/releases/download/v"
  2503. version "/Source.Code.tar.gz.gz"))
  2504. (file-name (string-append name "-" version ".tar.gz"))
  2505. (sha256
  2506. (base32
  2507. "0niha3wnn1jsndvz9vfwy2wyql8mp9j6v75vjsipy0idwan5yzgf"))))
  2508. (build-system gnu-build-system)
  2509. (native-inputs
  2510. `(("nasm" ,nasm)
  2511. ("python" ,python)))
  2512. (arguments
  2513. '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
  2514. "CC=gcc")
  2515. #:test-target "test"
  2516. #:phases (modify-phases %standard-phases
  2517. ;; no configure script
  2518. (delete 'configure))))
  2519. (home-page "http://www.openh264.org/")
  2520. (synopsis "H264 decoder library")
  2521. (description
  2522. "Openh264 is a library which can decode H264 video streams.")
  2523. (license license:bsd-2)))
  2524. (define-public libmp4v2
  2525. (package
  2526. (name "libmp4v2")
  2527. (version "2.0.0")
  2528. (source
  2529. (origin
  2530. (method url-fetch)
  2531. ;; XXX: The new location of upstream is uncertain and will become relevant the
  2532. ;; moment when the googlecode archive shuts down. It is past the date it
  2533. ;; should've been turned off. I tried to communicate with upstream, but this
  2534. ;; wasn't very responsive and not very helpful. The short summary is, it is
  2535. ;; chaos when it comes to the amount of forks and only time will tell where
  2536. ;; the new upstream location is.
  2537. (uri (string-append "https://storage.googleapis.com/google-"
  2538. "code-archive-downloads/v2/"
  2539. "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
  2540. (file-name (string-append name "-" version ".tar.bz2"))
  2541. (sha256
  2542. (base32
  2543. "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
  2544. (build-system gnu-build-system)
  2545. (outputs '("out"
  2546. "static")) ; 3.7MiB .a file
  2547. (arguments
  2548. `(#:phases
  2549. (modify-phases %standard-phases
  2550. (add-after 'unpack 'remove-dates
  2551. (lambda _
  2552. ;; Make the build reproducible.
  2553. (substitute* "configure"
  2554. (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
  2555. (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
  2556. #t))
  2557. (add-after 'install 'move-static-libraries
  2558. (lambda* (#:key outputs #:allow-other-keys)
  2559. ;; Move static libraries to the "static" output.
  2560. (let* ((out (assoc-ref outputs "out"))
  2561. (lib (string-append out "/lib"))
  2562. (static (assoc-ref outputs "static"))
  2563. (slib (string-append static "/lib")))
  2564. (mkdir-p slib)
  2565. (for-each (lambda (file)
  2566. (install-file file slib)
  2567. (delete-file file))
  2568. (find-files lib "\\.a$"))
  2569. #t))))))
  2570. (native-inputs
  2571. `(("help2man" ,help2man)
  2572. ("dejagnu" ,dejagnu)))
  2573. (home-page "https://code.google.com/archive/p/mp4v2/")
  2574. (synopsis "API to create and modify mp4 files")
  2575. (description
  2576. "The MP4v2 library provides an API to create and modify mp4 files as defined by
  2577. ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
  2578. file format that has been used as a multimedia file format in a variety of platforms and
  2579. applications. It is a very powerful and extensible format that can accommodate
  2580. practically any type of media.")
  2581. (license license:mpl1.1)))
  2582. (define-public libmediainfo
  2583. (package
  2584. (name "libmediainfo")
  2585. (version "0.7.95")
  2586. (source (origin
  2587. (method url-fetch)
  2588. (uri (string-append "https://mediaarea.net/download/source/"
  2589. name "/" version"/"
  2590. name "_" version ".tar.bz2"))
  2591. (sha256
  2592. (base32
  2593. "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
  2594. ;; TODO add a Big Buck Bunny webm for tests.
  2595. (native-inputs
  2596. `(("autoconf" ,autoconf)
  2597. ("automake" ,automake)
  2598. ("libtool" ,libtool)
  2599. ("pkg-config" ,pkg-config)
  2600. ("zlib" ,zlib)
  2601. ("tinyxml2" ,tinyxml2)
  2602. ("curl" ,curl)
  2603. ("libzen" ,libzen)))
  2604. (build-system gnu-build-system)
  2605. (arguments
  2606. '(#:tests? #f ; see above TODO
  2607. #:phases
  2608. ;; build scripts not in root of archive
  2609. (modify-phases %standard-phases
  2610. (add-after 'unpack 'change-to-build-dir
  2611. (lambda _
  2612. (chdir "Project/GNU/Library")
  2613. #t))
  2614. (add-after 'change-to-build-dir 'autogen
  2615. (lambda _
  2616. (invoke "sh" "autogen.sh"))))))
  2617. (home-page "https://mediaarea.net/en/MediaInfo")
  2618. (synopsis "Library for retrieving media metadata")
  2619. (description "MediaInfo is a library used for retrieving technical
  2620. information and other metadata about audio or video files. A non-exhaustive
  2621. list of the information MediaInfo can retrieve from media files include:
  2622. @itemize
  2623. @item General: title, author, director, album, track number, date, duration...
  2624. @item Video: codec, aspect, fps, bitrate...
  2625. @item Audio: codec, sample rate, channels, language, bitrate...
  2626. @item Text: language of subtitle
  2627. @item Chapters: number of chapters, list of chapters
  2628. @end itemize
  2629. MediaInfo supports the following formats:
  2630. @itemize
  2631. @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
  2632. MPEG-2, MPEG-4, DVD (VOB)...
  2633. @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
  2634. @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
  2635. @item Subtitles: SRT, SSA, ASS, SAMI...
  2636. @end itemize\n")
  2637. (license license:bsd-2)))
  2638. ;; TODO also have a GUI version available
  2639. (define-public mediainfo
  2640. (package
  2641. (name "mediainfo")
  2642. (version "18.12")
  2643. (source (origin
  2644. (method url-fetch)
  2645. ;; Warning: This source has proved unreliable 1 time at least.
  2646. ;; Consider an alternate source or report upstream if this
  2647. ;; happens again.
  2648. (uri (string-append "https://mediaarea.net/download/source/"
  2649. name "/" version "/"
  2650. name "_" version ".tar.bz2"))
  2651. (sha256
  2652. (base32
  2653. "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
  2654. (native-inputs
  2655. `(("autoconf" ,autoconf)
  2656. ("automake" ,automake)
  2657. ("libtool" ,libtool)
  2658. ("pkg-config" ,pkg-config)
  2659. ("zlib" ,zlib)
  2660. ("libmediainfo" ,libmediainfo)
  2661. ("libzen" ,libzen)))
  2662. (build-system gnu-build-system)
  2663. (arguments
  2664. '(#:tests? #f ; lacks tests
  2665. #:phases
  2666. ;; build scripts not in root of archive
  2667. (modify-phases %standard-phases
  2668. (add-after 'unpack 'change-to-build-dir
  2669. (lambda _
  2670. (chdir "Project/GNU/CLI")
  2671. #t)))))
  2672. (home-page "https://mediaarea.net/en/MediaInfo")
  2673. (synopsis "Utility for reading media metadata")
  2674. (description "MediaInfo is a utility used for retrieving technical
  2675. information and other metadata about audio or video files. It supports the
  2676. many codecs and formats supported by libmediainfo.")
  2677. (license license:bsd-2)))
  2678. (define-public livemedia-utils
  2679. (package
  2680. (name "livemedia-utils")
  2681. (version "2018.10.17")
  2682. (source (origin
  2683. (method url-fetch)
  2684. (uri (string-append
  2685. "https://download.videolan.org/contrib/live555/live."
  2686. version ".tar.gz"))
  2687. (sha256
  2688. (base32
  2689. "1s69ipvdc6ldscp0cr1zpsll8xc3qcagr95nl84x7b1rbg4xjs3w"))
  2690. (modules '((guix build utils)))
  2691. (snippet '(begin
  2692. ;; As of glibc 2.26, <xlocale.h> no longer is.
  2693. (substitute* "liveMedia/include/Locale.hh"
  2694. (("xlocale\\.h") "locale.h"))
  2695. #t))))
  2696. (build-system gnu-build-system)
  2697. (arguments
  2698. '(#:tests? #f ; no tests
  2699. #:make-flags (list "CC=gcc"
  2700. (string-append "LDFLAGS=-Wl,-rpath="
  2701. (assoc-ref %outputs "out") "/lib")
  2702. (string-append "PREFIX="
  2703. (assoc-ref %outputs "out")))
  2704. #:phases (modify-phases %standard-phases
  2705. (add-before 'configure 'fix-makefiles-generation
  2706. (lambda _
  2707. (substitute* "genMakefiles"
  2708. (("/bin/rm") "rm"))
  2709. #t))
  2710. (replace 'configure
  2711. (lambda _
  2712. (invoke "./genMakefiles"
  2713. "linux-with-shared-libraries"))))))
  2714. (home-page "http://www.live555.com/liveMedia/")
  2715. (synopsis "Set of C++ libraries for multimedia streaming")
  2716. (description "This code forms a set of C++ libraries for multimedia
  2717. streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
  2718. can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
  2719. JPEG video, and several audio codecs. They can easily be extended to support
  2720. additional (audio and/or video) codecs, and can also be used to build basic
  2721. RTSP or SIP clients and servers.")
  2722. (license license:lgpl3+)))
  2723. (define-public libdvbpsi
  2724. (package
  2725. (name "libdvbpsi")
  2726. (version "1.3.2")
  2727. (source (origin
  2728. (method url-fetch)
  2729. (uri (string-append
  2730. "https://download.videolan.org/pub/libdvbpsi/"
  2731. version "/libdvbpsi-" version ".tar.bz2"))
  2732. (sha256
  2733. (base32
  2734. "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
  2735. (build-system gnu-build-system)
  2736. (home-page "https://www.videolan.org/developers/libdvbpsi.html")
  2737. (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
  2738. tables")
  2739. (description "libdvbpsi is a simple library designed for decoding and
  2740. generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
  2741. and ITU-T H.222.0.")
  2742. (license license:lgpl2.1)))
  2743. (define-public ffms2
  2744. (package
  2745. (name "ffms2")
  2746. (version "2.23")
  2747. (home-page "https://github.com/FFMS/ffms2")
  2748. (source (origin
  2749. (method git-fetch)
  2750. (uri (git-reference
  2751. (url "https://github.com/FFMS/ffms2.git")
  2752. (commit version)))
  2753. (file-name (git-file-name name version))
  2754. (sha256
  2755. (base32
  2756. "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
  2757. (build-system gnu-build-system)
  2758. (arguments
  2759. '(#:configure-flags
  2760. (list "--enable-avresample")))
  2761. (inputs
  2762. `(("zlib" ,zlib)))
  2763. (propagated-inputs
  2764. `(("ffmpeg" ,ffmpeg)))
  2765. (native-inputs
  2766. `(("pkg-config" ,pkg-config)))
  2767. (synopsis "Cross-platform wrapper around ffmpeg/libav")
  2768. (description
  2769. "FFMpegSource is a wrapper library around ffmpeg/libav that allows
  2770. programmers to access a standard API to open and decompress media files.")
  2771. ;; sources are distributed under a different license that the binary.
  2772. ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
  2773. (license license:gpl2+))); inherits from ffmpeg
  2774. (define-public aegisub
  2775. (package
  2776. (name "aegisub")
  2777. (version "3.2.2")
  2778. (source (origin
  2779. (method url-fetch)
  2780. (uri (string-append
  2781. "http://ftp.aegisub.org/pub/archives/releases/source/"
  2782. name "-" version ".tar.xz"))
  2783. (sha256
  2784. (base32
  2785. "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
  2786. (patches (search-patches "aegisub-icu59-include-unistr.patch"
  2787. "aegisub-boost68.patch"))))
  2788. (build-system gnu-build-system)
  2789. (arguments
  2790. `(#:configure-flags
  2791. (list "--disable-update-checker"
  2792. "--without-portaudio"
  2793. "--without-openal"
  2794. "--without-oss"
  2795. "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
  2796. ;; tests require busted, a lua package we don't have yet
  2797. #:tests? #f
  2798. #:phases
  2799. (modify-phases %standard-phases
  2800. (add-before 'configure 'fix-ldflags
  2801. (lambda _
  2802. (setenv "LDFLAGS" "-pthread")
  2803. #t))
  2804. (add-after 'unpack 'fix-boost-headers
  2805. (lambda _
  2806. (substitute*
  2807. '("src/subtitles_provider_libass.cpp"
  2808. "src/colour_button.cpp"
  2809. "src/video_provider_dummy.cpp"
  2810. "./src/video_frame.cpp")
  2811. (("#include <boost/gil/gil_all.hpp>")
  2812. "#include <boost/gil.hpp>"))
  2813. #t)))))
  2814. (inputs
  2815. `(("boost" ,boost)
  2816. ("desktop-file-utils" ,desktop-file-utils)
  2817. ("ffms2" ,ffms2)
  2818. ("fftw" ,fftw)
  2819. ("hunspell" ,hunspell)
  2820. ("mesa" ,mesa)
  2821. ("libass" ,libass)
  2822. ("alsa-lib" ,alsa-lib)
  2823. ("pulseaudio" ,pulseaudio)
  2824. ("libx11" ,libx11)
  2825. ("freetype" ,freetype)
  2826. ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
  2827. (native-inputs
  2828. `(("intltool" ,intltool)
  2829. ("pkg-config" ,pkg-config)))
  2830. (home-page "http://www.aegisub.org/")
  2831. (synopsis "Subtitle engine")
  2832. (description
  2833. "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
  2834. it quick and easy to time subtitles to audio, and features many powerful
  2835. tools for styling them, including a built-in real-time video preview.")
  2836. (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
  2837. license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
  2838. license:expat)))) ; and src/gl that is under a license similar
  2839. ; the the Expat license, with a rewording (Software -> Materials). (called MIT
  2840. ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
  2841. ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
  2842. (define-public gst-transcoder
  2843. (package
  2844. (name "gst-transcoder")
  2845. (version "1.12.2")
  2846. (source
  2847. (origin
  2848. (method git-fetch)
  2849. (uri (git-reference
  2850. (url "https://github.com/pitivi/gst-transcoder.git")
  2851. (commit version)))
  2852. (file-name (git-file-name name version))
  2853. (sha256
  2854. (base32
  2855. "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
  2856. (build-system meson-build-system)
  2857. (inputs
  2858. `(("gobject-introspection" ,gobject-introspection)
  2859. ("glib" ,glib)
  2860. ("gstreamer" ,gstreamer)
  2861. ("gst-plugins-base" ,gst-plugins-base)))
  2862. (native-inputs
  2863. `(("python" ,python)
  2864. ("pkg-config" ,pkg-config)))
  2865. (home-page "https://github.com/pitivi/gst-transcoder/")
  2866. (synopsis "GStreamer Transcoding API")
  2867. (description "GStreamer Transcoding API")
  2868. (license license:lgpl2.1)))
  2869. (define-public gavl
  2870. (package
  2871. (name "gavl")
  2872. (version "1.4.0")
  2873. (source
  2874. (origin
  2875. (method url-fetch)
  2876. (uri (string-append "mirror://sourceforge/gmerlin/"
  2877. name "/" version "/"
  2878. name "-" version ".tar.gz"))
  2879. (file-name (string-append name "-" version ".tar.gz"))
  2880. (sha256
  2881. (base32
  2882. "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
  2883. (build-system gnu-build-system)
  2884. (arguments
  2885. '(#:configure-flags '("LIBS=-lm")))
  2886. (native-inputs
  2887. `(("pkg-config" ,pkg-config)
  2888. ("doxygen" ,doxygen)))
  2889. (home-page "http://gmerlin.sourceforge.net")
  2890. (synopsis "Low level library for multimedia API building")
  2891. (description
  2892. "Gavl is short for Gmerlin Audio Video Library. It is a low level
  2893. library, upon which multimedia APIs can be built. Gavl handles all the
  2894. details of audio and video formats like colorspaces, sample rates,
  2895. multichannel configurations, etc. It provides standardized definitions for
  2896. those formats as well as container structures for carrying audio samples or
  2897. video images inside an application.
  2898. In addition, it handles the sometimes ugly task of converting between all
  2899. these formats and provides some elementary operations (copying, scaling,
  2900. alpha blending etc).")
  2901. (license license:gpl3)))
  2902. (define-public frei0r-plugins
  2903. (package
  2904. (name "frei0r-plugins")
  2905. (version "1.6.1")
  2906. (source
  2907. (origin
  2908. (method url-fetch)
  2909. (uri (string-append "https://files.dyne.org/frei0r/"
  2910. "frei0r-plugins-" version ".tar.gz"))
  2911. (sha256
  2912. (base32
  2913. "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
  2914. (build-system gnu-build-system)
  2915. (arguments
  2916. `(#:phases
  2917. (modify-phases %standard-phases
  2918. (add-after 'unpack 'autotools
  2919. (lambda _
  2920. (invoke "sh" "autogen.sh"))))))
  2921. ;; TODO: opencv for additional face detection filters.
  2922. (inputs
  2923. `(("gavl" ,gavl)
  2924. ("cairo" ,cairo)))
  2925. (native-inputs
  2926. `(("pkg-config" ,pkg-config)
  2927. ("libtool" ,libtool)
  2928. ("automake" ,automake)
  2929. ("autoconf" ,autoconf)))
  2930. (home-page "https://www.dyne.org/software/frei0r/")
  2931. (synopsis "Minimalistic plugin API for video effects")
  2932. (description
  2933. "Frei0r is a minimalistic plugin API for video effects.
  2934. The main emphasis is on simplicity for an API that will round up
  2935. the most common video effects into simple filters, sources and
  2936. mixers that can be controlled by parameters. Frei0r wants to
  2937. provide a way to share these simple effects between many
  2938. applications, avoiding their reimplementation by different projects.
  2939. It counts more than 100 plugins.")
  2940. (license (list license:gpl2+
  2941. ;; The following files are licensed as LGPL2.1+:
  2942. ;; src/generator/ising0r/ising0r.c
  2943. ;; src/generator/onecol0r/onecol0r.cpp
  2944. ;; src/generator/nois0r/nois0r.cpp
  2945. ;; src/generator/lissajous0r/lissajous0r.cpp
  2946. ;; src/filter/ndvi/gradientlut.hpp
  2947. ;; src/filter/ndvi/ndvi.cpp
  2948. ;; src/filter/facedetect/facedetect.cpp
  2949. license:lgpl2.1+))))
  2950. (define-public motion
  2951. (package
  2952. (name "motion")
  2953. (version "4.2.2")
  2954. (home-page "https://motion-project.github.io/")
  2955. (source (origin
  2956. (method git-fetch)
  2957. (uri (git-reference
  2958. (url "https://github.com/Motion-Project/motion.git")
  2959. (commit (string-append "release-" version))))
  2960. (sha256
  2961. (base32
  2962. "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
  2963. (file-name (git-file-name name version))))
  2964. (build-system gnu-build-system)
  2965. (native-inputs
  2966. `(("autoconf" ,autoconf-wrapper)
  2967. ("automake" ,automake)
  2968. ("gettext" ,gettext-minimal)
  2969. ("pkg-config" ,pkg-config)))
  2970. (inputs
  2971. `(("libjpeg" ,libjpeg)
  2972. ("ffmpeg" ,ffmpeg-3.4)
  2973. ("libmicrohttpd" ,libmicrohttpd)
  2974. ("sqlite" ,sqlite)))
  2975. (arguments
  2976. '(#:phases (modify-phases %standard-phases
  2977. (replace 'bootstrap
  2978. (lambda _
  2979. (patch-shebang "version.sh")
  2980. (invoke "autoreconf" "-vfi"))))
  2981. #:configure-flags '("--sysconfdir=/etc")
  2982. #:make-flags (list (string-append "sysconfdir="
  2983. (assoc-ref %outputs "out")
  2984. "/etc"))
  2985. #:tests? #f)) ; no 'check' target
  2986. (synopsis "Detect motion from video signals")
  2987. (description
  2988. "Motion is a program that monitors the video signal from one or more
  2989. cameras and is able to detect if a significant part of the picture has
  2990. changed. Or in other words, it can detect motion.")
  2991. ;; Some files say "version 2" and others "version 2 or later".
  2992. (license license:gpl2)))
  2993. (define-public subdl
  2994. (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
  2995. (revision "1"))
  2996. (package
  2997. (name "subdl")
  2998. (version (git-version "1.0.3" revision commit))
  2999. (source (origin
  3000. (method git-fetch)
  3001. (uri (git-reference
  3002. (url "https://github.com/alexanderwink/subdl.git")
  3003. (commit commit)))
  3004. (file-name (git-file-name name version))
  3005. (sha256
  3006. (base32
  3007. "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
  3008. (build-system trivial-build-system)
  3009. (arguments
  3010. `(#:modules ((guix build utils))
  3011. #:builder (begin
  3012. (use-modules (guix build utils))
  3013. (let* ((out (assoc-ref %outputs "out"))
  3014. (bin (string-append out "/bin"))
  3015. (source (assoc-ref %build-inputs "source"))
  3016. (python (assoc-ref %build-inputs "python")))
  3017. (install-file (string-append source "/subdl") bin)
  3018. (patch-shebang (string-append bin "/subdl")
  3019. (list (string-append python "/bin")))))))
  3020. (inputs `(("python" ,python)))
  3021. (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
  3022. (description "Subdl is a command-line tool for downloading subtitles from
  3023. opensubtitles.org. By default, it will search for English subtitles, display
  3024. the results, download the highest-rated result in the requested language and
  3025. save it to the appropriate filename.")
  3026. (license license:gpl3+)
  3027. (home-page "https://github.com/alexanderwink/subdl"))))
  3028. (define-public l-smash
  3029. (package
  3030. (name "l-smash")
  3031. (version "2.14.5")
  3032. (source (origin
  3033. (method git-fetch)
  3034. (uri (git-reference
  3035. (url "https://github.com/l-smash/l-smash.git")
  3036. (commit (string-append "v" version))))
  3037. (file-name (git-file-name name version))
  3038. (sha256
  3039. (base32
  3040. "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
  3041. (build-system gnu-build-system)
  3042. (arguments
  3043. `(#:tests? #f ;no tests
  3044. #:make-flags
  3045. (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
  3046. (assoc-ref %outputs "out") "/lib"))
  3047. #:phases
  3048. (modify-phases %standard-phases
  3049. ;; configure fails if it is followed by CONFIG_SHELL
  3050. (replace 'configure
  3051. (lambda* (#:key outputs #:allow-other-keys)
  3052. (let ((out (assoc-ref outputs "out")))
  3053. (invoke "./configure" (string-append "--prefix=" out)
  3054. "--disable-static")))))))
  3055. (native-inputs
  3056. `(("which" ,which)))
  3057. (home-page "https://l-smash.github.io/l-smash/")
  3058. (synopsis "MP4 multiplexer and demultiplexer library")
  3059. (description
  3060. "L-SMASH is a cross-platform library that handles the ISO base media file
  3061. format and some of its derived file formats, including MP4. It operates as a
  3062. multiplexer and demultiplexer, and can mux video and audio in several formats
  3063. using standalone executable files.")
  3064. (license license:isc)))
  3065. (define-public qtfaststart
  3066. (package
  3067. (name "qtfaststart")
  3068. (version "1.8")
  3069. (source (origin
  3070. (method url-fetch)
  3071. (uri (pypi-uri "qtfaststart" version))
  3072. (sha256
  3073. (base32
  3074. "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
  3075. (build-system python-build-system)
  3076. (arguments
  3077. '(#:tests? #f)) ; no test suite
  3078. (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
  3079. (description "qtfaststart enables streaming and pseudo-streaming of
  3080. QuickTime and MP4 files by moving metadata and offset information to the
  3081. beginning of the file. It can also print some useful information about the
  3082. structure of the file. This program is based on qt-faststart.c from the FFmpeg
  3083. project, which is released into the public domain, as well as ISO 14496-12:2005
  3084. (the official spec for MP4), which can be obtained from the ISO or found
  3085. online.")
  3086. (home-page "https://github.com/danielgtaylor/qtfaststart")
  3087. (license license:expat)))
  3088. (define-public vidstab
  3089. (package
  3090. (name "vidstab")
  3091. (version "1.1.0")
  3092. (source (origin
  3093. (method git-fetch)
  3094. (uri (git-reference
  3095. (url "https://github.com/georgmartius/vid.stab.git")
  3096. (commit (string-append "v" version))))
  3097. (file-name (git-file-name name version))
  3098. (sha256
  3099. (base32
  3100. "0a3frpm2kdbx7vszhg64p3alisag73bcspl7fp3a2f1kgq7rbh38"))))
  3101. (build-system cmake-build-system)
  3102. (arguments
  3103. '(#:tests? #f)) ; tests are not run as part of standard build process
  3104. (home-page "http://public.hronopik.de/vid.stab/")
  3105. (synopsis "Video stabilization library")
  3106. (description "Vidstab is a video stabilization library which can be used
  3107. with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
  3108. vehicle typically suffers from undesirable shakes and jitters. Activities such
  3109. as surfing, skiing, riding and walking while shooting videos are especially
  3110. prone to erratic camera shakes. Vidstab targets these video contents to help
  3111. create smoother and stable videos.")
  3112. (license license:gpl2+)))
  3113. (define-public libopenshot
  3114. (package
  3115. (name "libopenshot")
  3116. (version "0.2.2")
  3117. (source (origin
  3118. (method git-fetch)
  3119. (uri (git-reference
  3120. (url "https://github.com/OpenShot/libopenshot")
  3121. (commit (string-append "v" version))))
  3122. (file-name (git-file-name name version))
  3123. (sha256
  3124. (base32
  3125. "1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd"))
  3126. (modules '((guix build utils)))
  3127. (snippet '(begin
  3128. ;; Allow overriding of the python installation dir
  3129. (substitute* "src/bindings/python/CMakeLists.txt"
  3130. (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
  3131. (string-append set " CACHE PATH "
  3132. "\"Python bindings directory\")")))
  3133. #t))
  3134. (patches (search-patches "libopenshot-tests-with-system-libs.patch"))))
  3135. (build-system cmake-build-system)
  3136. (native-inputs
  3137. `(("pkg-config" ,pkg-config)
  3138. ("python" ,python)
  3139. ("swig" ,swig)
  3140. ("unittest++" ,unittest-cpp)))
  3141. (propagated-inputs ;all referenced in installed headers
  3142. `(("cppzmq" ,cppzmq)
  3143. ("ffmpeg" ,ffmpeg)
  3144. ("imagemagick" ,imagemagick)
  3145. ("jsoncpp" ,jsoncpp)
  3146. ("libopenshot-audio" ,libopenshot-audio)
  3147. ("qt" ,qt) ;widgets, core, gui, multimedia, and multimediawidgets
  3148. ("zeromq" ,zeromq)))
  3149. (arguments
  3150. `(#:configure-flags
  3151. (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
  3152. ,(version-major+minor (package-version python))
  3153. "/site-packages")
  3154. "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
  3155. #:phases
  3156. (modify-phases %standard-phases
  3157. (add-before 'configure 'set-vars
  3158. (lambda* (#:key inputs #:allow-other-keys)
  3159. (setenv "LIBOPENSHOT_AUDIO_DIR"
  3160. (assoc-ref inputs "libopenshot-audio"))
  3161. (setenv "ZMQDIR"
  3162. (assoc-ref inputs "zeromq"))
  3163. (setenv "UNITTEST_DIR"
  3164. (string-append (assoc-ref inputs "unittest++")
  3165. "/include/UnitTest++"))
  3166. #t)))))
  3167. (home-page "https://openshot.org")
  3168. (synopsis "Video-editing, animation, and playback library")
  3169. (description "OpenShot Library (libopenshot) is a powerful C++ video
  3170. editing library with a multi-threaded and feature rich video editing
  3171. API. It includes bindings for Python, Ruby, and other languages.")
  3172. (license license:lgpl3+)))
  3173. (define-public openshot
  3174. (package
  3175. (name "openshot")
  3176. (version "2.4.3")
  3177. (source (origin
  3178. (method git-fetch)
  3179. (uri (git-reference
  3180. (url "https://github.com/OpenShot/openshot-qt")
  3181. (commit (string-append "v" version))))
  3182. (file-name (git-file-name name version))
  3183. (sha256
  3184. (base32
  3185. "1qdw1mli4y9qhrnllnkaf6ydgw5vfvdb90chs4i679k0x0jyb9a2"))))
  3186. (build-system python-build-system)
  3187. (inputs
  3188. `(("ffmpeg" ,ffmpeg)
  3189. ("libopenshot" ,libopenshot)
  3190. ("python" ,python)
  3191. ("python-pyqt" ,python-pyqt)
  3192. ("python-pyzmq" ,python-pyzmq)
  3193. ("python-requests" ,python-requests)
  3194. ("qtsvg" ,qtsvg)))
  3195. (arguments
  3196. `(#:tests? #f ;no tests
  3197. #:phases (modify-phases %standard-phases
  3198. (delete 'build) ;install phase does all the work
  3199. (add-before 'install 'set-tmp-home
  3200. (lambda _
  3201. ;; src/classes/info.py "needs" to create several
  3202. ;; directories in $HOME when loaded during build
  3203. (setenv "HOME" "/tmp")
  3204. #t))
  3205. (add-after 'install 'wrap-program
  3206. (lambda* (#:key inputs outputs #:allow-other-keys)
  3207. (wrap-program (string-append (assoc-ref outputs "out")
  3208. "/bin/openshot-qt")
  3209. `("QT_PLUGIN_PATH" prefix
  3210. ,(list (string-append (assoc-ref inputs "qtsvg")
  3211. "/lib/qt5/plugins/")))))))))
  3212. (home-page "https://openshot.org")
  3213. (synopsis "Video editor")
  3214. (description "OpenShot takes your videos, photos, and music files and
  3215. helps you create the film you have always dreamed of. Easily add sub-titles,
  3216. transitions, and effects and then export your film to many common formats.")
  3217. (license license:gpl3+)))
  3218. (define-public dav1d
  3219. (package
  3220. (name "dav1d")
  3221. (version "0.1.0")
  3222. (source
  3223. (origin
  3224. (method url-fetch)
  3225. (uri (string-append "https://downloads.videolan.org/pub/videolan/"
  3226. "dav1d/" version "/dav1d-" version ".tar.xz"))
  3227. (sha256
  3228. (base32
  3229. "0dw0liday8cbyrirhm6bgzhxg4cdy66nspfkdlq338gdsfqcvrsc"))))
  3230. (build-system meson-build-system)
  3231. (native-inputs `(("nasm" ,nasm)))
  3232. (home-page "https://code.videolan.org/videolan/dav1d")
  3233. (synopsis "AV1 decoder")
  3234. (description "dav1d is a new AV1 cross-platform decoder, and focused on
  3235. speed and correctness.")
  3236. (license license:bsd-2)))
  3237. (define-public wlstream
  3238. (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
  3239. (revision "1"))
  3240. (package
  3241. (name "wlstream")
  3242. (version (git-version "0.0" revision commit))
  3243. (source
  3244. (origin
  3245. (method git-fetch)
  3246. (uri (git-reference
  3247. (url "https://github.com/atomnuker/wlstream.git")
  3248. (commit commit)))
  3249. (file-name (git-file-name name version))
  3250. (sha256
  3251. (base32
  3252. "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
  3253. (build-system meson-build-system)
  3254. (native-inputs `(("libdrm" ,libdrm)
  3255. ("pkg-config" ,pkg-config)))
  3256. (inputs `(("ffmpeg" ,ffmpeg)
  3257. ("pulseaudio" ,pulseaudio)
  3258. ("wayland" ,wayland)
  3259. ("wayland-protocols" ,wayland-protocols)))
  3260. (home-page "https://github.com/atomnuker/wlstream")
  3261. (synopsis "Screen capture tool for Wayland sessions")
  3262. (description "Wlstream is a screen capture tool for recording audio and
  3263. video from a Wayland session.")
  3264. (license license:lgpl2.1+))))