Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7a8b40a
video/img_format: make mp_imgfmt_desc_get_num_comps input param const
kasper93 May 17, 2026
fd89017
demux: propagate track selection only from base track
kasper93 May 16, 2026
fdad1db
loadfile: reselect dependent tracks only when selected by user
kasper93 May 17, 2026
54d71d6
mp_image: add enhancement_layer child image
kasper93 May 16, 2026
d0e1473
vf_format: add `vf=format=enhancement-layer` option
kasper93 May 16, 2026
b192c64
mp_image: add no_dovi / no_enhancement_layer params
kasper93 Jun 1, 2026
b012489
f_enhancement_pair: add filter to match frames of separate video tracks
kasper93 May 16, 2026
d15bb20
f_output_chain: pair BL+EL and output as single frame
kasper93 May 17, 2026
db52c5d
vo_gpu_next: parametrize frame upload/map
kasper93 May 16, 2026
d52f0c6
vo_gpu_next: upload/map EL frame
kasper93 May 16, 2026
313b4dc
demux/dovi_split: add helper to split interleaved HEVC with BL and EL
kasper93 May 17, 2026
d726c2a
demux_lavf: add support for splitting EL track from in-band
kasper93 May 17, 2026
8300b8c
demux_mkv: add support for splitting EL track from in-band
kasper93 May 17, 2026
e2bc69a
demux_lavf: handle AV_STREAM_GROUP_PARAMS_DOLBY_VISION
kasper93 May 17, 2026
f51acf4
demux_disc: mirror lavf demuxer stream groups to parent
kasper93 Jun 1, 2026
3212387
demux_mkv: group EL+BL dovi tracks
kasper93 May 17, 2026
b569071
vo: bump size of pass desc string
kasper93 Jun 1, 2026
1e5b94c
mp_image: don't use deprecated pl_avdovi_metadata_supported
kasper93 Jun 1, 2026
ffdedbc
demux_mkv: map hvcE into side-data
kasper93 Jun 5, 2026
1991ce5
demux_lavf: parent mp_codec_params members to it
kasper93 May 25, 2026
2bb15b6
stream_dvdnav: read VTS event payload from the right buffer
kasper93 Jun 6, 2026
997b21a
sd_lavc: add support for DVD sub highlight
kasper93 May 25, 2026
8e2ab28
demux_disc: drop "PTS discontinuity" logs to verbose
kasper93 May 25, 2026
bf315a8
demux: allow to update duration, chapters and editions during playback
kasper93 Jun 5, 2026
9dbc5d9
stream: add disc-nav actions and states
kasper93 Jun 5, 2026
812c83c
options: add `disc-menu` option
kasper93 May 25, 2026
4b77e5b
stream_dvdnav: implement DVD menu navigation
kasper93 Jun 6, 2026
fe60ee8
stream_bluray: implement HDMV menu navigation
kasper93 Jun 6, 2026
58d346a
demux_disc: reopen slave demuxer on disc-nav hops
kasper93 Jun 6, 2026
73c483f
player: add disc-menu state holder and overlay support
kasper93 Jun 6, 2026
4c78dcc
player/loadfile: auto-select default tracks added after initial open
kasper93 Jun 6, 2026
fe175d9
player/loadfile: react to runtime chapter/edition list updates
kasper93 Jun 6, 2026
b488df4
player/command: add `disc-menu-active` property
kasper93 May 25, 2026
258c55a
player/command: add discnav command and bind default keys
kasper93 Jun 6, 2026
db92646
demux_disc: set partially_seekable to true
kasper93 Jun 6, 2026
8f06526
discnav: sync track selection state with VM
kasper93 Jun 6, 2026
53a2af7
stream_bluray: add BD-J menu support
kasper93 Jun 7, 2026
ddfc443
demux: drive DVD/BD VM even if cache is filled
kasper93 Jun 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions DOCS/interface-changes/disc-menu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
and `--disc-menu` option
add `disc-menu-active` property
add `discnav` command
1 change: 1 addition & 0 deletions DOCS/interface-changes/el.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add `vf=format=enhancement-layer` option
45 changes: 45 additions & 0 deletions DOCS/man/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,45 @@ Miscellaneous Commands
``context-menu``
Show context menu on the video window. See `Context Menu`_ section for details.

``discnav <action> [<x> <y>]``
Send a navigation command to the optical-disc stream that is currently
playing (DVD via ``dvdnav``, Blu-ray via ``libbluray``). The command does
nothing when no disc is being played.

``<action>`` is one of:

