mpv-player / mpv-player/mpv

Blu-ray menu navigation: external ASS subtitles become desynchronized; suspect disc timestamp rebasing

Open
#18,481 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information


[mpv-bluray-subtitle-evidence.zip](https://github.com/user-attachments/files/32177002/mpv-bluray-subtitle-evidence.zip)

mpv v0.41.0-1042-g7e4cb538a
 built on Sep 10 2026 17:19:27
libplacebo version: v7.371.0 (v7.360.0-124-g3330a51-dirty)
FFmpeg version: N-126492-gefb0a7e5e
FFmpeg library versions:
   libavcodec      63.11.101
   libavdevice     63.2.100
   libavfilter     12.4.100
   libavformat     63.6.100
   libavutil       61.7.100
   libswresample   7.3.100
   libswscale      10.2.100

Other Information

  • Windows: Windows 11 Pro for Workstations, 10.0.26200, build 26200.
  • GPU: AMD Radeon RX 580 2048SP; driver 31.0.21923.11000.
  • Binary: an existing portable Windows mpv package; original download URL not recorded. The test below uses this executable, without locally modifying it.
  • Latest known working version: unknown; no regression bisect performed.
  • Scope: native bd://menu playback from a local Blu-ray ISO and an external ASS file. This was first noticed in an application that loads subtitles, but the attached reproduction runs mpv directly with --no-config, without the application's Lua scripts, network layer, or subtitle workaround.

Reproduction Steps

Test media: 5 Centimeters Per Second.2007.iso and its matching 5 Centimeters Per Second.2007.ass.

  1. Start mpv with the following options (replace paths and choose any unused IPC pipe name):
mpv.exe bd://menu --bluray-device="G:/5 Centimeters Per Second.2007.iso" --no-config --pause=no --mute=yes --sub-auto=no --save-position-on-quit=no --geometry=960x540 --input-ipc-server=\\.\pipe\mpv-bd-report --log-file=output.txt --msg-level=all=info,disc=trace,bd=debug
  1. Allow First Play to run for about 25 seconds. Open the disc menu with discnav menu. Open the chapter-selection page and select its first chapter thumbnail.
  2. As soon as navigation finishes (disc-menu-active=false, seeking=false), pause playback. In the attached run, the controller waited approximately 0.2 seconds after these conditions before pausing.
  3. Load the ASS file with the IPC command below, without seeking or changing sub-delay:
{"command":["sub-add","G:/5 Centimeters Per Second.2007.ass","select"]}
  1. Compare the subtitle against the underlying picture, then resume playback. Also try the other chapter thumbnails. In manual tests, I load subtitles by dragging the ASS into the mpv window; the attached controlled run uses sub-add select explicitly.

For the specific disc menu, the controlled navigation used discnav mouse-click 0.408 0.868, waited one second, then discnav mouse-click 0.194 0.727. These coordinates are disc-specific, not a generic reproduction on other Blu-rays. The attached controller records the exact sequence.

Expected Behavior

External subtitle timestamps should align with the selected title's presentation timeline after menu navigation. Loading a subtitle should preserve the chapter selected by the user, without requiring an extra seek to the beginning.

Actual Behavior

External ASS subtitles can be out of sync after entering a title/chapter through the disc menu. The effect depends on navigation and loading timing; I have not established a reliable application-side workaround.

In the attached --no-config run, immediately after entering the first chapter and pausing:

time-pos           = 6.338789
playback-time      = 6.338789
demuxer-start-time = 0
pause              = true
seeking            = false
sub-delay          = 0

The image was still black. After sub-add, the position remained 6.338789 and the ASS title cue appeared over that black image. That cue runs from 3.82 to 6.65 seconds in the ASS. Screenshots before and after loading, and public-property samples, are attached. This is a concrete observation for this disc/build, not a claim that every menu transition fails or that a nonzero chapter position alone proves a bug.

Earlier manual observations:

  • Seeking to zero and then loading/reloading the ASS appeared to restore sync, but overwrites intentional chapter navigation.
  • Delaying loading or dragging the ASS during playback sometimes appeared to work.
  • Pausing immediately after chapter navigation and loading the ASS gave different results across three chapters: first and third were out of sync, second appeared correct in that test.
  • Further testing did not establish consistently successful results for delayed loading, so I cannot recommend it as a reliable workaround.
Possible diagnostic clue

The attached full log contains the following mapping after a navigation transition:

[  22.405][v][disc] reset to time: 6.088533
[  22.405][t][disc] ipts: 0 600.000000 599.958289
[  22.405][t][disc] mapped pkt: type=0 pts=6.130244 dts=6.088533

This mapping occurs before the external subtitle is loaded. It suggests investigating the relationship between the disc time queried after navigation/probing and the timestamp of the first packet being mapped. The relevant area may be demux/demux_disc.c and stream/stream_bluray.c. This is a hypothesis, not a confirmed root cause or proposed patch; I have not isolated whether mpv, libbluray, or their interaction is responsible.

Log File

Attach mpv-bluray-subtitle-evidence.zip here. It contains the full, untruncated --no-config run log, screenshots, sampled properties, and the controller used for that run. Local account/workspace paths are redacted; timestamp and packet lines are preserved. The run uses the options above, with local output paths and a generated IPC pipe name. No crash occurred.

Sample Files

The ISO is 21,504,196,608 bytes; the ASS is 138,998 bytes. The commercial disc image and full subtitle file are not included in the evidence archive, and no downloadable minimal media reproducer is available yet. This limits independent reproduction. The attached screenshots/log identify the observed mismatch; please let me know what smaller disc metadata or diagnostic capture would help narrow it down.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the controlled run with the attached log and controller, then inspect demux/demux_disc.c and stream/stream_bluray.c around the recorded timestamp mapping. Compare the disc time reset and first mapped packet with external ASS loading after chapter selection. Done means the cause is isolated and selected-title subtitles remain aligned without an extra seek.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.