video.scm 218 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629
  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, 2020 Mark H Weaver <mhw@netris.org>
  5. ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
  6. ;;; Copyright © 2015-2023 Efraim Flashner <efraim@flashner.co.il>
  7. ;;; Copyright © 2015, 2016 Andy Patterson <ajpatter@uwaterloo.ca>
  8. ;;; Copyright © 2015, 2018, 2019, 2020, 2021, 2023 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, 2017 Nikita <nikita@n0.is>
  14. ;;; Copyright © 2016, 2018, 2019, 2020, 2021 Eric Bavier <bavier@posteo.net>
  15. ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
  16. ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
  17. ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  18. ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
  19. ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
  20. ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
  21. ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
  22. ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
  23. ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
  24. ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
  25. ;;; Copyright © 2018-2022 Marius Bakke <marius@gnu.org>
  26. ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
  27. ;;; Copyright © 2018, 2019, 2020, 2022 Leo Famulari <leo@famulari.name>
  28. ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
  29. ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
  30. ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
  31. ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
  32. ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
  33. ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
  34. ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
  35. ;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
  36. ;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
  37. ;;; Copyright © 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com>
  38. ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
  39. ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
  40. ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
  41. ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
  42. ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
  43. ;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
  44. ;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <monego@posteo.net>
  45. ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
  46. ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
  47. ;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
  48. ;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
  49. ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
  50. ;;; Copyright © 2021 Alexey Abramov <levenson@mmer.org>
  51. ;;; Copyright © 2021, 2022, 2023 Andrew Tropin <andrew@trop.in>
  52. ;;; Copyright © 2021 David Wilson <david@daviwil.com>
  53. ;;; Copyright © 2021,2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  54. ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
  55. ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
  56. ;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
  57. ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
  58. ;;; Copyright © 2021 Robin Templeton <robin@terpri.org>
  59. ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
  60. ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
  61. ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  62. ;;; Copyright © 2022 Bird <birdsite@airmail.cc>
  63. ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
  64. ;;; Copyright © 2022 Chadwain Holness <chadwainholness@gmail.com>
  65. ;;; Copyright © 2022 Andy Tai <atai@atai.org>
  66. ;;; Copyright © 2023 Ott Joon <oj@vern.cc>
  67. ;;; Copyright © 2023 Dominik Delgado Steuter <dds@disroot.org>
  68. ;;;
  69. ;;; This file is part of GNU Guix.
  70. ;;;
  71. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  72. ;;; under the terms of the GNU General Public License as published by
  73. ;;; the Free Software Foundation; either version 3 of the License, or (at
  74. ;;; your option) any later version.
  75. ;;;
  76. ;;; GNU Guix is distributed in the hope that it will be useful, but
  77. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  78. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  79. ;;; GNU General Public License for more details.
  80. ;;;
  81. ;;; You should have received a copy of the GNU General Public License
  82. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  83. (define-module (gnu packages video)
  84. #:use-module (ice-9 match)
  85. #:use-module ((srfi srfi-1) #:hide (zip))
  86. #:use-module (srfi srfi-26)
  87. #:use-module ((guix licenses) #:prefix license:)
  88. #:use-module (guix utils)
  89. #:use-module (guix packages)
  90. #:use-module (guix download)
  91. #:use-module (guix gexp)
  92. #:use-module (guix git-download)
  93. #:use-module (guix svn-download)
  94. #:use-module (guix hg-download)
  95. #:use-module (guix build-system cargo)
  96. #:use-module (guix build-system cmake)
  97. #:use-module (guix build-system copy)
  98. #:use-module (guix build-system gnu)
  99. #:use-module (guix build-system glib-or-gtk)
  100. #:use-module (guix build-system meson)
  101. #:use-module (guix build-system perl)
  102. #:use-module (guix build-system pyproject)
  103. #:use-module (guix build-system python)
  104. #:use-module (guix build-system qt)
  105. #:use-module (guix build-system waf)
  106. #:use-module (guix build-system trivial)
  107. #:use-module (gnu packages)
  108. #:use-module (gnu packages algebra)
  109. #:use-module (gnu packages assembly)
  110. #:use-module (gnu packages audio)
  111. #:use-module (gnu packages autotools)
  112. #:use-module (gnu packages avahi)
  113. #:use-module (gnu packages backup)
  114. #:use-module (gnu packages base)
  115. #:use-module (gnu packages bash)
  116. #:use-module (gnu packages bison)
  117. #:use-module (gnu packages boost)
  118. #:use-module (gnu packages build-tools)
  119. #:use-module (gnu packages cdrom)
  120. #:use-module (gnu packages check)
  121. #:use-module (gnu packages cmake)
  122. #:use-module (gnu packages compression)
  123. #:use-module (gnu packages cpp)
  124. #:use-module (gnu packages crates-io)
  125. #:use-module (gnu packages crates-graphics)
  126. #:use-module (gnu packages curl)
  127. #:use-module (gnu packages dbm)
  128. #:use-module (gnu packages dejagnu)
  129. #:use-module (gnu packages dns)
  130. #:use-module (gnu packages docbook)
  131. #:use-module (gnu packages documentation)
  132. #:use-module (gnu packages elf)
  133. #:use-module (gnu packages file)
  134. #:use-module (gnu packages flex)
  135. #:use-module (gnu packages fonts)
  136. #:use-module (gnu packages fontutils)
  137. #:use-module (gnu packages freedesktop)
  138. #:use-module (gnu packages fribidi)
  139. #:use-module (gnu packages gettext)
  140. #:use-module (gnu packages ghostscript)
  141. #:use-module (gnu packages gl)
  142. #:use-module (gnu packages glib)
  143. #:use-module (gnu packages guile)
  144. #:use-module (gnu packages gnome)
  145. #:use-module (gnu packages gnunet)
  146. #:use-module (gnu packages gnupg)
  147. #:use-module (gnu packages gstreamer)
  148. #:use-module (gnu packages gtk)
  149. #:use-module (gnu packages haskell-xyz)
  150. #:use-module (gnu packages hunspell)
  151. #:use-module (gnu packages image)
  152. #:use-module (gnu packages imagemagick)
  153. #:use-module (gnu packages iso-codes)
  154. #:use-module (gnu packages libidn)
  155. #:use-module (gnu packages libusb)
  156. #:use-module (gnu packages linux)
  157. #:use-module (gnu packages llvm)
  158. #:use-module (gnu packages lua)
  159. #:use-module (gnu packages m4)
  160. #:use-module (gnu packages man)
  161. #:use-module (gnu packages markup)
  162. #:use-module (gnu packages maths)
  163. #:use-module (gnu packages music)
  164. #:use-module (gnu packages mp3)
  165. #:use-module (gnu packages ncurses)
  166. #:use-module (gnu packages networking)
  167. #:use-module (gnu packages ocr)
  168. #:use-module (gnu packages pcre)
  169. #:use-module (gnu packages pciutils)
  170. #:use-module (gnu packages perl)
  171. #:use-module (gnu packages perl-check)
  172. #:use-module (gnu packages perl-web)
  173. #:use-module (gnu packages php)
  174. #:use-module (gnu packages photo)
  175. #:use-module (gnu packages pkg-config)
  176. #:use-module (gnu packages popt)
  177. #:use-module (gnu packages pretty-print)
  178. #:use-module (gnu packages protobuf)
  179. #:use-module (gnu packages pulseaudio)
  180. #:use-module (gnu packages python)
  181. #:use-module (gnu packages python-crypto)
  182. #:use-module (gnu packages python-web)
  183. #:use-module (gnu packages python-xyz)
  184. #:use-module (gnu packages qt)
  185. #:use-module (gnu packages rdesktop)
  186. #:use-module (gnu packages re2c)
  187. #:use-module (gnu packages ruby)
  188. #:use-module (gnu packages rust-apps)
  189. #:use-module (gnu packages samba)
  190. #:use-module (gnu packages sdl)
  191. #:use-module (gnu packages serialization)
  192. #:use-module (gnu packages shells)
  193. #:use-module (gnu packages sqlite)
  194. #:use-module (gnu packages ssh)
  195. #:use-module (gnu packages swig)
  196. #:use-module (gnu packages texinfo)
  197. #:use-module (gnu packages textutils)
  198. #:use-module (gnu packages tls)
  199. #:use-module (gnu packages time)
  200. #:use-module (gnu packages upnp)
  201. #:use-module (gnu packages version-control)
  202. #:use-module (gnu packages vulkan)
  203. #:use-module (gnu packages web)
  204. #:use-module (gnu packages webkit)
  205. #:use-module (gnu packages wget)
  206. #:use-module (gnu packages wxwidgets)
  207. #:use-module (gnu packages xdisorg)
  208. #:use-module (gnu packages xiph)
  209. #:use-module (gnu packages xml)
  210. #:use-module (gnu packages xorg))
  211. (define-public transcode
  212. (package
  213. (name "transcode")
  214. (version "1.1.7")
  215. (source
  216. (origin
  217. (method url-fetch)
  218. (uri
  219. (string-append "https://sources.archlinux.org/other/community/"
  220. name "/" name "-" version ".tar.bz2"))
  221. (sha256
  222. (base32 "14ha9xjsjrj131f35jd56z5v1jb4rbsrj1nril5shqnxw3c74khy"))
  223. (patches
  224. (search-patches "transcode-ffmpeg.patch"))))
  225. (build-system gnu-build-system)
  226. (arguments
  227. `(#:configure-flags
  228. (list
  229. "CFLAGS=-O2 -g -fcommon"
  230. ;; XXX: Broken API.
  231. ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
  232. ;; "--enable-libv4l2"
  233. "--enable-libmpeg2"
  234. "--enable-libmpeg2convert"
  235. ;; XXX: Broken API.
  236. ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
  237. ;; "--enable-v4l"
  238. ;;; XXX: Not available.
  239. ;"--enable-bktr"
  240. ;"--enable-sunau"
  241. "--enable-oss"
  242. "--enable-alsa"
  243. ;;; XXX: Not available.
  244. ;"--enable-libpostproc"
  245. "--enable-freetype2"
  246. "--enable-xvid"
  247. "--enable-x264"
  248. "--enable-ogg"
  249. "--enable-vorbis"
  250. "--enable-theora"
  251. ;;; XXX: Not available.
  252. ;"--enable-pvm3"
  253. "--enable-libdv"
  254. "--enable-libquicktime"
  255. "--enable-lzo"
  256. "--enable-a52"
  257. "--enable-libxml2"
  258. ;;; XXX: Not available.
  259. ;"--enable-ibp"
  260. ;;"--enable-mjpegtools"
  261. "--enable-sdl"
  262. "--enable-imagemagick"
  263. ;;; XXX: Not available.
  264. ;"--enable-libjpegmmx"
  265. "--enable-libjpeg")))
  266. ;;; XXX: Not available.
  267. ;"--enable-bsdav"
  268. ;"--enable-pv3"
  269. ;"--enable-nuv"
  270. (native-inputs
  271. (list autoconf
  272. automake
  273. libtool
  274. libxml2
  275. perl
  276. pkg-config
  277. python-wrapper))
  278. (inputs
  279. (list alsa-lib
  280. ffmpeg-4
  281. freetype
  282. imagemagick
  283. lame
  284. liba52
  285. libdv
  286. libdvdread
  287. libjpeg-turbo
  288. libmpeg2
  289. libogg
  290. libquicktime
  291. libtheora
  292. libvorbis
  293. lzo
  294. mjpegtools
  295. sdl
  296. ;; ("v4l-utils" ,v4l-utils)
  297. libx11
  298. libx264
  299. libxaw
  300. libxext
  301. libxpm
  302. libxv
  303. xvid
  304. zlib))
  305. (synopsis "Audio/Video Transcoder")
  306. (description "Transcode is a fast, versatile and command-line based
  307. audio/video everything to everything converter primarily focused on producing
  308. AVI video files with MP3 audio, but also including a program to read all the
  309. video and audio streams from a DVD.")
  310. (home-page
  311. "https://linuxfromscratch.org/blfs/view/svn/multimedia/transcode.html")
  312. (license license:gpl2+)))
  313. (define-public svt-hevc
  314. (package
  315. (name "svt-hevc")
  316. (version "1.5.1")
  317. (source
  318. (origin
  319. (method git-fetch)
  320. (uri
  321. (git-reference
  322. (url "https://github.com/OpenVisualCloud/SVT-HEVC")
  323. (commit (string-append "v" version))))
  324. (file-name (git-file-name name version))
  325. (sha256
  326. (base32 "1cv6vcf5yxcwdvj5yqcckbixqrvvdxk7ibincnnv80pz6wh527sv"))))
  327. (build-system cmake-build-system)
  328. (arguments
  329. `(#:tests? #f)) ; Test script is stand-alone
  330. (native-inputs
  331. (list yasm))
  332. (synopsis "SVT HEVC encoder")
  333. (description "Scalable Video Technology (SVT) is a software-based video
  334. coding technology that is highly optimized for Intel's Xeon processors. Using
  335. the SVT-HEVC encoder, it is possible to spread video encoding processing across
  336. multiple Intel's Xeon processors to achieve a real advantage of processing
  337. efficiency.")
  338. (home-page "https://01.org/svt")
  339. ;; Specifically targets x86_64 Intel hardware.
  340. (supported-systems '("x86_64-linux"))
  341. (license (license:non-copyleft "file:///LICENSE.md"))))
  342. (define-public mediasdk
  343. (package
  344. (name "mediasdk")
  345. (version "22.4.4")
  346. (source
  347. (origin
  348. (method git-fetch)
  349. (uri
  350. (git-reference
  351. (url "https://github.com/Intel-Media-SDK/MediaSDK")
  352. (commit (string-append "intel-" name "-" version))))
  353. (file-name (git-file-name name version))
  354. (sha256
  355. (base32 "18mrqringyv1drswm4m8ppw7sks6x4jzp6s0ag0h9hrpd15kn5rx"))))
  356. (build-system cmake-build-system)
  357. (arguments
  358. (list
  359. #:configure-flags
  360. #~(list
  361. "-DENABLE_X11=ON"
  362. "-DENABLE_X11_DRI3=ON"
  363. "-DENABLE_WAYLAND=ON"
  364. "-DENABLE_TEXTLOG=ON"
  365. "-DENABLE_STAT=ON"
  366. "-DBUILD_TESTS=ON"
  367. "-DBUILD_TOOLS=ON"
  368. (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
  369. #$output "/lib"))
  370. #:phases
  371. #~(modify-phases %standard-phases
  372. (add-after 'unpack 'do-not-embed-kernel-version
  373. (lambda _
  374. (substitute* "builder/FindGlobals.cmake"
  375. (("set\\([[:blank:]]+?BUILD_INFO \"\\$\\{CMAKE_SYSTEM\\}\
  376. \\$\\{CMAKE_SYSTEM_VERSION\\}")
  377. "set( BUILD_INFO \"Linux")))))))
  378. (native-inputs
  379. (list pkg-config python-wrapper))
  380. (inputs
  381. (list libdrm libva libpciaccess wayland libx11))
  382. (synopsis "Intel Media SDK")
  383. (description "MediaSDK provides a plain C API to access hardware-accelerated
  384. video decode, encode and filtering on Intel's Gen graphics hardware platforms.")
  385. (home-page "http://mediasdk.intel.com/")
  386. (supported-systems '("x86_64-linux" "i686-linux"))
  387. (license (license:non-copyleft "file:///LICENSE"))))
  388. (define-public schroedinger
  389. (package
  390. (name "schroedinger")
  391. (version "1.0.11")
  392. (source
  393. (origin
  394. (method url-fetch)
  395. (uri
  396. (string-append "https://launchpad.net/" name "/trunk/" version
  397. "/+download/" name "-" version ".tar.gz"))
  398. (sha256
  399. (base32 "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"))))
  400. (build-system gnu-build-system)
  401. (outputs '("out" "doc"))
  402. (arguments
  403. `(#:phases
  404. (modify-phases %standard-phases
  405. (add-after 'install 'move-docs
  406. (lambda* (#:key outputs #:allow-other-keys)
  407. (let* ((out (assoc-ref outputs "out"))
  408. (doc (assoc-ref outputs "doc")))
  409. (mkdir-p (string-append doc "/share"))
  410. (rename-file
  411. (string-append out "/share/gtk-doc")
  412. (string-append doc "/share/gtk-doc"))
  413. #t))))))
  414. (native-inputs
  415. (list dash gtk-doc/stable pkg-config))
  416. (inputs
  417. `(("glew" ,glew)
  418. ("opengl" ,mesa)))
  419. (propagated-inputs
  420. (list orc))
  421. (synopsis "Dirac video codec")
  422. (description "Schroedinger is a project implementing the Dirac video codec in
  423. ANSI C code. It is meant to be highly optimized and portable. It is developed
  424. as a joint effort between the BBC and Fluendo.")
  425. (home-page "https://launchpad.net/schroedinger")
  426. (license
  427. ;; This library is licensed under 4 different licenses,
  428. ;; and you can choose to use it under the terms of any one of them.
  429. (list
  430. license:gpl2+
  431. license:lgpl2.0+
  432. license:expat
  433. license:mpl1.1))))
  434. (define-public libquicktime
  435. (package
  436. (name "libquicktime")
  437. (version "1.2.4")
  438. (source
  439. (origin
  440. (method url-fetch)
  441. (uri
  442. (string-append "https://sourceforge.net/projects/" name "/files/"
  443. name "/" version "/" name "-" version ".tar.gz"))
  444. (sha256
  445. (base32 "0s3kshzl3zfjw3phzv73r91fkr9z8q8kc3dhsys4f4xk6ff3alqw"))
  446. (patches
  447. (search-patches "libquicktime-ffmpeg.patch"))))
  448. (build-system gnu-build-system)
  449. (native-inputs
  450. (list gettext-minimal doxygen pkg-config))
  451. (inputs
  452. (list alsa-lib
  453. ffmpeg-4
  454. gtk+-2
  455. lame
  456. libdv
  457. libjpeg-turbo
  458. libpng
  459. libvorbis
  460. mesa
  461. schroedinger
  462. libx11
  463. libx264
  464. libxaw
  465. libxv))
  466. (synopsis "Quick Time Library")
  467. (description "The goal of this project is to enhance the quicktime4linux
  468. library.")
  469. (home-page "https://libquicktime.sourceforge.net/")
  470. (license license:lgpl2.1+)))
  471. (define-public mjpg-streamer
  472. (package
  473. (name "mjpg-streamer")
  474. (version "1.0.0")
  475. (source (origin
  476. (method git-fetch)
  477. (uri (git-reference
  478. (url "https://github.com/jacksonliam/mjpg-streamer")
  479. (commit (string-append "v" version))))
  480. (file-name (git-file-name name version))
  481. (sha256
  482. (base32
  483. "0w81pg228154blzbzr590xwhcll9baxyqxl6wxrgqsi9cd7pzq23"))
  484. (modules '((guix build utils)))
  485. (snippet
  486. '(begin
  487. (with-directory-excursion "mjpg-streamer-experimental/www"
  488. (for-each delete-file-recursively
  489. '("cambozola.jar"
  490. "JQuerySpinBtn.css"
  491. "JQuerySpinBtn.js"
  492. "jquery.js"
  493. "jquery.rotate.js"
  494. "jquery.ui.core.min.js"
  495. "jquery.ui.custom.css"
  496. "jquery.ui.tabs.min.js"
  497. "jquery.ui.widget.min.js")))))))
  498. (build-system cmake-build-system)
  499. (arguments
  500. '(#:tests? #f ; no test suite
  501. #:phases
  502. (modify-phases %standard-phases
  503. (add-after 'unpack 'chdir
  504. (lambda* _
  505. (chdir "mjpg-streamer-experimental"))))))
  506. (inputs (list libjpeg-turbo))
  507. (synopsis "Stream JPEG over IP network")
  508. (description "Command line application that copies JPEG frames from one or
  509. more input plugins to multiple output plugins. It can be used to stream JPEG
  510. files over an IP-based network from a webcam to various types of viewers such
  511. as Chrome, Firefox, Cambozola, VLC, mplayer, and other software capable of
  512. receiving MJPG streams.")
  513. (home-page "https://github.com/jacksonliam/mjpg-streamer")
  514. (license license:gpl2+)))
  515. (define-public mjpegtools
  516. (package
  517. (name "mjpegtools")
  518. (version "2.2.1")
  519. (source
  520. (origin
  521. (method url-fetch)
  522. (uri
  523. (string-append "https://sourceforge.net/projects/mjpeg/files/"
  524. name "/" version "/" name "-" version ".tar.gz"))
  525. (sha256
  526. (base32 "16pl22ra3x2mkp8p3awslhlhj46b1nq9g89301gb0q4rgmnm705i"))))
  527. (build-system gnu-build-system)
  528. (inputs
  529. (list gtk+-2 libdv libjpeg-turbo libpng libquicktime sdl))
  530. (native-inputs
  531. (list pkg-config))
  532. (synopsis "Tools for handling MPEG")
  533. (description "Mjpeg tools is a suite of programs which support video capture,
  534. editing, playback, and compression to MPEG of MJPEG video. Edit, play and
  535. compression software is hardware independent.")
  536. (home-page "https://mjpeg.sourceforge.net/")
  537. (license license:gpl2+)))
  538. (define-public libmms
  539. (package
  540. (name "libmms")
  541. (version "0.6.4")
  542. (source
  543. (origin
  544. (method url-fetch)
  545. (uri
  546. (string-append "https://sourceforge.net/projects/" name "/files/"
  547. name "/" version "/" name "-" version ".tar.gz"))
  548. (sha256
  549. (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
  550. (build-system gnu-build-system)
  551. (synopsis "MMS stream protocol library")
  552. (description "Libmms is a library for streaming media files using the mmst
  553. and mmsh protocols.")
  554. (home-page "https://sourceforge.net/projects/libmms/")
  555. (license license:lgpl2.1+)))
  556. (define-public libvideogfx
  557. (package
  558. (name "libvideogfx")
  559. (version "1.0.9")
  560. (source
  561. (origin
  562. (method git-fetch)
  563. (uri
  564. (git-reference
  565. (url "https://github.com/farindk/libvideogfx")
  566. (commit (string-append "v" version))))
  567. (file-name (git-file-name name version))
  568. (sha256
  569. (base32 "154b0j8cfg879pg08xcbwvbz8z9nrfnyj31i48vxir1psas70ynq"))))
  570. (build-system gnu-build-system)
  571. (arguments
  572. `(#:phases
  573. (modify-phases %standard-phases
  574. (add-after 'unpack 'fix-build-errors
  575. (lambda _
  576. (substitute* "libvideogfx/graphics/fileio/ffmpeg.cc"
  577. (("av_close_input_file\\(")
  578. "avformat_close_input(&"))
  579. (substitute* "libvideogfx/graphics/fileio/png.cc"
  580. (("is != NULL") "is.good()"))
  581. #t)))))
  582. (native-inputs
  583. (list autoconf automake libtool pkg-config))
  584. (inputs
  585. `(("ffmpeg" ,ffmpeg-2.8)
  586. ("jpeg" ,libjpeg-turbo)
  587. ("png" ,libpng)
  588. ("x11" ,libx11)
  589. ("xext" ,libxext)))
  590. (synopsis "Video processing library")
  591. (description "LibVideoGfx is a C++ library for low-level video processing.
  592. It aims at speeding up the development process for image and video processing
  593. applications by providing high-level classes for commonly required tasks.")
  594. (home-page "https://dirk-farin.net/software/libvideogfx/index.html")
  595. (license license:lgpl2.1+)))
  596. (define-public libde265
  597. (package
  598. (name "libde265")
  599. (version "1.0.8")
  600. (source
  601. (origin
  602. (method git-fetch)
  603. (uri
  604. (git-reference
  605. (url "https://github.com/strukturag/libde265")
  606. (commit (string-append "v" version))))
  607. (file-name (git-file-name name version))
  608. (sha256
  609. (base32 "1dzflqbk248lz5ws0ni5acmf32b3rmnq5gsfaz7691qqjxkl1zml"))))
  610. (build-system gnu-build-system)
  611. (arguments
  612. `(#:configure-flags
  613. (list "--disable-static")))
  614. (native-inputs
  615. `(("autoconf" ,autoconf)
  616. ("automake" ,automake)
  617. ("libtool" ,libtool)
  618. ("pkg-config" ,pkg-config)
  619. ("python" ,python-wrapper)))
  620. (inputs
  621. `(;; XXX: Build fails with libvideogfx.
  622. ;; ("libvideogfx" ,libvideogfx)
  623. ("qt" ,qtbase-5)
  624. ("sdl" ,sdl)))
  625. (synopsis "H.265 video codec implementation")
  626. (description "Libde265 is an implementation of the h.265 video codec. It is
  627. written from scratch and has a plain C API to enable a simple integration into
  628. other software.")
  629. (home-page "https://www.libde265.org/")
  630. (license
  631. (list
  632. ;; Applications.
  633. license:expat
  634. ;; Library.
  635. license:lgpl3+))))
  636. (define-public tslib
  637. (package
  638. (name "tslib")
  639. (version "1.22")
  640. (source
  641. (origin
  642. (method git-fetch)
  643. (uri
  644. (git-reference
  645. (url "https://github.com/libts/tslib")
  646. (commit version)))
  647. (file-name (git-file-name name version))
  648. (sha256
  649. (base32 "197p6vy539wvfrv23agbvmay4rjya1jnisi46llm0nx4cvqh48by"))))
  650. (build-system gnu-build-system)
  651. (arguments
  652. `(#:test-target "tests"
  653. #:configure-flags
  654. (list "--with-sdl2")))
  655. (native-inputs
  656. (list autoconf automake libtool pkg-config))
  657. (inputs
  658. `(("sdl2" ,sdl2)))
  659. (synopsis "Touchscreen access library")
  660. (description "TSLib is a cross-platform library that provides access to
  661. touchscreen devices and the ability to apply filters to their input events.")
  662. (home-page "http://www.tslib.org/")
  663. (license license:lgpl2.1+)))
  664. (define-public libmpeg3
  665. (package
  666. (name "libmpeg3")
  667. (version "1.8")
  668. (source
  669. (origin
  670. (method url-fetch)
  671. (uri
  672. (string-append "https://sourceforge.net/projects/heroines/files/"
  673. "releases/081108/" name "-" version "-src.tar.bz2"))
  674. (sha256
  675. (base32 "1i53vv0wm5qfwgg1z7j9g14s6c7gxxkiy4vbdkq3lijjyyz50vv5"))))
  676. (build-system gnu-build-system)
  677. (arguments
  678. `(#:test-target "test"
  679. #:make-flags
  680. (list
  681. (string-append "A52DIR=" (assoc-ref %build-inputs "liba52"))
  682. (string-append "DST=" (assoc-ref %outputs "out") "/bin"))
  683. #:phases
  684. (modify-phases %standard-phases
  685. (add-after 'unpack 'delete-bundled-a52dec
  686. (lambda _
  687. (delete-file-recursively "a52dec-0.7.3")
  688. (substitute* "Makefile"
  689. (("include Makefile\\.a52")
  690. "")
  691. (("\\(A52DIR\\)/include")
  692. "(A52DIR)/include/a52dec")
  693. (("LIBS = " match)
  694. (string-append match "-la52 ")))))
  695. (add-after 'unpack 'preseed-cflags
  696. (lambda _
  697. (setenv "CFLAGS"
  698. (string-append "-D_FILE_OFFSET_BITS=64 "
  699. "-D_LARGEFILE_SOURCE "
  700. "-D_LARGEFILE64_SOURCE"))))
  701. (add-before 'install 'create-destination-directory
  702. (lambda* (#:key outputs #:allow-other-keys)
  703. (let* ((out (string-append (assoc-ref outputs "out"))))
  704. (mkdir-p (string-append out "/bin"))))))))
  705. (native-inputs
  706. (list nasm))
  707. (inputs
  708. (list liba52))
  709. (synopsis "Advanced MPEG editing and manipulation library")
  710. (description "Libmpeg3 decodes MP2, MP3, AC3, MPEG-1 video, MPEG-2 video,
  711. and DVD footage in a single library. It supports many esoteric features like
  712. parallel video decoding, frame-accurate editing, YUV 4:2:2, and ATSC transport
  713. stream decoding")
  714. (home-page "http://heroinewarrior.com/libmpeg3.php")
  715. (license license:gpl2+)))
  716. (define-public aalib
  717. (package
  718. (name "aalib")
  719. (version "1.4rc5")
  720. (source (origin
  721. (method url-fetch)
  722. (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
  723. version "/" name "-" version ".tar.gz"))
  724. (sha256
  725. (base32
  726. "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
  727. (build-system gnu-build-system)
  728. (native-inputs
  729. `(("config" ,config)
  730. ("makeinfo" ,texinfo)))
  731. (inputs
  732. (list ncurses))
  733. (arguments
  734. `(#:phases
  735. (modify-phases %standard-phases
  736. (add-after 'unpack 'update-config-scripts
  737. (lambda* (#:key inputs native-inputs #:allow-other-keys)
  738. ;; Replace outdated config.guess and config.sub.
  739. (for-each (lambda (file)
  740. (install-file
  741. (search-input-file
  742. (or native-inputs inputs)
  743. (string-append "/bin/" file)) "."))
  744. '("config.guess" "config.sub"))))
  745. (replace 'configure
  746. (lambda* (#:key build inputs outputs #:allow-other-keys)
  747. ;; This old `configure' script doesn't support
  748. ;; variables passed as arguments.
  749. (let ((out (assoc-ref outputs "out"))
  750. (ncurses (assoc-ref inputs "ncurses")))
  751. (setenv "CONFIG_SHELL" (which "bash"))
  752. (invoke "./configure"
  753. "--disable-static"
  754. (string-append "--prefix=" out)
  755. (string-append "--build=" build)
  756. (string-append "--with-ncurses="
  757. ncurses))))))))
  758. (home-page "https://aa-project.sourceforge.net/aalib/")
  759. (synopsis "ASCII-art library")
  760. (description
  761. "AA-lib is a low level gfx library which does not require graphics device.
  762. In fact, there is no graphical output possible. AA-lib replaces those
  763. old-fashioned output methods with powerful ascii-art renderer.")
  764. (license license:lgpl2.0+)))
  765. (define-public celluloid
  766. (package
  767. (name "celluloid")
  768. (version "0.24")
  769. (source
  770. (origin
  771. (method url-fetch)
  772. (uri (string-append "https://github.com/celluloid-player/celluloid"
  773. "/releases/download/v" version
  774. "/celluloid-" version ".tar.xz"))
  775. (sha256
  776. (base32 "0ns9xh582c8kajw4v2x5ap5jfiba3gxywqc2klc0v6fc3id1gqii"))))
  777. (build-system meson-build-system)
  778. (arguments
  779. (list
  780. #:glib-or-gtk? #t
  781. #:phases
  782. #~(modify-phases %standard-phases
  783. (add-after 'unpack 'disable-postinstall-script
  784. (lambda _
  785. (setenv "DESTDIR" "/"))))))
  786. (native-inputs
  787. (list
  788. intltool
  789. `(,glib "bin") ; for glib-compile-resources
  790. pkg-config
  791. python-wrapper)) ; for generate-authors.py
  792. (inputs
  793. (list gtk libadwaita libepoxy mpv))
  794. (home-page "https://github.com/celluloid-player/celluloid")
  795. (synopsis "GTK+ frontend for the mpv media player")
  796. (description "Celluloid is a simple GTK+ frontend for the mpv media player.
  797. It interacts with mpv via the client API exported by libmpv, allowing access to
  798. mpv's powerful playback capabilities.")
  799. (license license:gpl3+)))
  800. (define-public liba52
  801. (package
  802. (name "liba52")
  803. (version "0.7.4")
  804. (source (origin
  805. (method url-fetch)
  806. (uri (string-append
  807. ;; A mirror://sourceforge URI doesn't work, presumably
  808. ;; because the SourceForge project is misconfigured.
  809. "http://liba52.sourceforge.net/files/a52dec-" version
  810. ".tar.gz"))
  811. (sha256
  812. (base32
  813. "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
  814. (patches (search-patches "liba52-enable-pic.patch"
  815. "liba52-set-soname.patch"
  816. "liba52-use-mtune-not-mcpu.patch"
  817. "liba52-link-with-libm.patch"))))
  818. (build-system gnu-build-system)
  819. ;; XXX We need to run ./bootstrap because of the build system fixes above.
  820. (native-inputs
  821. (list autoconf automake libtool))
  822. (arguments `(#:configure-flags '("--enable-shared")
  823. #:phases
  824. (modify-phases %standard-phases
  825. ;; XXX We need to run ./bootstrap because of the build
  826. ;; system fixes above.
  827. (replace 'bootstrap
  828. (lambda _ (invoke "sh" "bootstrap"))))))
  829. (home-page "https://liba52.sourceforge.net/")
  830. (synopsis "ATSC A/52 audio stream decoder")
  831. (description "liba52 is a library for decoding ATSC A/52 audio streams.
  832. The A/52 standard is used in a variety of applications, including digital
  833. television and DVD. It is also known as AC-3.")
  834. (license license:gpl2+)))
  835. (define-public libaom
  836. (package
  837. (name "libaom")
  838. (version "3.5.0")
  839. (source (origin
  840. (method git-fetch)
  841. (uri (git-reference
  842. (url "https://aomedia.googlesource.com/aom/")
  843. (commit (string-append "v" version))))
  844. (file-name (git-file-name name version))
  845. (sha256
  846. (base32
  847. "0arn8a88jz4mj69n8cs4qmrdjwhbvzsqgnx20wr9mq01b06kqich"))))
  848. (build-system cmake-build-system)
  849. (native-inputs
  850. (list perl pkg-config python)) ; to detect the version
  851. (arguments
  852. `(#:tests? #f ; downloads many video clips
  853. #:configure-flags
  854. (list "-DBUILD_SHARED_LIBS=YES"
  855. "-DAOM_TARGET_CPU=generic"
  856. (string-append "-DCMAKE_INSTALL_PREFIX="
  857. (assoc-ref %outputs "out")))
  858. #:phases
  859. (modify-phases %standard-phases
  860. (add-after 'install 'delete-static-libraries
  861. (lambda* (#:key outputs #:allow-other-keys)
  862. (let* ((out (assoc-ref outputs "out"))
  863. (lib (string-append out "/lib")))
  864. (for-each delete-file
  865. (find-files lib "\\.a$"))))))))
  866. (home-page "https://aomedia.googlesource.com/aom/")
  867. (synopsis "AV1 video codec")
  868. (description "Libaom is the reference implementation of AV1. It includes a
  869. shared library and encoder and decoder command-line executables.")
  870. (license license:bsd-2)))
  871. (define-public libmpeg2
  872. (package
  873. (name "libmpeg2")
  874. (version "0.5.1")
  875. (source (origin
  876. (method url-fetch)
  877. ;; A mirror://sourceforge URI doesn't work, presumably
  878. ;; because the SourceForge project is misconfigured.
  879. (uri (string-append "http://libmpeg2.sourceforge.net/files/"
  880. name "-" version ".tar.gz"))
  881. (patches (search-patches "libmpeg2-arm-private-symbols.patch"
  882. "libmpeg2-global-symbol-test.patch"))
  883. (sha256
  884. (base32
  885. "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
  886. (inputs
  887. (list libx11
  888. libxext
  889. libxv
  890. libsm
  891. libice
  892. sdl))
  893. (build-system gnu-build-system)
  894. (home-page "https://libmpeg2.sourceforge.net/")
  895. (synopsis "MPEG1 and MPEG2 video decoder library")
  896. (description
  897. "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
  898. (license license:gpl2+)))
  899. (define-public libx264
  900. ;; There are no tags in the repository, so we take the version number from
  901. ;; the X264_BUILD variable defined in x264.h.
  902. (let ((version "164")
  903. (commit "b093bbe7d9bc642c8f24067cbdcc73bb43562eab")
  904. (revision "0"))
  905. (package
  906. (name "libx264")
  907. (version (git-version version revision commit))
  908. (source (origin
  909. (method git-fetch)
  910. (uri (git-reference
  911. (url "https://code.videolan.org/videolan/x264.git")
  912. (commit commit)))
  913. (file-name (git-file-name name version))
  914. (sha256
  915. (base32
  916. "095pv8y6fqjg8mdvsfk12d0jqgyhip536a6vxhzm7qz8hfp96qhq"))))
  917. (build-system gnu-build-system)
  918. (native-inputs
  919. (list pkg-config nasm))
  920. (inputs
  921. (list config))
  922. ;; TODO: Add gpac input
  923. (arguments
  924. `(#:tests? #f ;no check target
  925. #:configure-flags '("--enable-shared"
  926. ;; Don't build the command-line program. If we
  927. ;; want it later, we should do so in a different
  928. ;; package to avoid a circular dependency (the x264
  929. ;; program depends on ffmpeg and ffmpeg depends on
  930. ;; libx264).
  931. "--disable-cli"
  932. "--enable-pic"
  933. ;; On MIPS, we must pass "--disable-asm" or else
  934. ;; configure fails after printing: "You specified a
  935. ;; pre-MSA CPU in your CFLAGS. If you really want
  936. ;; to run on such a CPU, configure with
  937. ;; --disable-asm."
  938. ,@(if (string-prefix? "mips"
  939. (or (%current-target-system)
  940. (%current-system)))
  941. '("--disable-asm")
  942. '()))
  943. #:phases
  944. (modify-phases %standard-phases
  945. (add-after 'unpack 'update-config-scripts
  946. (lambda* (#:key native-inputs inputs #:allow-other-keys)
  947. (for-each (lambda (file)
  948. (install-file
  949. (search-input-file
  950. (or native-inputs inputs)
  951. (string-append "/bin/" file)) "."))
  952. '("config.guess" "config.sub")))))))
  953. (home-page "https://www.videolan.org/developers/x264.html")
  954. (synopsis "H.264 video coding library")
  955. (description "libx264 is an advanced encoding library for creating
  956. H.264 (MPEG-4 AVC) video streams.")
  957. (license (list license:gpl2+ ;most files
  958. license:isc ;common/x86/x86inc.asm
  959. license:lgpl2.1+ ;extras/getopt.c
  960. license:bsd-3 ;extras/inttypes.h
  961. (license:non-copyleft ;extras/cl*.h
  962. "file://extras/cl.h"
  963. "See extras/cl.h in the distribution."))))))
  964. (define-public mkvtoolnix
  965. (package
  966. (name "mkvtoolnix")
  967. (version "52.0.0")
  968. (source
  969. (origin
  970. (method url-fetch)
  971. (uri (string-append "https://mkvtoolnix.download/sources/"
  972. "mkvtoolnix-" version ".tar.xz"))
  973. (sha256
  974. (base32 "15y7ahlifsclnkl70wn5w34dil8nwcwcjnw3k2ydqc6dz4vb0j5s"))
  975. (modules '((guix build utils)))
  976. (snippet '(begin
  977. ;; Delete bundled libraries.
  978. (for-each delete-file-recursively
  979. '("lib/fmt"
  980. "lib/libebml"
  981. "lib/libmatroska"
  982. "lib/nlohmann-json"
  983. "lib/pugixml"
  984. "lib/utf8-cpp"))
  985. #t))))
  986. (build-system gnu-build-system)
  987. (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
  988. (inputs
  989. (list boost
  990. bzip2
  991. cmark
  992. libebml
  993. file
  994. flac
  995. fmt-8
  996. libdvdread
  997. libmatroska
  998. libogg
  999. libvorbis
  1000. lzo
  1001. pcre2
  1002. pugixml
  1003. qtbase-5
  1004. qtmultimedia-5
  1005. utfcpp
  1006. zlib))
  1007. (native-inputs
  1008. `(("docbook-xsl" ,docbook-xsl)
  1009. ("gettext" ,gettext-minimal)
  1010. ("googletest" ,googletest)
  1011. ("libxslt" ,libxslt)
  1012. ("nlohmann-json" ,nlohmann-json)
  1013. ("perl" ,perl)
  1014. ("pkg-config" ,pkg-config)
  1015. ("po4a" ,po4a)
  1016. ("qttools-5" ,qttools-5)
  1017. ("ruby" ,ruby)))
  1018. (arguments
  1019. `(#:configure-flags
  1020. (list (string-append "--with-boost="
  1021. (assoc-ref %build-inputs "boost"))
  1022. (string-append "--with-docbook-xsl-root="
  1023. (assoc-ref %build-inputs "docbook-xsl")
  1024. "/xml/xsl/docbook-xsl-"
  1025. ,(package-version docbook-xsl))
  1026. "--enable-update-check=no"
  1027. "--enable-precompiled-headers=no")
  1028. #:phases
  1029. (modify-phases %standard-phases
  1030. (add-after 'unpack 'patch-relative-file-names
  1031. (lambda* (#:key outputs #:allow-other-keys)
  1032. (let ((out (assoc-ref outputs "out")))
  1033. (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
  1034. (("mkvmerge" match)
  1035. (string-append out "/bin/" match)))
  1036. #t)))
  1037. (add-before 'configure 'add-googletest
  1038. (lambda* (#:key inputs #:allow-other-keys)
  1039. (symlink (search-input-directory inputs "/include/gtest")
  1040. "lib/gtest")))
  1041. (replace 'build
  1042. (lambda _
  1043. (let ((-j (list "-j" (number->string (parallel-job-count)))))
  1044. (apply invoke "rake" -j))))
  1045. (replace 'check
  1046. (lambda _
  1047. (invoke "rake" "tests/unit")))
  1048. (replace 'install
  1049. (lambda _
  1050. (invoke "rake" "install")))
  1051. (add-after 'install 'post-install
  1052. (lambda* (#:key outputs #:allow-other-keys)
  1053. ;; Move the Qt interface to "gui".
  1054. (let* ((out (assoc-ref outputs "out"))
  1055. (gui (assoc-ref outputs "gui"))
  1056. (strip-store-dir (lambda (path)
  1057. (substring path (string-prefix-length out path)))))
  1058. (for-each
  1059. (lambda (file)
  1060. (mkdir-p (string-append gui (dirname file)))
  1061. (rename-file (string-append out file)
  1062. (string-append gui file)))
  1063. (append '("/bin/mkvtoolnix-gui"
  1064. "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
  1065. "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
  1066. "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
  1067. (map strip-store-dir (find-files out "\\.ogg$"))
  1068. (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
  1069. (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
  1070. (for-each
  1071. (lambda (file)
  1072. (delete-file-recursively (string-append out file)))
  1073. '("/share/applications"
  1074. "/share/metainfo"
  1075. "/share/mime"
  1076. "/share/mkvtoolnix")))
  1077. #t)))))
  1078. (home-page "https://mkvtoolnix.download")
  1079. (synopsis "Tools to create, alter and inspect Matroska files")
  1080. (description
  1081. "MKVToolNix provides tools for getting information about Matroska files
  1082. (@command{mkvinfo}), extracting tracks/data from Matroska files
  1083. (@command{mkvextract}), and creating Matroska files from other media files
  1084. (@command{mkvmerge}).")
  1085. (license license:gpl2)))
  1086. (define-public pipe-viewer
  1087. (package
  1088. (name "pipe-viewer")
  1089. (version "0.4.4")
  1090. (source
  1091. (origin
  1092. (method git-fetch)
  1093. (uri
  1094. (git-reference
  1095. (url "https://github.com/trizen/pipe-viewer")
  1096. (commit version)))
  1097. (file-name (git-file-name name version))
  1098. (sha256
  1099. (base32 "0ka5az3aq2khql9nlxnrbkbs7afmp07r2fkx5pvmh6mqnriaimq3"))))
  1100. (build-system perl-build-system)
  1101. (arguments
  1102. `(#:imported-modules
  1103. ((guix build copy-build-system)
  1104. ,@%perl-build-system-modules)
  1105. #:modules
  1106. (((guix build copy-build-system)
  1107. #:prefix copy:)
  1108. (guix build perl-build-system)
  1109. (guix build utils)
  1110. (srfi srfi-26))
  1111. #:module-build-flags
  1112. (list
  1113. "--gtk3")
  1114. #:phases
  1115. (modify-phases %standard-phases
  1116. (add-after 'unpack 'patch-source
  1117. (lambda* (#:key inputs #:allow-other-keys)
  1118. (substitute* (find-files "lib" "\\.pm$")
  1119. (("\"yt-dlp\"")
  1120. (format #f "\"~a/bin/yt-dlp\""
  1121. (assoc-ref inputs "yt-dlp"))))
  1122. (substitute* (find-files "bin" ".*-viewer$")
  1123. (("'ffmpeg'")
  1124. (format #f "'~a/bin/ffmpeg'"
  1125. (assoc-ref inputs "ffmpeg")))
  1126. (("'wget'")
  1127. (format #f "'~a/bin/wget'"
  1128. (assoc-ref inputs "wget")))
  1129. (("'xdg-open'")
  1130. (format #f "'~a/bin/xdg-open'"
  1131. (assoc-ref inputs "xdg-utils")))
  1132. (("'yt-dlp'")
  1133. (format #f "'~a/bin/yt-dlp'"
  1134. (assoc-ref inputs "yt-dlp"))))))
  1135. (add-after 'install 'install-xdg
  1136. (lambda args
  1137. (apply (assoc-ref copy:%standard-phases 'install)
  1138. #:install-plan
  1139. '(("share/icons" "share/pixmaps")
  1140. ("share" "share/applications"
  1141. #:include-regexp ("\\.desktop$")))
  1142. args)))
  1143. (add-after 'install-xdg 'wrap-programs
  1144. (lambda* (#:key outputs #:allow-other-keys)
  1145. (let* ((out (assoc-ref outputs "out"))
  1146. (bin-dir (string-append out "/bin/"))
  1147. (site-dir (string-append out "/lib/perl5/site_perl/"))
  1148. (perl-lib (getenv "PERL5LIB"))
  1149. (gi-typelib (getenv "GI_TYPELIB_PATH")))
  1150. (for-each
  1151. (cut wrap-program <>
  1152. `("PERL5LIB" ":" prefix (,perl-lib ,site-dir))
  1153. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib)))
  1154. (find-files bin-dir))))))))
  1155. (native-inputs
  1156. (list perl-module-build perl-test-pod perl-test-simple))
  1157. (inputs
  1158. (list perl-data-dump
  1159. perl-digest-md5
  1160. perl-encode
  1161. ffmpeg
  1162. perl-file-path
  1163. perl-file-sharedir
  1164. perl-getopt-long
  1165. perl-gtk3
  1166. perl-http-message
  1167. perl-json
  1168. perl-json-xs
  1169. perl-libwww
  1170. perl-lwp-protocol-https
  1171. perl-lwp-useragent-cached
  1172. perl-memoize
  1173. perl-mime-base64
  1174. perl-pathtools
  1175. perl-scalar-list-utils
  1176. perl-storable
  1177. perl-term-ansicolor
  1178. perl-term-readline-gnu
  1179. perl-text-parsewords
  1180. perl-text-tabs+wrap
  1181. perl-unicode-linebreak
  1182. perl-uri-escape
  1183. wget
  1184. xdg-utils
  1185. yt-dlp))
  1186. (propagated-inputs
  1187. (list dconf))
  1188. (home-page "https://github.com/trizen/pipe-viewer")
  1189. (synopsis "CLI+GUI YouTube Client")
  1190. (description "Pipe-Viewer is a lightweight application for searching and
  1191. playing videos from YouTube. It parses the YouTube website directly and relies
  1192. on the Invidious instances only as a fallback method.")
  1193. (license license:artistic2.0)))
  1194. (define-public straw-viewer
  1195. (deprecated-package "straw-viewer" pipe-viewer))
  1196. (define-public x265
  1197. (package
  1198. (name "x265")
  1199. (version "3.5")
  1200. (outputs '("out" "static"))
  1201. (source
  1202. (origin
  1203. (method url-fetch)
  1204. (uri (string-append "https://bitbucket.org/multicoreware/x265_git"
  1205. "/downloads/x265_" version ".tar.gz"))
  1206. (sha256
  1207. (base32 "1s6afxj61jdwfjnn70dwiql34fbqsvn6zv10785vmjyar8sk62p7"))
  1208. (patches (search-patches "x265-arm-flags.patch"))
  1209. (modules '((guix build utils)))
  1210. (snippet '(begin
  1211. (delete-file-recursively "source/compat/getopt")))))
  1212. (build-system cmake-build-system)
  1213. (native-inputs
  1214. ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
  1215. (if (string-prefix? "i686" (%current-system))
  1216. '()
  1217. `(("nasm" ,nasm))))
  1218. (arguments
  1219. `(#:tests? #f ; tests are skipped if ENABLE_ASSEMBLY is TRUE.
  1220. #:configure-flags
  1221. ;; Ensure position independent code for everyone.
  1222. (list "-DENABLE_PIC=TRUE"
  1223. (string-append "-DCMAKE_INSTALL_PREFIX="
  1224. (assoc-ref %outputs "out")))
  1225. #:phases
  1226. (modify-phases %standard-phases
  1227. (add-after 'unpack 'prepare-build
  1228. (lambda _
  1229. (delete-file-recursively "build")
  1230. (chdir "source")
  1231. ;; We're not building from a git or mercurial repository,
  1232. ;; so help cmake find the version number.
  1233. (substitute* "cmake/Version.cmake"
  1234. (("if\\(X265_TAG_DISTANCE STREQUAL \"0\"\\)")
  1235. (string-append "if(TRUE)\n"
  1236. " set(X265_LATEST_TAG \"" ,version "\")\n")))))
  1237. (add-before 'configure 'build-12-bit
  1238. (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
  1239. (mkdir "../build-12bit")
  1240. (with-directory-excursion "../build-12bit"
  1241. (apply invoke
  1242. "cmake" "../source"
  1243. ,@(if (target-aarch64?)
  1244. '("-DENABLE_ASSEMBLY=OFF")
  1245. '())
  1246. ;; Altivec code produces many build errors.
  1247. ,@(if (target-ppc64le?)
  1248. '("-DENABLE_ALTIVEC=OFF")
  1249. '())
  1250. "-DHIGH_BIT_DEPTH=ON"
  1251. "-DEXPORT_C_API=OFF"
  1252. "-DENABLE_CLI=OFF"
  1253. "-DMAIN12=ON"
  1254. configure-flags)
  1255. (substitute* (cons "cmake_install.cmake"
  1256. (append
  1257. (find-files "CMakeFiles/x265-shared.dir")
  1258. (find-files "CMakeFiles/x265-static.dir")))
  1259. (("libx265") "libx265_main12"))
  1260. ((assoc-ref %standard-phases 'build)))))
  1261. (add-before 'configure 'build-10-bit
  1262. (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
  1263. (mkdir "../build-10bit")
  1264. (with-directory-excursion "../build-10bit"
  1265. (apply invoke
  1266. "cmake" "../source"
  1267. ,@(if (target-aarch64?)
  1268. '("-DENABLE_ASSEMBLY=OFF")
  1269. '())
  1270. ;; Altivec code produces many build errors.
  1271. ,@(if (target-ppc64le?)
  1272. '("-DENABLE_ALTIVEC=OFF")
  1273. '())
  1274. "-DHIGH_BIT_DEPTH=ON"
  1275. "-DEXPORT_C_API=OFF"
  1276. "-DENABLE_CLI=OFF"
  1277. configure-flags)
  1278. (substitute* (cons "cmake_install.cmake"
  1279. (append
  1280. (find-files "CMakeFiles/x265-shared.dir")
  1281. (find-files "CMakeFiles/x265-static.dir")))
  1282. (("libx265") "libx265_main10"))
  1283. ((assoc-ref %standard-phases 'build)))))
  1284. (add-after 'install 'install-more-libs
  1285. (lambda args
  1286. (with-directory-excursion "../build-12bit"
  1287. ((assoc-ref %standard-phases 'install)))
  1288. (with-directory-excursion "../build-10bit"
  1289. ((assoc-ref %standard-phases 'install)))))
  1290. (add-before 'strip 'move-static-libs
  1291. (lambda* (#:key outputs #:allow-other-keys)
  1292. (let ((out (assoc-ref outputs "out"))
  1293. (static (assoc-ref outputs "static")))
  1294. (mkdir-p (string-append static "/lib"))
  1295. (with-directory-excursion
  1296. (string-append out "/lib")
  1297. (for-each
  1298. (lambda (file)
  1299. (rename-file file
  1300. (string-append static "/lib/" file)))
  1301. (find-files "." "\\.a$")))))))))
  1302. (home-page "https://x265.org/")
  1303. (synopsis "Library for encoding h.265/HEVC video streams")
  1304. (description "x265 is a H.265 / HEVC video encoder application library,
  1305. designed to encode video or images into an H.265 / HEVC encoded bitstream.")
  1306. (license license:gpl2+)))
  1307. (define-public libass
  1308. (package
  1309. (name "libass")
  1310. (version "0.15.1")
  1311. (source (origin
  1312. (method url-fetch)
  1313. (uri (string-append
  1314. "https://github.com/libass/libass/releases/download/"
  1315. version "/libass-" version ".tar.xz"))
  1316. (sha256
  1317. (base32
  1318. "0lwfmdizzrr4gcq3fgw4j8g9pkrqgx6h0f3pgrrnxc07s34kkp8w"))))
  1319. (build-system gnu-build-system)
  1320. (arguments
  1321. '(#:configure-flags '("--disable-static")))
  1322. (native-inputs
  1323. (list pkg-config nasm))
  1324. (propagated-inputs
  1325. `(("freetype" ,freetype)
  1326. ("fribidi" ,fribidi)
  1327. ("fontconfig" ,fontconfig)
  1328. ("harfbuzz" ,harfbuzz)))
  1329. (home-page "https://github.com/libass/libass")
  1330. (synopsis "Subtitle rendering library for the ASS/SSA format")
  1331. (description "libass is a subtitle rendering library for the
  1332. ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
  1333. (license license:isc)))
  1334. (define-public libcaca
  1335. (package
  1336. (name "libcaca")
  1337. (version "0.99.beta19")
  1338. (source (origin
  1339. (method url-fetch)
  1340. (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
  1341. version ".tar.gz"))
  1342. (sha256
  1343. (base32
  1344. "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))
  1345. (patches (search-patches "libcaca-CVE-2021-3410-pt1.patch"
  1346. "libcaca-CVE-2021-3410-pt2.patch"))))
  1347. (build-system gnu-build-system)
  1348. (arguments
  1349. '(#:configure-flags '("--disable-static")))
  1350. (native-inputs (list pkg-config))
  1351. (inputs
  1352. (list freeglut
  1353. ftgl
  1354. imlib2
  1355. libx11
  1356. mesa
  1357. ncurses
  1358. zlib))
  1359. (home-page "http://caca.zoy.org/wiki/libcaca")
  1360. (synopsis "Colour ASCII-art library")
  1361. (description "libcaca is a graphics library that outputs text instead of
  1362. pixels, so that it can work on older video cards or text terminals. It
  1363. supports Unicode, 2048 colors, dithering of color images, and advanced text
  1364. canvas operations.")
  1365. (license license:wtfpl2)))
  1366. (define-public libdca
  1367. (package
  1368. (name "libdca")
  1369. (version "0.0.7")
  1370. (source (origin
  1371. (method url-fetch)
  1372. (uri (string-append
  1373. "https://download.videolan.org/pub/videolan/libdca/"
  1374. version "/libdca-" version ".tar.bz2"))
  1375. (sha256
  1376. (base32
  1377. "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
  1378. (build-system gnu-build-system)
  1379. (native-inputs
  1380. (list autoconf automake libtool))
  1381. (home-page "https://www.videolan.org/developers/libdca.html")
  1382. (synopsis "DTS Coherent Acoustics decoder")
  1383. (description "libdca is a library for decoding DTS Coherent Acoustics
  1384. streams.")
  1385. (license license:gpl2+)))
  1386. (define-public libdv
  1387. (package
  1388. (name "libdv")
  1389. (version "1.0.0")
  1390. (source (origin
  1391. (method url-fetch)
  1392. (uri (string-append
  1393. "mirror://sourceforge/libdv/libdv/"
  1394. version "/libdv-" version ".tar.gz"))
  1395. (sha256
  1396. (base32
  1397. "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
  1398. (build-system gnu-build-system)
  1399. (native-inputs (list pkg-config))
  1400. (inputs (list libxv))
  1401. (home-page "https://libdv.sourceforge.net/")
  1402. (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
  1403. (description "The Quasar DV codec (libdv) is a software codec for DV
  1404. video, the encoding format used by most digital camcorders, typically those
  1405. that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
  1406. developed according to the official standards for DV video: IEC 61834 and
  1407. SMPTE 314M.")
  1408. (license license:lgpl2.1+)))
  1409. (define-public libmatroska
  1410. (package
  1411. (name "libmatroska")
  1412. (version "1.6.3")
  1413. (source
  1414. (origin
  1415. (method url-fetch)
  1416. (uri (string-append "https://dl.matroska.org/downloads/"
  1417. "libmatroska/libmatroska-" version ".tar.xz"))
  1418. (sha256
  1419. (base32 "06h81sxyz2riic0gpzik6ffcnq32wrqphi8c6k55glcdymiimyfs"))))
  1420. (build-system cmake-build-system)
  1421. (inputs
  1422. (list libebml))
  1423. (arguments
  1424. `(#:configure-flags
  1425. (list "-DBUILD_SHARED_LIBS=YES")
  1426. #:tests? #f)) ; no test suite
  1427. (home-page "https://www.matroska.org")
  1428. (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
  1429. (description
  1430. "Matroska aims to become the standard of multimedia container formats.
  1431. It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
  1432. of XML. EBML enables the Matroska Development Team to gain significant
  1433. advantages in terms of future format extensibility, without breaking file
  1434. support in old parsers.
  1435. libebml is a C++ library to read and write EBML files.")
  1436. (license license:lgpl2.1)))
  1437. (define-public libplacebo
  1438. (package
  1439. (name "libplacebo")
  1440. (version "4.208.0")
  1441. (source
  1442. (origin
  1443. (method git-fetch)
  1444. (uri (git-reference
  1445. (url "https://code.videolan.org/videolan/libplacebo.git")
  1446. (commit (string-append "v" version))))
  1447. (file-name (git-file-name name version))
  1448. (sha256
  1449. (base32 "161dp5781s74ca3gglaxlmchx7glyshf0wg43w98pl22n1jcm5qk"))))
  1450. (build-system meson-build-system)
  1451. (arguments
  1452. `(#:configure-flags
  1453. `("-Dopengl=enabled"
  1454. ,(string-append "-Dvulkan-registry="
  1455. (assoc-ref %build-inputs "vulkan-headers")
  1456. "/share/vulkan/registry/vk.xml"))))
  1457. (native-inputs
  1458. (list python python-mako pkg-config))
  1459. (inputs
  1460. (list lcms
  1461. libepoxy
  1462. mesa
  1463. shaderc
  1464. vulkan-headers
  1465. vulkan-loader))
  1466. (home-page "https://code.videolan.org/videolan/libplacebo")
  1467. (synopsis "GPU-accelerated image/video processing library")
  1468. (description "libplacebo is, in a nutshell, the core rendering algorithms
  1469. and ideas of mpv rewritten as an independent library. As of today, libplacebo
  1470. contains a large assortment of video processing shaders, focusing on both
  1471. quality and performance.")
  1472. (license license:lgpl2.1+)))
  1473. (define-public libva
  1474. (package
  1475. (name "libva")
  1476. (version "2.18.0")
  1477. (source
  1478. (origin
  1479. (method url-fetch)
  1480. (uri (string-append "https://github.com/intel/libva/releases/download/"
  1481. version "/libva-" version ".tar.bz2"))
  1482. (sha256
  1483. (base32 "10j9rm6ajgp3fda7pwl058lchdip0wq20bvydil28ff2l3mpwmx3"))))
  1484. (build-system gnu-build-system)
  1485. (native-inputs
  1486. (list config pkg-config))
  1487. (inputs
  1488. (list libdrm
  1489. libx11
  1490. libxext
  1491. libxfixes
  1492. mesa
  1493. wayland))
  1494. (arguments
  1495. (list
  1496. ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
  1497. ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
  1498. #:configure-flags
  1499. #~(list (string-append "--with-drivers-path="
  1500. (search-input-directory %build-inputs "lib/dri")))
  1501. ;; However, we can't write to mesa's store directory, so override the
  1502. ;; following make variable to install the dummy driver to libva's
  1503. ;; $prefix/lib/dri directory.
  1504. #:make-flags
  1505. #~(list (string-append "dummy_drv_video_ladir=" #$output "/lib/dri"))
  1506. #:phases
  1507. #~(modify-phases %standard-phases
  1508. (add-after 'unpack 'update-config-scripts
  1509. (lambda* (#:key native-inputs inputs #:allow-other-keys)
  1510. (for-each (lambda (file)
  1511. (install-file
  1512. (search-input-file
  1513. (or native-inputs inputs)
  1514. (string-append "/bin/" file)) "."))
  1515. '("config.guess" "config.sub"))))
  1516. (add-before 'build 'fix-dlopen-paths
  1517. (lambda _
  1518. (substitute* "va/drm/va_drm_auth_x11.c"
  1519. (("\"libva-x11\\.so\\.%d\"")
  1520. (string-append "\"" #$output "/lib/libva-x11.so.%d\""))))))))
  1521. (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
  1522. (synopsis "Video acceleration library")
  1523. (description "The main motivation for VA-API (Video Acceleration API) is
  1524. to enable hardware accelerated video decode/encode at various
  1525. entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
  1526. standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
  1527. (license license:expat)))
  1528. (define-public libva-utils
  1529. (package
  1530. (name "libva-utils")
  1531. (version "2.18.1")
  1532. (source
  1533. (origin
  1534. (method url-fetch)
  1535. (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
  1536. version "/libva-utils-" version ".tar.bz2"))
  1537. (sha256
  1538. (base32 "06n123kvzk51bx5cbhf34i3cfxc8vxmksgh5azycz9fwwcz3n7rm"))))
  1539. (build-system gnu-build-system)
  1540. (arguments
  1541. `(#:configure-flags
  1542. (list "--enable-wayland"
  1543. "--enable-x11")))
  1544. (native-inputs
  1545. (list pkg-config))
  1546. (inputs
  1547. (list libdrm libva libx11 mesa wayland))
  1548. (home-page "https://github.com/intel/libva-utils")
  1549. (synopsis "Collection of testing utilities for VA-API")
  1550. (description
  1551. "This is a collection of utilities to query and test the @acronym{VA-API,
  1552. Video Acceleration API} implemented by the libva library.
  1553. These tools require a supported graphics chip, driver, and VA-API back end to
  1554. operate properly.")
  1555. (license license:expat)))
  1556. (define-public ffmpeg
  1557. (package
  1558. (name "ffmpeg")
  1559. (version "6.0")
  1560. (source (origin
  1561. (method url-fetch)
  1562. (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
  1563. version ".tar.xz"))
  1564. (sha256
  1565. (base32
  1566. "10kh2f4y4isfqj4xpcqqnzk611jh89ywcjyjnq9c2jcv5p18ggjp"))))
  1567. (outputs '("out" "debug"))
  1568. (build-system gnu-build-system)
  1569. (inputs
  1570. (append
  1571. ;; XXX: rav1e depends on rust, which currently only works on x86_64.
  1572. ;; See also the related configure flag when changing this.
  1573. (if (target-x86-64?) (list rav1e) '())
  1574. (list dav1d
  1575. fontconfig
  1576. freetype
  1577. frei0r-plugins
  1578. gnutls
  1579. opus
  1580. ladspa
  1581. lame
  1582. libaom
  1583. libass
  1584. libbluray
  1585. libcaca
  1586. libcdio-paranoia
  1587. libdrm
  1588. libtheora
  1589. libva
  1590. libvdpau
  1591. libvorbis
  1592. libvpx
  1593. libwebp
  1594. libx11
  1595. libx264
  1596. mesa
  1597. openal
  1598. pulseaudio
  1599. sdl2
  1600. soxr
  1601. speex
  1602. srt
  1603. twolame
  1604. vidstab
  1605. x265
  1606. xvid
  1607. zlib)))
  1608. (native-inputs
  1609. (list bc
  1610. perl
  1611. pkg-config
  1612. texinfo
  1613. speex
  1614. yasm))
  1615. (arguments
  1616. (list
  1617. #:test-target "fate"
  1618. #:configure-flags
  1619. ;; possible additional inputs:
  1620. ;; --enable-avisynth enable reading of AviSynth script
  1621. ;; files [no]
  1622. ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
  1623. ;; --enable-libcelt enable CELT decoding via libcelt [no]
  1624. ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
  1625. ;; and libraw1394 [no]
  1626. ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
  1627. ;; --enable-libflite enable flite (voice synthesis) support via
  1628. ;; libflite [no]
  1629. ;; --enable-libgme enable Game Music Emu via libgme [no]
  1630. ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
  1631. ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
  1632. ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
  1633. ;; --enable-libmodplug enable ModPlug via libmodplug [no]
  1634. ;; --enable-libnut enable NUT (de)muxing via libnut,
  1635. ;; native (de)muxer exists [no]
  1636. ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
  1637. ;; libopencore-amrnb [no]
  1638. ;; --enable-libopencore-amrwb enable AMR-WB decoding via
  1639. ;; libopencore-amrwb [no]
  1640. ;; --enable-libopencv enable video filtering via libopencv [no]
  1641. ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
  1642. ;; OpenJPEG [no]
  1643. ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
  1644. ;; --enable-libschroedinger enable Dirac de/encoding via
  1645. ;; libschroedinger [no]
  1646. ;; --enable-libshine enable fixed-point MP3 encoding via
  1647. ;; libshine [no]
  1648. ;; --enable-libssh enable SFTP protocol via libssh [no]
  1649. ;; (libssh2 does not work)
  1650. ;; --enable-libstagefright-h264 enable H.264 decoding via
  1651. ;; libstagefright [no]
  1652. ;; --enable-libutvideo enable Ut Video encoding and decoding via
  1653. ;; libutvideo [no]
  1654. ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
  1655. ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
  1656. ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
  1657. ;; libvo-amrwbenc [no]
  1658. ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
  1659. ;; --enable-libxavs enable AVS encoding via xavs [no]
  1660. ;; --enable-libzmq enable message passing via libzmq [no]
  1661. ;; --enable-libzvbi enable teletext support via libzvbi [no]
  1662. ;; --enable-opencl enable OpenCL code
  1663. #~(list
  1664. "--enable-gpl" ;enable optional gpl licensed parts
  1665. "--enable-shared"
  1666. "--enable-frei0r"
  1667. "--enable-fontconfig"
  1668. "--enable-gnutls"
  1669. "--enable-ladspa"
  1670. "--enable-libaom"
  1671. "--enable-libass"
  1672. "--enable-libbluray"
  1673. "--enable-libcaca"
  1674. "--enable-libcdio"
  1675. "--enable-libdav1d"
  1676. "--enable-libfreetype"
  1677. "--enable-libmp3lame"
  1678. "--enable-libopus"
  1679. "--enable-libpulse"
  1680. #$@(if (target-x86-64?)
  1681. '("--enable-librav1e")
  1682. '())
  1683. "--enable-libsoxr"
  1684. "--enable-libspeex"
  1685. "--enable-libsrt"
  1686. "--enable-libtheora"
  1687. "--enable-libtwolame"
  1688. "--enable-libvidstab"
  1689. "--enable-libvorbis"
  1690. "--enable-libvpx"
  1691. "--enable-libwebp"
  1692. "--enable-libxvid"
  1693. "--enable-libx264"
  1694. "--enable-libx265"
  1695. "--enable-openal"
  1696. "--enable-opengl"
  1697. "--enable-libdrm"
  1698. "--enable-vaapi"
  1699. "--enable-runtime-cpudetect"
  1700. ;; The HTML pages take 7.2 MiB
  1701. "--disable-htmlpages"
  1702. ;; The static libraries are 23 MiB
  1703. "--disable-static"
  1704. "--disable-stripping"
  1705. #$@(if (target-riscv64?)
  1706. '("--extra-cflags=-fPIC")
  1707. '())
  1708. ;; Runtime cpu detection is not implemented on
  1709. ;; MIPS, so we disable some features.
  1710. "--disable-mips32r2"
  1711. "--disable-mipsdsp"
  1712. "--disable-mipsdspr2"
  1713. "--disable-mipsfpu")
  1714. #:phases
  1715. #~(modify-phases %standard-phases
  1716. (replace 'configure
  1717. ;; configure does not work followed by "SHELL=..." and
  1718. ;; "CONFIG_SHELL=..."; set environment variables instead
  1719. (lambda* (#:key outputs configure-flags #:allow-other-keys)
  1720. (let ((out (assoc-ref outputs "out")))
  1721. (substitute* "configure"
  1722. (("#! /bin/sh") (string-append "#!" (which "sh"))))
  1723. (setenv "SHELL" (which "bash"))
  1724. (setenv "CONFIG_SHELL" (which "bash"))
  1725. (apply invoke
  1726. "./configure"
  1727. (string-append "--prefix=" out)
  1728. ;; Add $libdir to the RUNPATH of all the binaries.
  1729. (string-append "--extra-ldflags=-Wl,-rpath="
  1730. out "/lib")
  1731. configure-flags))))
  1732. (add-before 'check 'set-ld-library-path
  1733. (lambda _
  1734. ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
  1735. ;; running tests.
  1736. (let* ((dso (find-files "." "\\.so$"))
  1737. (path (string-join (map dirname dso) ":")))
  1738. (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
  1739. (setenv "LD_LIBRARY_PATH" path)))))))
  1740. (home-page "https://www.ffmpeg.org/")
  1741. (synopsis "Audio and video framework")
  1742. (description "FFmpeg is a complete, cross-platform solution to record,
  1743. convert and stream audio and video. It includes the libavcodec
  1744. audio/video codec library.")
  1745. (license license:gpl2+)))
  1746. (define-public ffmpeg-5
  1747. (package
  1748. (inherit ffmpeg)
  1749. (version "5.1.3")
  1750. (source (origin
  1751. (method url-fetch)
  1752. (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
  1753. version ".tar.xz"))
  1754. (sha256
  1755. (base32
  1756. "0biil32xnshg1b4lwzbdc5rxv1g7lpfsr5gdgaz96wlhzy9ka48v"))))))
  1757. (define-public ffmpeg-4
  1758. (package
  1759. (inherit ffmpeg-5)
  1760. (version "4.4.2")
  1761. (source (origin
  1762. (method url-fetch)
  1763. (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
  1764. version ".tar.xz"))
  1765. (sha256
  1766. (base32
  1767. "14xadxm1yaamp216nq09xwasxg5g133v86dbb33mdg5di1zrlhdg"))))
  1768. (inputs (modify-inputs (package-inputs ffmpeg)
  1769. (replace "sdl2" sdl2-2.0)))
  1770. (arguments
  1771. (substitute-keyword-arguments (package-arguments ffmpeg)
  1772. ((#:configure-flags flags ''())
  1773. #~(cons "--enable-avresample" #$flags))))))
  1774. (define-public ffmpeg-3.4
  1775. (package
  1776. (inherit ffmpeg-4)
  1777. (version "3.4.11")
  1778. (source (origin
  1779. (method url-fetch)
  1780. (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
  1781. version ".tar.xz"))
  1782. (sha256
  1783. (base32
  1784. "1rijdvcx8xjqwh084qchwz91vcj8wsvb4diax0g8miywpir00ccw"))))
  1785. (arguments
  1786. (substitute-keyword-arguments (package-arguments ffmpeg-4)
  1787. ((#:modules modules %gnu-build-system-modules)
  1788. `((srfi srfi-1)
  1789. ,@modules))
  1790. ((#:configure-flags flags)
  1791. #~(fold delete #$flags
  1792. '("--enable-libdav1d"
  1793. "--enable-libaom"
  1794. "--enable-librav1e"
  1795. "--enable-libsrt")))))
  1796. (inputs (modify-inputs (package-inputs ffmpeg-4)
  1797. (delete "dav1d" "libaom" "rav1e" "srt")))))
  1798. (define-public ffmpeg-2.8
  1799. (package
  1800. (inherit ffmpeg-3.4)
  1801. (version "2.8.20")
  1802. (source (origin
  1803. (method url-fetch)
  1804. (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
  1805. version ".tar.xz"))
  1806. (sha256
  1807. (base32
  1808. "1ivnfqmfnp3zmn1q2dxy4p85427y3r6d3jbnl5kprr7lqckf6rl5"))))
  1809. (arguments
  1810. `(#:tests? #f ; XXX: Enable them later, if required
  1811. #:configure-flags
  1812. (list
  1813. "--disable-static"
  1814. "--enable-shared"
  1815. "--extra-cflags=-DFF_API_OLD_ENCODE_VIDEO -DFF_API_OLD_ENCODE_AUDIO")
  1816. #:phases
  1817. (modify-phases %standard-phases
  1818. (replace 'configure
  1819. (lambda* (#:key outputs configure-flags #:allow-other-keys)
  1820. (let ((out (assoc-ref outputs "out")))
  1821. (substitute* "configure"
  1822. (("#! /bin/sh") (string-append "#!" (which "sh"))))
  1823. ;; configure does not work followed by "SHELL=..." and
  1824. ;; "CONFIG_SHELL=..."; set environment variables instead.
  1825. (setenv "SHELL" (which "bash"))
  1826. (setenv "CONFIG_SHELL" (which "bash"))
  1827. (apply invoke
  1828. "./configure"
  1829. (string-append "--prefix=" out)
  1830. ;; Add $libdir to the RUNPATH of all the binaries.
  1831. (string-append "--extra-ldflags=-Wl,-rpath="
  1832. out "/lib")
  1833. configure-flags))))
  1834. (add-before
  1835. 'check 'set-ld-library-path
  1836. (lambda _
  1837. ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
  1838. ;; running tests.
  1839. (let* ((dso (find-files "." "\\.so$"))
  1840. (path (string-join (map dirname dso) ":")))
  1841. (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
  1842. (setenv "LD_LIBRARY_PATH" path)))))))
  1843. ;; FFmpeg 2.8 does support libwebp, but we don't enable it while configuring
  1844. ;; the build, and we'd rather not add features to this old package anymore.
  1845. (inputs (modify-inputs (package-inputs ffmpeg-3.4)
  1846. (delete "libwebp")))))
  1847. (define-public ffmpeg-for-stepmania
  1848. (hidden-package
  1849. (package
  1850. (inherit ffmpeg-4)
  1851. (version "2.1.3")
  1852. (source
  1853. (origin
  1854. (method git-fetch)
  1855. (uri (git-reference
  1856. (url "https://github.com/stepmania/ffmpeg")
  1857. (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
  1858. (sha256
  1859. (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
  1860. (file-name (git-file-name "ffmpeg" version))))
  1861. (arguments
  1862. (substitute-keyword-arguments (package-arguments ffmpeg-4)
  1863. ((#:configure-flags flags)
  1864. #~(list "--disable-programs"
  1865. "--disable-doc"
  1866. "--disable-debug"
  1867. "--disable-avdevice"
  1868. "--disable-swresample"
  1869. "--disable-postproc"
  1870. "--disable-avfilter"
  1871. "--disable-shared"
  1872. "--enable-static"))))
  1873. (inputs '()))))
  1874. (define-public ffmpegthumbnailer
  1875. (package
  1876. (name "ffmpegthumbnailer")
  1877. (version "2.2.2")
  1878. (source (origin
  1879. (method git-fetch)
  1880. (uri (git-reference
  1881. (url "https://github.com/dirkvdb/ffmpegthumbnailer")
  1882. (commit version)))
  1883. (file-name (git-file-name name version))
  1884. (sha256
  1885. (base32
  1886. "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
  1887. (build-system cmake-build-system)
  1888. (native-inputs
  1889. (list pkg-config))
  1890. (inputs
  1891. (list ffmpeg-4 libjpeg-turbo libpng gvfs))
  1892. (arguments
  1893. `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
  1894. (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
  1895. (synopsis "Create thumbnails from video files")
  1896. (description "FFmpegthumbnailer is a lightweight video thumbnailer that
  1897. can be used by file managers to create thumbnails for your video files. The
  1898. thumbnailer uses ffmpeg to decode frames from the video files, so supported
  1899. videoformats depend on the configuration flags of ffmpeg.")
  1900. (license license:gpl2+)))
  1901. (define-public vlc
  1902. (package
  1903. (name "vlc")
  1904. (version "3.0.18")
  1905. (source (origin
  1906. (method url-fetch)
  1907. (uri (string-append
  1908. "https://download.videolan.org/pub/videolan/vlc/"
  1909. (car (string-split version #\-))
  1910. "/vlc-" version ".tar.xz"))
  1911. (sha256
  1912. (base32
  1913. "1v7db9icrb12yz7banq2wvpjpvqfrj031yj1kf5smn35qcwl82ap"))))
  1914. (build-system gnu-build-system)
  1915. (native-inputs
  1916. (list flex bison gettext-minimal pkg-config))
  1917. ;; FIXME: Add optional inputs once available.
  1918. (inputs
  1919. (list alsa-lib
  1920. avahi
  1921. bash-minimal
  1922. dav1d
  1923. dbus
  1924. eudev
  1925. ffmpeg
  1926. flac
  1927. fontconfig
  1928. freetype
  1929. fribidi
  1930. gnutls
  1931. liba52
  1932. libarchive
  1933. libass
  1934. libavc1394
  1935. libbluray
  1936. libcaca
  1937. libcddb
  1938. libdca
  1939. libdvbpsi
  1940. libdvdnav
  1941. libdvdread
  1942. libebml
  1943. libgcrypt
  1944. libidn
  1945. libkate
  1946. libmad
  1947. libmatroska
  1948. libmicrodns
  1949. libmodplug
  1950. libmpeg2
  1951. libogg
  1952. libpng
  1953. libraw1394
  1954. (librsvg-for-system)
  1955. libsamplerate
  1956. libsecret
  1957. libssh2
  1958. libtheora
  1959. libupnp
  1960. libva
  1961. libvdpau
  1962. libvorbis
  1963. libvpx
  1964. libx264
  1965. libxext
  1966. libxi
  1967. libxinerama
  1968. libxml2
  1969. libxpm
  1970. livemedia-utils
  1971. lua-5.2
  1972. mesa
  1973. opus
  1974. perl
  1975. protobuf
  1976. pulseaudio
  1977. python-wrapper
  1978. qtbase-5
  1979. qtsvg-5
  1980. qtx11extras
  1981. samba
  1982. sdl
  1983. sdl-image
  1984. speex
  1985. speexdsp
  1986. srt
  1987. taglib
  1988. twolame
  1989. unzip
  1990. wayland
  1991. wayland-protocols
  1992. x265
  1993. xcb-util-keysyms))
  1994. (arguments
  1995. `(#:configure-flags
  1996. `("BUILDCC=gcc"
  1997. ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
  1998. (assoc-ref %build-inputs "ffmpeg")
  1999. "/lib")) ;needed for the tests
  2000. #:phases
  2001. (modify-phases %standard-phases
  2002. (add-after 'unpack 'patch-source
  2003. (lambda* (#:key inputs #:allow-other-keys)
  2004. (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
  2005. (substitute* "configure"
  2006. (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
  2007. (string-append "LIVE555_PREFIX=" livemedia-utils)))
  2008. ;; Some of the tests require using the display to test out VLC,
  2009. ;; which fails in our sandboxed build system
  2010. (substitute* "test/run_vlc.sh"
  2011. (("./vlc --ignore-config") "echo"))
  2012. #t)))
  2013. (add-after 'strip 'regenerate-plugin-cache
  2014. (lambda* (#:key outputs #:allow-other-keys)
  2015. ;; The 'install-exec-hook' rule in the top-level Makefile.am
  2016. ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
  2017. ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
  2018. ;; it references. Thus, we first reset the timestamps of all
  2019. ;; these files, and then regenerate the cache such that the
  2020. ;; mtimes it includes are always zero instead of being dependent
  2021. ;; on the build time.
  2022. (let* ((out (assoc-ref outputs "out"))
  2023. (pkglibdir (string-append out "/lib/vlc"))
  2024. (plugindir (string-append pkglibdir "/plugins"))
  2025. (cachegen (string-append pkglibdir "/vlc-cache-gen")))
  2026. ;; TODO: Factorize 'reset-timestamps'.
  2027. (for-each (lambda (file)
  2028. (let ((s (lstat file)))
  2029. (unless (eq? (stat:type s) 'symlink)
  2030. (utime file 1 1))))
  2031. (find-files plugindir))
  2032. (invoke cachegen plugindir))))
  2033. (add-after 'install 'wrap-executable
  2034. (lambda* (#:key outputs #:allow-other-keys)
  2035. (let ((out (assoc-ref outputs "out"))
  2036. (plugin-path (getenv "QT_PLUGIN_PATH")))
  2037. (wrap-program (string-append out "/bin/vlc")
  2038. `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
  2039. #t)))))
  2040. (home-page "https://www.videolan.org/")
  2041. (synopsis "Audio and video framework")
  2042. (description "VLC is a cross-platform multimedia player and framework
  2043. that plays most multimedia files as well as DVD, Audio CD, VCD, and various
  2044. streaming protocols.")
  2045. (properties
  2046. '((release-monitoring-url . "https://download.videolan.org/pub/videolan/vlc/last")))
  2047. (license license:gpl2+)))
  2048. (define-public mplayer
  2049. (package
  2050. (name "mplayer")
  2051. (version "1.4")
  2052. (source (origin
  2053. (method url-fetch)
  2054. (uri (string-append
  2055. "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
  2056. version ".tar.xz"))
  2057. (sha256
  2058. (base32
  2059. "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
  2060. (build-system gnu-build-system)
  2061. ;; FIXME: Add additional inputs once available.
  2062. (native-inputs
  2063. (list pkg-config yasm))
  2064. (inputs
  2065. `(("alsa-lib" ,alsa-lib)
  2066. ("cdparanoia" ,cdparanoia)
  2067. ("ffmpeg" ,ffmpeg-4)
  2068. ("fontconfig" ,fontconfig)
  2069. ("freetype" ,freetype)
  2070. ("giflib" ,giflib)
  2071. ("lame" ,lame)
  2072. ("libass" ,libass)
  2073. ("libdvdcss" ,libdvdcss)
  2074. ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
  2075. ("libdvdread" ,libdvdread) ; ignored without libdvdnav
  2076. ("libjpeg" ,libjpeg-turbo)
  2077. ("libmpeg2" ,libmpeg2)
  2078. ("libmpg123" ,mpg123) ; audio codec for MP3
  2079. ("libpng" ,libpng)
  2080. ("libtheora" ,libtheora)
  2081. ("libvdpau" ,libvdpau)
  2082. ("libvorbis" ,libvorbis)
  2083. ("libx11" ,libx11)
  2084. ("libx264" ,libx264)
  2085. ("libxinerama" ,libxinerama)
  2086. ("libxv" ,libxv)
  2087. ("libxxf86dga" ,libxxf86dga)
  2088. ("mesa" ,mesa)
  2089. ("opus" ,opus)
  2090. ("perl" ,perl)
  2091. ("pulseaudio" ,pulseaudio)
  2092. ("python" ,python-wrapper)
  2093. ("sdl" ,sdl)
  2094. ("speex" ,speex)
  2095. ("zlib" ,zlib)))
  2096. (arguments
  2097. `(#:tests? #f ; no test target
  2098. #:phases
  2099. (modify-phases %standard-phases
  2100. (replace 'configure
  2101. ;; configure does not work followed by "SHELL=..." and
  2102. ;; "CONFIG_SHELL=..."; set environment variables instead
  2103. (lambda* (#:key inputs outputs #:allow-other-keys)
  2104. (let ((out (assoc-ref outputs "out"))
  2105. (libx11 (assoc-ref inputs "libx11")))
  2106. (substitute* "configure"
  2107. (("#! /bin/sh") (string-append "#!" (which "sh"))))
  2108. (setenv "SHELL" (which "bash"))
  2109. (setenv "CONFIG_SHELL" (which "bash"))
  2110. (invoke "./configure"
  2111. (string-append "--extra-cflags=-I"
  2112. libx11 "/include") ; to detect libx11
  2113. "--disable-ffmpeg_a" ; disables bundled ffmpeg
  2114. (string-append "--prefix=" out)
  2115. ;; Enable runtime cpu detection where supported,
  2116. ;; and choose a suitable target.
  2117. ,@(match (or (%current-target-system)
  2118. (%current-system))
  2119. ("x86_64-linux"
  2120. '("--enable-runtime-cpudetection"
  2121. "--target=x86_64-linux"))
  2122. ("i686-linux"
  2123. '("--enable-runtime-cpudetection"
  2124. "--target=i686-linux"))
  2125. ("mips64el-linux"
  2126. '("--target=mips3-linux"))
  2127. (_ (list (string-append
  2128. "--target="
  2129. (or (%current-target-system)
  2130. (nix-system->gnu-triplet
  2131. (%current-system)))))))
  2132. "--disable-iwmmxt")))))))
  2133. (home-page "https://www.mplayerhq.hu")
  2134. (synopsis "Audio and video player")
  2135. (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
  2136. Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
  2137. NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
  2138. SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
  2139. (license license:gpl2)))
  2140. (define-public mpv
  2141. (package
  2142. (name "mpv")
  2143. (version "0.35.1")
  2144. (source (origin
  2145. (method git-fetch)
  2146. (uri (git-reference
  2147. (url "https://github.com/mpv-player/mpv")
  2148. (commit (string-append "v" version))))
  2149. (file-name (git-file-name name version))
  2150. (sha256
  2151. (base32 "1lzaijqddr4ir9nb27cv9ki20b0k5jns2k47v4xvmi30v1gi71ha"))))
  2152. (build-system waf-build-system)
  2153. (arguments
  2154. (list
  2155. #:phases
  2156. #~(modify-phases %standard-phases
  2157. (add-after 'unpack 'patch-file-names
  2158. (lambda* (#:key inputs #:allow-other-keys)
  2159. (substitute* "player/lua/ytdl_hook.lua"
  2160. (("\"yt-dlp\",")
  2161. (string-append
  2162. "\"" (search-input-file inputs "bin/yt-dlp") "\",")))))
  2163. (add-before 'configure 'build-reproducibly
  2164. (lambda _
  2165. ;; Somewhere in the build system library dependencies are enumerated
  2166. ;; and passed as linker flags, but the order in which they are added
  2167. ;; varies. See <https://github.com/mpv-player/mpv/issues/7855>.
  2168. ;; Set PYTHONHASHSEED as a workaround for deterministic results.
  2169. (setenv "PYTHONHASHSEED" "1")))
  2170. (add-before 'configure 'set-up-waf
  2171. (lambda* (#:key inputs #:allow-other-keys)
  2172. (copy-file (search-input-file inputs "bin/waf") "waf")
  2173. (setenv "CC" #$(cc-for-target)))))
  2174. #:configure-flags
  2175. #~(list "--enable-libmpv-shared"
  2176. "--enable-cdda"
  2177. "--enable-dvdnav"
  2178. "--disable-build-date")
  2179. ;; No check function defined.
  2180. #:tests? #f))
  2181. (native-inputs
  2182. (list perl ; for zsh completion file
  2183. pkg-config python-docutils))
  2184. ;; Missing features: libguess, V4L2.
  2185. (inputs
  2186. (list alsa-lib
  2187. enca
  2188. ffmpeg
  2189. jack-1
  2190. ladspa
  2191. lcms
  2192. libass
  2193. libbluray
  2194. libcaca
  2195. libbs2b
  2196. libcdio-paranoia
  2197. libdvdread
  2198. libdvdnav
  2199. libjpeg-turbo
  2200. libva
  2201. libvdpau
  2202. libx11
  2203. libxext
  2204. libxkbcommon
  2205. libxinerama
  2206. libxpresent
  2207. libxrandr
  2208. libxscrnsaver
  2209. libxv
  2210. ;; XXX: lua > 5.2 is not currently supported; see
  2211. ;; waftools/checks/custom.py
  2212. lua-5.2
  2213. mesa
  2214. mpg123
  2215. pulseaudio
  2216. python-waf
  2217. rsound
  2218. shaderc
  2219. vulkan-headers
  2220. vulkan-loader
  2221. wayland
  2222. wayland-protocols
  2223. yt-dlp
  2224. zlib))
  2225. (home-page "https://mpv.io/")
  2226. (synopsis "Audio and video player")
  2227. (description "mpv is a general-purpose audio and video player. It is a
  2228. fork of mplayer2 and MPlayer. It shares some features with the former
  2229. projects while introducing many more.")
  2230. (license license:gpl2+)))
  2231. (define-public smplayer
  2232. (package
  2233. (name "smplayer")
  2234. (version "21.10.0")
  2235. (source (origin
  2236. (method url-fetch)
  2237. (uri (string-append
  2238. "mirror://sourceforge/smplayer/SMPlayer/" version
  2239. "/smplayer-" version ".tar.bz2"))
  2240. (sha256
  2241. (base32
  2242. "12nvcl0cfix1xay9hfi7856vg4lpv8y5b0a22212bsjbvl5g22rc"))))
  2243. (build-system qt-build-system)
  2244. (native-inputs
  2245. (list qttools-5))
  2246. (inputs
  2247. (list bash-minimal qtbase-5 zlib mpv))
  2248. (arguments
  2249. (list #:tests? #false ; no tests
  2250. #:make-flags #~(list (string-append "PREFIX=" #$output)
  2251. (string-append "CC=" #+(cc-for-target))
  2252. ;; A KLUDGE to turn off invoking lrelease on the
  2253. ;; project for now, because it fails consistently
  2254. ;; with "WARNING: Could not find qmake spec
  2255. ;; 'default'". See below.
  2256. "LRELEASE=true")
  2257. #:phases
  2258. #~(modify-phases %standard-phases
  2259. (delete 'configure)
  2260. ;; Due to the above, we must run lrelease separately on each .ts file
  2261. ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire
  2262. ;; project, as the Makefile does normally without the above kludge).
  2263. (add-after 'build 'compile-ts-files
  2264. (lambda _
  2265. (for-each (lambda (file)
  2266. (invoke "lrelease" file))
  2267. (find-files "./" "\\.ts$"))))
  2268. (add-after 'install 'wrap-executable
  2269. (lambda* (#:key inputs outputs #:allow-other-keys)
  2270. (let* ((out (assoc-ref outputs "out"))
  2271. (mpv (assoc-ref inputs "mpv")))
  2272. (wrap-program (string-append out "/bin/smplayer")
  2273. `("PATH" ":" prefix
  2274. ,(list (string-append mpv "/bin"))))))))))
  2275. (home-page "https://www.smplayer.info")
  2276. (synopsis "Complete front-end for MPlayer, a media player")
  2277. (description "SMPlayer is a graphical user interface (GUI) for
  2278. MPlayer, which is capable of playing almost all known video and audio
  2279. formats. Apart from providing access for the most common and useful
  2280. options of MPlayer, SMPlayer adds other interesting features like the
  2281. possibility to play Youtube videos, download subtitles, remember
  2282. the last played position, etc.")
  2283. (license license:gpl2+)))
  2284. (define-public gallery-dl
  2285. (package
  2286. (name "gallery-dl")
  2287. (version "1.25.1")
  2288. (source (origin
  2289. (method url-fetch)
  2290. (uri (string-append "https://github.com/mikf/gallery-dl"
  2291. "/releases/download/v" version "/gallery_dl-"
  2292. version ".tar.gz"))
  2293. (sha256
  2294. (base32
  2295. "1zhcd5qnnlmr0qp72rj4bfw0lz4gz1bl65wfn7w21c2xr36nbkxs"))))
  2296. (build-system python-build-system)
  2297. (inputs (list python-requests ffmpeg))
  2298. (home-page "https://github.com/mikf/gallery-dl")
  2299. (synopsis "Command-line program to download images from several sites")
  2300. (description "Gallery-dl is a command-line program that downloads image
  2301. galleries and collections from several image hosting sites. While this package
  2302. can use youtube-dl or yt-dlp packages to download videos, the focus is more on
  2303. images and image hosting sites.")
  2304. (license license:gpl2)))
  2305. (define-public mpv-mpris
  2306. (package
  2307. (name "mpv-mpris")
  2308. (version "1.0")
  2309. (source
  2310. (origin
  2311. (method git-fetch)
  2312. (uri (git-reference
  2313. (url "https://github.com/hoyon/mpv-mpris")
  2314. (commit version)))
  2315. (file-name (git-file-name name version))
  2316. (sha256
  2317. (base32 "1vpx4kzyg4pssn1hql2ci4s9x08sdx2v0kphw4aryywnz04yjhzf"))))
  2318. (build-system copy-build-system)
  2319. (arguments
  2320. '(#:install-plan
  2321. '(("mpris.so" "lib/"))
  2322. #:phases
  2323. (modify-phases %standard-phases
  2324. (add-before 'install 'build
  2325. (lambda _
  2326. (setenv "CC" (which "gcc"))
  2327. (invoke "make"))))))
  2328. (native-inputs
  2329. (list pkg-config))
  2330. (inputs
  2331. (list glib mpv))
  2332. (home-page "https://github.com/hoyon/mpv-mpris")
  2333. (synopsis "MPRIS plugin for mpv")
  2334. (description "This package provides an @dfn{MPRIS} (Media Player Remote
  2335. Interfacing Specification) plugin for the @code{mpv} media player. It implements
  2336. @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
  2337. interfaces.
  2338. To load this plugin, specify the following option when starting mpv:
  2339. @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
  2340. @file{$HOME/.config/mpv/scripts}.")
  2341. (license license:expat)))
  2342. (define-public libvpx
  2343. (package
  2344. (name "libvpx")
  2345. (version "1.12.0")
  2346. (source (origin
  2347. (method git-fetch)
  2348. (uri (git-reference
  2349. (url "https://chromium.googlesource.com/webm/libvpx")
  2350. (commit (string-append "v" version))))
  2351. (file-name (git-file-name name version))
  2352. (sha256
  2353. (base32
  2354. "1x12f2bd4jqd532rnixmwvcx8d29yxiacpcxqqh86qczc49la8gm"))
  2355. (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
  2356. (build-system gnu-build-system)
  2357. (arguments
  2358. `(#:configure-flags (list "--enable-shared"
  2359. "--disable-static"
  2360. "--as=yasm"
  2361. ;; Limit size to avoid CVE-2015-1258
  2362. "--size-limit=16384x16384"
  2363. (string-append "--prefix=" (assoc-ref %outputs "out")))
  2364. #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
  2365. (assoc-ref %outputs "out") "/lib"))
  2366. #:phases (modify-phases %standard-phases
  2367. (replace 'configure
  2368. (lambda* (#:key configure-flags #:allow-other-keys)
  2369. ;; The configure script does not understand some of the GNU
  2370. ;; options, so we only add the flags specified above.
  2371. (apply invoke "./configure" configure-flags))))
  2372. ;; XXX: The test suite wants to download 871 files from a cloud storage
  2373. ;; service (see test/test-data.sha1). It is possible to specify a
  2374. ;; custom directory, but there seems to be no tarball with all files.
  2375. #:tests? #f))
  2376. (native-inputs
  2377. (list perl yasm))
  2378. (synopsis "VP8/VP9 video codec")
  2379. (description "libvpx is a codec for the VP8/VP9 video compression format.")
  2380. (license license:bsd-3)
  2381. (home-page "https://www.webmproject.org/")))
  2382. (define-public orf-dl
  2383. (let ((commit "2dbbe7ef4e0efe0f3c1d59c503108e22d9065999")
  2384. (revision "1"))
  2385. (package
  2386. (name "orf-dl")
  2387. (version (git-version "0" revision commit))
  2388. (source (origin
  2389. (method git-fetch)
  2390. (uri (git-reference
  2391. (url "https://github.com/tpoechtrager/orf_dl")
  2392. (commit commit)))
  2393. (file-name (git-file-name name version))
  2394. (sha256
  2395. (base32
  2396. "1w413miy01cm7rzb5c6wwfdnc2sqv87cvxwikafgrkswpimvdjsk"))))
  2397. (build-system copy-build-system)
  2398. (arguments
  2399. (list #:install-plan #~`(("orf_dl.php" "bin/orf-dl"))
  2400. #:phases
  2401. #~(modify-phases %standard-phases
  2402. (add-after 'unpack 'patch-source
  2403. (lambda* (#:key inputs #:allow-other-keys)
  2404. (substitute* "orf_dl.php"
  2405. (("ffmpeg")
  2406. (search-input-file inputs "bin/ffmpeg"))))))))
  2407. (inputs (list php ffmpeg))
  2408. (home-page "https://github.com/tpoechtrager/orf_dl")
  2409. (synopsis "Download videos from tvthek.orf.at")
  2410. (description "This package provides a PHP-based command line application
  2411. to download videos from Austria's national television broadcaster.")
  2412. (license license:gpl2+))))
  2413. (define-public youtube-dl
  2414. (package
  2415. (name "youtube-dl")
  2416. (version "2021.12.17")
  2417. (source (origin
  2418. (method url-fetch)
  2419. (uri (string-append "https://youtube-dl.org/downloads/latest/"
  2420. "youtube-dl-" version ".tar.gz"))
  2421. (sha256
  2422. (base32
  2423. "1prm84ci1n1kjzhikhrsbxbgziw6br822psjnijm2ibqnz49jfwz"))
  2424. (snippet
  2425. '(begin
  2426. ;; Delete the pre-generated files, except for the man page
  2427. ;; which requires 'pandoc' to build.
  2428. (for-each delete-file '("youtube-dl"
  2429. ;;pandoc is needed to generate
  2430. ;;"youtube-dl.1"
  2431. "youtube-dl.bash-completion"
  2432. "youtube-dl.fish"
  2433. "youtube-dl.zsh"))))))
  2434. (build-system python-build-system)
  2435. (arguments
  2436. ;; The problem here is that the directory for the man page and completion
  2437. ;; files is relative, and for some reason, setup.py uses the
  2438. ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
  2439. ;; So, we need pass the prefix directly. In addition, make sure the Bash
  2440. ;; completion file is called 'youtube-dl' rather than
  2441. ;; 'youtube-dl.bash-completion'.
  2442. `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
  2443. #:phases (modify-phases %standard-phases
  2444. (add-after 'unpack 'default-to-the-ffmpeg-input
  2445. (lambda _
  2446. ;; See <https://issues.guix.gnu.org/43418#5>.
  2447. ;; ffmpeg is big but required to request free formats
  2448. ;; from, e.g., YouTube so pull it in unconditionally.
  2449. ;; Continue respecting the --ffmpeg-location argument.
  2450. (substitute* "youtube_dl/postprocessor/ffmpeg.py"
  2451. (("\\.get\\('ffmpeg_location'\\)" match)
  2452. (format #f "~a or '~a'" match (which "ffmpeg"))))))
  2453. (add-before 'build 'build-generated-files
  2454. (lambda _
  2455. ;; Avoid the make targets that require pandoc.
  2456. (invoke "make"
  2457. "PYTHON=python"
  2458. "youtube-dl"
  2459. ;;"youtube-dl.1" ; needs pandoc
  2460. "youtube-dl.bash-completion"
  2461. "youtube-dl.zsh"
  2462. "youtube-dl.fish")))
  2463. (add-before 'install 'fix-the-data-directories
  2464. (lambda* (#:key outputs #:allow-other-keys)
  2465. (let ((prefix (assoc-ref outputs "out")))
  2466. (mkdir "bash-completion")
  2467. (rename-file "youtube-dl.bash-completion"
  2468. "bash-completion/youtube-dl")
  2469. (substitute* "setup.py"
  2470. (("youtube-dl\\.bash-completion")
  2471. "bash-completion/youtube-dl")
  2472. (("'etc/")
  2473. (string-append "'" prefix "/etc/"))
  2474. (("'share/")
  2475. (string-append "'" prefix "/share/"))))))
  2476. (add-after 'install 'install-completion
  2477. (lambda* (#:key outputs #:allow-other-keys)
  2478. (let* ((out (assoc-ref outputs "out"))
  2479. (zsh (string-append out
  2480. "/share/zsh/site-functions")))
  2481. (mkdir-p zsh)
  2482. (copy-file "youtube-dl.zsh"
  2483. (string-append zsh "/_youtube-dl"))))))))
  2484. (native-inputs
  2485. (list zip))
  2486. (inputs
  2487. (list ffmpeg))
  2488. (synopsis "Download videos from YouTube.com and other sites")
  2489. (description
  2490. "Youtube-dl is a small command-line program to download videos from
  2491. YouTube.com and many more sites.")
  2492. (home-page "https://yt-dl.org")
  2493. (properties '((release-monitoring-url . "https://yt-dl.org/downloads/")))
  2494. (license license:public-domain)))
  2495. (define-public yt-dlp
  2496. (package/inherit youtube-dl
  2497. (name "yt-dlp")
  2498. (version "2023.03.04")
  2499. (source
  2500. (origin
  2501. (method git-fetch)
  2502. (uri (git-reference
  2503. (url "https://github.com/yt-dlp/yt-dlp/")
  2504. (commit version)))
  2505. (file-name (git-file-name name version))
  2506. (sha256
  2507. (base32 "1zb4blj7qrmwkryyqrkxl909f59hvbs8dwiwl7sw1fs2kdzb1rw4"))))
  2508. (arguments
  2509. (substitute-keyword-arguments (package-arguments youtube-dl)
  2510. ((#:tests? _) (not (%current-target-system)))
  2511. ((#:phases phases)
  2512. #~(modify-phases #$phases
  2513. ;; See the comment for the corresponding phase in youtube-dl.
  2514. (replace 'default-to-the-ffmpeg-input
  2515. (lambda* (#:key inputs #:allow-other-keys)
  2516. (substitute* "yt_dlp/postprocessor/ffmpeg.py"
  2517. (("location = self.get_param(.*)$")
  2518. (string-append
  2519. "location = '"
  2520. (dirname (search-input-file inputs "bin/ffmpeg"))
  2521. "'\n")))))
  2522. (replace 'build-generated-files
  2523. (lambda* (#:key inputs #:allow-other-keys)
  2524. (if (assoc-ref inputs "pandoc")
  2525. (invoke "make"
  2526. "PYTHON=python"
  2527. "yt-dlp"
  2528. "yt-dlp.1"
  2529. "completions")
  2530. (invoke "make"
  2531. "PYTHON=python"
  2532. "yt-dlp"
  2533. "completions"))))
  2534. (replace 'fix-the-data-directories
  2535. (lambda* (#:key outputs #:allow-other-keys)
  2536. (let ((prefix (assoc-ref outputs "out")))
  2537. (substitute* "setup.py"
  2538. (("'etc/")
  2539. (string-append "'" prefix "/etc/"))
  2540. (("'share/")
  2541. (string-append "'" prefix "/share/"))))))
  2542. (delete 'install-completion)
  2543. (replace 'check
  2544. (lambda* (#:key tests? #:allow-other-keys)
  2545. (when tests?
  2546. (invoke "pytest" "-k" "not download"))))))))
  2547. (inputs (modify-inputs (package-inputs youtube-dl)
  2548. (append python-brotli
  2549. python-certifi
  2550. python-mutagen
  2551. python-pycryptodomex
  2552. python-websockets)))
  2553. (native-inputs
  2554. (append
  2555. ;; To generate the manpage.
  2556. (if (member (%current-system)
  2557. (package-transitive-supported-systems pandoc))
  2558. (list pandoc)
  2559. '())
  2560. (list python-pytest zip)))
  2561. (description
  2562. "yt-dlp is a small command-line program to download videos from
  2563. YouTube.com and many more sites. It is a fork of youtube-dl with a
  2564. focus on adding new features while keeping up-to-date with the
  2565. original project.")
  2566. (properties '((release-monitoring-url . "https://pypi.org/project/yt-dlp/")))
  2567. (home-page "https://github.com/yt-dlp/yt-dlp")))
  2568. (define-public you-get
  2569. (package
  2570. (name "you-get")
  2571. (version "0.4.1555")
  2572. (source (origin
  2573. (method git-fetch)
  2574. (uri (git-reference
  2575. (url "https://github.com/soimort/you-get")
  2576. (commit (string-append "v" version))))
  2577. (file-name (git-file-name name version))
  2578. (sha256
  2579. (base32
  2580. "0gn86i6nfsw395r9a3i88nv2g08s5bgjps7w4qawb9gvk4h7zqap"))))
  2581. (build-system python-build-system)
  2582. (inputs
  2583. (list ffmpeg)) ; for multi-part and >=1080p videos
  2584. (arguments
  2585. `(#:phases
  2586. (modify-phases %standard-phases
  2587. (add-after 'unpack 'qualify-input-references
  2588. ;; Explicitly invoke the input ffmpeg, instead of whichever one
  2589. ;; happens to be in the user's $PATH at run time.
  2590. (lambda* (#:key inputs #:allow-other-keys)
  2591. (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg")))
  2592. (substitute* "src/you_get/processor/ffmpeg.py"
  2593. ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
  2594. ;; same string is also used when sniffing ffmpeg's output.
  2595. (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
  2596. (string-append prefix "'" ffmpeg "'")))))))
  2597. #:tests? #f)) ; XXX some tests need Internet access
  2598. (synopsis "Download videos, audio, or images from Web sites")
  2599. (description
  2600. "You-Get is a command-line utility to download media contents (videos,
  2601. audio, images) from the Web. It can use either mpv or vlc for playback.")
  2602. (home-page "https://you-get.org/")
  2603. (license license:expat)))
  2604. (define-public youtube-viewer
  2605. (package
  2606. (name "youtube-viewer")
  2607. (version "3.8.1")
  2608. (source (origin
  2609. (method git-fetch)
  2610. (uri (git-reference
  2611. (url "https://github.com/trizen/youtube-viewer")
  2612. (commit version)))
  2613. (file-name (git-file-name name version))
  2614. (sha256
  2615. (base32
  2616. "0xdybiihd66b79rbsawjhxs9snm78gld5ziz3gnp8vdcw0bshwz7"))))
  2617. (build-system perl-build-system)
  2618. (native-inputs
  2619. (list perl-module-build))
  2620. (inputs
  2621. (list perl-data-dump
  2622. perl-file-sharedir
  2623. perl-gtk2
  2624. perl-json
  2625. perl-json-xs
  2626. perl-libwww
  2627. perl-lwp-protocol-https
  2628. perl-lwp-useragent-cached
  2629. perl-memoize
  2630. perl-mozilla-ca
  2631. perl-term-readline-gnu
  2632. perl-unicode-linebreak
  2633. xdg-utils
  2634. ;; Some videos play without youtube-dl, but others silently fail to.
  2635. youtube-dl))
  2636. (arguments
  2637. `(#:modules ((guix build perl-build-system)
  2638. (guix build utils)
  2639. (srfi srfi-26))
  2640. ;; gtk-2/3 variants are both installed by default but the gtk3 variant
  2641. ;; is broken without perl-gtk3.
  2642. #:module-build-flags '("--gtk2")
  2643. #:phases
  2644. (modify-phases %standard-phases
  2645. (add-after 'unpack 'refer-to-inputs
  2646. (lambda* (#:key inputs #:allow-other-keys)
  2647. (substitute* "lib/WWW/YoutubeViewer.pm"
  2648. (("'youtube-dl'")
  2649. (format #f "'~a/bin/youtube-dl'"
  2650. (assoc-ref inputs "youtube-dl"))))
  2651. (substitute* '("bin/gtk2-youtube-viewer"
  2652. "bin/gtk3-youtube-viewer")
  2653. (("'xdg-open'")
  2654. (format #f "'~a/bin/xdg-open'"
  2655. (assoc-ref inputs "xdg-utils"))))
  2656. #t))
  2657. (add-after 'install 'install-desktop
  2658. (lambda* (#:key outputs #:allow-other-keys)
  2659. (let* ((out (assoc-ref outputs "out"))
  2660. (sharedir (string-append out "/share")))
  2661. (install-file "share/gtk-youtube-viewer.desktop"
  2662. (string-append sharedir "/applications"))
  2663. (install-file "share/icons/gtk-youtube-viewer.png"
  2664. (string-append sharedir "/pixmaps"))
  2665. #t)))
  2666. (add-after 'install 'wrap-program
  2667. (lambda* (#:key outputs #:allow-other-keys)
  2668. (let* ((out (assoc-ref outputs "out"))
  2669. (bin-dir (string-append out "/bin/"))
  2670. (site-dir (string-append out "/lib/perl5/site_perl/"))
  2671. (lib-path (getenv "PERL5LIB")))
  2672. (for-each (cut wrap-program <>
  2673. `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
  2674. (find-files bin-dir))
  2675. #t))))))
  2676. (synopsis
  2677. "Lightweight application for searching and streaming videos from YouTube")
  2678. (description
  2679. "Youtube-viewer searches and plays YouTube videos in a native player.
  2680. It comes with various search options; it can search for videos, playlists
  2681. and/or channels. The videos are streamed directly in a selected video player
  2682. at the best resolution (customizable) and with closed-captions (if available).
  2683. Both command-line and GTK2 interface are available.")
  2684. (home-page "https://github.com/trizen/youtube-viewer")
  2685. (license license:perl-license)))
  2686. (define-public libbluray
  2687. (package
  2688. (name "libbluray")
  2689. (version "1.0.2")
  2690. (source (origin
  2691. (method url-fetch)
  2692. (uri (string-append "https://download.videolan.org/videolan/"
  2693. name "/" version "/"
  2694. name "-" version ".tar.bz2"))
  2695. (sha256
  2696. (base32
  2697. "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
  2698. (build-system gnu-build-system)
  2699. (arguments
  2700. `(#:configure-flags '("--disable-bdjava-jar"
  2701. "--disable-static")
  2702. #:phases
  2703. (modify-phases %standard-phases
  2704. (add-after 'unpack 'refer-to-libxml2-in-.pc-file
  2705. ;; Avoid the need to propagate libxml2 by referring to it
  2706. ;; directly, as is already done for fontconfig & freetype.
  2707. (lambda* (#:key inputs #:allow-other-keys)
  2708. (let ((libxml2 (assoc-ref inputs "libxml2")))
  2709. (substitute* "configure"
  2710. ((" libxml-2.0") ""))
  2711. (substitute* "src/libbluray.pc.in"
  2712. (("^Libs.private:" field)
  2713. (string-append field " -L" libxml2 "/lib -lxml2")))
  2714. #t)))
  2715. (add-before 'build 'fix-dlopen-paths
  2716. (lambda* (#:key inputs #:allow-other-keys)
  2717. (let ((libaacs (assoc-ref inputs "libaacs"))
  2718. (libbdplus (assoc-ref inputs "libbdplus")))
  2719. (substitute* "src/libbluray/disc/aacs.c"
  2720. (("\"libaacs\"")
  2721. (string-append "\"" libaacs "/lib/libaacs\"")))
  2722. (substitute* "src/libbluray/disc/bdplus.c"
  2723. (("\"libbdplus\"")
  2724. (string-append "\"" libbdplus "/lib/libbdplus\"")))
  2725. #t))))))
  2726. (native-inputs (list pkg-config))
  2727. (inputs
  2728. `(("fontconfig" ,fontconfig)
  2729. ("freetype" ,freetype)
  2730. ("libaacs" ,libaacs)
  2731. ("libbdplus" ,libbdplus)
  2732. ("libxml2" ,libxml2)))
  2733. (home-page "https://www.videolan.org/developers/libbluray.html")
  2734. (synopsis "Blu-Ray Disc playback library")
  2735. (description
  2736. "libbluray is a library designed for Blu-Ray Disc playback for media
  2737. players, like VLC or MPlayer.")
  2738. (license license:lgpl2.1+)))
  2739. (define-public libdvdread
  2740. (package
  2741. (name "libdvdread")
  2742. (version "6.0.2")
  2743. (source (origin
  2744. (method url-fetch)
  2745. (uri (string-append "https://download.videolan.org/videolan/"
  2746. "libdvdread/" version "/"
  2747. "libdvdread-" version ".tar.bz2"))
  2748. (sha256
  2749. (base32
  2750. "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
  2751. (build-system gnu-build-system)
  2752. (arguments
  2753. `(#:configure-flags '("--with-libdvdcss=yes")))
  2754. (native-inputs
  2755. (list pkg-config))
  2756. (propagated-inputs
  2757. (list libdvdcss))
  2758. (home-page "http://dvdnav.mplayerhq.hu/")
  2759. (synopsis "Library for reading video DVDs")
  2760. (description
  2761. "Libdvdread provides a simple foundation for reading DVD video
  2762. disks. It provides the functionality that is required to access many
  2763. DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
  2764. authentication and descrambling (if an external libdvdcss library is
  2765. installed).")
  2766. (license license:gpl2+)))
  2767. (define-public dvdauthor
  2768. (package
  2769. (name "dvdauthor")
  2770. (version "0.7.2")
  2771. (source
  2772. (origin
  2773. (method url-fetch)
  2774. (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
  2775. version ".tar.gz"))
  2776. (sha256
  2777. (base32
  2778. "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
  2779. (build-system gnu-build-system)
  2780. (inputs
  2781. (list libdvdread libpng imagemagick libxml2 freetype))
  2782. (native-inputs
  2783. (list pkg-config))
  2784. (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
  2785. (description "@command{dvdauthor} will generate a DVD-Video movie from a
  2786. MPEG-2 stream containing VOB packets.")
  2787. (home-page "https://dvdauthor.sourceforge.net")
  2788. (license license:gpl3+)))
  2789. (define-public libdvdnav
  2790. (package
  2791. (name "libdvdnav")
  2792. (version "6.0.1")
  2793. (source (origin
  2794. (method url-fetch)
  2795. (uri (string-append "https://download.videolan.org/videolan/"
  2796. "libdvdnav/" version "/"
  2797. "libdvdnav-" version ".tar.bz2"))
  2798. (sha256
  2799. (base32
  2800. "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
  2801. (build-system gnu-build-system)
  2802. (native-inputs
  2803. (list pkg-config))
  2804. (inputs
  2805. (list libdvdread))
  2806. (home-page "http://dvdnav.mplayerhq.hu/")
  2807. (synopsis "Library for video DVD navigation features")
  2808. (description
  2809. "Libdvdnav is a library for developers of multimedia
  2810. applications. It allows easy use of sophisticated DVD navigation features
  2811. such as DVD menus, multiangle playback and even interactive DVD games. All
  2812. this functionality is provided through a simple API which provides the DVD
  2813. playback as a single logical stream of blocks, intermitted by special
  2814. dvdnav events to report certain conditions. The main usage of libdvdnav is
  2815. a loop regularly calling a function to get the next block, surrounded by
  2816. additional calls to tell the library of user interaction. The whole
  2817. DVD virtual machine and internal playback states are completely
  2818. encapsulated.")
  2819. (license license:gpl2+)))
  2820. (define-public libdvdcss
  2821. (package
  2822. (name "libdvdcss")
  2823. (version "1.4.3")
  2824. (source (origin
  2825. (method url-fetch)
  2826. (uri (string-append "https://download.videolan.org/pub/"
  2827. name "/" version "/"
  2828. name "-" version ".tar.bz2"))
  2829. (sha256
  2830. (base32
  2831. "0y800y33spblb20s1lsjbaiybknmwwmmiczmjqx5s760blpwjg13"))))
  2832. (build-system gnu-build-system)
  2833. (home-page "https://www.videolan.org/developers/libdvdcss.html")
  2834. (synopsis "Library for accessing DVDs as block devices")
  2835. (description
  2836. "libdvdcss is a simple library designed for accessing DVDs like a block
  2837. device without having to bother about the decryption.")
  2838. (license license:gpl2+)))
  2839. (define-public srt2vtt
  2840. (package
  2841. (name "srt2vtt")
  2842. (version "0.2")
  2843. (source (origin
  2844. (method url-fetch)
  2845. (uri (string-append
  2846. "https://files.dthompson.us/srt2vtt/srt2vtt-"
  2847. version ".tar.gz"))
  2848. (sha256
  2849. (base32
  2850. "1ravl635x81fcai4h2xnsn926i69pafgr6zkghq6319iprkw8ffv"))))
  2851. (build-system gnu-build-system)
  2852. (arguments
  2853. `(#:phases
  2854. (modify-phases %standard-phases
  2855. (add-after 'install 'wrap-srt2vtt
  2856. (lambda* (#:key outputs #:allow-other-keys)
  2857. (let* ((out (assoc-ref outputs "out"))
  2858. (bin (string-append out "/bin"))
  2859. (version ,(let ((v (package-version guile-3.0)))
  2860. (string-append (car (string-split v #\.))
  2861. ".0")))
  2862. (site (string-append out "/share/guile/site/" version))
  2863. (compiled (string-append
  2864. out "/lib/guile/" version
  2865. "/site-ccache")))
  2866. (wrap-program (string-append bin "/srt2vtt")
  2867. `("GUILE_LOAD_PATH" ":" prefix (,site))
  2868. `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,compiled)))))))))
  2869. (native-inputs
  2870. (list pkg-config))
  2871. (inputs
  2872. (list guile-3.0))
  2873. (synopsis "SubRip to WebVTT subtitle converter")
  2874. (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
  2875. for use with HTML5 video.")
  2876. (home-page "https://dthompson.us/projects/srt2vtt.html")
  2877. (license license:gpl3+)))
  2878. (define-public avidemux
  2879. (package
  2880. (name "avidemux")
  2881. (version "2.7.8")
  2882. (source (origin
  2883. (method url-fetch)
  2884. (uri (string-append
  2885. "mirror://sourceforge/avidemux/avidemux/" version "/"
  2886. "avidemux_" version ".tar.gz"))
  2887. (sha256
  2888. (base32
  2889. "00blv5455ry3bb86zyzk1xmq3rbqmbif62khc0kq3whza97l12k2"))
  2890. (patches (search-patches "avidemux-install-to-lib.patch"))))
  2891. (build-system cmake-build-system)
  2892. (native-inputs
  2893. `(("perl" ,perl)
  2894. ("pkg-config" ,pkg-config)
  2895. ("python" ,python-wrapper)
  2896. ("qttools-5" ,qttools-5)
  2897. ("yasm" ,yasm)))
  2898. ;; FIXME: Once packaged, add libraries not found during the build.
  2899. (inputs
  2900. `(("alsa-lib" ,alsa-lib)
  2901. ("fontconfig" ,fontconfig)
  2902. ("freetype" ,freetype)
  2903. ("fribidi" ,fribidi)
  2904. ("glu" ,glu)
  2905. ("jack" ,jack-1)
  2906. ("lame" ,lame)
  2907. ("libaom" ,libaom)
  2908. ("libva" ,libva)
  2909. ("libvdpau" ,libvdpau)
  2910. ("libvorbis" ,libvorbis)
  2911. ("libvpx" ,libvpx)
  2912. ("libxv" ,libxv)
  2913. ("pulseaudio" ,pulseaudio)
  2914. ("qtbase" ,qtbase-5)
  2915. ("sqlite" ,sqlite)
  2916. ("zlib" ,zlib)))
  2917. (arguments
  2918. `(#:tests? #f ; no check target
  2919. #:phases
  2920. ;; Make sure files inside the included ffmpeg tarball are
  2921. ;; patch-shebanged.
  2922. (let ((ffmpeg "ffmpeg-4.2.4"))
  2923. (modify-phases %standard-phases
  2924. (add-before 'patch-source-shebangs 'unpack-ffmpeg
  2925. (lambda _
  2926. (with-directory-excursion "avidemux_core/ffmpeg_package"
  2927. (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
  2928. (delete-file (string-append ffmpeg ".tar.bz2")))
  2929. #t))
  2930. (add-after 'patch-source-shebangs 'repack-ffmpeg
  2931. (lambda _
  2932. (with-directory-excursion "avidemux_core/ffmpeg_package"
  2933. (substitute* (string-append ffmpeg "/configure")
  2934. (("#! /bin/sh") (string-append "#!" (which "sh"))))
  2935. (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
  2936. ;; avoid non-determinism in the archive
  2937. "--sort=name" "--mtime=@0"
  2938. "--owner=root:0" "--group=root:0")
  2939. (delete-file-recursively ffmpeg))
  2940. #t))
  2941. (replace 'configure
  2942. (lambda _
  2943. ;; Copy-paste settings from the cmake build system.
  2944. (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
  2945. (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
  2946. #t))
  2947. (replace 'build
  2948. (lambda* (#:key inputs outputs #:allow-other-keys)
  2949. (let* ((out (assoc-ref outputs "out"))
  2950. (lib (string-append out "/lib"))
  2951. (top (getcwd))
  2952. (build_component
  2953. (lambda* (component srcdir #:optional (args '()))
  2954. (let ((builddir (string-append "build_" component)))
  2955. (mkdir builddir)
  2956. (with-directory-excursion builddir
  2957. (apply invoke "cmake"
  2958. "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
  2959. (string-append "-DCMAKE_INSTALL_PREFIX=" out)
  2960. (string-append "-DCMAKE_INSTALL_RPATH=" lib)
  2961. (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
  2962. "\"-Wl,-rpath=" lib "\"")
  2963. (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
  2964. (string-append "../" srcdir)
  2965. "-DENABLE_QT5=True"
  2966. args)
  2967. (invoke "make" "-j"
  2968. (number->string (parallel-job-count)))
  2969. (invoke "make" "install"))))))
  2970. (mkdir out)
  2971. (build_component "core" "avidemux_core")
  2972. (build_component "cli" "avidemux/cli")
  2973. (build_component "qt4" "avidemux/qt4")
  2974. (build_component "plugins_common" "avidemux_plugins"
  2975. '("-DPLUGIN_UI=COMMON"))
  2976. (build_component "plugins_cli" "avidemux_plugins"
  2977. '("-DPLUGIN_UI=CLI"))
  2978. (build_component "plugins_qt4" "avidemux_plugins"
  2979. '("-DPLUGIN_UI=QT4"))
  2980. (build_component "plugins_settings" "avidemux_plugins"
  2981. '("-DPLUGIN_UI=SETTINGS"))
  2982. ;; Remove .exe and .dll file.
  2983. (delete-file-recursively
  2984. (string-append out "/share/ADM6_addons"))
  2985. #t)))
  2986. (delete 'install)))))
  2987. (home-page "http://fixounet.free.fr/avidemux/")
  2988. (synopsis "Video editor")
  2989. (description "Avidemux is a video editor designed for simple cutting,
  2990. filtering and encoding tasks. It supports many file types, including AVI,
  2991. DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
  2992. can be automated using projects, job queue and powerful scripting
  2993. capabilities.")
  2994. (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
  2995. ;; Software with various licenses is included, see License.txt.
  2996. (license license:gpl2+)))
  2997. (define-public vapoursynth
  2998. (package
  2999. (name "vapoursynth")
  3000. (version "61")
  3001. (source (origin
  3002. (method git-fetch)
  3003. (uri (git-reference
  3004. (url "https://github.com/vapoursynth/vapoursynth")
  3005. (commit (string-append "R" version))))
  3006. (file-name (git-file-name name version))
  3007. (sha256
  3008. (base32
  3009. "0v0dp3hydqzam0dp2d9zbrccrsvhy6n61s4v7ca2qbw69vpsm594"))))
  3010. (build-system gnu-build-system)
  3011. (arguments
  3012. `(#:phases
  3013. (modify-phases %standard-phases
  3014. (add-after 'install 'wrap
  3015. (lambda* (#:key outputs #:allow-other-keys)
  3016. (let* ((out (assoc-ref outputs "out"))
  3017. (site (string-append out "/lib/python"
  3018. ,(version-major+minor
  3019. (package-version python))
  3020. "/site-packages")))
  3021. (wrap-program (string-append out "/bin/vspipe")
  3022. `("PYTHONPATH" ":" = (,site)))))))))
  3023. (native-inputs
  3024. (list autoconf
  3025. automake
  3026. python-cython
  3027. libtool
  3028. pkg-config
  3029. yasm))
  3030. (inputs
  3031. (list ffmpeg libass python tesseract-ocr zimg))
  3032. (home-page "http://www.vapoursynth.com/")
  3033. (synopsis "Video processing framework")
  3034. (description "VapourSynth is a C++ library and Python module for video
  3035. manipulation. It aims to be a modern rewrite of Avisynth, supporting
  3036. multithreading, generalized colorspaces, per frame properties, and videos with
  3037. format changes.")
  3038. ;; src/core/cpufeatures only allows x86, ARM or PPC
  3039. (supported-systems (fold delete %supported-systems
  3040. '("mips64el-linux" "aarch64-linux")))
  3041. ;; As seen from the source files.
  3042. (license license:lgpl2.1+)))
  3043. (define-public xvid
  3044. (package
  3045. (name "xvid")
  3046. (version "1.3.7")
  3047. (source (origin
  3048. (method url-fetch)
  3049. (uri (string-append
  3050. "http://downloads.xvid.com/downloads/xvidcore-"
  3051. version ".tar.bz2"))
  3052. (sha256
  3053. (base32
  3054. "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
  3055. (build-system gnu-build-system)
  3056. (native-inputs (list yasm))
  3057. (arguments
  3058. '(#:phases
  3059. (modify-phases %standard-phases
  3060. (add-before 'configure 'pre-configure
  3061. (lambda _
  3062. (chdir "build/generic")
  3063. (substitute* "configure"
  3064. (("#! /bin/sh") (string-append "#!" (which "sh"))))
  3065. #t)))
  3066. #:tests? #f)) ; no test suite
  3067. (home-page "https://www.xvid.com/")
  3068. (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
  3069. (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
  3070. codec library. It uses ASP features such as b-frames, global and quarter
  3071. pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
  3072. and custom quantization matrices.")
  3073. (license license:gpl2+)))
  3074. (define-public streamlink
  3075. (package
  3076. (name "streamlink")
  3077. (version "3.2.0")
  3078. (source
  3079. (origin
  3080. (method url-fetch)
  3081. (uri (pypi-uri "streamlink" version))
  3082. (sha256
  3083. (base32
  3084. "09nrspga15svzi0hmakcarbciav0nzf30hg1ff53gia473cd4w4p"))))
  3085. (build-system python-build-system)
  3086. (arguments
  3087. `(#:phases (modify-phases %standard-phases
  3088. (replace 'check
  3089. (lambda* (#:key tests? #:allow-other-keys)
  3090. (when tests?
  3091. (invoke "python" "-m" "pytest")))))))
  3092. (native-inputs
  3093. (list python-freezegun python-mock python-pytest
  3094. python-requests-mock))
  3095. (propagated-inputs
  3096. (list python-pysocks
  3097. python-websocket-client
  3098. python-isodate
  3099. python-lxml
  3100. python-pycountry
  3101. python-pycryptodome
  3102. python-requests
  3103. python-urllib3))
  3104. (home-page "https://github.com/streamlink/streamlink")
  3105. (synopsis "Extract streams from various services")
  3106. (description "Streamlink is command-line utility that extracts streams
  3107. from sites like Twitch.tv and pipes them into a video player of choice.")
  3108. (license license:bsd-2)))
  3109. (define-public twitchy
  3110. (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
  3111. (package
  3112. (name "twitchy")
  3113. (version (git-version "3.4" "1" commit))
  3114. (source
  3115. (origin
  3116. (method git-fetch)
  3117. (uri (git-reference
  3118. (url "https://github.com/BasioMeusPuga/twitchy")
  3119. (commit commit)))
  3120. (file-name (git-file-name name version))
  3121. (sha256
  3122. (base32
  3123. "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
  3124. (build-system python-build-system)
  3125. (arguments
  3126. '(#:phases
  3127. (modify-phases %standard-phases
  3128. (add-after 'unpack 'patch-paths
  3129. (lambda* (#:key inputs #:allow-other-keys)
  3130. (substitute* "twitchy/twitchy_play.py"
  3131. (("\"streamlink ")
  3132. (string-append "\"" (assoc-ref inputs "streamlink")
  3133. "/bin/streamlink ")))
  3134. #t))
  3135. (add-before 'check 'check-setup
  3136. (lambda _
  3137. (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
  3138. #t))
  3139. (add-after 'install 'install-rofi-plugin
  3140. (lambda* (#:key outputs #:allow-other-keys)
  3141. (install-file "plugins/rofi-twitchy"
  3142. (string-append (assoc-ref outputs "out")
  3143. "/bin"))
  3144. #t)))))
  3145. (inputs
  3146. (list python-requests streamlink))
  3147. (home-page "https://github.com/BasioMeusPuga/twitchy")
  3148. (synopsis "Command-line interface for Twitch.tv")
  3149. (description
  3150. "This package provides a command-line interface for Twitch.tv")
  3151. (license license:gpl3+))))
  3152. (define-public mlt
  3153. (package
  3154. (name "mlt")
  3155. (version "7.16.0")
  3156. (source
  3157. (origin
  3158. (method git-fetch)
  3159. (uri (git-reference
  3160. (url "https://github.com/mltframework/mlt")
  3161. (commit (string-append "v" version))))
  3162. (file-name (git-file-name name version))
  3163. (sha256
  3164. (base32 "0aas3zjc9xh7sn01xv67fa26bzlz9sapbgzsplmikwc9lwfl5pqi"))))
  3165. (build-system cmake-build-system)
  3166. (arguments
  3167. (list
  3168. #:tests? #f ;requires "Kwalify"
  3169. #:phases
  3170. #~(modify-phases %standard-phases
  3171. (add-before 'configure 'override-LDFLAGS
  3172. (lambda _
  3173. (setenv "LDFLAGS"
  3174. (string-append "-Wl,-rpath=" #$output "/lib"))))
  3175. (add-after 'install 'wrap-executable
  3176. (lambda _
  3177. (let* ((frei0r #$(this-package-input "frei0r-plugins"))
  3178. (ladspa #$(this-package-input "ladspa"))
  3179. ;; In MLT 7, 'melt' symlinks to 'melt-7'. Try to keep
  3180. ;; compatibility with MLT 6 where it's only 'melt'.
  3181. (major #$(version-major version))
  3182. (exec (if (file-exists?
  3183. (string-append #$output "/bin/melt-" major))
  3184. (string-append "melt-" major)
  3185. "melt")))
  3186. (wrap-program (string-append #$output "/bin/" exec)
  3187. `("FREI0R_PATH" ":" =
  3188. (,(string-append frei0r "/lib/frei0r-1")))
  3189. `("LADSPA_PATH" ":" =
  3190. (,(string-append ladspa "/lib/ladspa"))))))))))
  3191. (inputs
  3192. (list alsa-lib
  3193. `(,alsa-plugins "pulseaudio")
  3194. bash-minimal
  3195. ffmpeg
  3196. fftw
  3197. frei0r-plugins
  3198. gdk-pixbuf
  3199. gtk+
  3200. libxml2
  3201. jack-1
  3202. ladspa
  3203. libebur128
  3204. libexif
  3205. libvorbis
  3206. rubberband
  3207. libsamplerate
  3208. pulseaudio
  3209. qtbase-5
  3210. qtsvg-5
  3211. rtaudio
  3212. sdl2
  3213. sdl2-image
  3214. sox
  3215. vidstab))
  3216. (native-inputs
  3217. (list pkg-config))
  3218. (home-page "https://www.mltframework.org/")
  3219. (synopsis "Author, manage, and run multitrack audio/video compositions")
  3220. (description
  3221. "MLT is a multimedia framework, designed and developed for television
  3222. broadcasting. It provides a toolkit for broadcasters, video editors, media
  3223. players, transcoders, web streamers and many more types of applications. The
  3224. functionality of the system is provided via an assortment of ready to use
  3225. tools, XML authoring components, and an extensible plug-in based API.")
  3226. (license license:lgpl2.1+)))
  3227. (define-public mlt-6
  3228. (package
  3229. (inherit mlt)
  3230. (name "mlt")
  3231. (version "6.26.1")
  3232. (source
  3233. (origin
  3234. (method git-fetch)
  3235. (uri (git-reference
  3236. (url "https://github.com/mltframework/mlt")
  3237. (commit (string-append "v" version))))
  3238. (file-name (git-file-name name version))
  3239. (sha256
  3240. (base32 "1gz79xvs5jrzqhwhfk0dqdd3xiavnjp4q957h7nb02rij32byb39"))))
  3241. (arguments
  3242. `(#:configure-flags
  3243. (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
  3244. (assoc-ref %build-inputs "gtk+")
  3245. "/lib/gtk-2.0/include")
  3246. (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
  3247. (assoc-ref %build-inputs "glib")
  3248. "/lib/glib-2.0/include"))
  3249. ,@(package-arguments mlt)))
  3250. (inputs
  3251. (modify-inputs (package-inputs mlt)
  3252. (replace "ffmpeg" ffmpeg-4)
  3253. (replace "gtk+" gtk+-2)))))
  3254. (define-public v4l-utils
  3255. (package
  3256. (name "v4l-utils")
  3257. (version "1.22.1")
  3258. (source (origin
  3259. (method url-fetch)
  3260. (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
  3261. "/v4l-utils-" version ".tar.bz2"))
  3262. (sha256
  3263. (base32
  3264. "0cafp64b7ylxhjnp47hxm59r0b0v5hc2gc23qh2s2k5463lgpik5"))))
  3265. (build-system gnu-build-system)
  3266. ;; Separate graphical tools in order to save almost 1 GiB on the closure
  3267. ;; for the common case.
  3268. (outputs '("out" "gui"))
  3269. (arguments
  3270. '(#:configure-flags
  3271. (list "--disable-static"
  3272. (string-append "--with-udevdir="
  3273. (assoc-ref %outputs "out")
  3274. "/lib/udev"))
  3275. #:phases
  3276. (modify-phases %standard-phases
  3277. (add-after 'install 'split
  3278. (lambda* (#:key outputs #:allow-other-keys)
  3279. (let ((out (assoc-ref outputs "out"))
  3280. (gui (assoc-ref outputs "gui")))
  3281. (mkdir-p (string-append gui "/bin"))
  3282. (mkdir-p (string-append gui "/share/man/man1"))
  3283. (mkdir-p (string-append gui "/share/applications"))
  3284. (for-each
  3285. (lambda (prog)
  3286. (for-each
  3287. (lambda (file)
  3288. (rename-file (string-append out file)
  3289. (string-append gui file)))
  3290. (list
  3291. (string-append "/bin/" prog)
  3292. (string-append "/share/man/man1/" prog ".1")
  3293. (string-append "/share/applications/" prog ".desktop"))))
  3294. '("qv4l2" "qvidcap"))
  3295. (copy-recursively (string-append out "/share/icons")
  3296. (string-append gui "/share/icons"))
  3297. (delete-file-recursively (string-append out "/share/icons"))
  3298. (rmdir (string-append out "/share/applications"))
  3299. #t))))))
  3300. (native-inputs
  3301. (list perl pkg-config))
  3302. (inputs
  3303. (list alsa-lib
  3304. glu
  3305. libjpeg-turbo
  3306. libx11
  3307. qtbase-5
  3308. eudev))
  3309. (synopsis "Realtime video capture utilities for Linux")
  3310. (description "The v4l-utils provide a series of libraries and utilities to
  3311. be used for realtime video capture via Linux-specific APIs.")
  3312. (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
  3313. ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
  3314. (license (list license:lgpl2.1+ license:gpl2))))
  3315. (define-public obs
  3316. (package
  3317. (name "obs")
  3318. (version "29.0.2")
  3319. (source (origin
  3320. (method git-fetch)
  3321. (uri (git-reference
  3322. (url "https://github.com/obsproject/obs-studio")
  3323. (commit version)
  3324. (recursive? #t)))
  3325. (file-name (git-file-name name version))
  3326. (sha256
  3327. (base32
  3328. "1ijn19wy52fa7ahr29v1rzvh6j0qr7i5xl129m6s9c644f7i51ac"))
  3329. (patches
  3330. (search-patches "obs-modules-location.patch"))))
  3331. (build-system cmake-build-system)
  3332. (arguments
  3333. (list
  3334. #:configure-flags
  3335. #~(list (string-append "-DOBS_VERSION_OVERRIDE=" #$version)
  3336. "-DENABLE_UNIT_TESTS=ON"
  3337. "-DENABLE_NEW_MPEGTS_OUTPUT=OFF"
  3338. "-DENABLE_AJA=OFF"
  3339. ;; Browser plugin requires cef, but it is not packaged yet.
  3340. ;; <https://bitbucket.org/chromiumembedded/cef/src/master/>
  3341. "-DBUILD_BROWSER=OFF")
  3342. #:phases
  3343. #~(modify-phases %standard-phases
  3344. (add-after 'install 'wrap-executable
  3345. (lambda* _
  3346. (let ((plugin-path (getenv "QT_PLUGIN_PATH")))
  3347. (wrap-program (string-append #$output "/bin/obs")
  3348. `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))))))))
  3349. (native-search-paths
  3350. (list (search-path-specification
  3351. (variable "OBS_PLUGINS_DIRECTORY")
  3352. (separator #f) ;single entry
  3353. (files '("lib/obs-plugins")))
  3354. (search-path-specification
  3355. (variable "OBS_PLUGINS_DATA_DIRECTORY")
  3356. (separator #f) ;single entry
  3357. (files '("share/obs/obs-plugins")))))
  3358. (native-inputs
  3359. (list cmocka pkg-config swig))
  3360. (inputs
  3361. (list
  3362. alsa-lib
  3363. bash-minimal
  3364. curl
  3365. eudev
  3366. ffmpeg-4
  3367. fontconfig
  3368. freetype
  3369. glib
  3370. jack-1
  3371. jansson
  3372. libglvnd
  3373. libva
  3374. libx264
  3375. libxcomposite
  3376. libxkbcommon
  3377. luajit
  3378. mbedtls-apache
  3379. mesa
  3380. pciutils
  3381. pipewire
  3382. pulseaudio
  3383. python
  3384. qtbase-5
  3385. qtsvg-5
  3386. qtx11extras
  3387. qtwayland-5
  3388. speexdsp
  3389. v4l-utils
  3390. vlc
  3391. wayland
  3392. wayland-protocols
  3393. zlib))
  3394. (synopsis "Live streaming software")
  3395. (description "Open Broadcaster Software provides a graphical interface for
  3396. video recording and live streaming. OBS supports capturing audio and video
  3397. from many input sources such as webcams, X11 (for screencasting), PulseAudio,
  3398. and JACK.")
  3399. (home-page "https://obsproject.com")
  3400. (license license:gpl2+)))
  3401. (define-public obs-websocket
  3402. (package
  3403. (name "obs-websocket")
  3404. (version "4.9.1")
  3405. (source
  3406. (origin
  3407. (method git-fetch)
  3408. (uri (git-reference
  3409. (url "https://github.com/Palakis/obs-websocket")
  3410. (commit version)
  3411. (recursive? #t)))
  3412. (file-name (git-file-name name version))
  3413. (sha256
  3414. (base32 "0giwhm0rbc578qng4invqqma935zzjlf05msz1gx986aqk654s7k"))))
  3415. (build-system cmake-build-system)
  3416. (arguments
  3417. `(#:tests? #f ;no tests
  3418. #:phases
  3419. (modify-phases %standard-phases
  3420. (add-after 'unpack 'remove-permission-change
  3421. (lambda* _
  3422. (substitute* "CMakeLists.txt"
  3423. ;; Remove lines that set writeable permissions on outputs.
  3424. (("PERMISSIONS [^)]*") "")
  3425. (("set\\(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS") "")
  3426. ;; Ug^WClever hack to comment out the next line, which is ‘)’.
  3427. (("(OWNER|GROUP|WORLD)_READ .*") "#")))))))
  3428. (inputs
  3429. (list obs qtbase-5))
  3430. (home-page "https://github.com/Palakis/obs-websocket")
  3431. (synopsis "OBS plugin for remote control via WebSockets")
  3432. (description "This OBS plugin allows you to establish a WebSocket channel
  3433. from within your running OBS instance so that you can control it remotely from
  3434. programs on your current machine or on other machines.")
  3435. (license license:gpl2+)))
  3436. (define-public obs-wlrobs
  3437. (package
  3438. (name "obs-wlrobs")
  3439. (version "1.1")
  3440. (source
  3441. (origin
  3442. (method hg-fetch)
  3443. (uri (hg-reference
  3444. (url "https://hg.sr.ht/~scoopta/wlrobs")
  3445. (changeset (string-append "v" version))))
  3446. (file-name (git-file-name name version))
  3447. (sha256
  3448. (base32
  3449. "1whdb2ykisz50qw19nv1djw5qp17rpnpkc8s8470ja8iz894mmwd"))))
  3450. (build-system meson-build-system)
  3451. (native-inputs
  3452. (list pkg-config))
  3453. (propagated-inputs `() )
  3454. (inputs (list obs
  3455. `(,libx11 "out") wayland wayland-protocols))
  3456. (home-page "https://hg.sr.ht/~scoopta/wlrobs")
  3457. (synopsis "OBS plugin for Wayland (wlroots) screen capture")
  3458. (description
  3459. "This OBS plugin allows you to capture the screen on wlroots-based
  3460. Wayland compositors.")
  3461. (license license:gpl3+)))
  3462. (define-public obs-vkcapture
  3463. (package
  3464. (name "obs-vkcapture")
  3465. (version "1.3.0")
  3466. (source (origin
  3467. (method git-fetch)
  3468. (uri (git-reference
  3469. (url "https://github.com/nowrep/obs-vkcapture")
  3470. (commit (string-append "v" version))))
  3471. (file-name (git-file-name name version))
  3472. (sha256
  3473. (base32
  3474. "18v15bfzm31qkpwipvbqgzak4z6f2hhq6mnz2bvhwnv57whirln6"))))
  3475. (build-system cmake-build-system)
  3476. (arguments
  3477. '(#:tests? #f)) ;no tests
  3478. (native-inputs (list pkg-config))
  3479. (inputs (list mesa
  3480. obs
  3481. libx11
  3482. libxcb
  3483. vulkan-headers
  3484. vulkan-loader
  3485. wayland))
  3486. (home-page "https://github.com/nowrep/obs-vkcapture")
  3487. (synopsis "OBS plugin for Vulkan/OpenGL game capture on Linux")
  3488. (description
  3489. "This OBS plugin lets you record an OpenGL or Vulkan
  3490. game by adding the Game Capture source to your scene and starting an
  3491. application with @code{obs-gamecapture}.")
  3492. (license license:gpl2)))
  3493. (define-public libvdpau
  3494. (package
  3495. (name "libvdpau")
  3496. (version "1.5")
  3497. (source
  3498. (origin
  3499. (method git-fetch)
  3500. (uri (git-reference
  3501. (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
  3502. (commit version)))
  3503. (file-name (git-file-name name version))
  3504. (sha256
  3505. (base32
  3506. "1zfbh5q9adzlydpgwq7hl5w1j2b29j7zns6dxf9fp9pvkj23fz5l"))))
  3507. (build-system meson-build-system)
  3508. (native-inputs
  3509. (list pkg-config))
  3510. (inputs
  3511. (list `(,libx11 "out") libxext xorgproto))
  3512. (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
  3513. (synopsis "Video Decode and Presentation API")
  3514. (description "VDPAU is the Video Decode and Presentation API for UNIX. It
  3515. provides an interface to video decode acceleration and presentation hardware
  3516. present in modern GPUs.")
  3517. (license (license:x11-style "file://COPYING"))))
  3518. (define-public vdpauinfo
  3519. (package
  3520. (name "vdpauinfo")
  3521. (version "1.5")
  3522. (source
  3523. (origin
  3524. (method git-fetch)
  3525. (uri (git-reference
  3526. (url "https://gitlab.freedesktop.org/vdpau/vdpauinfo")
  3527. (commit version)))
  3528. (file-name (git-file-name name version))
  3529. (sha256
  3530. (base32 "01nkk8rixzvicrg0cr90mbxyd4vdyd0739ipywn0mx56xddambmx"))))
  3531. (build-system gnu-build-system)
  3532. (arguments
  3533. `(#:phases
  3534. (modify-phases %standard-phases
  3535. (replace 'bootstrap
  3536. ;; ./autogen.sh runs ./configure too soon.
  3537. (lambda _
  3538. (invoke "autoreconf" "-fiv"))))))
  3539. (native-inputs
  3540. (list autoconf automake libx11 pkg-config))
  3541. (propagated-inputs
  3542. (list libvdpau))
  3543. (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
  3544. (synopsis "Tool to query the capabilities of a VDPAU implementation")
  3545. (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
  3546. implementation.")
  3547. (license (license:x11-style "file://COPYING"))))
  3548. (define-public libvdpau-va-gl
  3549. (package
  3550. (name "libvdpau-va-gl")
  3551. (version "0.4.2")
  3552. (source
  3553. (origin
  3554. (method url-fetch)
  3555. (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
  3556. "releases/download/v" version "/libvdpau-va-gl-"
  3557. version ".tar.gz"))
  3558. (sha256
  3559. (base32
  3560. "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
  3561. (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
  3562. (modules '((guix build utils)))
  3563. (snippet '(begin (delete-file-recursively "3rdparty")
  3564. #t))))
  3565. (build-system cmake-build-system)
  3566. (arguments
  3567. '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
  3568. (native-inputs
  3569. (list libvdpau pkg-config))
  3570. (inputs
  3571. (list libva mesa))
  3572. (home-page "https://github.com/i-rinat/libvdpau-va-gl")
  3573. (synopsis "VDPAU driver with VA-API/OpenGL backend")
  3574. (description
  3575. "Many applications can use VDPAU to accelerate portions of the video
  3576. decoding process and video post-processing to the GPU video hardware. Since
  3577. there is no VDPAU available on Intel chips, they fall back to different drawing
  3578. techniques. This driver uses OpenGL under the hood to accelerate drawing and
  3579. scaling and VA-API (if available) to accelerate video decoding.")
  3580. (license license:expat)))
  3581. (define-public recordmydesktop
  3582. (package
  3583. (name "recordmydesktop")
  3584. (version "0.4.0")
  3585. (source (origin
  3586. (method url-fetch)
  3587. (uri (string-append "https://github.com/Enselic/"
  3588. name "/releases/download/v" version
  3589. "/recordmydesktop-" version ".tar.gz"))
  3590. (sha256
  3591. (base32
  3592. "17kjgmkl45zma64a5dg1hyvnjkzk4vl8milgi6ic7hlsbmywpig7"))))
  3593. (build-system gnu-build-system)
  3594. (inputs (list popt
  3595. zlib
  3596. libx11
  3597. libice
  3598. libsm
  3599. libxfixes
  3600. libxdamage
  3601. libxext
  3602. alsa-lib
  3603. libvorbis
  3604. libtheora))
  3605. (home-page "https://enselic.github.io/recordmydesktop/")
  3606. (synopsis "Desktop session video recorder")
  3607. (description
  3608. "recordMyDesktop is a command-line tool that captures the activity in
  3609. your graphical desktop and encodes it as a video. This is a useful tool for
  3610. making @dfn{screencasts}.")
  3611. (license license:gpl2+)))
  3612. (define-public simplescreenrecorder
  3613. (package
  3614. (name "simplescreenrecorder")
  3615. (version "0.4.2")
  3616. (source
  3617. (origin
  3618. (method git-fetch)
  3619. (uri (git-reference
  3620. (url "https://github.com/MaartenBaert/ssr")
  3621. (commit version)))
  3622. (file-name (git-file-name name version))
  3623. (sha256
  3624. (base32
  3625. "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
  3626. (build-system cmake-build-system)
  3627. ;; Although libx11, libxfixes, libxext are listed as build dependencies in
  3628. ;; README.md, the program builds and functions properly without them.
  3629. ;; As a result, they are omitted. Please add them back if problems appear.
  3630. (inputs
  3631. (list alsa-lib
  3632. ffmpeg-4
  3633. glu
  3634. jack-1
  3635. libxi
  3636. libxinerama
  3637. pulseaudio
  3638. qtbase-5
  3639. qtx11extras))
  3640. (native-inputs (list pkg-config))
  3641. (arguments
  3642. `(#:configure-flags
  3643. (list "-DWITH_QT5=TRUE")
  3644. #:tests? #f)) ; no test suite
  3645. ;; Using HTTPS causes part of the page to be displayed improperly.
  3646. (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
  3647. (synopsis "Screen recorder")
  3648. (description "SimpleScreenRecorder is an easy to use screen recorder with
  3649. a graphical user interface. It supports recording the entire screen, or a
  3650. part of it, and allows encoding in many different codecs and file formats.
  3651. Other features include a live preview and live streaming.")
  3652. (license (list license:gpl3+ ; most files
  3653. license:zlib ; glinject/elfhacks.*
  3654. license:isc ; glinject/*
  3655. license:x11)))) ; build-aux/install-sh
  3656. (define-public libsmpeg
  3657. (package
  3658. (name "libsmpeg")
  3659. (version "0.4.5-401")
  3660. (source (origin
  3661. (method svn-fetch)
  3662. (uri (svn-reference
  3663. (url "svn://svn.icculus.org/smpeg/trunk/")
  3664. (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
  3665. (file-name (string-append name "-" version "-checkout"))
  3666. (sha256
  3667. (base32
  3668. "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
  3669. (build-system gnu-build-system)
  3670. (arguments
  3671. ;; libsmpeg fails to build with -std=c++11, which is the default with
  3672. ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
  3673. '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
  3674. (native-inputs
  3675. (list autoconf automake))
  3676. (inputs
  3677. `(("sdl" ,sdl2)))
  3678. (home-page "https://icculus.org/smpeg/")
  3679. (synopsis "SDL MPEG decoding library")
  3680. (description
  3681. "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
  3682. with sound support. Video playback is based on the ubiquitous Berkeley MPEG
  3683. player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
  3684. library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
  3685. and MPEG system streams.")
  3686. (license (list license:expat
  3687. license:lgpl2.1
  3688. license:lgpl2.1+
  3689. license:gpl2))))
  3690. ;; for btanks
  3691. (define-public libsmpeg-with-sdl1
  3692. (package (inherit libsmpeg)
  3693. (name "libsmpeg")
  3694. (version "0.4.5-399")
  3695. (source (origin
  3696. (method svn-fetch)
  3697. (uri (svn-reference
  3698. (url "svn://svn.icculus.org/smpeg/trunk/")
  3699. (revision 399))) ; tagged release 0.4.5
  3700. (file-name (string-append name "-" version "-checkout"))
  3701. (sha256
  3702. (base32
  3703. "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
  3704. (inputs
  3705. (list sdl))))
  3706. (define-public libbdplus
  3707. (package
  3708. (name "libbdplus")
  3709. (version "0.1.2")
  3710. (source
  3711. (origin
  3712. (method url-fetch)
  3713. (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
  3714. version "/" name "-" version ".tar.bz2"))
  3715. (sha256
  3716. (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
  3717. (inputs
  3718. (list libgcrypt))
  3719. (build-system gnu-build-system)
  3720. (home-page "https://www.videolan.org/developers/libbdplus.html")
  3721. (synopsis "Library for decrypting certain Blu-Ray discs")
  3722. (description "libbdplus is a library which implements the BD+ System
  3723. specifications.")
  3724. (license license:lgpl2.1+)))
  3725. (define-public libaacs
  3726. (package
  3727. (name "libaacs")
  3728. (version "0.11.0")
  3729. (source
  3730. (origin
  3731. (method url-fetch)
  3732. (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
  3733. version "/libaacs-" version ".tar.bz2"))
  3734. (sha256
  3735. (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d"))))
  3736. (inputs
  3737. (list libgcrypt))
  3738. (native-inputs
  3739. (list bison flex))
  3740. (build-system gnu-build-system)
  3741. (home-page "https://www.videolan.org/developers/libaacs.html")
  3742. (synopsis "Library for decrypting certain Blu-Ray discs")
  3743. (description "libaacs is a library which implements the Advanced Access
  3744. Content System specification.")
  3745. (license license:lgpl2.1+)))
  3746. (define-public mps-youtube
  3747. (package
  3748. (name "mps-youtube")
  3749. (version "0.2.8")
  3750. (source
  3751. (origin
  3752. (method git-fetch)
  3753. (uri (git-reference
  3754. (url "https://github.com/mps-youtube/mps-youtube")
  3755. (commit (string-append "v" version))))
  3756. (file-name (git-file-name name version))
  3757. (sha256
  3758. (base32
  3759. "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
  3760. (build-system python-build-system)
  3761. (arguments
  3762. ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
  3763. ;; test suite results differ depending on the country and also introduce
  3764. ;; non-determinism in the tests.
  3765. ;; https://github.com/mps-youtube/mps-youtube/issues/556
  3766. '(#:tests? #f
  3767. #:phases (modify-phases %standard-phases
  3768. ;; Loading this as a library will create cache directories,
  3769. ;; etc; which fails in the build container.
  3770. (delete 'sanity-check))))
  3771. (propagated-inputs
  3772. (list python-pafy python-pygobject)) ; For mpris2 support
  3773. (home-page "https://github.com/mps-youtube/mps-youtube")
  3774. (synopsis "Terminal based YouTube player and downloader")
  3775. (description
  3776. "@code{mps-youtube} is based on mps, a terminal based program to
  3777. search, stream and download music. This implementation uses YouTube as
  3778. a source of content and can play and download video as well as audio.
  3779. It can use either mpv or mplayer for playback, and for conversion of
  3780. formats ffmpeg or libav is used. Users should install one of the
  3781. supported players in addition to this package.")
  3782. (license license:gpl3+)))
  3783. (define-public handbrake
  3784. (package
  3785. (name "handbrake")
  3786. (version "1.5.1")
  3787. (source (origin
  3788. (method url-fetch)
  3789. (uri (string-append "https://github.com/HandBrake/HandBrake/"
  3790. "releases/download/" version "/"
  3791. "HandBrake-" version "-source.tar.bz2"))
  3792. (sha256
  3793. (base32
  3794. "1w1hjj6gvdydypw4mdn281w0x163is59cfm7k6bq371hsl3gx69r"))
  3795. (modules '((guix build utils)))
  3796. (snippet
  3797. ;; Remove "contrib" and source not necessary for
  3798. ;; building/running under a GNU environment.
  3799. '(begin
  3800. (for-each delete-file-recursively
  3801. '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
  3802. (substitute* "make/include/main.defs"
  3803. ;; Disable unconditional inclusion of "contrib" libraries
  3804. ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
  3805. ;; which would lead to fetching and building of these
  3806. ;; libraries. Use our own instead.
  3807. (("MODULES \\+= contrib") "# MODULES += contrib"))))))
  3808. (build-system glib-or-gtk-build-system)
  3809. (native-inputs
  3810. `(("automake" ,automake) ; GUI subpackage must be bootstrapped
  3811. ("autoconf" ,autoconf)
  3812. ("intltool" ,intltool)
  3813. ("libtool" ,libtool)
  3814. ("pkg-config" ,pkg-config)
  3815. ("python" ,python-2))) ; For configuration
  3816. (inputs
  3817. `(("bzip2" ,bzip2)
  3818. ("dbus-glib" ,dbus-glib)
  3819. ("ffmpeg" ,ffmpeg-4)
  3820. ("fontconfig" ,fontconfig)
  3821. ("freetype" ,freetype)
  3822. ("glib" ,glib)
  3823. ("gstreamer" ,gstreamer)
  3824. ("gst-plugins-base" ,gst-plugins-base)
  3825. ("gtk+" ,gtk+)
  3826. ("jansson" ,jansson)
  3827. ("lame" ,lame)
  3828. ("libass" ,libass)
  3829. ("libbluray" ,libbluray)
  3830. ("libdav1d" ,dav1d)
  3831. ("libdvdnav" ,libdvdnav)
  3832. ("libdvdread" ,libdvdread)
  3833. ("libgudev" ,libgudev)
  3834. ("libjpeg-turbo" ,libjpeg-turbo)
  3835. ("libmpeg2" ,libmpeg2)
  3836. ("libnotify" ,libnotify)
  3837. ("libnuma" ,numactl)
  3838. ("libogg" ,libogg)
  3839. ("libopus" ,opus)
  3840. ("libsamplerate" ,libsamplerate)
  3841. ("libtheora" ,libtheora)
  3842. ("libvorbis" ,libvorbis)
  3843. ("libvpx" ,libvpx)
  3844. ("libxml2" ,libxml2)
  3845. ("libx264" ,libx264)
  3846. ("speex" ,speex)
  3847. ("x265" ,x265)
  3848. ("zimg" ,zimg)
  3849. ("zlib" ,zlib)))
  3850. (arguments
  3851. `(#:tests? #f ;tests require Ruby and claim to be unsupported
  3852. #:configure-flags
  3853. (list "--disable-gtk-update-checks"
  3854. "--disable-nvenc"
  3855. (string-append "CPPFLAGS=-I"
  3856. (assoc-ref %build-inputs "libxml2")
  3857. "/include/libxml2")
  3858. "LDFLAGS=-lx265")
  3859. #:phases
  3860. (modify-phases %standard-phases
  3861. (replace 'bootstrap
  3862. ;; Run bootstrap ahead of time so that shebangs get patched.
  3863. (lambda _
  3864. (setenv "CONFIG_SHELL" (which "sh"))
  3865. ;; Patch the Makefile so that it doesn't bootstrap again.
  3866. (substitute* "gtk/module.rules"
  3867. ((".*autoreconf.*") ""))
  3868. (with-directory-excursion "gtk"
  3869. (invoke "autoreconf" "-fiv"))))
  3870. (add-before 'configure 'patch-SHELL
  3871. (lambda _
  3872. (substitute* "gtk/po/Makefile.in.in"
  3873. (("SHELL = /bin/sh") "SHELL = @SHELL@"))))
  3874. (add-before 'configure 'relax-reqs
  3875. (lambda _
  3876. (substitute* "make/configure.py"
  3877. ;; cmake is checked for so that it can be used to build
  3878. ;; contrib/harfbuzz and contrib/x265, but we get these as
  3879. ;; inputs, so don't abort if it's not found. Similarly, meson
  3880. ;; and ninja are only needed for contrib/libdav1d, and nasm
  3881. ;; only for libvpx
  3882. (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
  3883. (string-append & "False")))))
  3884. (replace 'configure
  3885. (lambda* (#:key outputs configure-flags #:allow-other-keys)
  3886. ;; 'configure' is not an autoconf-generated script, and
  3887. ;; errors on unrecognized arguments,
  3888. ;; e.g. --enable-fast-install
  3889. (let ((out (assoc-ref outputs "out")))
  3890. (apply invoke "./configure"
  3891. (string-append "--prefix=" out)
  3892. (or configure-flags '())))))
  3893. (add-after 'configure 'chdir-build
  3894. (lambda _ (chdir "./build"))))))
  3895. (home-page "https://handbrake.fr")
  3896. (synopsis "Video transcoder")
  3897. (description
  3898. "HandBrake is a tool for converting video from any format to a selection
  3899. of modern, widely supported codecs.")
  3900. ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
  3901. ;; Combination under GPLv2. See LICENSE.
  3902. (license license:gpl2)))
  3903. (define-public intel-vaapi-driver
  3904. (package
  3905. (name "intel-vaapi-driver")
  3906. (version "2.4.1")
  3907. (source
  3908. (origin
  3909. (method git-fetch)
  3910. (uri (git-reference
  3911. (url "https://github.com/intel/intel-vaapi-driver")
  3912. (commit version)))
  3913. (sha256
  3914. (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
  3915. (file-name (git-file-name name version))))
  3916. (build-system gnu-build-system)
  3917. (native-inputs
  3918. (list autoconf automake libtool pkg-config))
  3919. (inputs
  3920. (list libdrm libva libx11))
  3921. (arguments
  3922. `(#:phases
  3923. (modify-phases %standard-phases
  3924. (add-before 'configure 'set-target-directory
  3925. (lambda* (#:key outputs #:allow-other-keys)
  3926. (let ((out (assoc-ref outputs "out")))
  3927. (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
  3928. #t))))))
  3929. ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
  3930. ;; this to all VA-API back ends instead of once to libva.
  3931. (native-search-paths
  3932. (list (search-path-specification
  3933. (variable "LIBVA_DRIVERS_PATH")
  3934. (files '("lib/dri")))))
  3935. (supported-systems '("i686-linux" "x86_64-linux"))
  3936. (home-page "https://01.org/linuxmedia/vaapi")
  3937. (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
  3938. (description
  3939. "This is the @acronym{VA-API, Video Acceleration API} back end required for
  3940. hardware-accelerated video processing on Intel GEN Graphics devices supported by
  3941. the i915 driver, such as integrated Intel HD Graphics. It provides access to
  3942. both hardware and shader functionality for faster encoding, decoding, and
  3943. post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
  3944. (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
  3945. license:expat)))) ; the rest, excluding the test suite
  3946. (define-public openh264
  3947. (package
  3948. (name "openh264")
  3949. (version "2.3.0")
  3950. (source (origin
  3951. (method git-fetch)
  3952. (uri (git-reference
  3953. (url "https://github.com/cisco/openh264")
  3954. (commit (string-append "v" version))))
  3955. (file-name (git-file-name name version))
  3956. (sha256
  3957. (base32
  3958. "1yr6nsjpnazq4z6dvjfyanljwgwnyjh3ddxa0sq6hl9qc59yq91r"))))
  3959. (build-system gnu-build-system)
  3960. (native-inputs
  3961. (list nasm python))
  3962. (arguments
  3963. (list
  3964. #:make-flags
  3965. #~(list (string-append "PREFIX=" #$output)
  3966. "CC=gcc")
  3967. #:test-target "test"
  3968. #:phases
  3969. #~(modify-phases %standard-phases
  3970. ;; no configure script
  3971. (delete 'configure))))
  3972. (home-page "https://www.openh264.org/")
  3973. (synopsis "H264 decoder library")
  3974. (description
  3975. "Openh264 is a library which can decode H264 video streams.")
  3976. (license license:bsd-2)))
  3977. (define-public libmp4v2
  3978. (package
  3979. (name "libmp4v2")
  3980. (version "2.0.0")
  3981. (source
  3982. (origin
  3983. (method url-fetch)
  3984. ;; XXX: The new location of upstream is uncertain and will become relevant the
  3985. ;; moment when the googlecode archive shuts down. It is past the date it
  3986. ;; should've been turned off. I tried to communicate with upstream, but this
  3987. ;; wasn't very responsive and not very helpful. The short summary is, it is
  3988. ;; chaos when it comes to the amount of forks and only time will tell where
  3989. ;; the new upstream location is.
  3990. (uri (string-append "https://storage.googleapis.com/google-"
  3991. "code-archive-downloads/v2/"
  3992. "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
  3993. (file-name (string-append name "-" version ".tar.bz2"))
  3994. (patches (search-patches "libmp4v2-c++11.patch"))
  3995. (sha256
  3996. (base32
  3997. "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
  3998. (build-system gnu-build-system)
  3999. (outputs '("out"
  4000. "static")) ; 3.7MiB .a file
  4001. (arguments
  4002. `(;; Build as C++2003 to avoid C++11 "narrowing conversion" errors.
  4003. #:configure-flags '("CXXFLAGS=-O2 -g -std=c++03")
  4004. #:phases
  4005. (modify-phases %standard-phases
  4006. (add-after 'unpack 'remove-dates
  4007. (lambda _
  4008. ;; Make the build reproducible.
  4009. (substitute* "configure"
  4010. (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
  4011. (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
  4012. #t))
  4013. (add-after 'install 'move-static-libraries
  4014. (lambda* (#:key outputs #:allow-other-keys)
  4015. ;; Move static libraries to the "static" output.
  4016. (let* ((out (assoc-ref outputs "out"))
  4017. (lib (string-append out "/lib"))
  4018. (static (assoc-ref outputs "static"))
  4019. (slib (string-append static "/lib")))
  4020. (mkdir-p slib)
  4021. (for-each (lambda (file)
  4022. (install-file file slib)
  4023. (delete-file file))
  4024. (find-files lib "\\.a$"))
  4025. #t))))))
  4026. (native-inputs
  4027. (list help2man dejagnu))
  4028. (home-page "https://code.google.com/archive/p/mp4v2/")
  4029. (synopsis "API to create and modify mp4 files")
  4030. (description
  4031. "The MP4v2 library provides an API to create and modify mp4 files as defined by
  4032. ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
  4033. file format that has been used as a multimedia file format in a variety of platforms and
  4034. applications. It is a very powerful and extensible format that can accommodate
  4035. practically any type of media.")
  4036. (license license:mpl1.1)))
  4037. (define-public libmediainfo
  4038. (package
  4039. (name "libmediainfo")
  4040. (version "23.03")
  4041. (source (origin
  4042. (method url-fetch)
  4043. (uri (string-append "https://mediaarea.net/download/source/"
  4044. name "/" version "/"
  4045. name "_" version ".tar.xz"))
  4046. (sha256
  4047. (base32
  4048. "1660lsilm02324c65sxxi41fn225hg78yxqyxff5dyf6fvyzyypm"))))
  4049. ;; TODO add a Big Buck Bunny webm for tests.
  4050. (native-inputs
  4051. (list autoconf automake libtool pkg-config))
  4052. (propagated-inputs
  4053. (list zlib tinyxml2 curl ; In Requires.private of libmediainfo.pc.
  4054. libzen))
  4055. (build-system gnu-build-system)
  4056. (arguments
  4057. '(#:tests? #f ; see above TODO
  4058. #:configure-flags
  4059. (list "--with-libcurl" "--with-libtinyxml2")
  4060. #:phases
  4061. ;; build scripts not in root of archive
  4062. (modify-phases %standard-phases
  4063. (add-after 'unpack 'change-to-build-dir
  4064. (lambda _
  4065. (chdir "Project/GNU/Library")
  4066. ;; XXX Add a shebang to the script to avoid an error like:
  4067. ;; "In execvp of ./autogen.sh: Exec format error"
  4068. ;; The string replaced is just a code comment.
  4069. ;; See the similar substitution made in mediainfo.
  4070. (substitute* "autogen.sh"
  4071. (("#libtoolize")
  4072. "#!/bin/sh"))
  4073. #t)))))
  4074. (home-page "https://mediaarea.net/en/MediaInfo")
  4075. (synopsis "Library for retrieving media metadata")
  4076. (description "MediaInfo is a library used for retrieving technical
  4077. information and other metadata about audio or video files. A non-exhaustive
  4078. list of the information MediaInfo can retrieve from media files include:
  4079. @itemize
  4080. @item General: title, author, director, album, track number, date, duration...
  4081. @item Video: codec, aspect, fps, bitrate...
  4082. @item Audio: codec, sample rate, channels, language, bitrate...
  4083. @item Text: language of subtitle
  4084. @item Chapters: number of chapters, list of chapters
  4085. @end itemize
  4086. MediaInfo supports the following formats:
  4087. @itemize
  4088. @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
  4089. MPEG-2, MPEG-4, DVD (VOB)...
  4090. @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
  4091. @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
  4092. @item Subtitles: SRT, SSA, ASS, SAMI...
  4093. @end itemize\n")
  4094. (license license:bsd-2)))
  4095. ;; TODO also have a GUI version available
  4096. (define-public mediainfo
  4097. (package
  4098. (name "mediainfo")
  4099. (version "23.03")
  4100. (source (origin
  4101. (method url-fetch)
  4102. ;; Warning: This source has proved unreliable 1 time at least.
  4103. ;; Consider an alternate source or report upstream if this
  4104. ;; happens again.
  4105. (uri (string-append "https://mediaarea.net/download/source/"
  4106. name "/" version "/"
  4107. name "_" version ".tar.xz"))
  4108. (sha256
  4109. (base32
  4110. "1654pal4x753pcha8h939a70q5z3jzaddgb39cinlrv5fljs8qgh"))))
  4111. (native-inputs
  4112. (list autoconf automake libtool pkg-config))
  4113. (inputs
  4114. (list libmediainfo))
  4115. (build-system gnu-build-system)
  4116. (arguments
  4117. '(#:tests? #f ; lacks tests
  4118. #:phases
  4119. ;; build scripts not in root of archive
  4120. (modify-phases %standard-phases
  4121. (add-after 'unpack 'change-to-build-dir
  4122. (lambda _
  4123. (chdir "Project/GNU/CLI")
  4124. ;; XXX Add a shebang to the script to avoid an error like:
  4125. ;; "In execvp of ./autogen.sh: Exec format error"
  4126. ;; The string replaced is just a code comment.
  4127. ;; See the similar substitution made in libmediainfo.
  4128. (substitute* "autogen.sh"
  4129. (("#libtoolize")
  4130. "#!/bin/sh"))
  4131. #t)))))
  4132. (home-page "https://mediaarea.net/en/MediaInfo")
  4133. (synopsis "Utility for reading media metadata")
  4134. (description "MediaInfo is a utility used for retrieving technical
  4135. information and other metadata about audio or video files. It supports the
  4136. many codecs and formats supported by libmediainfo.")
  4137. (license license:bsd-2)))
  4138. (define-public atomicparsley
  4139. (package
  4140. (name "atomicparsley")
  4141. (version "20200701.154658.b0d6223")
  4142. (source (origin
  4143. (method git-fetch)
  4144. (uri (git-reference
  4145. (url "https://github.com/wez/atomicparsley")
  4146. (commit version)))
  4147. (file-name (git-file-name name version))
  4148. (sha256
  4149. (base32
  4150. "1kym2l5y34nmbrrlkfmxsf1cwrvch64kb34jp0hpa0b89idbhwqh"))))
  4151. (build-system cmake-build-system)
  4152. (arguments
  4153. `(#:tests? #f ;; no tests included
  4154. #:phases
  4155. (modify-phases %standard-phases
  4156. (add-before 'configure 'set-cmake-version
  4157. (lambda* _
  4158. (substitute* "CMakeLists.txt"
  4159. ;; At the time of writing, Guix has CMake at 3.16, but
  4160. ;; AtomicParsley uses 3.17. This brings the required CMake
  4161. ;; version down to what Guix can afford.
  4162. (("VERSION 3.17") "VERSION 3.16"))
  4163. #t))
  4164. (replace 'install
  4165. (lambda* (#:key outputs #:allow-other-keys)
  4166. (let* ((out (assoc-ref outputs "out"))
  4167. (bin (string-append out "/bin")))
  4168. (install-file "AtomicParsley" bin))
  4169. #t)))))
  4170. (inputs
  4171. (list zlib))
  4172. (synopsis "Metadata editor for MPEG-4 files")
  4173. (description "AtomicParsley is a lightweight command line program for
  4174. reading, parsing and setting metadata into MPEG-4 files, in particular,
  4175. iTunes-style metadata.")
  4176. (home-page "https://github.com/wez/atomicparsley")
  4177. (license license:gpl2+)))
  4178. (define-public livemedia-utils
  4179. (package
  4180. (name "livemedia-utils")
  4181. (version "2020.11.19")
  4182. (source (origin
  4183. (method url-fetch)
  4184. (uri (string-append
  4185. "https://download.videolan.org/contrib/live555/live."
  4186. version ".tar.gz"))
  4187. (sha256
  4188. (base32
  4189. "16w6yxdbmjdhvffnrb752dn4llf3l0wb00dgdkyia0vqsv2qqyn7"))))
  4190. (build-system gnu-build-system)
  4191. (arguments
  4192. `(#:tests? #f ; no tests
  4193. #:make-flags (list (string-append "CC=" ,(cc-for-target))
  4194. (string-append "CXX=" ,(cxx-for-target))
  4195. (string-append "LDFLAGS=-Wl,-rpath="
  4196. (assoc-ref %outputs "out") "/lib")
  4197. (string-append "PREFIX="
  4198. (assoc-ref %outputs "out")))
  4199. #:phases (modify-phases %standard-phases
  4200. (add-before 'configure 'fix-makefiles-generation
  4201. (lambda _
  4202. (substitute* "genMakefiles"
  4203. (("/bin/rm") "rm"))
  4204. #t))
  4205. (replace 'configure
  4206. (lambda _
  4207. (invoke "./genMakefiles"
  4208. "linux-with-shared-libraries"))))))
  4209. (inputs
  4210. (list openssl))
  4211. (home-page "http://www.live555.com/liveMedia/")
  4212. (synopsis "Set of C++ libraries for multimedia streaming")
  4213. (description "This code forms a set of C++ libraries for multimedia
  4214. streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
  4215. can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
  4216. JPEG video, and several audio codecs. They can easily be extended to support
  4217. additional (audio and/or video) codecs, and can also be used to build basic
  4218. RTSP or SIP clients and servers.")
  4219. (license license:lgpl3+)))
  4220. (define-public libdvbpsi
  4221. (package
  4222. (name "libdvbpsi")
  4223. (version "1.3.3")
  4224. (source (origin
  4225. (method url-fetch)
  4226. (uri (string-append
  4227. "https://download.videolan.org/pub/libdvbpsi/"
  4228. version "/libdvbpsi-" version ".tar.bz2"))
  4229. (sha256
  4230. (base32
  4231. "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
  4232. (build-system gnu-build-system)
  4233. (home-page "https://www.videolan.org/developers/libdvbpsi.html")
  4234. (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
  4235. tables")
  4236. (description "libdvbpsi is a simple library designed for decoding and
  4237. generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
  4238. and ITU-T H.222.0.")
  4239. (license license:lgpl2.1)))
  4240. (define-public ffms2
  4241. (package
  4242. (name "ffms2")
  4243. (version "2.23")
  4244. (home-page "https://github.com/FFMS/ffms2")
  4245. (source (origin
  4246. (method git-fetch)
  4247. (uri (git-reference
  4248. (url "https://github.com/FFMS/ffms2")
  4249. (commit version)))
  4250. (file-name (git-file-name name version))
  4251. (sha256
  4252. (base32
  4253. "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
  4254. (build-system gnu-build-system)
  4255. (arguments
  4256. '(#:configure-flags
  4257. (list "--enable-avresample")))
  4258. (inputs
  4259. (list zlib))
  4260. (propagated-inputs
  4261. (list ffmpeg-4))
  4262. (native-inputs
  4263. (list pkg-config))
  4264. (synopsis "Cross-platform wrapper around ffmpeg/libav")
  4265. (description
  4266. "FFMpegSource is a wrapper library around ffmpeg/libav that allows
  4267. programmers to access a standard API to open and decompress media files.")
  4268. ;; sources are distributed under a different license that the binary.
  4269. ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
  4270. (license license:gpl2+))); inherits from ffmpeg
  4271. (define-public aegisub
  4272. (package
  4273. (name "aegisub")
  4274. (version "3.2.2")
  4275. (source (origin
  4276. (method url-fetch)
  4277. (uri (string-append
  4278. "http://ftp.aegisub.org/pub/archives/releases/source/"
  4279. name "-" version ".tar.xz"))
  4280. (sha256
  4281. (base32
  4282. "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
  4283. (patches (search-patches "aegisub-icu59-include-unistr.patch"
  4284. "aegisub-make43.patch"
  4285. "aegisub-boost68.patch"))))
  4286. (build-system gnu-build-system)
  4287. (arguments
  4288. `(#:configure-flags
  4289. (list "--disable-update-checker"
  4290. "--without-portaudio"
  4291. "--without-openal"
  4292. "--without-oss"
  4293. "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
  4294. ;; tests require busted, a lua package we don't have yet
  4295. #:tests? #f
  4296. #:phases
  4297. (modify-phases %standard-phases
  4298. (add-before 'configure 'fix-ldflags
  4299. (lambda _
  4300. (setenv "LDFLAGS" "-pthread")
  4301. #t))
  4302. (add-after 'unpack 'fix-boost-headers
  4303. (lambda _
  4304. (substitute*
  4305. '("src/subtitles_provider_libass.cpp"
  4306. "src/colour_button.cpp"
  4307. "src/video_provider_dummy.cpp"
  4308. "./src/video_frame.cpp")
  4309. (("#include <boost/gil/gil_all.hpp>")
  4310. "#include <boost/gil.hpp>"))
  4311. #t)))))
  4312. (inputs
  4313. (list boost
  4314. ffms2
  4315. fftw
  4316. hunspell
  4317. mesa
  4318. libass
  4319. alsa-lib
  4320. pulseaudio
  4321. libx11
  4322. freetype
  4323. wxwidgets-gtk2))
  4324. (native-inputs
  4325. (list intltool desktop-file-utils pkg-config))
  4326. (home-page "https://www.aegisub.org/")
  4327. (synopsis "Subtitle engine")
  4328. (description
  4329. "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
  4330. it quick and easy to time subtitles to audio, and features many powerful
  4331. tools for styling them, including a built-in real-time video preview.")
  4332. (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
  4333. license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
  4334. license:expat)))) ; and src/gl that is under a license similar
  4335. ; the the Expat license, with a rewording (Software -> Materials). (called MIT
  4336. ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
  4337. ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
  4338. (define-public pitivi
  4339. (package
  4340. (name "pitivi")
  4341. (version "2022.06.0")
  4342. (source
  4343. (origin
  4344. (method git-fetch)
  4345. (uri (git-reference
  4346. (url "https://gitlab.gnome.org/GNOME/pitivi.git")
  4347. (commit version)))
  4348. (file-name (git-file-name name version))
  4349. (sha256
  4350. (base32 "1wgfi8srblqzd2y6528cyvn56rbdxpwlq0wmwqhabshdk28zyx8d"))))
  4351. (build-system meson-build-system)
  4352. (native-inputs
  4353. (list gettext-minimal
  4354. `(,glib "bin")
  4355. itstool
  4356. pkg-config))
  4357. (inputs
  4358. (list bash-minimal
  4359. glib
  4360. gst-editing-services
  4361. gstreamer
  4362. gst-plugins-base
  4363. gst-plugins-good
  4364. ;; TODO: Add the 'cvtracker' plugin after our gstreamer packages
  4365. ;; has been upgraded to version 1.20.
  4366. (gst-plugins/selection gst-plugins-bad #:plugins
  4367. '("debugutils" "transcode")
  4368. #:configure-flags
  4369. #~'("-Dintrospection=enabled"))
  4370. gst-libav
  4371. gsound
  4372. gtk+
  4373. libpeas
  4374. libnotify
  4375. pango
  4376. python
  4377. python-gst
  4378. python-librosa
  4379. python-numpy
  4380. python-matplotlib
  4381. python-pycairo
  4382. python-pygobject))
  4383. ;; Propagate librsvg so that is is registered in GDK_PIXBUF_MODULE_FILE,
  4384. ;; otherwise pitivi fails to launch.
  4385. (propagated-inputs (list librsvg))
  4386. (arguments
  4387. `(#:glib-or-gtk? #t
  4388. #:phases
  4389. (modify-phases %standard-phases
  4390. (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
  4391. (lambda* (#:key outputs #:allow-other-keys)
  4392. (wrap-program (search-input-file outputs "bin/pitivi")
  4393. `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
  4394. `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
  4395. ;; We've only added inputs for what Pitivi deems either
  4396. ;; necessary or optional. Let the user's packages take
  4397. ;; precedence in case they have e.g. the full gst-plugins-bad.
  4398. `("GST_PLUGIN_SYSTEM_PATH" suffix
  4399. (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))))))
  4400. (home-page "https://www.pitivi.org")
  4401. (synopsis "Video editor based on GStreamer Editing Services")
  4402. (description "Pitivi is a video editor built upon the GStreamer Editing
  4403. Services. It aims to be an intuitive and flexible application that can appeal
  4404. to newbies and professionals alike.")
  4405. (license license:lgpl2.1+)))
  4406. (define-public gavl
  4407. (package
  4408. (name "gavl")
  4409. (version "1.4.0")
  4410. (source
  4411. (origin
  4412. (method url-fetch)
  4413. (uri (string-append "mirror://sourceforge/gmerlin/"
  4414. name "/" version "/"
  4415. name "-" version ".tar.gz"))
  4416. (file-name (string-append name "-" version ".tar.gz"))
  4417. (sha256
  4418. (base32
  4419. "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
  4420. (build-system gnu-build-system)
  4421. (arguments
  4422. '(#:configure-flags '("LIBS=-lm")))
  4423. (native-inputs
  4424. (list pkg-config doxygen))
  4425. (home-page "https://gmerlin.sourceforge.net")
  4426. (synopsis "Low level library for multimedia API building")
  4427. (description
  4428. "Gavl is short for Gmerlin Audio Video Library. It is a low level
  4429. library, upon which multimedia APIs can be built. Gavl handles all the
  4430. details of audio and video formats like colorspaces, sample rates,
  4431. multichannel configurations, etc. It provides standardized definitions for
  4432. those formats as well as container structures for carrying audio samples or
  4433. video images inside an application.
  4434. In addition, it handles the sometimes ugly task of converting between all
  4435. these formats and provides some elementary operations (copying, scaling,
  4436. alpha blending etc).")
  4437. (license license:gpl3)))
  4438. (define-public frei0r-plugins
  4439. (package
  4440. (name "frei0r-plugins")
  4441. (version "1.7.0")
  4442. (source
  4443. (origin
  4444. (method url-fetch)
  4445. (uri (string-append "https://files.dyne.org/frei0r/"
  4446. "frei0r-plugins-" version ".tar.gz"))
  4447. (sha256
  4448. (base32
  4449. "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
  4450. (build-system gnu-build-system)
  4451. (arguments
  4452. `(#:phases
  4453. (modify-phases %standard-phases
  4454. (add-after 'unpack 'patch-Makefile
  4455. (lambda _
  4456. ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
  4457. ;; names in the tarball. Try removing this for future versions.
  4458. (substitute* "Makefile.in"
  4459. (("README\\.md ChangeLog TODO AUTHORS")
  4460. "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
  4461. #t)))))
  4462. ;; TODO: opencv for additional face detection filters.
  4463. (inputs
  4464. (list gavl cairo))
  4465. (native-inputs
  4466. (list pkg-config))
  4467. (home-page "https://www.dyne.org/software/frei0r/")
  4468. (synopsis "Minimalistic plugin API for video effects")
  4469. (description
  4470. "Frei0r is a minimalistic plugin API for video effects.
  4471. The main emphasis is on simplicity for an API that will round up
  4472. the most common video effects into simple filters, sources and
  4473. mixers that can be controlled by parameters. Frei0r wants to
  4474. provide a way to share these simple effects between many
  4475. applications, avoiding their reimplementation by different projects.
  4476. It counts more than 100 plugins.")
  4477. (license (list license:gpl2+
  4478. ;; The following files are licensed as LGPL2.1+:
  4479. ;; src/generator/ising0r/ising0r.c
  4480. ;; src/generator/onecol0r/onecol0r.cpp
  4481. ;; src/generator/nois0r/nois0r.cpp
  4482. ;; src/generator/lissajous0r/lissajous0r.cpp
  4483. ;; src/filter/ndvi/gradientlut.hpp
  4484. ;; src/filter/ndvi/ndvi.cpp
  4485. ;; src/filter/facedetect/facedetect.cpp
  4486. license:lgpl2.1+))))
  4487. (define-public motion
  4488. (package
  4489. (name "motion")
  4490. (version "4.5.1")
  4491. (home-page "https://motion-project.github.io/")
  4492. (source (origin
  4493. (method git-fetch)
  4494. (uri (git-reference
  4495. (url "https://github.com/Motion-Project/motion")
  4496. (commit (string-append "release-" version))))
  4497. (sha256
  4498. (base32
  4499. "09j919bba75d05rkqpib5rcmn1ff5nvn4ss8yy4fi6iz0lnacffx"))
  4500. (file-name (git-file-name name version))))
  4501. (build-system gnu-build-system)
  4502. (native-inputs
  4503. (list autoconf automake gettext-minimal pkg-config))
  4504. (inputs
  4505. (list libjpeg-turbo ffmpeg libmicrohttpd sqlite))
  4506. (arguments
  4507. '(#:phases (modify-phases %standard-phases
  4508. (replace 'bootstrap
  4509. (lambda _
  4510. (patch-shebang "scripts/version.sh")
  4511. (invoke "autoreconf" "-vfi"))))
  4512. #:configure-flags '("--sysconfdir=/etc")
  4513. #:make-flags (list (string-append "sysconfdir="
  4514. (assoc-ref %outputs "out")
  4515. "/etc"))
  4516. #:tests? #f)) ; no 'check' target
  4517. (synopsis "Detect motion from video signals")
  4518. (description
  4519. "Motion is a program that monitors the video signal from one or more
  4520. cameras and is able to detect if a significant part of the picture has
  4521. changed. Or in other words, it can detect motion.")
  4522. ;; Some files say "version 2" and others "version 2 or later".
  4523. (license license:gpl2)))
  4524. (define-public subdl
  4525. (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
  4526. (revision "1"))
  4527. (package
  4528. (name "subdl")
  4529. (version (git-version "1.0.3" revision commit))
  4530. (source (origin
  4531. (method git-fetch)
  4532. (uri (git-reference
  4533. (url "https://github.com/alexanderwink/subdl")
  4534. (commit commit)))
  4535. (file-name (git-file-name name version))
  4536. (sha256
  4537. (base32
  4538. "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
  4539. (build-system trivial-build-system)
  4540. (arguments
  4541. `(#:modules ((guix build utils))
  4542. #:builder (begin
  4543. (use-modules (guix build utils))
  4544. (let* ((out (assoc-ref %outputs "out"))
  4545. (bin (string-append out "/bin"))
  4546. (source (assoc-ref %build-inputs "source"))
  4547. (python (assoc-ref %build-inputs "python")))
  4548. (install-file (string-append source "/subdl") bin)
  4549. (patch-shebang (string-append bin "/subdl")
  4550. (list (string-append python "/bin")))))))
  4551. (inputs (list python))
  4552. (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
  4553. (description "Subdl is a command-line tool for downloading subtitles from
  4554. opensubtitles.org. By default, it will search for English subtitles, display
  4555. the results, download the highest-rated result in the requested language and
  4556. save it to the appropriate filename.")
  4557. (license license:gpl3+)
  4558. (home-page "https://github.com/alexanderwink/subdl"))))
  4559. (define-public l-smash
  4560. (package
  4561. (name "l-smash")
  4562. (version "2.14.5")
  4563. (source (origin
  4564. (method git-fetch)
  4565. (uri (git-reference
  4566. (url "https://github.com/l-smash/l-smash")
  4567. (commit (string-append "v" version))))
  4568. (file-name (git-file-name name version))
  4569. (sha256
  4570. (base32
  4571. "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
  4572. (build-system gnu-build-system)
  4573. (arguments
  4574. `(#:tests? #f ;no tests
  4575. #:make-flags
  4576. (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
  4577. (assoc-ref %outputs "out") "/lib"))
  4578. #:phases
  4579. (modify-phases %standard-phases
  4580. ;; configure fails if it is followed by CONFIG_SHELL
  4581. (replace 'configure
  4582. (lambda* (#:key outputs #:allow-other-keys)
  4583. (let ((out (assoc-ref outputs "out")))
  4584. (invoke "./configure" (string-append "--prefix=" out)
  4585. "--disable-static")))))))
  4586. (native-inputs
  4587. (list which))
  4588. (home-page "https://l-smash.github.io/l-smash/")
  4589. (synopsis "MP4 multiplexer and demultiplexer library")
  4590. (description
  4591. "L-SMASH is a cross-platform library that handles the ISO base media file
  4592. format and some of its derived file formats, including MP4. It operates as a
  4593. multiplexer and demultiplexer, and can mux video and audio in several formats
  4594. using standalone executable files.")
  4595. (license license:isc)))
  4596. (define-public qtfaststart
  4597. (package
  4598. (name "qtfaststart")
  4599. (version "1.8")
  4600. (source (origin
  4601. (method url-fetch)
  4602. (uri (pypi-uri "qtfaststart" version))
  4603. (sha256
  4604. (base32
  4605. "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
  4606. (build-system python-build-system)
  4607. (arguments
  4608. '(#:tests? #f)) ; no test suite
  4609. (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
  4610. (description "qtfaststart enables streaming and pseudo-streaming of
  4611. QuickTime and MP4 files by moving metadata and offset information to the
  4612. beginning of the file. It can also print some useful information about the
  4613. structure of the file. This program is based on qt-faststart.c from the FFmpeg
  4614. project, which is released into the public domain, as well as ISO 14496-12:2005
  4615. (the official spec for MP4), which can be obtained from the ISO or found
  4616. online.")
  4617. (home-page "https://github.com/danielgtaylor/qtfaststart")
  4618. (license license:expat)))
  4619. (define-public vidstab
  4620. (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
  4621. (revision "0"))
  4622. (package
  4623. (name "vidstab")
  4624. (version (git-version "1.1.0" revision commit))
  4625. (source (origin
  4626. (method git-fetch)
  4627. (uri (git-reference
  4628. (url "https://github.com/georgmartius/vid.stab")
  4629. (commit commit)))
  4630. (file-name (git-file-name name version))
  4631. (sha256
  4632. (base32
  4633. "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
  4634. (build-system cmake-build-system)
  4635. (arguments
  4636. '(#:tests? #f)) ; tests are not run as part of standard build process
  4637. (home-page "http://public.hronopik.de/vid.stab/")
  4638. (synopsis "Video stabilization library")
  4639. (description "Vidstab is a video stabilization library which can be used
  4640. with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
  4641. vehicle typically suffers from undesirable shakes and jitters. Activities such
  4642. as surfing, skiing, riding and walking while shooting videos are especially
  4643. prone to erratic camera shakes. Vidstab targets these video contents to help
  4644. create smoother and stable videos.")
  4645. (license license:gpl2+))))
  4646. (define-public libopenshot
  4647. (package
  4648. (name "libopenshot")
  4649. (version "0.3.1")
  4650. (source (origin
  4651. (method git-fetch)
  4652. (uri (git-reference
  4653. (url "https://github.com/OpenShot/libopenshot")
  4654. (commit (string-append "v" version))))
  4655. (file-name (git-file-name name version))
  4656. (sha256
  4657. (base32
  4658. "10s76x4hwm4ccxdy8cv1nks028hldjmx25yy42fnjc4vscy7yd8a"))
  4659. (modules '((guix build utils)))
  4660. (snippet '(begin
  4661. ;; Allow overriding of the python installation dir
  4662. (substitute* "bindings/python/CMakeLists.txt"
  4663. (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
  4664. (string-append set " CACHE PATH "
  4665. "\"Python bindings directory\")")))
  4666. (delete-file-recursively "thirdparty")
  4667. #t))))
  4668. (build-system cmake-build-system)
  4669. (native-inputs
  4670. `(("pkg-config" ,pkg-config)
  4671. ("python" ,python)
  4672. ("swig" ,swig)
  4673. ("unittest++" ,unittest-cpp)))
  4674. (inputs
  4675. (list alsa-lib zlib))
  4676. (propagated-inputs ;all referenced in installed headers
  4677. (list cppzmq
  4678. ffmpeg-4
  4679. imagemagick
  4680. jsoncpp
  4681. libopenshot-audio
  4682. qtbase-5
  4683. qtmultimedia-5
  4684. qtsvg-5
  4685. zeromq))
  4686. (arguments
  4687. `(#:configure-flags
  4688. (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
  4689. ,(version-major+minor (package-version python))
  4690. "/site-packages")
  4691. "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
  4692. #:phases
  4693. (modify-phases %standard-phases
  4694. (add-before 'configure 'set-vars
  4695. (lambda* (#:key inputs #:allow-other-keys)
  4696. (setenv "LIBOPENSHOT_AUDIO_DIR"
  4697. (assoc-ref inputs "libopenshot-audio"))
  4698. (setenv "ZMQDIR"
  4699. (assoc-ref inputs "zeromq"))
  4700. (setenv "UNITTEST_DIR"
  4701. (search-input-directory inputs
  4702. "include/UnitTest++")))))))
  4703. (home-page "https://openshot.org")
  4704. (synopsis "Video-editing, animation, and playback library")
  4705. (description "OpenShot Library (libopenshot) is a powerful C++ video
  4706. editing library with a multi-threaded and feature rich video editing
  4707. API. It includes bindings for Python, Ruby, and other languages.")
  4708. (license license:lgpl3+)))
  4709. (define-public openshot
  4710. (package
  4711. (name "openshot")
  4712. (version "3.1.0")
  4713. (source (origin
  4714. (method git-fetch)
  4715. (uri (git-reference
  4716. (url "https://github.com/OpenShot/openshot-qt")
  4717. (commit (string-append "v" version))))
  4718. (file-name (git-file-name name version))
  4719. (sha256
  4720. (base32
  4721. "1m1mq8kws00mwijx8j5gqharkw63jqyywbnzsswgcxlhmsyv3k4v"))
  4722. (modules '((guix build utils)))
  4723. (snippet
  4724. '(begin
  4725. ;; TODO: Unbundle jquery and others from src/timeline/media
  4726. (delete-file-recursively "src/images/fonts") #t))))
  4727. (build-system python-build-system)
  4728. (inputs
  4729. (list ffmpeg
  4730. font-dejavu
  4731. libopenshot
  4732. python
  4733. python-pyqt
  4734. python-pyqtwebengine
  4735. python-pyzmq
  4736. python-requests
  4737. qtsvg-5
  4738. qtwebengine-5))
  4739. (arguments
  4740. `(#:modules ((guix build python-build-system)
  4741. (guix build qt-utils)
  4742. (guix build utils))
  4743. #:imported-modules (,@%python-build-system-modules
  4744. (guix build qt-utils))
  4745. #:phases (modify-phases %standard-phases
  4746. (delete 'build) ;install phase does all the work
  4747. (replace 'check
  4748. (lambda* (#:key tests? #:allow-other-keys)
  4749. (when tests?
  4750. (setenv "QT_QPA_PLATFORM" "offscreen")
  4751. (invoke "python" "src/tests/query_tests.py"))))
  4752. (add-after 'unpack 'patch-font-location
  4753. (lambda* (#:key inputs #:allow-other-keys)
  4754. (let ((font (assoc-ref inputs "font-dejavu")))
  4755. (substitute* "src/classes/app.py"
  4756. (("info.IMAGES_PATH") (string-append "\"" font "\""))
  4757. (("fonts") "share/fonts/truetype")
  4758. (("[A-Za-z_-]+.ttf") "DejaVuSans.ttf")))
  4759. #t))
  4760. (add-before 'install 'set-tmp-home
  4761. (lambda _
  4762. ;; src/classes/info.py "needs" to create several
  4763. ;; directories in $HOME when loaded during build
  4764. (setenv "HOME" "/tmp")
  4765. #t))
  4766. (add-after 'install 'wrap-program
  4767. (lambda* (#:key outputs inputs #:allow-other-keys)
  4768. (let ((out (assoc-ref outputs "out"))
  4769. (qtwebengine-process-path
  4770. (search-input-file
  4771. inputs "/lib/qt5/libexec/QtWebEngineProcess")))
  4772. (wrap-qt-program "openshot-qt"
  4773. #:output out #:inputs inputs)
  4774. ;; Help the program discover QtWebEngine at runtime.
  4775. (wrap-program (string-append out "/bin/openshot-qt")
  4776. `("QTWEBENGINEPROCESS_PATH" =
  4777. (,qtwebengine-process-path)))))))))
  4778. (home-page "https://www.openshot.org/")
  4779. (synopsis "Video editor")
  4780. (description "OpenShot takes your videos, photos, and music files and
  4781. helps you create the film you have always dreamed of. Easily add sub-titles,
  4782. transitions, and effects and then export your film to many common formats.")
  4783. (license license:gpl3+)))
  4784. (define-public shotcut
  4785. (package
  4786. (name "shotcut")
  4787. (version "22.12.21")
  4788. (source
  4789. (origin
  4790. (method git-fetch)
  4791. (uri (git-reference
  4792. (url "https://github.com/mltframework/shotcut")
  4793. (commit (string-append "v" version))))
  4794. (file-name (git-file-name name version))
  4795. (sha256
  4796. (base32 "1hchnywsrkvnz07r2i1cffg1a8zi59pcpswz8x93a0rdc42hlk3d"))))
  4797. (build-system qt-build-system)
  4798. (arguments
  4799. `(#:tests? #f ;there are no tests
  4800. #:phases
  4801. (modify-phases %standard-phases
  4802. (add-after 'unpack 'patch-executable-paths
  4803. (lambda* (#:key inputs #:allow-other-keys)
  4804. ;; Shotcut expects ffmpeg and melt executables in the shotcut
  4805. ;; directory. Use full store paths.
  4806. (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
  4807. (mlt (assoc-ref inputs "mlt")))
  4808. (substitute* "src/jobs/ffmpegjob.cpp"
  4809. (("\"ffmpeg\"") (string-append "\"" ffmpeg "/bin/ffmpeg\"")))
  4810. (substitute* "src/jobs/meltjob.cpp"
  4811. (("\"melt\"") (string-append "\"" mlt "/bin/melt\""))
  4812. (("\"melt-7\"") (string-append "\"" mlt "/bin/melt-7\""))))))
  4813. (add-after 'install 'wrap-executable
  4814. (lambda* (#:key inputs outputs #:allow-other-keys)
  4815. (let* ((out (assoc-ref outputs "out"))
  4816. (frei0r (assoc-ref inputs "frei0r-plugins"))
  4817. (jack (assoc-ref inputs "jack"))
  4818. (ladspa (assoc-ref inputs "ladspa"))
  4819. (mlt (assoc-ref inputs "mlt"))
  4820. (sdl2 (assoc-ref inputs "sdl2")))
  4821. (wrap-program (string-append out "/bin/shotcut")
  4822. `("FREI0R_PATH" ":" =
  4823. (,(string-append frei0r "/lib/frei0r-1")))
  4824. `("LADSPA_PATH" ":" =
  4825. (,(string-append ladspa "/lib/ladspa")))
  4826. `("LD_LIBRARY_PATH" ":" prefix
  4827. ,(list (string-append jack "/lib" ":" sdl2 "/lib")))
  4828. `("PATH" ":" prefix
  4829. ,(list (string-append mlt "/bin"))))))))))
  4830. (native-inputs
  4831. (list pkg-config python-wrapper qttools-5))
  4832. (inputs
  4833. (list bash-minimal
  4834. ffmpeg
  4835. fftw
  4836. frei0r-plugins
  4837. jack-1
  4838. ladspa
  4839. mlt
  4840. pulseaudio
  4841. qtbase-5
  4842. qtdeclarative-5
  4843. qtgraphicaleffects
  4844. qtmultimedia-5
  4845. qtquickcontrols-5
  4846. qtquickcontrols2-5
  4847. qtsvg-5
  4848. qtwebsockets-5
  4849. qtx11extras
  4850. sdl2))
  4851. (home-page "https://www.shotcut.org/")
  4852. (synopsis "Video editor built on the MLT framework")
  4853. (description
  4854. "Shotcut is a video editor built on the MLT framework. Features include
  4855. a wide range of formats through @code{ffmpeg}, 4k resolution support, webcam
  4856. and audio capture, network stream playback, and many more.")
  4857. (license license:gpl3+)))
  4858. (define-public dav1d
  4859. (package
  4860. (name "dav1d")
  4861. (version "1.0.0")
  4862. (source
  4863. (origin
  4864. (method git-fetch)
  4865. (uri (git-reference
  4866. (url "https://code.videolan.org/videolan/dav1d.git")
  4867. (commit version)))
  4868. (file-name (git-file-name name version))
  4869. (sha256
  4870. (base32 "0jkvb5as7danpalzlwd0w1dc9i2vijvmf39z0j6fwqvialsgnnj5"))))
  4871. (build-system meson-build-system)
  4872. (native-inputs (list nasm))
  4873. (home-page "https://code.videolan.org/videolan/dav1d")
  4874. (synopsis "AV1 decoder")
  4875. (description "dav1d is a new AV1 cross-platform decoder, and focused on
  4876. speed and correctness.")
  4877. (license license:bsd-2)))
  4878. (define-public wlstream
  4879. (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
  4880. (revision "1"))
  4881. (package
  4882. (name "wlstream")
  4883. (version (git-version "0.0" revision commit))
  4884. (source
  4885. (origin
  4886. (method git-fetch)
  4887. (uri (git-reference
  4888. (url "https://github.com/atomnuker/wlstream")
  4889. (commit commit)))
  4890. (file-name (git-file-name name version))
  4891. (sha256
  4892. (base32
  4893. "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
  4894. (build-system meson-build-system)
  4895. (native-inputs (list libdrm pkg-config))
  4896. (inputs (list ffmpeg-4 pulseaudio wayland wayland-protocols))
  4897. (home-page "https://github.com/atomnuker/wlstream")
  4898. (synopsis "Screen capture tool for Wayland sessions")
  4899. (description "Wlstream is a screen capture tool for recording audio and
  4900. video from a Wayland session.")
  4901. (license license:lgpl2.1+))))
  4902. (define-public gaupol
  4903. (package
  4904. (name "gaupol")
  4905. (version "1.12")
  4906. (source (origin
  4907. (method git-fetch)
  4908. (uri (git-reference
  4909. (url "https://github.com/otsaloma/gaupol/")
  4910. (commit version)))
  4911. (file-name (git-file-name name version))
  4912. (sha256
  4913. (base32
  4914. "1z9j3r9pm4rdynlmhgsgnwnnaqw5274yfy4kyillgd77msnpbhaw"))))
  4915. (build-system pyproject-build-system)
  4916. (native-inputs
  4917. (list gettext-minimal pkg-config))
  4918. (inputs
  4919. (list python-pygobject
  4920. gtk+
  4921. python-pycairo ; Required or else clicking on a subtitle line fails.
  4922. python-chardet ; Optional: Character encoding detection.
  4923. gtkspell3 ; Optional: Inline spell-checking.
  4924. iso-codes ; Optional: Translations.
  4925. gstreamer
  4926. gst-libav
  4927. gst-plugins-base
  4928. gst-plugins-good
  4929. gst-plugins-bad
  4930. gst-plugins-ugly))
  4931. (arguments
  4932. `(#:tests? #f ; Tests seem to require networking.
  4933. #:phases
  4934. (modify-phases %standard-phases
  4935. (add-after 'unpack 'disable-builtin-byte-compilation
  4936. (lambda _
  4937. ;; The setup.py script attempts to compile bytecode and fails.
  4938. ;; We compile bytecode in a separate phase, so just disable it.
  4939. (substitute* "setup.py"
  4940. (("distutils\\.util\\.byte_compile\\(.*")
  4941. ""))))
  4942. (add-after 'install 'wrap-gaupol
  4943. (lambda* (#:key outputs #:allow-other-keys)
  4944. (let ((out (assoc-ref outputs "out"))
  4945. (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
  4946. (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
  4947. (wrap-program (string-append out "/bin/gaupol")
  4948. `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
  4949. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))
  4950. ;; Can't create a GtkStyleContext without a display connection
  4951. (delete 'sanity-check)
  4952. (add-after 'unpack 'patch-data-dir
  4953. ;; Fix some path variables that setup.py seems to garble.
  4954. (lambda* (#:key outputs #:allow-other-keys)
  4955. (let ((out (assoc-ref outputs "out")))
  4956. (substitute* "setup.py"
  4957. (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
  4958. (string-append "DATA_DIR = '" out "/share/gaupol'\""))
  4959. (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
  4960. (string-append "LOCALE_DIR = '" out "/share/locale'\"")))))))))
  4961. (synopsis "Editor for text-based subtitles")
  4962. (description
  4963. "Gaupol supports multiple subtitle file formats and provides means of
  4964. creating subtitles, editing texts and timing subtitles to match video. The
  4965. user interface features a builtin video player and is designed with attention
  4966. to convenience of translating and batch processing of multiple documents.")
  4967. (home-page "https://otsaloma.io/gaupol/")
  4968. (license license:gpl3+)))
  4969. (define-public theorafile
  4970. (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
  4971. (package
  4972. (name "theorafile")
  4973. (version (git-version "0.0.0" "1" commit))
  4974. (source
  4975. (origin
  4976. (method git-fetch)
  4977. (uri (git-reference
  4978. (url "https://github.com/FNA-XNA/Theorafile")
  4979. (commit commit)))
  4980. (file-name (git-file-name name version))
  4981. (sha256
  4982. (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
  4983. (build-system gnu-build-system)
  4984. (arguments
  4985. '(#:make-flags '("CC=gcc")
  4986. #:phases
  4987. (modify-phases %standard-phases
  4988. (delete 'configure)
  4989. (replace 'check
  4990. (lambda _
  4991. (setenv "CC" "gcc")
  4992. (invoke "make" "test")))
  4993. (replace 'install
  4994. (lambda* (#:key outputs #:allow-other-keys)
  4995. (let ((out (assoc-ref outputs "out")))
  4996. (install-file "libtheorafile.so" (string-append out "/lib"))
  4997. (install-file "theorafile.h" (string-append out "/include")))
  4998. #t)))))
  4999. (native-inputs
  5000. ;; For tests.
  5001. (list sdl2))
  5002. (home-page "https://github.com/FNA-XNA/Theorafile")
  5003. (synopsis "Ogg Theora Video Decoder Library")
  5004. (description "Theorafile is a library for quickly and easily decoding Ogg
  5005. Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
  5006. (license license:zlib))))
  5007. (define-public dvdbackup
  5008. (package
  5009. (name "dvdbackup")
  5010. (version "0.4.2")
  5011. (source
  5012. (origin
  5013. (method url-fetch)
  5014. (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
  5015. "dvdbackup-" version "/"
  5016. "dvdbackup-" version ".tar.xz"))
  5017. (sha256
  5018. (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
  5019. (build-system gnu-build-system)
  5020. (inputs
  5021. (list libdvdcss libdvdread))
  5022. (home-page "https://dvdbackup.sourceforge.net")
  5023. (synopsis "DVD video ripper")
  5024. (description
  5025. "A simple command line tool to backup video from a DVD. Decrypts the
  5026. DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
  5027. transcode or reformat the videos in any way, producing perfect backups.")
  5028. (license license:gpl3+)))
  5029. (define-public svt-av1
  5030. (package
  5031. (name "svt-av1")
  5032. (version "1.3.0")
  5033. (source
  5034. (origin
  5035. (method git-fetch)
  5036. (uri (git-reference
  5037. (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git")
  5038. (commit (string-append "v" version))))
  5039. (file-name (git-file-name name version))
  5040. (sha256
  5041. (base32 "0blnla32yz665bx0xyx8lrjs2wqd2xhpbqwwpz72mq7zf341j8vv"))))
  5042. (build-system cmake-build-system)
  5043. (arguments
  5044. ;; The test suite tries to download test data and git clone a 3rd-party
  5045. ;; fork of libaom. Skip it.
  5046. `(#:tests? #f
  5047. #:phases
  5048. (modify-phases %standard-phases
  5049. (add-after 'install 'install-documentation
  5050. (lambda* (#:key outputs #:allow-other-keys)
  5051. (let* ((out (assoc-ref %outputs "out"))
  5052. (doc (string-append out "/share/doc/svt-av1-" ,version)))
  5053. (copy-recursively "../source/Docs" doc)
  5054. #t))))))
  5055. (native-inputs
  5056. (list yasm))
  5057. (synopsis "AV1 video codec")
  5058. (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
  5059. work-in-progress, aiming to support video-on-demand and live streaming
  5060. applications with high performance requirements. It mainly targets
  5061. Intel-compatible CPUs (x86), but has limited support for other architectures.")
  5062. (home-page "https://gitlab.com/AOMediaCodec/SVT-AV1")
  5063. (license license:bsd-2)))
  5064. (define-public svt-vp9
  5065. (package
  5066. (name "svt-vp9")
  5067. (version "0.3.0")
  5068. (source (origin
  5069. (method git-fetch)
  5070. (uri (git-reference
  5071. (url "https://github.com/OpenVisualCloud/SVT-VP9")
  5072. (commit (string-append "v" version))))
  5073. (file-name (git-file-name name version))
  5074. (sha256
  5075. (base32
  5076. "1ypdiw4cq22llvm8jyszxdq6r1aydkj80dsxjarjn5b7c1f2q3ar"))))
  5077. ;; SVT-VP9 only supports 64-bit Intel-compatible CPUs.
  5078. (supported-systems '("x86_64-linux"))
  5079. (build-system cmake-build-system)
  5080. (arguments
  5081. `(#:tests? #f ; No test suite
  5082. #:phases
  5083. (modify-phases %standard-phases
  5084. (add-after 'install 'install-documentation
  5085. (lambda* (#:key outputs #:allow-other-keys)
  5086. (let* ((out (assoc-ref %outputs "out"))
  5087. (doc (string-append out "/share/doc/" ,name "-" ,version)))
  5088. (copy-recursively "../source/Docs" doc)
  5089. #t))))))
  5090. (native-inputs
  5091. (list yasm))
  5092. (home-page "https://github.com/OpenVisualCloud/SVT-VP9")
  5093. (synopsis "VP9 video encoder")
  5094. (description "SVT-VP9 is a VP9 video encoder implementation. It is focused
  5095. on supporting video-on-demand and live encoding on Intel Xeon processors.")
  5096. (license license:bsd-2)))
  5097. (define-public w-scan
  5098. (package
  5099. (name "w-scan")
  5100. (version "20170107")
  5101. (source
  5102. (origin
  5103. (method url-fetch)
  5104. (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
  5105. version ".tar.bz2"))
  5106. (sha256
  5107. (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
  5108. (build-system gnu-build-system)
  5109. (arguments
  5110. `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
  5111. (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
  5112. (description
  5113. "This is a small command line utility used to perform frequency scans for
  5114. DVB and ATSC transmissions without initial tuning data. It can print the
  5115. result in several formats:
  5116. @itemize
  5117. @item VDR channels.conf,
  5118. @item czap/tzap/xine/mplayer channels.conf,
  5119. @item Gstreamer dvbsrc plugin,
  5120. @item VLC xspf playlist,
  5121. @item XML,
  5122. @item initial tuning data for scan or dvbv5-scan.
  5123. @end itemize\n")
  5124. (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
  5125. (license license:gpl2+)))
  5126. (define-public rav1e
  5127. (package
  5128. (name "rav1e")
  5129. (version "0.6.3")
  5130. (source
  5131. (origin
  5132. (method url-fetch)
  5133. (uri (crate-uri "rav1e" version))
  5134. (file-name
  5135. (string-append name "-" version ".tar.gz"))
  5136. (sha256
  5137. (base32
  5138. "0if94sfviy5cwljlnsy0f470ixfs090k54g416kcc0qd9w4rhy17"))))
  5139. (build-system cargo-build-system)
  5140. (arguments
  5141. `(#:cargo-inputs
  5142. (("rust-aom-sys" ,rust-aom-sys-0.3)
  5143. ("rust-arbitrary" ,rust-arbitrary-0.4)
  5144. ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
  5145. ("rust-arrayvec" ,rust-arrayvec-0.7)
  5146. ("rust-av-metrics" ,rust-av-metrics-0.9)
  5147. ("rust-av1-grain" ,rust-av1-grain-0.2)
  5148. ("rust-backtrace" ,rust-backtrace-0.3)
  5149. ("rust-bitstream-io" ,rust-bitstream-io-1)
  5150. ("rust-built" ,rust-built-0.5)
  5151. ("rust-byteorder" ,rust-byteorder-1)
  5152. ("rust-cc" ,rust-cc-1)
  5153. ("rust-cfg-if" ,rust-cfg-if-1)
  5154. ("rust-clap" ,rust-clap-4)
  5155. ("rust-clap-complete" ,rust-clap-complete-4)
  5156. ("rust-console" ,rust-console-0.15)
  5157. ("rust-const-fn-assert" ,rust-const-fn-assert-0.1)
  5158. ("rust-crossbeam" ,rust-crossbeam-0.8)
  5159. ("rust-dav1d-sys" ,rust-dav1d-sys-0.7)
  5160. ("rust-fern" ,rust-fern-0.6)
  5161. ("rust-image" ,rust-image-0.24)
  5162. ("rust-interpolate-name" ,rust-interpolate-name-0.2)
  5163. ("rust-itertools" ,rust-itertools-0.10)
  5164. ("rust-ivf" ,rust-ivf-0.1)
  5165. ("rust-libc" ,rust-libc-0.2)
  5166. ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
  5167. ("rust-log" ,rust-log-0.4)
  5168. ("rust-maybe-rayon" ,rust-maybe-rayon-0.1)
  5169. ("rust-nasm-rs" ,rust-nasm-rs-0.2)
  5170. ("rust-new-debug-unreachable" ,rust-new-debug-unreachable-1)
  5171. ("rust-nom" ,rust-nom-7)
  5172. ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
  5173. ("rust-num-derive" ,rust-num-derive-0.3)
  5174. ("rust-num-traits" ,rust-num-traits-0.2)
  5175. ("rust-once-cell" ,rust-once-cell-1)
  5176. ("rust-paste" ,rust-paste-1)
  5177. ("rust-rand" ,rust-rand-0.8)
  5178. ("rust-rand-chacha" ,rust-rand-chacha-0.3)
  5179. ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
  5180. ("rust-rustc-version" ,rust-rustc-version-0.4)
  5181. ("rust-scan-fmt" ,rust-scan-fmt-0.2)
  5182. ("rust-serde" ,rust-serde-1)
  5183. ("rust-serde-big-array" ,rust-serde-big-array-0.4)
  5184. ("rust-signal-hook" ,rust-signal-hook-0.3)
  5185. ("rust-simd-helpers" ,rust-simd-helpers-0.1)
  5186. ("rust-system-deps" ,rust-system-deps-6)
  5187. ("rust-thiserror" ,rust-thiserror-1)
  5188. ("rust-toml" ,rust-toml-0.5)
  5189. ("rust-v-frame" ,rust-v-frame-0.3)
  5190. ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
  5191. ("rust-y4m" ,rust-y4m-0.7))
  5192. #:cargo-development-inputs
  5193. (("rust-assert-cmd" ,rust-assert-cmd-2)
  5194. ("rust-criterion" ,rust-criterion-0.4)
  5195. ("rust-interpolate-name" ,rust-interpolate-name-0.2)
  5196. ("rust-nom" ,rust-nom-7)
  5197. ("rust-pretty-assertions" ,rust-pretty-assertions-1)
  5198. ("rust-quickcheck" ,rust-quickcheck-1)
  5199. ("rust-quickcheck-macros" ,rust-quickcheck-macros-1)
  5200. ("rust-rand" ,rust-rand-0.8)
  5201. ("rust-rand-chacha" ,rust-rand-chacha-0.3)
  5202. ("rust-semver" ,rust-semver-1))
  5203. #:phases
  5204. (modify-phases %standard-phases
  5205. (replace 'build
  5206. (lambda* (#:key outputs #:allow-other-keys)
  5207. (let ((out (assoc-ref outputs "out")))
  5208. (invoke "cargo" "cinstall" "--release"
  5209. (string-append "--prefix=" out)))))
  5210. (add-after 'install 'delete-static-library
  5211. (lambda* (#:key outputs #:allow-other-keys)
  5212. ;; Delete 80 MiB (!) static library.
  5213. (delete-file (string-append (assoc-ref outputs "out")
  5214. "/lib/librav1e.a")))))))
  5215. (native-inputs
  5216. (list nasm pkg-config rust-cargo-c))
  5217. (inputs
  5218. (list libgit2 zlib))
  5219. (home-page "https://github.com/xiph/rav1e/")
  5220. (synopsis "Fast and safe AV1 encoder")
  5221. (description "@code{rav1e} is an AV1 video encoder. It is designed to
  5222. eventually cover all use cases, though in its current form it is most suitable
  5223. for cases where libaom (the reference encoder) is too slow.")
  5224. (license license:bsd-2)))
  5225. (define-public peek
  5226. (package
  5227. (name "peek")
  5228. (version "1.5.1")
  5229. (source
  5230. (origin
  5231. (method git-fetch)
  5232. (uri (git-reference
  5233. (url "https://github.com/phw/peek")
  5234. (commit version)))
  5235. (file-name (git-file-name name version))
  5236. (sha256
  5237. (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
  5238. (build-system meson-build-system)
  5239. (arguments '(#:glib-or-gtk? #t))
  5240. (inputs
  5241. (list gtk+ python-wrapper))
  5242. (native-inputs
  5243. (list desktop-file-utils ; for update-desktop-database
  5244. gettext-minimal
  5245. `(,glib "bin") ; for glib-compile-resources
  5246. `(,gtk+ "bin") ; For gtk-update-icon-cache
  5247. pkg-config
  5248. vala))
  5249. (home-page "https://github.com/phw/peek")
  5250. (synopsis "Simple animated GIF screen recorder")
  5251. (description
  5252. "Peek makes it easy to create short screencasts of a screen area. It was
  5253. built for the specific use case of recording screen areas, e.g. for easily
  5254. showing UI features of your own apps or for showing a bug in bug reports.
  5255. With Peek, you simply place the Peek window over the area you want to record
  5256. and press \"Record\". Peek is optimized for generating animated GIFs, but you
  5257. can also directly record to WebM or MP4 if you prefer.")
  5258. (license license:gpl3+)))
  5259. (define-public wf-recorder
  5260. (package
  5261. (name "wf-recorder")
  5262. (version "0.3.0")
  5263. (source (origin
  5264. (method git-fetch)
  5265. (uri (git-reference
  5266. (url "https://github.com/ammen99/wf-recorder")
  5267. (commit (string-append "v" version))))
  5268. (file-name (git-file-name name version))
  5269. (sha256
  5270. (base32
  5271. "18csvix8fdqir52q729rgcy355xy2ngvmr05l1abflpbvsklbn52"))))
  5272. (build-system meson-build-system)
  5273. (native-inputs
  5274. (list pkg-config))
  5275. (inputs
  5276. (list ffmpeg pulseaudio wayland wayland-protocols libx264))
  5277. (home-page "https://github.com/ammen99/wf-recorder")
  5278. (synopsis "Screen recorder for wlroots-based compositors")
  5279. (description
  5280. "@code{wf-recorder} is a utility program for screen recording of
  5281. wlroots-based compositors. More specifically, those that support
  5282. @code{wlr-screencopy-v1} and @code{xdg-output}.")
  5283. (license license:expat)))
  5284. (define-public guvcview
  5285. (package
  5286. (name "guvcview")
  5287. (version "2.0.8")
  5288. (source (origin
  5289. (method url-fetch)
  5290. (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
  5291. "src-" version ".tar.bz2"))
  5292. (sha256
  5293. (base32
  5294. "108c4g0ns9i1wnxyalmpjqbhlflmrj855vxgggr6qrl6h924w7x2"))))
  5295. (build-system gnu-build-system)
  5296. (arguments
  5297. ;; There are no tests and "make check" would fail on an intltool error.
  5298. '(#:tests? #f))
  5299. (native-inputs
  5300. (list pkg-config intltool))
  5301. (inputs
  5302. (list bdb
  5303. gtk+
  5304. eudev
  5305. libjpeg-turbo
  5306. libusb
  5307. v4l-utils ;libv4l2
  5308. ffmpeg ;libavcodec, libavutil
  5309. sdl2
  5310. gsl
  5311. portaudio
  5312. alsa-lib))
  5313. (home-page "https://guvcview.sourceforge.net/")
  5314. (synopsis "Control your webcam and capture videos and images")
  5315. (description
  5316. "GTK+ UVC Viewer (guvcview) is a graphical application to control a
  5317. webcam accessible with Video4Linux (V4L2) and to capture videos and images.
  5318. It provides control over precise settings of the webcam such as exposure,
  5319. brightness, contrast, and frame rate.")
  5320. ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
  5321. (license license:gpl2+)))
  5322. (define-public get-iplayer
  5323. (package
  5324. (name "get-iplayer")
  5325. (version "3.30")
  5326. (source
  5327. (origin
  5328. (method git-fetch)
  5329. (uri (git-reference
  5330. (url "https://github.com/get-iplayer/get_iplayer")
  5331. (commit (string-append "v" version))))
  5332. (file-name (git-file-name name version))
  5333. (sha256
  5334. (base32 "1kzsdq1mhm5h83bbdbhh3jhpfvq4f13ly22mfd6vvmhj8mq084pi"))))
  5335. (build-system perl-build-system)
  5336. (arguments
  5337. `(#:tests? #f ; no tests
  5338. #:phases
  5339. (modify-phases %standard-phases
  5340. (delete 'configure)
  5341. (delete 'build)
  5342. (replace 'install
  5343. (lambda* (#:key outputs #:allow-other-keys)
  5344. (let* ((out (assoc-ref outputs "out"))
  5345. (bin (string-append out "/bin"))
  5346. (man (string-append out "/share/man/man1")))
  5347. (install-file "get_iplayer" bin)
  5348. (install-file "get_iplayer.cgi" bin)
  5349. (install-file "get_iplayer.1" man))))
  5350. (add-after 'install 'wrap-program
  5351. (lambda* (#:key inputs outputs #:allow-other-keys)
  5352. (let* ((out (assoc-ref outputs "out"))
  5353. (perllib (string-append out "/lib/perl5/site_perl/"
  5354. ,(package-version perl))))
  5355. (wrap-program (string-append out "/bin/get_iplayer")
  5356. `("PERL5LIB" ":"
  5357. prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
  5358. (wrap-program (string-append out "/bin/get_iplayer.cgi")
  5359. `("PERL5LIB" ":"
  5360. prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))))))))
  5361. (inputs
  5362. (list perl-mojolicious perl-lwp-protocol-https perl-xml-libxml))
  5363. (home-page "https://github.com/get-iplayer/get_iplayer")
  5364. (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
  5365. (description "@code{get_iplayer} lists, searches and records BBC iPlayer
  5366. TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
  5367. @code{get_iplayer} has three modes: recording a complete programme for later
  5368. playback, streaming a programme directly to a playback application, such as
  5369. mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
  5370. terms and recording programmes automatically. It can also stream or record live
  5371. BBC iPlayer output.")
  5372. (license license:gpl3+)))
  5373. (define-public ogmtools
  5374. (package
  5375. (name "ogmtools")
  5376. (version "1.5")
  5377. (source (origin
  5378. (method url-fetch)
  5379. (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-"
  5380. version
  5381. ".tar.bz2"))
  5382. (sha256
  5383. (base32
  5384. "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"))))
  5385. (build-system gnu-build-system)
  5386. (inputs
  5387. (list libvorbis libdvdread))
  5388. (synopsis "Information, extraction or creation for OGG media streams")
  5389. (description
  5390. "These tools allow information about (@code{ogminfo}) or extraction from
  5391. \(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It
  5392. includes @code{dvdxchap} tool for extracting chapter information from DVD.")
  5393. (license license:gpl2)
  5394. (home-page "https://www.bunkus.org/videotools/ogmtools/")))
  5395. (define-public libcaption
  5396. (package
  5397. (name "libcaption")
  5398. (version "0.7")
  5399. (source (origin
  5400. (method git-fetch)
  5401. (uri (git-reference
  5402. (url "https://github.com/szatmary/libcaption")
  5403. (commit version)))
  5404. (file-name (git-file-name name version))
  5405. (sha256
  5406. (base32
  5407. "16mhw8wpl7wdjj4n7rd1c294p1r8r322plj7z91crla5aah726rq"))))
  5408. (build-system cmake-build-system)
  5409. (arguments
  5410. `(#:tests? #f ; Cannot figure out how to run the unit tests
  5411. #:configure-flags '("-DENABLE_RE2C=ON")))
  5412. (native-inputs
  5413. (list re2c))
  5414. (synopsis "CEA608 / CEA708 closed-caption codec")
  5415. (description "Libcaption creates and parses closed-caption data,
  5416. providing an encoder / decoder for the EIA608 and CEA708 closed-caption
  5417. standards.
  5418. 608 support is currently limited to encoding and decoding the necessary control
  5419. and preamble codes as well as support for the Basic North American, Special
  5420. North American and Extended Western European character sets.
  5421. 708 support is limited to encoding the 608 data in NTSC field 1 user data type
  5422. structure.
  5423. In addition, utility functions to create h.264 SEI (Supplementary enhancement
  5424. information) NALUs (Network Abstraction Layer Unit) for inclusion into an h.264
  5425. elementary stream are provided.")
  5426. (home-page "https://github.com/szatmary/libcaption")
  5427. (license license:expat)))
  5428. (define-public video-contact-sheet
  5429. (package
  5430. (name "video-contact-sheet")
  5431. (version "1.13.4")
  5432. (source (origin
  5433. (method url-fetch)
  5434. (uri (string-append "http://p.outlyer.net/vcs/files/vcs-" version
  5435. ".tar.gz"))
  5436. (sha256
  5437. (base32
  5438. "0jsl93r0rnybjcipqbww5hwsr9ln6kz1qnf32qfxdvhfw52n27fw"))))
  5439. (build-system gnu-build-system)
  5440. (arguments
  5441. (list
  5442. #:make-flags
  5443. #~(list (string-append "prefix=" #$output))
  5444. #:phases
  5445. #~(modify-phases %standard-phases
  5446. (delete 'configure)
  5447. (delete 'build)
  5448. (delete 'check)
  5449. (add-after 'install 'wrap-program
  5450. (lambda _
  5451. (wrap-program (string-append #$output "/bin/vcs")
  5452. `("PATH" ":" prefix
  5453. ,(map (lambda (dir)
  5454. (string-append dir "/bin"))
  5455. (list #$(this-package-input "ffmpeg")
  5456. #$(this-package-input "imagemagick"))))))))))
  5457. (inputs
  5458. (list bash-minimal ffmpeg imagemagick))
  5459. (synopsis "Create contact sheets (preview images) from videos")
  5460. (description "@acronym{VCS, Video Contact Sheet} is a Bash script meant to
  5461. create video contact sheets (previews) of videos. Any video supported by
  5462. MPlayer and FFmpeg can be used. A note of warning: Unlike most similar tools
  5463. VCS, by default, makes screenshots the same size as the video, see the manual
  5464. for details on how to change this.")
  5465. (home-page "https://p.outlyer.net/vcs/")
  5466. (license license:lgpl2.1+)))
  5467. (define-public svtplay-dl
  5468. (package
  5469. (name "svtplay-dl")
  5470. (version "4.17")
  5471. (source (origin
  5472. (method git-fetch)
  5473. (uri (git-reference
  5474. (url "https://github.com/spaam/svtplay-dl")
  5475. (commit version)))
  5476. (file-name (git-file-name name version))
  5477. (sha256
  5478. (base32
  5479. "0yjxmvldskw4pji3lg69pbx05izvxahz9my7z5p31mkiz6v33dmx"))))
  5480. (build-system python-build-system)
  5481. (inputs (list ffmpeg python-pyaml python-requests python-pysocks
  5482. python-cryptography))
  5483. (home-page "https://svtplay-dl.se/")
  5484. (synopsis "Download or stream SVT Play's (and others) TV programmes")
  5485. (description
  5486. "@code{svtplay-dl} allows downloading TV programmes from various Swedish
  5487. broadcasters including SVT Play, Sveriges Radio, TV4 Play, along with many
  5488. others.")
  5489. (license license:expat)))