This adds dropped-file property which contains a list of dropped files
and the type of the drop. This allows clients to implement custom drag
and drop handling.
Lavf exposes programs/renditions as a flat track list tagged with
program_id. We respect this metadata and group tracks into their
respective programs, as tracks from different programs may be completely
unrelated to each other.
This commits adds an option to flatten the editions and ignore the
grouping.
Fixes: https://github.com/mpv-player/mpv/issues/17836#issuecomment-4345930205
Return all subtitle lines in memory with text, start and end.
I did not name this sub-all so it cannot be misinterpreted as referring
to all subtitle tracks.
Closes#12810.
If the compositor supports session management, the mpv window is always
added to a session. The user can manage multiple sessions by using
`--wayland-session=<human-readable-name>`. Human-readable names are
mapped to session ids via files under `~/.local/state/mpv/sessions`. The
file name is computed as a hash of XDG_CURRENT_DESKTOP and the
human-readable name.
If multiple mpv instances are started with the same session name, the
latter mpv instance takes over the session.
Upon session restoration, the mpv window is restored by the compositor
according to its state from the previous session. What that entails is
compositor policy.
93fe7a5526 fixed the only problem with all_formats=yes, so make it the
default to allow changing tracks of ytdl_hook URLs at runtime without
re-invoking yt-dlp.
Closes#16872.
This adds _down_command support to bind_mouse_buttons so it can be
used to bind button down actions like mbtn_left_down, and let forward
and backward buttons use bind_mouse_buttons. This makes mouse button
down actions customizable.
This has been deprecated for 8 years, since 9eadc068fa, with a visible
warning. Removing it has the benefit of not spamming every log file with
lua-settings searches.
This adds proper support for MPEG-TS programs and HLS variants. Now
program selection is exposed as editions and tracks are grouped under
such edition. If there are external tracks added, they are available in
all editions.
trying to autocreate playlist when the file is a fifo breaks
playback. the bug report is a special case of `/dev/fd/*` but
even for named fifos, opening and closing them can cause the
other end to stop writing.
Closes: https://github.com/mpv-player/mpv/issues/17682
Some commands have named arguments named "name", which conflict with
the "name" entry used to specify command name in mpv_command_node, so
they cannot be used with mpv_command_node.
These commands include:
set, del, change-list, add, cycle, multiply, enable-section,
disable-section, define-section, script-binding, keybind, keypress,
keydown, keyup, apply-profile.
This makes mpv_command_node accept command name as key "_name", so
"name" can be used to specify command arguments. For compatibility,
if "_name" entry does not exist, then "name" is used as fallback.
Add optional 'default-value' and 'choices' fields where appropriate
for command arguments in the 'command-list' property. Update
documentation to reflect the command-list schema change.
DOCS/interface-changes/command-list: add changes
Using vo_vaapi has already been heavily discouraged for years since
years since 5c313f1f59. More importantly,
it's just fundamentally broken on most hardware, serves no real purpose,
and well we shouldn't just ship broken stuff. vo_vaapi largely only ever
worked correctly on some intel hardware. The VO relies on certain API
calls that other vendors never implemented so things like the OSD and
subtitles are just never going to work. This largely has no reason to
exist either. If you're looking for efficient playback, you can use
vo_gpu/vo_gpu_next in dumb mode with vaapi decoding. You can also use
vo_dmabuf_wayland with vaapi as well to avoid even more GPU to CPU
copies and theoretically be even more efficient.
When force-window-position=no place window on requested position only on
init (when VO requests `force_pos`), except that keep existing
position on auto resizes.
This applies to both user provided geometry and default center
position.
Fixes: #17588
This uses the update_data request for clipboard backends that require it.
When clipboard monitoring is disabled, the backends will no longer
fetch data when it detects data change, and will now only do that when
receiving the update_data request.
The client now needs to run this command to update the clipboard content,
otherwise the property value is outdated.
This makes sure that applications that depend on "paste once" behavior
work correctly.
This command runs in a separate worker thread so that it can be used
as a "blocking" way to update clipboard until the update notification
arrives without blocking the playback core. It accepts a maximum timeout
parameter. This uses the existing mp_cancel mechanism to make sure this
command can be aborted and the worker threads will not stall the player
too much when quitting mpv.
For backends that do not support update_data, this command does nothing.
Currently, there is no hook which happens when the playback actually
starts. The on_preloaded hook is insufficient for many cases, as many
track information are unavailable at that stage. This makes it impossible
to act on certain track metadata before the media is shown to the user,
so the user will see the media before action for a brief moment before the
properties are notified and options are changed.
This adds the on_loaded hook which allows the mentioned information
available.
This commit allows a table of script-opt overrides to be passed to
`mp.input.get()` and `mp.input.select()`, which console.lua will use
instead of the its own.
To minimise required changes, metatables are used to allow console.lua
to seamlessly fall back on the original script-opts if the client does
not provide an override.
To prevent exceptions, the incoming opts must be of the same type.
If you set file-local-options/foo at runtime and run playlist-play-index
current or playlist-play-index $current_pos, file-local-options/foo is
reset. Add a flag to make it preserve file-local-options.
The advantage of this change is that it allows binding Ctrl+r set
file-local-options/start ${=time-pos}; playlist-play-index current yes
to reload the current file while preserving all options, independently
of --no-config, --watch-later-options or --reset-on-next-file, and
without writing watch later files to disk. It also preserves
file-local-options set on the CLI unlike loadfile.
This was a typo. Although this changes the user option name, this
filter, especially this option, is so niche that I fix it without a
deprecation period.
This was a mistake. It's too situational and it's not worth complicating
the API and every mp.input client with it. It made some sense before I
implemented input.select() because you could use input.get() to input a
choice and validate it, but in general for input.get() clients it's
better to show an error with input.set_log() instead of adding new lines
to the log everytime. This is what e.g.
https://framagit.org/Midgard/mpv-subber/-/blob/master/subber.lua does.
So this is only marginally useful for REPL scripts that keep adding
lines to the log, and the only such scripts are commands.lua and my
lua-repl.lua. commands.lua never used it and I already removed it from
lua-repl.lua. Cloning all scripts in the wiki reveals that **nobody** is
using log_error(), confirming that it is safe to deprecate.
We should have done this ages ago. These commands essentially consist of
a combination of a load action and whether or not playback should be
started. The old `-play` aliases are kept for backwards compatibility.