12666 Commits

Author SHA1 Message Date
Kacper Michajłow 24cc1c1c3e DOCS/interface-changes: add entries for merged changes without one
The nvidia-true-hdr change of vf_d3d11vpp, the detection of .iso disc
images and the reference white default have no entry yet.
2026-10-16 23:23:18 +02:00
Kacper Michajłow dc7f5ec7e4 DOCS/interface-changes: put each change on one line 2026-10-16 23:23:18 +02:00
Kacper Michajłow 78159111a8 TOOLS/gen-interface-changes: take every file in the directory
Entries in files with an extension other than .txt were silently left
out of the generated list, which happened to three .rst files in the
0.41.0 release. Collect every file except example.txt and say so in the
release policy.
2026-10-16 23:23:18 +02:00
Lynne 25d8fa585b mp_image: support linear light XYZ
Treat RGB formats tagged with SMPTE ST 428-1 primaries as XYZ, keep
linear light XYZ linear and decode it into the tagged primaries, BT.2020
if unknown, and decode anything else as DCDM X'Y'Z' into DCI-P3. Tag XYZ
frames with ST 428-1 primaries when converting to AVFrame.

Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
2026-10-16 19:56:44 +02:00
Link Mauve a2cd83c56d vo_drm: add support for RGB565
This image format is quite legacy, but uses half as much bandwidth as
the closest XRGB8888, at 16bpp instead of 32bpp, so it is useful to
support on the slowest/oldest display controllers.
2026-10-16 00:28:47 +02:00
Kacper Michajłow 2ddd0f027c select.lua: open context_menu.lua in d3d11 exclusive fullscreen
Load context_menu.lua when --d3d11-exclusive-fs is enabled and open it
instead of the native context menu. Native context menu cannot be
displayed over the exlusive window.

Fixes: #18181
2026-10-15 20:37:15 +02:00
Kacper Michajłow 4255130de4 libmpv: add D3D11 render API backend
Adds a new render API backend that lets libmpv embedders render directly
into an application-owned ID3D11Texture2D.

The backend is selected with MPV_RENDER_API_TYPE_D3D11. The embedder
supplies the ID3D11Device via MPV_RENDER_PARAM_D3D11_INIT_PARAMS at
context creation, and the target texture via MPV_RENDER_PARAM_D3D11_FBO
on each mpv_render_context_render() call. Swapchain creation and
presentation stay entirely on the caller side.

Co-authored-by: dragonflylee <dragonflylee@outlook.com>
2026-10-15 15:36:37 +02:00
Kacper Michajłow c92f8b4b3a stream_aes_ctr: add aes-ctr:// protocol
Decrypts a stream that was encrypted as a whole with AES in CTR mode,
with a key of 128, 192 or 256 bits. The counter block is the IV plus
the index of the block as a 128 bit big endian number, so the stream
seeks wherever the inner stream does.
2026-10-14 18:09:16 +02:00
Kacper Michajłow 16fb1523fb DOCS/man/vo: drop the removed --vo-sixel-exit-clear alias
The option was removed in 6e3d90d72a.
2026-10-11 16:45:32 +02:00
Kacper Michajłow ad69233d93 vo_tct: present frames through the terminal swapchain
Build the whole frame, including the synchronized update sequences, in
a buffer acquired from the terminal swapchain and present it, so it is
written while the next frame is rendered.
2026-10-11 16:45:32 +02:00
Kacper Michajłow 2c98919b66 vo_sixel: present frames through the terminal swapchain
The console write of a frame blocks until the terminal has consumed it,
which at large sizes takes as long as encoding the next frame. Present
each frame through the terminal swapchain instead, so the write overlaps
with scaling and encoding the next one.
2026-10-11 16:45:32 +02:00
Kacper Michajłow ce2fe8d678 vo_sixel: size the canvas from the terminal's cells
--vo-sixel-rows and --vo-sixel-cols replaced the terminal's cell counts
while the canvas kept the terminal's pixel size, and --vo-sixel-top and
--vo-sixel-left kept it too, so the image ran past the bottom and
scrolled the terminal. Take the cell size from what the terminal
reports, and size the canvas in those cells from where the image
starts, or as the options say.
2026-10-11 16:45:32 +02:00
Kacper Michajłow 12d630d819 terminal: serialize terminal output between the status line and the VOs
The status line is written from the main thread while vo_sixel, vo_kitty
and vo_tct write frames from the VO thread, so it could land inside a
frame. Add a lock that the status line holds for a write and the VOs for
a frame.
2026-10-11 16:45:32 +02:00
Julius Bairaktaris fd9265a905 context_angle: remove the D3D9 renderer
ANGLE removed its D3D9 backend along with
EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE, so context_angle.c no longer builds
against current ANGLE headers.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
2026-10-09 13:01:09 +02:00
Guido Cella 5d85ba5fb3 osc.lua: make wheel commands on the seekbar configurable
Fixes #18562.
2026-10-05 19:47:30 +02:00
der richter 0fd3430ee9 DOCS/man/options: clarify input-builtin-drag-and-drop macOS behavior
this is a shortcoming of cocoa, so clarify this behavior till it can
be fixed.
2026-09-26 14:34:52 +02:00
Kacper Michajłow 76234f58af ci/mingw64-full: add full static mingw64 builds
Build mpv and libmpv inside the FFmpeg-Builds container images, which
ship a mingw-w64 cross toolchain and every FFmpeg dependency as a static
library. FFmpeg itself, LuaJIT, subrandr and the C++/WinRT projection
are built on top. One day we might fork the FFmpeg-Builds and do
mpv-Builds, but the overhead of maintaining that is bigger than current
cost of building few deps on top.

