-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
wishlist: vtt: support styling #7214
Comments
Now, I haven't looked at the sample yet, but I do know that we have two possible parts here:
ffmpeg -v verbose -i INPUT.vtt -c:s ass out.ass has the styling. If not, then this is an FFmpeg issue. If it has, then mpv is dropping the styles. I think there was some argument before regarding mpv dropping the generated styles that FFmpeg provides. |
It drops the ASS style section. Not doing so in unacceptable, because for most formats, the ffmpeg default style is just arbitrary, and it makes no sense to force that on users. |
Alright, feel free to create a ticket on https://trac.ffmpeg.org/ regarding it. |
Ok :) I'll do it later |
let us know when you reported it, so i can close this issue. |
@Akemi @jeeb @wm4 Ok I reported this to upstream: https://trac.ffmpeg.org/ticket/8410#ticket Could you guys take a look? thanks! :) |
closed since it was reported upstream. |
Hope they can do it, ASS is just such a terrible, unreadable subtitle format. |
What does that help us? Besides webvtt is more terrible than ASS. Anyway, if anyone wants to implement a webvtt parser/renderer in mpv, you're welcome. |
Hi everyone, vlc has vtt files displaying with styling working. Can mpv copy/integrate vlc's parser/renderer in mpv's code? Thanks, |
@ghost = deleted users. Tagging it takes no effect. |
VTT is a terrible format because it requires a full browser engine to render properly. mpv will not ship a full web browser to render subtitles. |
It's just CSS and a bit of XML, isn't it? Little details aside, what makes that
so different from the ASS subtitle format? An XML interpreter is hardly a "full
web browser".
|
It's a full DOM, with JS scriptability, and a whole CSS layout engine. (EDIT: after a quick glance at the W3C spec, the JS or CSS of the HTML page the ASS, on the other hand, is basically just timed vectors with some transforms. FYI, VLC did pull in a full CSS layout engine to get even partial support for styled WebVTT from what I recall, and if I remember their statement at VDD about this they were less than happy about having to do this. WebVTT is a format specifically written to make life easier for web browsers, and incidentally will make life harder for everyone who is not yet a web browser. |
A workaround for YouTube subtitles (which is SRV3/YTT, I think it's non-standard WebVTT?) is to use YTSubConverter to convert it to ass which can be played in mpv. It should largely resemble the subtitles you'll see in the YouTube player. |
So if I understand correctly WebVTT colouring will never be supported by MPV because it needs too much to work (a complete web browser engine) |
The W3C spec says
So, thatʼs still an almost-full CSS renderer and most of the problems that come with it, and I understand not wanting to include that, but no HTTP requests are necessary, and none of the security or blocking problems associated with those. That can still be a lot of extra effort, of course, but not nearly as bad as implied. |
Maybe a limited WebVTT spec support? no full karaoke, just basic tags like: color/line/position, that it's already there, because ass. Can be a 5 line bash script, just to convert vtt2ass, retaining that. |
I think that would take more than 5 lines of bash, and I am in no way a maintainer or anything, but I bet if you did write that script people would be willing to use it. |
How to convert VTT to ASS? From their description:
|
@Tama47 See the Reverse conversion section of the README. |
Too many things wrong from the very beginning. Somewhat related: |
mpv version and platform
youtube-dl
installedReproduction steps
konsole
)mpv https://youtu.be/S8dmq5YIUoc
zh_TW
Expected behavior
When playing this video with zh_TW subtitle on YouTube Web. (0:14)
Actual behavior
When playing this video with zh_TW subtitle on mpv + youtube-dl. (0:14)
(For developers) some reference of styling
Log file
Omitted.
Sample files
The text was updated successfully, but these errors were encountered: