question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The default style for HTML5 subtitle tracks is designed to look like closed-captions on television, but users who are familiar with VLC or MPV and not with closed captioning will probably prefer the nicer styles of those players. I would think that it should be configurable, since some users will require captions rather than just subtitles and might prefer the caption style.

@dularion mentioned in #152 that she plans to move away from HTML5 subtitles/captions, but it might be easier to let HTML5 handle the subs and let the server work out how to extract embedded subtitles and convert ASS and other formats to VTT. You can add the styles directly to the converted VTT or put them in the page CSS. Is there a reason to render subtitles manually that I haven’t thought of?

I whipped up some real quick CSS in dev tools that changes how the ::cue pseudoelement looks:

::cue {
    color: white;
    background: transparent;
    font-weight: 700;
    font-size: 48pt;
    text-shadow: 4px 4px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

The biggest differences are that the subtitles are much larger, bolder, and only outlined, rather than completely filled in black. I only tested it in Chrome on a large monitor.

changes this: closed_caption

to this: mpv_like

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
MrArca9commented, May 2, 2018

Would suggest adding a CSS edit text where adding any CSS code would override current implementation.

This would allow the users to customize the styling to their liking.

1reaction
BeardOverflowcommented, Jul 12, 2018

Check out this project https://github.com/YePpHa/crunchyroll-html5

Adding the support for libass engine would be a great feature and less painful than using CSS styles. Also, would no longer be needed to convert from ssa/ass to vtt.

Please, consider it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Ways to Make Subtitle Styles More Readable
1. Give the text a thin outline or stroke · 2. Make the subtitle text bold · 3. Change the color of your...
Read more >
Style Your Subtitles | Type Studio
A quick guide on how to style your subtitles to match your design by using Type Studio. Increase your view numbers with beautifully...
Read more >
Best caption or subtitle styles: a full guide - Checksub
Subtitle styles : a top 5 of the best formatting ; The classic: Roboto, white colored, and black background. Subtitle style roboto ;...
Read more >
Subtitling Styles - Voquent
A guide showing common subtitling style options for open captions. It's time to choose how users perceive your films with the best typography...
Read more >
Styling video subtitles and closed captions - Narakeet
embed : create an embedded subtitle track in the result video, and generate SRT and VTT files as separate downloads. · overlay :...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found