Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 17:57
· 3 commits to main since this release

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 Effect constants are removed. libass ignores Banner, Scroll up and Scroll down without their numbers, and does not know Scroll, Scroll left, Scroll right or Karaoke as Effect field values. Build effects with ass.BannerEffect and ass.ScrollEffect. Karaoke is unaffected: it comes from the \k, \kf, \ko and \kt tags, which Override.Karaoke and Override.KaraokeStart still write.
  • Script.Info no longer accepts Kerning or Language. Set Script.Kerning and Script.Language instead.
  • Styles with a BorderStyle other than 0, 1, 3 or 4, or an Encoding below -1, are now rejected when a script is written. Renderers do not support other values.

Changes:

  • Added safe-area and safe-areas, and ass.SafeArea, ass.SafeAreas, ass.LookupSafeArea, ass.SafeAreaAll, Document.CheckSafeArea, ass.SafeAreaIssue and the ass.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-middle and 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-hook and portrait-upper keep 18%. Added Preset.RightMarginRatio for custom themes.
  • Added embedded fonts: Script.Fonts, ass.EmbeddedFont, Document.EmbedFonts, --embed-font FILE on create, captions and theme, and --embed-preset-fonts on captions and theme, 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), and Script.Kerning and Script.Language headers. These are libass extensions.
  • Added Override.ResetScale for \fsc, and a Transform with End 0 now runs until the event ends.
  • Added ass.EscapeText and ass.ScrollDirection. captions now 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.4 rather than 86.39999999999999.
  • Fixed PlayResX or PlayResY of zero or less failing themes and positions. They are now treated as missing and inferred, as libass does.