heavy optimization on ffmpeg

pull/2/head
hashirama 2024-07-28 00:44:50 -04:00
parent 0bca0ee0c1
commit ad43ae7bbf
No known key found for this signature in database
GPG Key ID: 53E62470A86BC185
1 changed files with 107 additions and 9 deletions

View File

@ -320,6 +320,8 @@
"--enable-libspeex" "--enable-libspeex"
;; "--enable-libvvenc" TODO: this needs a patch ;; "--enable-libvvenc" TODO: this needs a patch
;; https://patchwork.ffmpeg.org/series/12059/mbox/ ;; https://patchwork.ffmpeg.org/series/12059/mbox/
"--extra-cflags=-Ofast"
"--extra-cxxflags=-Ofast"
"--enable-libsrt" "--enable-libsrt"
"--enable-libtheora" "--enable-libtheora"
"--enable-libtwolame" "--enable-libtwolame"
@ -389,4 +391,100 @@ audio/video codec library.")
(license license:gpl2+))) (license license:gpl2+)))
(define-public mpv-vvdec
(package
(name "mpv-vvdec")
(version "0.38.0.1")
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/mpv-player/mpv.git")
(commit "6107112b32e748c55dd2d344b8871ad60c0c504c")))
(sha256
(base32 "0qr4sp3gq3pxpl7nr2dxd628jmdwv09f76pgsyc5rydz05ahymym"))))
(build-system meson-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-file-names
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "player/lua/ytdl_hook.lua"
(("\"yt-dlp\",")
(string-append
"\"" (search-input-file inputs "bin/yt-dlp") "\",")))))
(add-before 'configure 'build-reproducibly
(lambda _
;; Somewhere in the build system library dependencies are enumerated
;; and passed as linker flags, but the order in which they are added
;; varies. See <https://github.com/mpv-player/mpv/issues/7855>.
;; Set PYTHONHASHSEED as a workaround for deterministic results.
(setenv "PYTHONHASHSEED" "1"))))
#:configure-flags
#~(list "-Dlibmpv=true"
"-Dcdda=enabled"
"-Ddvdnav=enabled"
"-Dbuild-date=false")))
(native-inputs
(list perl ;for zsh completion file
pkg-config
python-docutils
python-wrapper))
;; Missing features: libguess, V4L2.
(inputs
(list enca
ladspa
lcms
libbs2b
vvdec
mpg123
rsound
vulkan-headers
vulkan-loader
yt-dlp))
;; XXX: These are propagated for the mpv pkg-config package, as they are
;; listed in Requires.private and would break 'pkg-config --exists mpv' if
;; unavailable.
(propagated-inputs
(list alsa-lib
vvdec
ffmpeg-vvdec
jack-1
libass
libbluray
libcaca
libcdio-paranoia
libdrm
libdvdnav
libdvdread
libjpeg-turbo
libplacebo
libva
libvdpau
libx11
libxext
libxinerama
libxkbcommon
libxpresent
libxrandr
libxscrnsaver
libxv
;; XXX: lua > 5.2 is not currently supported; see meson.build
lua-5.2
mesa
pulseaudio
shaderc
wayland
wayland-protocols
zimg
zlib))
(home-page "https://mpv.io/")
(synopsis "Audio and video player")
(description "mpv is a general-purpose audio and video player. It is a
fork of mplayer2 and MPlayer. It shares some features with the former
projects while introducing many more.")
(license license:gpl2+)))
ffmpeg-vvdec ffmpeg-vvdec