up, down, left, right
Move the on-disc button selection.
select
Activate the currently highlighted button.
menu
Jump to the disc's root menu (DVD: VMGM root menu, BD: HDMV top menu).
title-menu
Jump to the current title's menu (DVD only; treated like ``menu`` on BD).
popup
Show / dismiss the Blu-ray popup menu. For DVDs, falls back to the
chapter menu where available.
prev
Return from a menu to playback, or to the previous menu domain.
mouse-move
Forward a mouse position to the disc, so it can update the focused
button under the cursor. With no ``<x> <y>`` arguments, the position
is read from the ``mouse-pos`` property and mapped from window into
source-video coordinates automatically.
mouse-click
Like ``mouse-move`` but also activates the button under the cursor.

``<x>`` and ``<y>`` are optional and only meaningful for the ``mouse-*``
actions. They should normalized cormalized coordinates (top-left at ``0,0``).
Those values are used directly, instead of the live ``mouse-pos``.

mpv ships default bindings for this command in the ``{discnav}`` input
section (``UP``/``DOWN``/``LEFT``/``RIGHT`` for navigation, ``ENTER`` to
select, ``ESC`` / ``BS`` to leave, ``MBTN_LEFT`` / ``MOUSE_MOVE`` for
mouse). The player enables and disables that section automatically as
the menu appears and disappears, so the bindings only shadow the normal
ones while a menu is actually on screen.

``update-clipboard <type> [timeout]``
Update the clipboard content so that the ``clipboard`` property reflects
up-to-date value. This command is required to update the ``clipboard``
Expand Down Expand Up @@ -2423,6 +2462,12 @@ Property list
between having no editions and a single edition, which will be reflected by
the property, although in practice it does not matter.)

``disc-menu-active``
``yes`` when the current optical-disc stream (DVD or Blu-ray) is showing
an interactive menu with a selectable button highlight, and ``no``
otherwise. Unavailable when the currently playing source is not an
optical disc.

``chapters``
Number of chapters.

Expand Down
6 changes: 6 additions & 0 deletions DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ Track Selection
flat list. Note that depending on the file, tracks from different programs
may be completely unrelated to each other.

``--disc-menu=<yes|no>``
When set, opening ``dvd://`` or ``bd://`` boots into the disc's interactive
menu instead of automatically playing the longest title (default: ``no``).
The menu can also be reached at any time via the synthetic "Disc Menu"
entry in the editions/titles list, or with ``discnav menu`` command.

``--show-dependent-tracks=<yes|no>``
Show dependent tracks in the track list (default: no). Dependent tracks
carry coded data that is not independently decodable. For example, the
Expand Down
6 changes: 6 additions & 0 deletions DOCS/man/vf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ Available mpv-only filters are:
Whether or not to include HDR10+ metadata (default: yes). If
disabled, any HDR10+ metadata will be stripped from frames.

``<enhancement-layer=yes|no>``
Whether or not to apply the image enhancement layer (default: yes).
If disabled, the enhancement-layer frame paired with each base-layer
frame is discarded. Currently this controls Dolby Vision Profile 7 FEL
application.

``<min-luma>``
Set the minimum luminance value for the mastering display metadata.
This is a float value in nits (cd/m²).
Expand Down
64 changes: 61 additions & 3 deletions demux/demux.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ struct demux_internal {
double hyst_secs; // stop reading till there's hyst_secs remaining
size_t hyst_bytes; // stop reading till there's hyst_bytes remaining
bool hyst_active;
int64_t nav_pump_deadline; // Deadline (mp_time_ns) until which reading is
// forced past the readahead
size_t max_bytes;
size_t max_bytes_bw;
bool seekable_cache;
Expand Down Expand Up @@ -1249,6 +1251,18 @@ void demux_start_prefetch(struct demuxer *demuxer)
mp_mutex_unlock(&in->lock);
}

void demux_drive_nav(struct demuxer *demuxer)
{
struct demux_internal *in = demuxer->in;
mp_assert(demuxer == in->d_user);

mp_mutex_lock(&in->lock);
in->nav_pump_deadline = mp_time_ns() + MP_TIME_S_TO_NS(2);
in->reading = true;
mp_cond_signal(&in->wakeup);
mp_mutex_unlock(&in->lock);
}

