Custom fonts not loaded properly with OC-only files
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Important information
Matroska should allow for a file containing no streams, using only ordered chapters to play segments from other files. While mpv seems to handle most of this correctly, it fails to load fonts from the linked files unless the edition has at least a short bit from the main file itself.
Edition with three chapters: first two are linked to files in the same directory, last one is 1ms of black video + blank subtitle track from the main file. This is the expected behavior.


Same as above, but without the chapter from the main file itself. Second chapter fails to load fonts from the relevant file.


It does not appear to matter where in the timeline the main file's part is, as long as it exists.
Reproduced on Windows 10 using latest stable (mpv 0.32.0) and a recent build from git (mpv 0.32.0-201-ge7bab0025f). Also on Arch Linux with 0.32.0 (pacman: community mpv 1:0.32.0-4).
Related to #6009, but not the same issue.
Reproduction steps
- Using MKVToolNix or a similar tool, create two Matroska video files (
A.mkvandB.mkv) with subtitles and embedded fonts (different font in each file). - Create a third matroska file (
OCs.mkv) with a single edition. Enable ordered chapters and add both of the files created in step 1. Make sure that these are the only two chapters. - Open
OCs.mkvwith mpv, using--sub-font-provider=noneto make sure mpv tries to use the embedded fonts instead of loading possibly installed fonts. - Wait for the second chapter to start.
Expected behavior
Second chapter should look the same as if B.mkv had been opened by itself in mpv.
Actual behavior
Fonts embedded in B.mkv are not loaded, and mpv displays either a fallback font or simply no subtitles at all.
Log file
Log file: https://pastebin.com/p7R1q3Z6
Sample files
A.mkv: https://x0.at/Mlz.mkv
B.mkv: https://x0.at/Jkt.mkv
OCs.mkv: https://x0.at/ZkU.mkv
Same as OCs.mkv, but with a single ms chapter from the source file added: https://x0.at/Cjw.mkv
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with A.mkv, B.mkv, and OCs.mkv, using --sub-font-provider=none, and review the linked log file. Compare playback of B.mkv alone with its second ordered-chapter appearance in OCs.mkv; done means B.mkv's embedded fonts load without adding a chapter from the main file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100