Repository navigation
v0.2.0
Social captions now stay out from under TikTok, YouTube Shorts and Instagram Reels buttons, using each platform's published safe area, and scripts can carry their own fonts. Go callers and existing specs have three breaking changes to migrate:
- The
Effectconstants are removed. libass ignoresBanner,Scroll upandScroll downwithout their numbers, and does not knowScroll,Scroll left,Scroll rightorKaraokeas Effect field values. Build effects withass.BannerEffectandass.ScrollEffect. Karaoke is unaffected: it comes from the\k,\kf,\koand\kttags, whichOverride.KaraokeandOverride.KaraokeStartstill write. Script.Infono longer acceptsKerningorLanguage. SetScript.KerningandScript.Languageinstead.- Styles with a
BorderStyleother than 0, 1, 3 or 4, or anEncodingbelow -1, are now rejected when a script is written. Renderers do not support other values.
Changes:
- Added
safe-areaandsafe-areas, andass.SafeArea,ass.SafeAreas,ass.LookupSafeArea,ass.SafeAreaAll,Document.CheckSafeArea,ass.SafeAreaIssueand theass.Edge*constants. The check reports every style or event whose margins reach under a platform's buttons and captions. The areas come from TikTok's In-Feed safe zone template, Google's vertical video safe zones and Meta's Reels ad guide. - Changed
portrait-center,portrait-lower-middleand the lower and centered social presets to a left margin of 120/1080 and a right margin of 300/1080 of the width, clear of TikTok's button column.social-hookandportrait-upperkeep 18%. AddedPreset.RightMarginRatiofor custom themes. - Added embedded fonts:
Script.Fonts,ass.EmbeddedFont,Document.EmbedFonts,--embed-font FILEoncreate,captionsandtheme, and--embed-preset-fontsoncaptionsandtheme, which installs the preset's fonts and embeds them. FFmpeg renders with them without installed fonts. - Added
ass.BorderStyleEventBox(one box behind the whole event),ass.EncodingAuto(automatic text direction), andScript.KerningandScript.Languageheaders. These are libass extensions. - Added
Override.ResetScalefor\fsc, and aTransformwithEnd0 now runs until the event ends. - Added
ass.EscapeTextandass.ScrollDirection.captionsnow escapes{in plain dialogue, which used to hide the text after it, and still wraps and uppercases text that contains braces. - Changed margins from ratios to round up to a whole pixel instead of down, so positions and social presets stay inside the safe areas at every video size, and numbers in generated scripts to at most three decimals, so a font size prints as
86.4rather than86.39999999999999. - Fixed
PlayResXorPlayResYof zero or less failing themes and positions. They are now treated as missing and inferred, as libass does.