ajattix/ajatt/packages/video.scm

466 lines
16 KiB
Scheme
Raw Normal View History

2024-07-26 17:48:36 +00:00
(define-module (ajatt packages video)
#:use-module (gnu packages video)
#:use-module (guix build-system copy)
#:use-module (guix git-download)
#:use-module (gnu packages)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module (guix gexp)
2024-07-28 03:38:42 +00:00
#:use-module (guix utils)
2024-07-26 17:48:36 +00:00
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module (gnu packages cmake)
2024-07-28 03:38:42 +00:00
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages assembly)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages tls)
#:use-module (ice-9 match)
#:use-module ((srfi srfi-1) #:hide (zip))
#:use-module (srfi srfi-26)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix svn-download)
#:use-module (guix hg-download)
#:use-module (guix build-system cargo)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix build-system qt)
#:use-module (guix build-system waf)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages assembly)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
#:use-module (gnu packages avahi)
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages bittorrent)
#:use-module (gnu packages boost)
#:use-module (gnu packages cdrom)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-graphics)
#:use-module (gnu packages curl)
#:use-module (gnu packages dbm)
#:use-module (gnu packages dejagnu)
#:use-module (gnu packages dns)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages guile)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gnunet)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages golang)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages hunspell)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages iso-codes)
#:use-module (gnu packages libcanberra)
#:use-module (gnu packages libidn)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
#:use-module (gnu packages man)
#:use-module (gnu packages markup)
#:use-module (gnu packages maths)
#:use-module (gnu packages messaging)
#:use-module (gnu packages music)
#:use-module (gnu packages mp3)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages nettle)
#:use-module (gnu packages networking)
#:use-module (gnu packages ocr)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages perl-web)
#:use-module (gnu packages php)
#:use-module (gnu packages photo)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages popt)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages re2c)
#:use-module (gnu packages ruby)
#:use-module (gnu packages rust-apps)
#:use-module (gnu packages samba)
#:use-module (gnu packages sdl)
#:use-module (gnu packages serialization)
#:use-module (gnu packages shells)
#:use-module (gnu packages spice)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages ssh)
#:use-module (gnu packages swig)
#:use-module (gnu packages terminals)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages time)
#:use-module (gnu packages upnp)
#:use-module (gnu packages version-control)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages web)
#:use-module (gnu packages wget)
#:use-module (gnu packages wxwidgets)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages python)
2024-07-26 17:48:36 +00:00
#:use-module ((guix licenses) #:prefix license:))
(define-public vvdec
(package
(name "vvdec")
(version "2.3.1")
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/fraunhoferhhi/vvdec.git")
(commit "ad8f4bb7d6271b5fe6b3ab0a5e64114dec1af5d4")))
(sha256
(base32 "0qr4sp3gq3pxpl7nr2dxd628jmdwv09f76pgsyc5rydz05ahymym"))))
(build-system cmake-build-system)
(arguments
2024-07-26 18:03:17 +00:00
(list
#:configure-flags
#~(list "-DBUILD_SHARED_LIBS=1")
#:cmake cmake
#:tests? #f ))
2024-07-26 17:48:36 +00:00
(synopsis "VVdeC, the Fraunhofer Versatile Video Decoder.")
(description
"VVdeC, the Fraunhofer Versatile Video Decoder, is a fast software H.266/VVC decoder implementation supporting all features of the VVC Main10 profile.")
(home-page "https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h266-vvc.html")
(license
(list license:bsd-3))))
2024-07-28 03:38:42 +00:00
(define-public ffmpeg-vvdec
(package
(inherit ffmpeg)
(name "ffmpeg-vvdec")
2024-07-28 04:44:50 +00:00
(version "7.0.1")
(source (origin
(method url-fetch)
(uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
version ".tar.xz"))
(sha256
(base32
"1zz4n2zqazl5nlvil31aikf90hhvlq8pgwxij0iriy3yy6qfxsdw"))))
(outputs '("out" "debug"))
2024-07-28 03:38:42 +00:00
(build-system gnu-build-system)
(inputs
(append
;; XXX: rav1e depends on rust, which currently only works on x86_64.
;; See also the related configure flag when changing this.
(if (target-x86-64?) (list rav1e) '())
(list dav1d
fontconfig
freetype
frei0r-plugins
gnutls
vvdec
opus
ladspa
lame
libaom
libass
libbluray
libcaca
libcdio-paranoia
libdrm
libtheora
libva
libvdpau
libvorbis
libvpx
libwebp
libx11
libx264
mesa
openal
pulseaudio
sdl2
soxr
speex
srt
twolame
vidstab
x265
xvid
zlib)))
(native-inputs
(list bc
perl
pkg-config
python
texinfo
speex
yasm))
(arguments
(list
#:test-target "fate"
#:configure-flags
;; possible additional inputs:
;; --enable-avisynth enable reading of AviSynth script
;; files [no]
;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
;; --enable-libcelt enable CELT decoding via libcelt [no]
;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
;; and libraw1394 [no]
;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
;; --enable-libflite enable flite (voice synthesis) support via
;; libflite [no]
;; --enable-libgme enable Game Music Emu via libgme [no]
;; --enable-libgsm enable GSM de/encoding via libgsm [no]
;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
;; --enable-libmodplug enable ModPlug via libmodplug [no]
;; --enable-libnut enable NUT (de)muxing via libnut,
;; native (de)muxer exists [no]
;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
;; libopencore-amrnb [no]
;; --enable-libopencore-amrwb enable AMR-WB decoding via
;; libopencore-amrwb [no]
;; --enable-libopencv enable video filtering via libopencv [no]
;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
;; OpenJPEG [no]
;; --enable-librtmp enable RTMP[E] support via librtmp [no]
;; --enable-libschroedinger enable Dirac de/encoding via
;; libschroedinger [no]
;; --enable-libshine enable fixed-point MP3 encoding via
;; libshine [no]
;; --enable-libssh enable SFTP protocol via libssh [no]
;; (libssh2 does not work)
;; --enable-libstagefright-h264 enable H.264 decoding via
;; libstagefright [no]
;; --enable-libutvideo enable Ut Video encoding and decoding via
;; libutvideo [no]
;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
;; --enable-libvo-amrwbenc enable AMR-WB encoding via
;; libvo-amrwbenc [no]
;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
;; --enable-libxavs enable AVS encoding via xavs [no]
;; --enable-libzmq enable message passing via libzmq [no]
;; --enable-libzvbi enable teletext support via libzvbi [no]
;; --enable-opencl enable OpenCL code
#~(list
#$@(if (target-powerpc?)
;; These tests fail on powerpc64-le (see:
;; https://trac.ffmpeg.org/ticket/9604).
'("--ignore-tests=checkasm-sw_scale,filter-scale2ref_keep_aspect")
'())
"--enable-gpl" ;enable optional gpl licensed parts
"--enable-shared"
"--enable-frei0r"
"--enable-fontconfig"
"--enable-gnutls"
"--enable-ladspa"
"--enable-libaom"
"--enable-libass"
"--enable-libbluray"
"--enable-libcaca"
"--enable-libcdio"
"--enable-libdav1d"
"--enable-libfreetype"
"--enable-libmp3lame"
"--enable-libopus"
"--enable-libpulse"
#$@(if (target-x86-64?)
'("--enable-librav1e")
'())
"--enable-libsoxr"
"--enable-libspeex"
;; "--enable-libvvenc" TODO: this needs a patch
;; https://patchwork.ffmpeg.org/series/12059/mbox/
2024-07-28 04:44:50 +00:00
"--extra-cflags=-Ofast"
"--extra-cxxflags=-Ofast"
2024-07-28 03:38:42 +00:00
"--enable-libsrt"
"--enable-libtheora"
"--enable-libtwolame"
"--enable-libvidstab"
"--enable-libvorbis"
"--enable-libvpx"
"--enable-libwebp"
"--enable-libxvid"
"--enable-libx264"
"--enable-libx265"
"--enable-openal"
"--enable-opengl"
"--enable-libdrm"
"--enable-vaapi"
"--enable-runtime-cpudetect"
;; The HTML pages take 7.2 MiB
"--disable-htmlpages"
;; The static libraries are 23 MiB
"--disable-static"
"--disable-stripping"
#$@(if (target-riscv64?)
'("--extra-cflags=-fPIC")
'())
;; Runtime cpu detection is not implemented on
;; MIPS, so we disable some features.
"--disable-mips32r2"
"--disable-mipsdsp"
"--disable-mipsdspr2"
"--disable-mipsfpu")
#:phases
#~(modify-phases %standard-phases
(replace 'configure
;; configure does not work followed by "SHELL=..." and
;; "CONFIG_SHELL=..."; set environment variables instead
(lambda* (#:key outputs configure-flags #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "configure"
(("#! /bin/sh") (string-append "#!" (which "sh"))))
(setenv "SHELL" (which "bash"))
(setenv "CONFIG_SHELL" (which "bash"))
(apply invoke
"./configure"
(string-append "--prefix=" out)
;; Add $libdir to the RUNPATH of all the binaries.
(string-append "--extra-ldflags=-Wl,-rpath="
out "/lib")
configure-flags))))
(add-before 'check 'set-ld-library-path
(lambda _
;; Allow $(top_builddir)/ffmpeg to find its dependencies when
;; running tests.
(let* ((dso (find-files "." "\\.so$"))
(path (string-join (map dirname dso) ":")))
(format #t "setting LD_LIBRARY_PATH to ~s~%" path)
(setenv "LD_LIBRARY_PATH" path)))))))
(home-page "https://www.ffmpeg.org/")
(synopsis "Audio and video framework")
(description "FFmpeg is a complete, cross-platform solution to record,
convert and stream audio and video. It includes the libavcodec
audio/video codec library.")
(license license:gpl2+)))
2024-09-08 17:59:04 +00:00
(define-public uvg266
(package
(name "uvg266")
(version "0.8.1")
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/ultravideo/uvg266.git")
(commit "6999e4484143091067b0d631b624aea7554a46db")
(recursive? #t)))
2024-09-08 17:59:04 +00:00
(sha256
(base32 "0z6qq0hchn7fb69f75y5ck25k1gb878snd9g5k2vrfq70m6rlhxg"))))
2024-09-08 17:59:04 +00:00
(build-system cmake-build-system)
(arguments
(list #:cmake cmake ;; currently this is not enough
#:tests? #f
;;#:configure-flags
;; #~(list "-G 'Ninja'")
))
;; (native-inputs
;; (list ninja));; it's needed to use "make install" after the cmake stage
2024-09-08 17:59:04 +00:00
(synopsis "An open-source VVC encoder based on Kvazaar.")
(description
"An open-source VVC encoder licensed under 3-clause BSD.")
(home-page "https://ultravideo.fi/uvg266.html")
(license
(list license:bsd-3))))
2024-07-28 04:44:50 +00:00
(define-public gpac
(package
(name "gpac")
(version "2.4")
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/gpac/gpac.git")
(commit "ccc6a76a67e08814e20ca678b84899653102b1f5")))
(sha256
(base32 "03lzg7q0kc4wdwfrh7kbrlml4kmx8nsp3zh6dsmby7q53wdwa7c6"))))
(build-system gnu-build-system)
(inputs (append (list zlib pkg-config)))
(arguments
(list #:tests? #f
#:configure-flags #~(list "--static-bin" )
#:phases
#~(modify-phases %standard-phases
;; this is very weird, but absolutely needed.
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(invoke "make" "install")
)))))
(native-inputs
(list (list zlib "static")
(list zstd "lib")
pkg-config
cmake
yasm
))
(synopsis "GPAC Ultramedia OSS for Video Streaming & Next-Gen Multimedia Transcoding, Packaging & Delivery.")
(description
"GPAC is an open-source multimedia framework focused on modularity and standards compliance. GPAC provides tools to process, inspect, package, stream, playback and interact with media content. Such content can be any combination of audio, video, subtitles, metadata, scalable graphics, encrypted media, 2D/3D graphics and ECMAScript. GPAC is best-known for its wide MP4/ISOBMFF capabilities and is popular among video enthusiasts, academic researchers, standardization bodies, and professional broadcasters.")
(home-page "https://gpac.io/")
(license
(list license:lgpl2.1))))
gpac