Here is an update to mpv 0.40.0.
Release 0.40.0 ============== We are excited to announce the release of mpv 0.40.0. Key highlights: * Console: Enhanced autocompletion and visual styling * OSC: New selection menu accessible by right-clicking common buttons * HDR is now natively supported when using direct rendering (DRM), as well as dmabuf-wayland on Linux * Native clipboard access for scripts via new `clipboard` property * New command menu, with common actions easily accessible * Enhanced select.lua with new selection options for watch history, editions, DVD/Blu-Ray titles * New positioning.lua script script for cursor-centric zooming and drag to pan * Better stream support for Blu-ray, DVD and CDDA * Track selection improvements and better metadata display * Added osd-box / sub-box / box profiles to easily enable box styled OSD/OSC * Windows support in umpv helper script # Features ## New - vf_d3d11vpp: add NVIDIA RTX Video HDR support - context_drm_gl: add support for HDR metadata - positioning.lua: add new script for video alignment and zooming - umpv: add Windows support - command: add clipboard property with native backends for Windows, macOS, and Wayland - select.lua: add watch history, edition, DVD/Blu-Ray titles and more selection options - input.conf: add cursor-centric zoom and drag-to-pan bindings - wayland: add support for wp-color-management-v1 protocol - console.lua: add persistent command history - stats.lua: add timecode display - options: add --playlist-exts and --archive-exts - wayland_common: support IME usage via text-input-v3 - command: add multiple track metadata and properties - vo_gpu_next: add chroma location and HDR metadata to shader parameters - player/screenshot: support more formats for screenshot-raw command - demux_mkv: add `--demuxer-mkv-crop-compat` option - misc/language: parse hi/sdh/cc tags from external subtitle tracks - wayland: support xdg-activation - player: add mpv:// protocol ## Changed - meson: build libmpv by default - command: enhance track and playlist display information - input.conf: improve numpad key bindings - osc.lua: add custom buttons support and improved mouse bindings - console.lua: inherit OSD styles and colors - options: default to --prefetch-playlist=yes - osc.lua: add slimbottombar and slimtopbar layouts - command: improve frame-step to go through multiple frames - wayland: use wp-presentation v2 if available - various: reorganize options into more logical groups - vo_gpu_next: improve target colorspace handling - options: disable `--input-ime` by default (enabled on demand) # Options and Commands ## Added - sd_ass: introduce sub-ass-prune-delay - player: add an optional mute flag when framestepping - command: add clipboard/text-primary property - command: add current-clipboard-backend property - command: add notify-property command - options: add --script-opt alias for --script-opts-append - options: add --osd-bar-marker-{size,style} options - options: add --input-ime for improved text input - options: add --video-recenter - options: add --clipboard-backends - options: add --wayland-internal-vsync - options: add --sub-scale-signs ## Changed - options: rename --load-osd-console to --load-console - player: improve track selection for multi-component languages - options: improve frame-step command to handle multiple frames - input.conf: make Alt+BS reset --video-align-{x,y} - command: print track metadata when changing track - command: print track-list with enhanced metadata ## Deprecated - options: deprecate `--gamma-auto` (use gamma-auto.lua script instead) - options: deprecate undocumented --cdda-span-{a,b} options # Fixes and Minor Enhancements - f_hwtransfer: ensure that we convert to full range rgb with scale_vaapi - win32: fix window size restore after maximize state - build: fix dynamic generation of mpv.desktop file protocols - player/sub: avoid pointlessly redecoding subs - x11: remove nvidia blacklist logic from --x11-present=auto - osc.lua: seek to the nearest chapter when right clicking the seekbar - command: fix keybind command with sequence keys - video/out/wayland_common: fix crash with multi-seat drag and drop - demux: reclaim demux_packets to reduce memory allocator pressure - demux_cue: only accept TRACK with AUDIO type - player/loadfile: strip common filename part from external track title - build: remove unused dvdread dependency - wayland: fix vertical resizing and scaling issues - console.lua: improve completion and visual appearance - sub/osd: default to a semitransparent black back color - player: improve playlist handling with prefetch - drm: parse EDID using libdisplay-info (which is now a required dependency) - win32: fix window size restore after maximize state - hwdec_d3d11va: align image mapper dimensions to a multiple of 2 - wayland: fix DnD with focus follow mouse - player: store external filenames as normalized - player: properly handle secondary subtitles on the terminal - demux_mkv: add support for chroma location - vo_dmabuf_wayland: improve and fix format selection - player: fix combination of --loop-playlist + --shuffle + --prefetch-playlist Index: Makefile =================================================================== RCS file: /cvs/ports/multimedia/mpv/Makefile,v retrieving revision 1.107 diff -u -p -u -p -r1.107 Makefile --- Makefile 2 Mar 2025 10:17:37 -0000 1.107 +++ Makefile 26 Mar 2025 03:51:33 -0000 @@ -2,9 +2,8 @@ COMMENT = movie player based on MPlayer GH_ACCOUNT = mpv-player GH_PROJECT = mpv -GH_TAGNAME = v0.39.0 +GH_TAGNAME = v0.40.0 USE_NOBTCFI = Yes -REVISION = 0 SHARED_LIBS += mpv 2.0 @@ -15,12 +14,12 @@ HOMEPAGE = https://mpv.io/ # GPLv2+ PERMIT_PACKAGE = Yes -WANTLIB += ${MODLUA_WANTLIB} EGL SDL2 X11 Xext Xpresent Xrandr +WANTLIB += ${MODLUA_WANTLIB} EGL SDL2 X11 X11-xcb Xext Xpresent Xrandr WANTLIB += Xss Xv archive ass avcodec avdevice avfilter avformat -WANTLIB += avutil bluray c cdio cdio_cdda cdio_paranoia drm dvdnav -WANTLIB += iconv jpeg lcms2 m placebo pthread sndio swresample -WANTLIB += swscale va va-drm va-x11 vulkan z zimg -WANTLIB += X11-xcb xcb xcb-shm +WANTLIB += avutil bluray c cdio cdio_cdda cdio_paranoia display-info +WANTLIB += drm dvdnav iconv jpeg lcms2 m placebo pthread sndio +WANTLIB += swresample swscale va va-drm va-x11 vulkan xcb xcb-shm z +WANTLIB += zimg MODULES = devel/meson \ lang/lua \ @@ -39,7 +38,7 @@ LIB_DEPENDS = archivers/libarchive \ audio/libcdio-paranoia \ converters/libiconv \ devel/sdl2 \ - graphics/ffmpeg>=4.4.4p6 \ + graphics/ffmpeg \ graphics/jpeg \ graphics/lcms2 \ graphics/libplacebo \ @@ -47,7 +46,8 @@ LIB_DEPENDS = archivers/libarchive \ graphics/zimg \ multimedia/libass \ multimedia/libbluray \ - multimedia/libdvdnav + multimedia/libdvdnav \ + sysutils/libdisplay-info MODPY_RUNDEP = No RUN_DEPENDS = devel/desktop-file-utils \ @@ -60,7 +60,6 @@ CONFIGURE_ARGS = -Dalsa=disabled \ -Daudiounit=disabled \ -Davfoundation=disabled \ -Dcaca=disabled \ - -Dcdda=enabled \ -Dcocoa=disabled \ -Dcoreaudio=disabled \ -Dcuda-hwaccel=disabled \ @@ -70,26 +69,21 @@ CONFIGURE_ARGS = -Dalsa=disabled \ -Dd3d9-hwaccel=disabled \ -Ddirect3d=disabled \ -Ddmabuf-wayland=disabled \ - -Ddrm=enabled \ -Ddvbin=disabled \ - -Ddvdnav=enabled \ -Degl-android=disabled \ -Degl-angle-lib=disabled \ -Degl-angle-win32=disabled \ -Degl-angle=disabled \ -Degl-drm=disabled \ -Degl-wayland=disabled \ - -Degl=enabled \ -Dgbm=disabled \ -Dgl-cocoa=disabled \ -Dgl-dxinterop-d3d9=disabled \ -Dgl-dxinterop=disabled \ -Dgl-win32=disabled \ - -Dgl-x11=disabled \ -Dios-gl=disabled \ -Djack=disabled \ -Djavascript=disabled \ - -Dlibmpv=true \ -Dlua=lua${MODLUA_DEP_VERSION} \ -Dmacos-10-15-4-features=disabled \ -Dmacos-11-features=disabled \ @@ -108,28 +102,23 @@ CONFIGURE_ARGS = -Dalsa=disabled \ -Dsdl2=enabled \ -Dshaderc=disabled \ -Dsixel=disabled \ - -Dsndio=enabled \ -Dspirv-cross=disabled \ -Dswift-build=disabled \ -Dswift-flags=disabled \ -Duchardet=disabled \ - -Dvaapi-drm=enabled \ -Dvaapi-wayland=disabled \ -Dvaapi-win32=disabled \ - -Dvaapi-x11=enabled \ - -Dvaapi=enabled \ -Dvapoursynth=disabled \ -Dvdpau-gl-x11=disabled \ -Dvdpau=disabled \ -Dvideotoolbox-gl=disabled \ -Dvideotoolbox-pl=disabled \ - -Dvulkan=enabled \ -Dwasapi=disabled \ -Dwayland=disabled \ -Dwin32-threads=disabled -CFLAGS += -I${LOCALBASE}/include -I${X11BASE}/include -LDFLAGS += -L${LOCALBASE}/lib -L${X11BASE}/lib +CFLAGS += -I${LOCALBASE}/include +LDFLAGS += -L${LOCALBASE}/lib MODMESON_CONFIGURE_ENV += CFLAGS="${CFLAGS}" \ LDFLAGS="${LDFLAGS}" Index: distinfo =================================================================== RCS file: /cvs/ports/multimedia/mpv/distinfo,v retrieving revision 1.37 diff -u -p -u -p -r1.37 distinfo --- distinfo 10 Feb 2025 15:39:21 -0000 1.37 +++ distinfo 26 Mar 2025 03:51:33 -0000 @@ -1,2 +1,2 @@ -SHA256 (mpv-0.39.0.tar.gz) = LKkkN6/7YsK1WbRBnqR4XHDQI1kFAOilLpXqOrRVRoM= -SIZE (mpv-0.39.0.tar.gz) = 3494313 +SHA256 (mpv-0.40.0.tar.gz) = EKD0ZU9iFApt1NOA3PC729z25pdVaGPcSZwpYYLwgaM= +SIZE (mpv-0.40.0.tar.gz) = 3561474 Index: patches/patch-meson_build =================================================================== RCS file: /cvs/ports/multimedia/mpv/patches/patch-meson_build,v retrieving revision 1.11 diff -u -p -u -p -r1.11 patch-meson_build --- patches/patch-meson_build 2 Mar 2025 10:17:37 -0000 1.11 +++ patches/patch-meson_build 26 Mar 2025 03:51:33 -0000 @@ -5,7 +5,7 @@ Support for xcb-shm Index: meson.build --- meson.build.orig +++ meson.build -@@ -348,7 +348,19 @@ if features['libdl'] +@@ -358,7 +358,19 @@ if features['libdl'] endif # C11 atomics are mandatory but linking to the library is not always required. @@ -26,7 +26,7 @@ Index: meson.build cplugins = get_option('cplugins').require( win32 or (features['libdl'] and cc.has_link_argument('-rdynamic')), -@@ -1065,7 +1077,10 @@ x11 = { +@@ -1070,7 +1082,10 @@ x11 = { dependency('xscrnsaver', version: '>= 1.0.0', required: x11_opt), dependency('xext', version: '>= 1.0.0', required: x11_opt), dependency('xpresent', version: '>= 1.0.0', required: x11_opt), Index: patches/patch-osdep_terminal-unix_c =================================================================== RCS file: patches/patch-osdep_terminal-unix_c diff -N patches/patch-osdep_terminal-unix_c --- patches/patch-osdep_terminal-unix_c 10 Feb 2025 15:39:21 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,15 +0,0 @@ -https://github.com/mpv-player/mpv/pull/14654 - -Index: osdep/terminal-unix.c ---- osdep/terminal-unix.c.orig -+++ osdep/terminal-unix.c -@@ -466,7 +466,8 @@ static MP_THREAD_VOID terminal_thread(void *ptr) - } - if (fds[1].revents & POLLIN) { - int8_t c = -1; -- (void)read(stop_cont_pipe[0], &c, 1); -+ while (read(stop_cont_pipe[0], &c, 1) == 1) -+ continue; - if (c == PIPE_STOP) { - do_deactivate_getch2(); - if (isatty(STDERR_FILENO)) { Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/multimedia/mpv/pkg/PLIST,v retrieving revision 1.12 diff -u -p -u -p -r1.12 PLIST --- pkg/PLIST 17 Nov 2022 06:46:46 -0000 1.12 +++ pkg/PLIST 26 Mar 2025 03:51:33 -0000 @@ -16,7 +16,9 @@ share/examples/mpv/mplayer-input.conf share/examples/mpv/mpv.conf share/examples/mpv/mpv_identify.sh share/examples/mpv/restore-old-bindings.conf +share/examples/mpv/restore-osc-bindings.conf share/examples/mpv/umpv +share/fish/vendor_completions.d/mpv.fish share/icons/hicolor/128x128/apps/mpv.png share/icons/hicolor/16x16/apps/mpv.png share/icons/hicolor/32x32/apps/mpv.png