x86_64 and aarch64 are built in the GPL and the LGPL variant. The GPL
variant publishes mpv.exe, both variants publish a libmpv package with
the DLL, its import library and the headers.

rav1e and librsvg are Rust libraries with their own copy of the Rust
standard library, which collides with subrandr's at link time, so both
are left out of FFmpeg for now.
2026-09-26 00:49:37 +02:00
Kacper Michajłow ac7bceb640 vf_format: make stereo-in=mono override the source mode
set_params() treated 0 as unset, but 0 is mono, so stereo-in=mono was
a no-op and the only way to drop a stereo 3D mode was stereo-in=no,
which wrote the invalid value -1 into the image params. Use -1 as the
unset default like rotate does, so no keeps the source mode and mono
overrides it.
2026-09-23 15:41:38 +02:00
Kacper Michajłow 6fd80b2003 ci/build-win32.ps1: bump ffmpeg to 9.0 branch 2026-09-23 00:10:18 +02:00
Kacper Michajłow 6947452781 DOCS/contribute.md: set expectations for issues, PR text and LLM use
Drive-by contributions have become more and more problematic, so we
need to make the rules more explicit. At the same time, we don't want
to limit contributions, but make it clear that the submitter is supposed
to take responsibility for the change they are sending.

The biggest issue is overly verbose walls of text in issue or PR
descriptions for trivial code changes. What's worse, a big part of the
analysis is often simply wrong, making reviewers work twice as hard to
untangle the mess. Contributions are welcome, but we have to be mindful
of the time of everyone involved.
2026-09-22 14:50:33 +02:00
llyyr e76a35ec95 DOCS/contribute.md: disallow LLM in commit messages 2026-09-18 19:17:00 +02:00
Kacper Michajłow a98d3ede9f ytdl_hook: pass a default format again
This is a revert of a6f3236c3a with bestvideo* added. Dropping the
default format was meant to follow yt-dlp's `bv*+ba/b`, but yt-dlp only
selects that when it finds ffmpeg to merge the tracks. Otherwise it
falls back to `best`, a muxed format, which is most of the time is not
optimal selection.
2026-09-13 15:37:23 +02:00
Kacper Michajłow 87b8d352d2 stream_curl: use the Content-Disposition file name as the filename
Only stream_curl sets it for now.
2026-09-07 15:53:31 +02:00
Kacper Michajłow 876ba7b283 audio: add DSD-over-PCM pass-through
Add ad_dsd, a pass-through decoder converting raw DSD audio to DoP frames, enabled with --audio-spdif=dsd. DST compressed audio is losslessly decompressed to DSD first.

DoP output requires an AO with support for the format (currently
ao_wasapi in exclusive mode) and a DoP capable DAC. Will fallback to PCM
if not supported.
2026-09-06 01:27:27 +02:00
Kacper Michajłow 02ec593037 stream: auto-detect .iso DVD-Video, DVD-Audio and Blu-ray images
Passing a disc image directly (e.g. `mpv disc.iso`) previously fell
through to FFmpeg. Route it to the matching disc backend instead,
like the VIDEO_TS.IFO/AUDIO_TS.IFO/BDMV redirectors already do.
2026-08-26 01:47:41 +02:00
Kacper Michajłow a2448f3b81 stream_dvda: expose DVD-Audio still images as a cover-art video track
DVD-Audio discs carry an Audio Still Video Set (ASVS). An MPEG-2 still
images (cover art, booklet/lyric pages) that the disc associates with
tracks.

