From bdab7154731bda64ab8ce0ae556575ba479471c4 Mon Sep 17 00:00:00 2001 From: tigro Date: Tue, 18 Jul 2023 13:54:48 +0300 Subject: [PATCH] import mpv-0.35.1-2.el9 --- .gitignore | 2 +- .mpv.metadata | 2 +- SOURCES/mpv-0.35.1-yt-dlp-hook-fix.patch | 64 +++++++++ SPECS/mpv.spec | 158 +++++++++++++---------- 4 files changed, 155 insertions(+), 71 deletions(-) create mode 100644 SOURCES/mpv-0.35.1-yt-dlp-hook-fix.patch diff --git a/.gitignore b/.gitignore index 2280af2..40cc5e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/mpv-0.34.1.tar.gz +SOURCES/mpv-0.35.1.tar.gz diff --git a/.mpv.metadata b/.mpv.metadata index 46556b2..0ccddb0 100644 --- a/.mpv.metadata +++ b/.mpv.metadata @@ -1 +1 @@ -ab1838641e4de3c897364bf521f2798d8819d9e0 SOURCES/mpv-0.34.1.tar.gz +b8561e11e776b423055715bfe184d117cdf96732 SOURCES/mpv-0.35.1.tar.gz diff --git a/SOURCES/mpv-0.35.1-yt-dlp-hook-fix.patch b/SOURCES/mpv-0.35.1-yt-dlp-hook-fix.patch new file mode 100644 index 0000000..81792de --- /dev/null +++ b/SOURCES/mpv-0.35.1-yt-dlp-hook-fix.patch @@ -0,0 +1,64 @@ +From 985655ebfd77ceddc44d76f8cc6dc446002f34ee Mon Sep 17 00:00:00 2001 +From: Christoph Heinrich +Date: Fri, 3 Mar 2023 00:45:45 +0100 +Subject: [PATCH 1/2] ytdl_hook: init fragment requires other fragments + +With dash the first fragment was always considered an init fragment if +there wasn't a duration. However that only makes sense when there are +also other fragments, so check if there are other fragments in addition +to the lack of a duration. +--- + player/lua/ytdl_hook.lua | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua +index 27e5f4544b2..9e50b3a80b8 100644 +--- a/player/lua/ytdl_hook.lua ++++ b/player/lua/ytdl_hook.lua +@@ -297,7 +297,7 @@ local function edl_track_joined(fragments, protocol, is_live, base) + local args = "" + + -- assume MP4 DASH initialization segment +- if not fragments[1].duration then ++ if not fragments[1].duration and #fragments > 1 then + msg.debug("Using init segment") + args = args .. ",init=" .. edl_escape(join_url(base, fragments[1])) + offset = 2 + +From a5961ad096b1361a12f836c8b170fc748f46962a Mon Sep 17 00:00:00 2001 +From: Christoph Heinrich +Date: Fri, 3 Mar 2023 00:50:58 +0100 +Subject: [PATCH 2/2] ytdl_hook: only log error when no fallback url available + +An error indicates that something doesn't work, but as long as a +safe url is available, playback is still expected to work. + +Thus reduce logging level of MP4 DASH without fragments message and +add a new error message for when there is no safe url available either. + +Also adds a missing space. +--- + player/lua/ytdl_hook.lua | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua +index 9e50b3a80b8..77f7446ed22 100644 +--- a/player/lua/ytdl_hook.lua ++++ b/player/lua/ytdl_hook.lua +@@ -309,7 +309,7 @@ local function edl_track_joined(fragments, protocol, is_live, base) + -- if not available in all, give up. + for i = offset, #fragments do + if not fragments[i].duration then +- msg.error("EDL doesn't support fragments" .. ++ msg.verbose("EDL doesn't support fragments " .. + "without duration with MP4 DASH") + return nil + end +@@ -423,6 +423,7 @@ local function formats_to_edl(json, formats, use_all_formats) + track.protocol, json.is_live, + track.fragment_base_url) + if not edl_track and not url_is_safe(track.url) then ++ msg.error("No safe URL or supported fragmented stream available") + return nil + end + diff --git a/SPECS/mpv.spec b/SPECS/mpv.spec index af27abd..96f3fe1 100644 --- a/SPECS/mpv.spec +++ b/SPECS/mpv.spec @@ -1,100 +1,83 @@ Name: mpv -Version: 0.34.1 -Release: 10%{?dist} +Version: 0.35.1 +Release: 2%{?dist} -License: GPLv2+ and LGPLv2+ +License: GPL-2.0-or-later AND LGPL-2.1-or-later Summary: Movie player playing most video formats and DVDs URL: https://%{name}.io/ Source0: https://github.com/%{name}-player/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz -BuildRequires: pkgconfig(alsa) +# https://github.com/mpv-player/mpv/pull/11398 +Patch100: %{name}-0.35.1-yt-dlp-hook-fix.patch + BuildRequires: desktop-file-utils BuildRequires: gcc +BuildRequires: libappstream-glib +BuildRequires: python3-docutils +BuildRequires: waf-python3 + +BuildRequires: perl(Encode) +BuildRequires: perl(Math::BigInt) +BuildRequires: perl(Math::BigRat) +BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(caca) BuildRequires: pkgconfig(dvdnav) BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(enca) -BuildRequires: pkgconfig(libavutil) >= 56.12.100 -BuildRequires: pkgconfig(libavcodec) >= 58.16.100 -BuildRequires: pkgconfig(libavformat) >= 58.9.100 -BuildRequires: pkgconfig(libswscale) >= 5.0.101 -BuildRequires: pkgconfig(libavfilter) >= 7.14.100 -BuildRequires: pkgconfig(libswresample) >= 3.0.100 BuildRequires: pkgconfig(ffnvcodec) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(jack) -BuildRequires: pkgconfig(mujs) -BuildRequires: pkgconfig(uchardet) >= 0.0.5 -BuildRequires: pkgconfig(rubberband) -BuildRequires: pkgconfig(libguess) -%if 0%{?fedora} -BuildRequires: libshaderc-devel -BuildRequires: pkgconfig(vulkan) -BuildRequires: pkgconfig(libplacebo) -%else -%ifarch x86_64 -BuildRequires: pkgconfig(vulkan) -%endif -%endif BuildRequires: pkgconfig(lcms2) -%if 0%{?fedora} > 30 || 0%{?rhel} > 8 BuildRequires: pkgconfig(libarchive) >= 3.4.0 -%endif BuildRequires: pkgconfig(libass) +BuildRequires: pkgconfig(libavcodec) >= 58.16.100 +BuildRequires: pkgconfig(libavdevice) >= 57.0.0 +BuildRequires: pkgconfig(libavfilter) >= 7.14.100 +BuildRequires: pkgconfig(libavformat) >= 58.9.100 +BuildRequires: pkgconfig(libavutil) >= 56.12.100 BuildRequires: pkgconfig(libbluray) BuildRequires: pkgconfig(libcdio) BuildRequires: pkgconfig(libcdio_paranoia) BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libguess) BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.19 +BuildRequires: pkgconfig(libplacebo) BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(libswresample) >= 3.0.100 +BuildRequires: pkgconfig(libswscale) >= 5.0.101 BuildRequires: pkgconfig(libva) BuildRequires: pkgconfig(lua-5.1) +BuildRequires: pkgconfig(mujs) +BuildRequires: pkgconfig(rubberband) BuildRequires: pkgconfig(sdl2) -BuildRequires: pkgconfig(vdpau) -%ifarch x86_64 -%if 0%{?fedora} || 0%{?rhel} > 7 +BuildRequires: pkgconfig(shaderc) +BuildRequires: pkgconfig(uchardet) >= 0.0.5 BuildRequires: pkgconfig(vapoursynth) -%endif -%endif -BuildRequires: waf-python3 +BuildRequires: pkgconfig(vdpau) +BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-cursor) BuildRequires: pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: pkgconfig(wayland-scanner) BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(xpresent) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xscrnsaver) BuildRequires: pkgconfig(xv) -BuildRequires: pkgconfig(zimg) -# Requires zimg version >= 2.9 +BuildRequires: pkgconfig(zimg) >= 2.9 BuildRequires: pkgconfig(zlib) -BuildRequires: /usr/bin/rst2man -BuildRequires: perl(Math::BigInt) -BuildRequires: perl(Math::BigRat) -BuildRequires: perl(Encode) -%ifarch %{arm} -%{?_with_rpi:BuildRequires: raspberrypi-vc-devel} -%endif - -BuildRequires: ffmpeg-devel -Requires: ffmpeg-libs%{?_isa} - -# Obsoletes older ci/cd -Obsoletes: %{name}-master < %{version}-100 -Provides: %{name}-master = %{version}-100 Requires: hicolor-icon-theme Provides: mplayer-backend -%if 0%{?fedora} -Recommends: yt-dlp -%else -Recommends: youtube-dl -%endif +Recommends: (yt-dlp or youtube-dl) +Suggests: yt-dlp %description Mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety @@ -103,19 +86,36 @@ input URL types are available to read input from a variety of sources other than disk files. Depending on platform, a variety of different video and audio output methods are supported. +Mpv has an OpenGL, Vulkan, and D3D11 based video output that is capable of many +features loved by videophiles, such as video scaling with popular high quality +algorithms, color management, frame timing, interpolation, HDR, and more. + +While mpv strives for minimalism and provides no real GUI, it has a small +controller on top of the video for basic control. + +Mpv can leverage most hardware decoding APIs on all platforms. Hardware +decoding can be enabled at runtime on demand. + +Powerful scripting capabilities can make the player do almost anything. There +is a large selection of user scripts on the wiki. + +A straightforward C API was designed from the ground up to make mpv usable as +a library and facilitate easy integration into other applications. + %package libs -Summary: Dynamic library for Mpv frontends -Requires: ffmpeg-libs%{?_isa} +Summary: Dynamic library for Mpv frontends %description libs This package contains the dynamic library libmpv, which provides access to Mpv. -%package libs-devel +%package devel Summary: Development package for libmpv -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Provides: %{name}-libs-devel = %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: %{name}-libs-devel < %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} -%description libs-devel -Libmpv development header files and libraries. +%description devel +This package contains development header files and libraries for Mpv. %prep %autosetup -p1 @@ -124,7 +124,7 @@ sed -e "s|c_preproc.standard_includes.append('/usr/local/include')|c_preproc.sta %build %set_build_flags -%{_bindir}/waf configure \ +waf configure \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ --libdir=%{_libdir} \ @@ -134,26 +134,24 @@ sed -e "s|c_preproc.standard_includes.append('/usr/local/include')|c_preproc.sta --disable-build-date \ --enable-libmpv-shared \ --enable-sdl2 \ -%if 0%{?fedora} > 30 || 0%{?rhel} > 8 --enable-libarchive \ -%endif --enable-dvdnav \ --enable-cdda \ --enable-html-build \ -%{?_with_rpi:--enable-rpi --disable-vaapi} \ --enable-dvbin \ - --enable-gl-x11 -%{_bindir}/waf -v build %{?_smp_mflags} + --enable-gl-x11 \ + --enable-wayland +waf -v build %{?_smp_mflags} %install -%{_bindir}/waf install --destdir=%{buildroot} +waf install --destdir=%{buildroot} %check +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.metainfo.xml desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %files %docdir %{_docdir}/%{name}/ -%doc README.md etc/input.conf etc/%{name}.conf %license LICENSE.GPL LICENSE.LGPL Copyright %{_docdir}/%{name}/ %{_bindir}/%{name} @@ -166,22 +164,44 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %dir %{_datadir}/zsh/site-functions/ %{_datadir}/zsh/site-functions/_%{name} %{_mandir}/man1/%{name}.* +%{_metainfodir}/%{name}.metainfo.xml %dir %{_sysconfdir}/%{name}/ %config(noreplace) %{_sysconfdir}/%{name}/encoding-profiles.conf %files libs %license LICENSE.GPL LICENSE.LGPL Copyright -%{_libdir}/lib%{name}.so.* +%{_libdir}/lib%{name}.so.2* -%files libs-devel +%files devel %{_includedir}/%{name}/ %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %changelog -* Wed Jul 12 2023 Arkady L. Shane - 0.34.1-10 +* Tue Jul 18 2023 Arkady L. Shane - 0.35.1-2 - Rebuilt for MSVSphere 9.2 +* Tue Mar 07 2023 Maxwell G - 0.35.1-2 +- Backport upstream patch to fix yt-dlp hook + +* Mon Jan 30 2023 Vitaly Zaitsev - 0.35.1-1 +- Updated to version 0.35.1. + +* Thu Jan 19 2023 Fedora Release Engineering - 0.35.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Dec 23 2022 Nicolas Chauvet - 0.35.0-2 +- Rebuilt for libplacebo + +* Sat Nov 12 2022 Vitaly Zaitsev - 0.35.0-1 +- Updated to version 0.35.0. +- Enabled Wayland backend. +- Enabled native PipeWire output support. + +* Mon Sep 05 2022 Vitaly Zaitsev - 0.34.1-11 +- Moved to Fedora. +- Added XDG metainfo manifest. + * Sun Sep 04 2022 Leigh Scott - 0.34.1-10 - Add requires ffmpeg-libs