Limitations

While kbp2video (and the underlying KBP support in kbputils) do their best to support as much of the format as possible, there are some limitations. There’s essentially two categories to this, features not supported, and discrepancies in implementation. The below list is not exhaustive, but should give you a good idea of what to expect when using kbp2video.

Note that anything below mentioning specific sizes refers to CDG-resolution (KBS) pixels, and anything related to positioning assumes you are rendering the subtitle at CDG aspect ratio.

Features Not Supported

Feature

Rationale

Workaround

Outline wipe

The .ass format does not support it except for word by word (and not at the same time as text wiping). It also can’t be easily emulated.

None

Transitions

Many of these would be impossible to implement in the .ass format, though potentially some could eventually, and others could be supported through ffmpeg. In practice, most people do not change the transitions from the defaults, and the per-line fade-in/out default that kbp2video provides is at least a good as KBS’s line by line load-in.

Post-processing with a video editor

Embedded CDG (slides) in the timeline

It would not make sense to use CDG directly for this, as the whole point of the software is to avoid pixelated video. Theoretically it could support SHW files, rendering the text at full resolution and using the full versions of images, but it’s not currently in the roadmap.

Background video and intro/outro features, see Using Background Image/Videos

Intro/outro CDG

This is a similar issue as embedded CDG. Currently kbp2video does not support prepended/appended intro/outro in the way KBS does either though.

Pad the audio before starting the project to ensure there’s enough time to use an embedded intro/outro instead.

Implementation Differences

Feature

KBS Behavior

kbp2video Behavior

Rationale

Line spacing

Style 1 line height plus Spacing

19 plus Spacing

KBS makes the spacing dependent on the first style selected. Change that font, size, or even enable/disable bold, and it will potentially change the layout of your entire project.

kbp2video currently uses the spacing value for Arial 12 Bold, which is the default font and does not modify spacing if you change that style. It may at some point offer an option to emulate KBS behavior, but unfortunately it’s not straightforward - there’s no obvious relation between KBS’s definition of line height and any font metric I’ve found yet.

Font height

Based on cap height

Based on line height

The .ass format uses line heights to measure font, e.g. if you specify 16, all characters of the font will fit within a height of 16. Each font would have a different conversion factor to get from cap height (typically height of the letter “X”) to line height.

Currently, kbp2video scales provided fonts by a constant factor to roughly account for the discrepancy, but it does not yet emulate KBS behavior entirely, so fonts with metrics different from Arial may need their sizes tweaked to match better.

Font width and kerning

Rounds off to nearest pixel/no anti-aliasing

Uses a modern font renderer

KBS has to deal with the CDG format, so it must render text in a single color at low resolution, so the text will not be positioned exactly as the font metrics specify. This means there is likely going to be a discrepancy if you are using precise horizontal positioning (the “left” feature).

kbp2video will position the text as you specify, but the text itself, when properly scaled and kerned, will be a different width than in KBS, so you may need to do some tweaking to get the appearance you’re looking for, even if you get the font height exactly right.

Font names

Uses unknown Windows API for fetching fonts

DirectWrite on Windows, CoreText on Mac, fontconfig otherwise

In some rare cases, libass may not correctly find your font based on the name that KBS uses for it, especially if you are running kbp2video on a different platform than KBS. There’s not really a good general solution for this, but if your font is properly installed on your system and you can figure out the proper name for it, you can do a subtitle only conversion, edit the style in the generated .ass file, then run the conversion to video.

Rotation

Origin is always top-left

Origin is based on alignment

The .ass format implements rotation this way, and it’s easier to work with, e.g. if you left-align text and rotate 45° clockwise, and right-align text and rotate 45° counter-clockwise, they’ll be mirror images of each other in .ass format.

Outline and shadow sizes

Left, Right, Top, Bottom, Across, Down are used in those ways

Left/Right/Top/Bottom are averaged to create one outline size, Across/Down are averaged to create one shadow size

The .ass format does not support splitting outlines in this way, so kbp2video averages the numbers to allow more granularity (.25 becomes the minimum unit of size instead of 1). The same is currently done with Across/Down to get .5 granularity for the Shadow style parameter, but that might change in a future version because there do exist \xshad and \yshad override tags.

Outline wipe color

Sets the color for outline wipes

Sets the color for shadows

The .ass format allows a different color for shadow and outline. Since outline wipe isn’t supported, it made sense to use the color for this instead.

Wipe detail

Supports 5 levels of wipe detail

Supports progressive and word by word

KBS has so many levels of detail to deal with CDG not being able to keep up with the finest detail. With kbp2video, we do not have this limitation, so levels 1-4 are all treated the same. Level 5 still provides word by word.

Overlapping items

XORs the palette indexes

Draws in layers

CDG has two ways to draw, and the only way that’s practical most of the time is XOR, so it is what KBS uses for almost everything. KBS also does not track what is on the screen at any given time, it just assumes that you’re drawing on the background. This can cause some interesting effects when overlapping with embedded graphics or even text.

There’s no practical way for kbp2video to emulate all that, and it’s unlikely anyone would want it anyway, so we just overlap normally, layered in the order they’re specified in the file.

We do support one small part of it, which is that text or outlines using palette index 0 is invisible by default. Even that can be disabled by unchecking the “Draw BG color transparent” option