mpv doesn't accept ASS scripts without a [Script Info] line
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
As the title suggests, mpv won't load the ASS subtitle if it doesn't contain a [Script Info] line, not even when the user manually drag the file into the mpv window.
I recently came across some ASS scripts like that, in which the first few lines in the file - including the first line that says [Script Info] - are commented out by semicolons. Manually delete the semicolon in the first line solves the issue.
I know this is unlikely to be a bug on mpv's (or libass's) side, as one could argue that commenting out the first section-defining line makes the file an invalid ASS script after all. But I still decided to post this as an issue here because while these ASS subtitles have been on the web for quite a while and downloaded by thousands of people already, I haven't seen anyone complaining about this problem, so I assume those video players used by most people (like MPC-HC, PotPlayer, VLC etc.) can play those subtitles just fine. Maybe mpv should also tolerate those kind of ASS scripts just for compatibility's sake? What do you think?
(The info in those files say the script is generated by Aegisub, but I'm not sure whether Aegisub is the culprit here. It could well be that the files were edited in other text editors afterwards and the first line got accidentally commented out, and nobody noticed/thought this will actually be an issue...)
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 an ASS subtitle whose initial [Script Info] lines are commented out with semicolons, including when the file is dragged into mpv. Determine whether compatibility with these files is intended, and consider the work complete when the expected behavior is verified for such subtitles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100