const char *stream_type_name(enum stream_type type)
{
switch (type) {
Expand Down Expand Up @@ -2267,6 +2281,10 @@ static bool read_packet(struct demux_internal *in)
if (!was_reading || in->blocked || demux_cancel_test(in->d_thread))
return false;

bool nav_pump = in->nav_pump_deadline && mp_time_ns() < in->nav_pump_deadline;
if (in->nav_pump_deadline && !nav_pump)
in->nav_pump_deadline = 0;

// Check if we need to read a new packet. We do this if all queues are below
// the minimum, or if a stream explicitly needs new packets. Also includes
// safe-guards against packet queue overflow.
Expand Down Expand Up @@ -2304,6 +2322,11 @@ static bool read_packet(struct demux_internal *in)
prefetch_more |= true;
}

// Keep reading regardless of cache fill level so the stream's DVD/BD VM
// gets driven. This is important in cases, where we would receive
// discontinuity reset after VM control, but we have to pump the events first.
prefetch_more |= nav_pump;

MP_TRACE(in, "bytes=%zd, read_more=%d prefetch_more=%d, refresh_more=%d\n",
(size_t)total_fw_bytes, read_more, prefetch_more, refresh_more);
if (total_fw_bytes >= in->max_bytes) {
Expand Down Expand Up @@ -3075,7 +3098,7 @@ static void demux_update_replaygain(demuxer_t *demuxer)
if (!rg)
rg = decode_rgain(demuxer->log, demuxer->metadata);
if (rg)
sh->codec->replaygain_data = talloc_steal(in, rg);
sh->codec->replaygain_data = talloc_steal(sh->codec, rg);
}
}
}
Expand Down Expand Up @@ -3181,6 +3204,41 @@ void demux_metadata_changed(demuxer_t *demuxer)
mp_mutex_unlock(&in->lock);
}

// Updates the duration should it need to be changed. Used for demuxers that
// changes titles/playlists at runtime.
void demux_set_duration(demuxer_t *demuxer, double duration)
{
mp_assert(demuxer == demuxer->in->d_thread);
struct demux_internal *in = demuxer->in;

mp_mutex_lock(&in->lock);
in->duration = duration;
in->d_thread->duration = duration;
// Clear the high-water mark so subsequent packets can re-ratchet duration
// upward from the new playlist's PTS base without being shadowed by the
// previous title's value.
in->highest_av_pts = MP_NOPTS_VALUE;
in->events |= DEMUX_EVENT_DURATION;
mp_mutex_unlock(&in->lock);
}

// Updates the chapters/editions should it need to be changed. Used for demuxers
// that changes titles/playlists at runtime.
void demux_lists_changed(demuxer_t *demuxer)
{
mp_assert(demuxer == demuxer->in->d_thread);
struct demux_internal *in = demuxer->in;

mp_mutex_lock(&in->lock);
in->d_user->chapters = in->d_thread->chapters;
in->d_user->num_chapters = in->d_thread->num_chapters;
in->d_user->editions = in->d_thread->editions;
in->d_user->num_editions = in->d_thread->num_editions;
in->d_user->edition = in->d_thread->edition;
in->events |= DEMUX_EVENT_LISTS;
mp_mutex_unlock(&in->lock);
}

// Called locked, with user demuxer.
static void update_final_metadata(demuxer_t *demuxer, struct timed_metadata *tm)
{
Expand Down Expand Up @@ -4145,11 +4203,11 @@ void demuxer_select_track(struct demuxer *demuxer, struct sh_stream *stream,
struct demux_internal *in = demuxer->in;
mp_mutex_lock(&in->lock);
bool changed = select_track(in, stream, ref_pts, selected);
if (stream->group) {
if (stream->group && !stream->dependent_track) {
for (int i = 0; i < stream->group->num_members; i++) {
struct sh_stream *m = stream->group->members[i];
mp_assert(m);
if (m != stream)
if (m != stream && m->dependent_track)
changed |= select_track(in, m, ref_pts, selected);
}
}
Expand Down
4 changes: 4 additions & 0 deletions demux/demux.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ enum demux_event {
DEMUX_EVENT_STREAMS = 1 << 1, // a stream was added
DEMUX_EVENT_METADATA = 1 << 2, // metadata or stream_metadata changed
DEMUX_EVENT_DURATION = 1 << 3, // duration updated
DEMUX_EVENT_LISTS = 1 << 4, // chapters / editions list changed
DEMUX_EVENT_ALL = 0xFFFF,
};

Expand Down Expand Up @@ -320,6 +321,7 @@ void demux_start_thread(struct demuxer *demuxer);
void demux_stop_thread(struct demuxer *demuxer);
void demux_set_wakeup_cb(struct demuxer *demuxer, void (*cb)(void *ctx), void *ctx);
void demux_start_prefetch(struct demuxer *demuxer);
void demux_drive_nav(struct demuxer *demuxer);

bool demux_cancel_test(struct demuxer *demuxer);

Expand Down Expand Up @@ -348,6 +350,8 @@ void demux_stream_tags_changed(struct demuxer *demuxer, struct sh_stream *sh,
void demux_close_stream(struct demuxer *demuxer);

void demux_metadata_changed(demuxer_t *demuxer);
void demux_set_duration(demuxer_t *demuxer, double duration);
void demux_lists_changed(demuxer_t *demuxer);
void demux_update(demuxer_t *demuxer, double playback_pts);

bool demux_cache_dump_set(struct demuxer *demuxer, double start, double end,
Expand Down
Loading
Loading