Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpv doesn't accept ASS scripts without a [Script Info] line #2846

Open
bodayw opened this issue Feb 19, 2016 · 8 comments
Open

mpv doesn't accept ASS scripts without a [Script Info] line #2846

bodayw opened this issue Feb 19, 2016 · 8 comments

Comments

@bodayw
Copy link
Contributor

bodayw commented Feb 19, 2016

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...)

@ghost ghost added the down-upstream:ffmpeg label Feb 19, 2016
@ghost
Copy link

ghost commented Feb 19, 2016

Affects the ffmpeg ass demuxer.

@bodayw
Copy link
Contributor Author

bodayw commented Feb 19, 2016

Oops, didn't see there is already #2821. Now it does seem like a bug...

@sdvcrx
Copy link

sdvcrx commented Feb 20, 2016

See also #2506

@ghost
Copy link

ghost commented Mar 7, 2016

Needs a sample file.

@bodayw
Copy link
Contributor Author

bodayw commented Mar 7, 2016

OK. In this particular case, the beginning of the script (before [V4+ Styles])is like the following:

; [Script Info]
; Script generated by Aegisub 3.0.4
; http://www.aegisub.org/
; Title:PSYCHO-PASS #01_chs
; Original Script:TxxZ&A.I.R.nesSub
; 翻译:千草未萌 | 校对:Cute-Tina | 时间:朽木绯真 | 后期:村汉
============================================================
Synch Point:0
ScriptType:v4.00+
PlayResX:1280
PlayResY:720
Timer:100.0000

Removing the ; in the first line solves the issue.

@ghost
Copy link

ghost commented Mar 7, 2016

I think we'd prefer a complete script, so we can determine what could be used for autodetection.

@astiob
Copy link
Contributor

astiob commented Jan 7, 2019

Can the ASS demuxer be forced when handing over .ass and .ssa to FFmpeg? Or perhaps forced as a fallback after letting FFmpeg try and fail the regular autodetection mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants