mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.65k stars 2.83k forks source link

select.lua: `select-subtitle-line` doesn't consider ordered chapters #14402

Open norinoriko opened 1 week ago

norinoriko commented 1 week ago

mpv Information

mpv v0.38.0-511-g42a4c306 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Jun 20 2024 12:13:10
libplacebo version: v7.349.0 (v7.349.0-rc1-2-gbc9de9c-dirty)
FFmpeg version: N-115881-g0ae157b36
FFmpeg library versions:
   libavutil       59.24.100
   libavcodec      61.8.100
   libavformat     61.3.104
   libswscale      8.2.100
   libavfilter     10.2.102
   libswresample   5.2.100

Other Information

Reproduction Steps

  1. Load matroska file with ordered chapters
  2. Input g-l
  3. Seek to any subtitle line after the ordered chapter

Expected Behavior

Subtitles and timestamp align

Actual Behavior

Subtitles and timestamp don't align

Log File

mpv.log

Sample Files

Can be provided if necessary. but ffmpeg doesn't support ordered chapters so it's hard to make small samples without mangling the files.

I carefully read all instruction and confirm that I did the following:

guidocella commented 1 week ago

select.lua just uses whatever timestamps ffmpeg returns so to fix this either ffmpeg needs to support ordered chapters or we need to implement subtitle extraction within mpv.

norinoriko commented 1 week ago

The ticket for segmented .mkv support seems stalled in ffmpeg so RIP I suppose. https://trac.ffmpeg.org/ticket/3123

kasper93 commented 1 week ago

or we need to implement subtitle extraction within mpv.

Yep, we need to do that at some point.