A new STREAM_CTRL_GET_STILL returns the still for a given playback time.
demux_disc exposes it as a selectable mpeg2video track and injects the
still as a keyframe at the track's playback time. It changes as playback
crosses track boundaries (and follows onset times when a disc encodes
them).

--dvda-page (with the new STREAM_CTRL_SET_STILL_PAGE) forces a specific
still page instead of the scheduled one. The still state is guarded by
a mutex, runtime page changes arrive from the player thread while the
demuxer thread extracts stills.
2026-08-26 01:47:41 +02:00
Kacper Michajłow be04215d3f stream_dvda: add DVD-Audio playback support
Add a dvda:// protocol backed by libdvdread. Audio title sets are
enumerated from the ATS IFOs. Each ATS title is exposed as an mpv
title/edition and its tracks as chapters.

Menus are not supported, they would need full VM implementation, and
libdvdnav currently doesn't support DVD-Audio.

Still images (ASVS) may be supported in the future.
2026-08-26 01:47:41 +02:00
Kacper Michajłow 216e26c871 player/command: add discnav command and bind default keys
User-facing entry point for in-disc menu navigation. The command
forwards an action (up/down/left/right/select/menu/title-menu/popup/
prev/mouse-move/mouse-click) to the current disc stream handler.

The new discnav input section allows binding controls that are only
active while a disc menu is on screen.

Setting the edition property on a disc jumps to the title through the
stream directly, so selecting the currently-playing edition can still
return to it from a menu.
2026-08-26 01:47:41 +02:00
Kacper Michajłow a5682eb2ad player/command: add disc-menu-active property 2026-08-26 01:47:41 +02:00
Kacper Michajłow fbd0e047b1 options: add disc-menu option 2026-08-26 01:47:41 +02:00
Kacper Michajłow 654e9382c0 command: add colorspace and luminance arguments to overlay-add
Add primaries, transfer, max_luma and video_colorspace arguments.
Allows tagging the colorspace of the overlay bitmap instead of assuming
sRGB. video_colorspace interprets the bitmap in the video's colorspace,
so it is tone mapped exactly like the video. max_luma overrides the
luminance peak of the bitmap. Currently only vo_gpu_next honors these
parameters. vo_gpu keeps its sRGB assumption regardless of the tag.

Fixes #10678
2026-08-23 18:09:02 +02:00
Kacper Michajłow 24c1cc52a3 vd_lavc: derive hwdec surface pool size from VO requirements
Change --hwdec-extra-frames default to auto, which sizes fixed hw frame
pools from the number of frames the VO declares to reference, instead of
a static guess. Fixes pool exhaustion with e.g. --interpolation and a
tscale filter with larger radius.

