Skip to content
Yay295 edited this page Dec 27, 2020 · 68 revisions

Fully Implemented

  • [Script Info]
    • Collisions, PlayResX, and PlayResY
    • WrapStyle (and \q)
      • Changes line wrapping style. \N always breaks.
      • 0: Equal length lines with the top line longer than the bottom.
      • 1: Tries to fit as much text on a line as possible with overflow going to the next line(s).
      • 2: No automatic wrapping; long lines just go off the edge of the screen. \n also breaks. (default)
      • 3: Equal length lines with the bottom line longer than the top.
      • This will only re-wrap the lines if they become too wide. If a line gets smaller it will not be re-wrapped.
    • Custom Setting ‘TimeOffset’
      • All subtitles will be displayed this many seconds earlier than stated by their line.
  • Style Parameters
    • Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, and MarginV
    • You can use the function setBorderStyle on the subtitle manager object to override the styles in the subtitle document.
      • setBorderStyle(video,0) will tell the renderer to use the styles as defined in the subtitle document.
      • setBorderStyle(video,1) will make all subtitle lines use border style 1.
      • setBorderStyle(video,3) will make all subtitle lines use border style 3.
      • setBorderStyle(video,4) will make all subtitle lines use border style 4.
    • Custom Parameter ‘Blur’
    • Custom Parameter ‘Justify’
    • Parameter order does not matter. Unset parameters can be omitted.
  • Event Parameters
    • Layer, Start, End, Style, MarginL, MarginR, MarginV, and Text
  • Event Overrides
    • \n and \N
      • Soft and hard line breaks.
    • \b0, \b1, \b100, \b200, \b300, \b400, \b500, \b600, \b700, \b800, \b900, \i, \u, \s, \alpha, \1a, \2a, \3a, \4a, \a, \an, \be, \blur, \bord, \c, \1c, \2c, \3c, \4c, \fad(), \fade(), \fax, \fay, \fn, \fr, \frx, \fry, \frz, \fs, \fscx, \fscy, \fsp, \k, \K, \kf, \ko, \kt, \move(), \org(), \pos(), \q, \r, \shad, \xshad, \yshad, and \t()
      • \t() has been modified to work on \pos(). It functions the same as \move(), except it also lets you use \t()’s accel parameter.
    • Custom override \fsc.
      • Same as using \fscx and \fscy with the same value.
    • Custom override \te.
      • This can be used to mark the end of a transition instead of using parentheses.
      • ex. \t(<overrides>) becomes \t<overrides>\te.
      • You can still use parentheses if you want.
  • [Fonts]
    • Since we aren’t actually parsing the decoded fonts, I’m just making some guesses at what the name of the font actually is. I think it should actually work most of the time though. We can decode any font format, but that doesn’t mean every (or any) browser knows what to do with it. TTF and OTF fonts should work the best.

Partially Implemented

  • [Script Info]
    • ScaledBorderAndShadow
      • This is currently always on, because that’s how SVG’s work. The value is parsed, but not used because it’s almost always on anyway, and it’s usually a mistake when it’s off.
    • Timer
      • The value is read in, but I’ve found two conflicting descriptions of what it actually does, and both MPC-HC and VLC seem to ignore it so I can’t use them as a guide.
  • Event Overrides
    • \xbord and \ybord
      • Only one border value can be used, but these values can override that if they are smaller than the current value.
    • \clip and \iclip
      • Transitions on these are not supported.
    • \p
      • Paths defined on the same line are not XOR’d with each other.
    • \pbo
      • The value is read in, but things ended up in the wrong place when I actually used it, so it’s ignored for now.

Not Implemented

  • [Script Info]
    • PlayDepth
      • Subtitle color depth.
  • Style Parameters
    • Encoding (and \fe)
      • Changes font encoding (Windows-1252, UTF-8, …). While technically possible to implement, this one feature would be more complicated than almost everything else combined. Just use UTF-8.
  • Event Parameters
    • Effect
      • Karaoke
        • This effect was obsoleted by the karaoke event overrides.
      • Scroll Up/Down
        • This is essentially just a restricted \move() override with a possible fade at the top and bottom.
      • Banner
        • Same as Scroll Up/Down, but horizontal. Also forces text into a single line regardless of length.
  • [Events] Picture, Sound, Movie, and Command
    • No.
  • [Graphics]
    • Could probably be implemented, but I’ve never seen it used.

Other Issues (Last Checked December 27, 2020)

  • \shad, \xshad, and \yshad do not work in Chrome before version 89 because the drop-shadow filter is not supported on SVG elements.
  • Blurs on an element with a border are disabled because I don’t currently have a way of blurring just the border, and blurring everything looks bad when that’s not what’s supposed to happen.
  • Various things may not be positioned correctly in Chrome before version 64, or in Opera before version 51.
  • If some text has both italics and a border, and the font does not have an italic version, Firefox will fail to generate one. The border will still be displayed correctly.
  • The subtitles are supposed to be rendered at one resolution and then scaled to cover the video, but they don’t. Because we are using SVG’s – whose main purpose is to cleanly display content at any scale – the subtitles are instead rendered at their final size. This isn’t always a problem, but especially on older videos that are lower quality, the subtitles will be noticeably sharper than the video.
Clone this wiki locally