Fixes: #18205
2026-07-28 15:08:36 +02:00
nanahi 5659a9a9c8 DOCS/man/options: clarify --playlist expansion behavior
It's not recursive except for directories.
2026-07-26 11:50:05 +02:00
nanahi f76519ebd8 DOCS/man/options: clarify how --shuffle option works
There are many misconceptions about how this option work.
Make it more clear.
2026-07-26 11:50:05 +02:00
nanahi 05d45f4955 DOCS/man: mention when options are marked as file-local 2026-07-26 11:49:30 +02:00
nanahi 42d50061f6 DOCS/man/input: use connect terminology for file-local options
The file-local-options property sets options that are reset when file
change occurs. This is different from per-file options which are set with
--{ commandline arguments and options parameter of the loadfile command.
Per-file options use file-local option mechanism for setting options when
the file is loaded, but they are persistent and stay with the playlist
entries, unlike file-local-options set at runtime.

This corrects the on_load hook documentation about the effect of setting
file-local-options.
2026-07-26 11:49:30 +02:00
nanahi 731229bd2b options: add --playlist-inherit-options option
This allows controlling whether the files in a playlist inherit the
per-file options of the playlist file itself. For playlists created
by --autocreate-playlist, --playlist-inherit-options=current allows
inheriting only for the item the playlist is created from.
2026-07-26 11:49:16 +02:00
diniamo 0fb136f685 input/ipc-win: allow Windows handles for --input-ipc-client
Previously, you could only provide a CRT FD, which works great for the
most part, but when using CreateProcess on Windows, it requires the use
of the reserved fields of STARTUPINFO to inherit the FD to a child mpv
process. This becomes a problem for example if you use Go's os/exec API,
which does not expose a way to set those reserved fields. Exposing a way
to allow passing handles directly fixes the mentioned scenario, and
makes --input-ipc-client more flexible at no cost.
2026-07-23 22:06:04 +02:00
idontwannagoo 8ab3f8b66d options: add secondary-sub-scale
This allows scaling secondary subtitles independently from primary subtitles. The option defaults to 1 like --sub-scale and follows the other secondary-sub-* options by not inheriting from the primary subtitle setting.

Fixes #14989.
2026-07-22 19:32:01 +00:00
Kacper Michajłow e517fd6043 player/command: make track-list/N/ff-index optional
The `ff-index` is just a index of in the track order, it doesn't carry
much meaning and may be wrong or unavailable when other than lavf
demuxer is used. Additionally some tracks may be virtual like DOVI EL
track or merged image tile grid. In which case those track are not
related to lavf at all.

No deprecation period. It was never guaranteed to match FFmpeg anyway,
so anyone who has a hard dependency on this property should reconsider.
It's not really possible to provide backward compatibility given the
ambiguity of this index. It's better to make it unavailable than making
mismatch. For user it's clear when it's not available, but not possible
to know when it's wrong.
2026-07-09 05:04:11 +02:00
Kacper Michajłow 4c220ffd95 vo_gpu_next: disable auto reference white on onlder libplacebo version
To avoid forcing by default values that may be problematic in some
cases, especially with ICC profiles.
2026-07-07 00:00:05 +02:00
Kacper Michajłow 6a0ef86e00 vo_gpu_next: make subtitles / osd also follow system reference white 2026-07-07 00:00:05 +02:00
Dudemanguy 33111f3212 DOCS/man/vo: remove mentions of 'experimental' for vo_dmabuf_wayland
It's fair to say that it's generally a mature and well-working VO at
this point.
2026-07-03 14:00:15 +00:00
Mohammad AlSaleh dc8101574d audio/filter: implement lavfi-tempo leveraging lavfi's atempo/ascale
Implement `lavfi-tempo` audio filter, which uses `atempo` or `ascale`
 form libavfilter for setting the tempo.

 Users (myself included) seem to be always looking for alternative tempo
 scalers to try, and this provides a faster implementation (or two), and
 may prove useful beyond performance/speed.

 `atempo` is picked as a default, and as a fall-back if `ascale` is not
 available.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2026-07-02 17:38:07 +00:00
Thomas Weißschuh c22cac669e stream_env: add new stream to read from environment variables 2026-07-02 17:36:31 +00:00
Kacper Michajłow 0480011ac4 vf_format: add vf=format=enhancement-layer option 2026-07-01 04:46:42 +02:00
Kacper Michajłow 5abce15f1c vf_d3d11vpp: enable NVIDIA RTX Video only for SDR input
This filter only converts SDR to HDR, so disable it if we have already
HDR on input. Note that it also seems to be disabled if HDR is disabled
in Windows, but we don't check that, because filters are not related to
display. Use conditional profile to enable this filter when needed, this
commit is only small convenience change.

Fixes: #17800
2026-06-28 17:22:20 +02:00
Kacper Michajłow 62f1494661 vo_gpu_next: follow reference white system setting
This is mostly useful for SDR mode where previously we would output 203
nits, which on Windows is considered HDR, because reference white is
fixed at 80 nits in SDR mode. Which in turn causes additional
tone-mapping when using scRGB output.

Note that for SDR transfers this doesn't change the luminance, but
instead causes more aggressive tone-mapping, might not be fully
expected. But maybe we should follow system setting for better of for
worse.

Fixes: https://github.com/mpv-player/mpv/issues/17850
Not fully, because when ICC profile is embeded in content, libplacebo
will override our luminance, this will be fixed separately.
2026-06-27 23:15:26 +02:00
Kacper Michajłow c4207644ba stream_curl: require libcurl 7.88.0
To avoid those awkward definitions. Initially much lower version was
required, but after changes it landed at 7.87.0, so we might as well
bump it one up.
2026-06-26 06:47:50 +02:00
sfan5 2339eb7276 stream_curl: extend version checks that enable curl by default
...to include older ffmpeg patch relases where the nested IO cleanup bug is fixed
2026-06-23 11:03:09 +02:00