All Projects → weizhenye → ass-compiler

weizhenye / ass-compiler

Licence: MIT license
Parses and compiles ASS subtitle format to easy-to-use data structure

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ass-compiler

ST-ASS
ASS/SSA subtitles syntax highlight for Sublime Text.
Stars: ✭ 23 (-68.49%)
Mutual labels:  ssa, ass, subtitle
SABRE.js
Substation Alpha suBtitles REnderer -- A Gpu Accelerated Javascript Advanced SubStation (ASS) Alpha Subtitles Renderer. Renders .ass and .ssa files.
Stars: ✭ 58 (-20.55%)
Mutual labels:  ssa, ass
PyonFX
An easy way to create KFX (Karaoke Effects) and complex typesetting using the ASS format (Advanced Substation Alpha).
Stars: ✭ 101 (+38.36%)
Mutual labels:  ass, subtitle
pysub-parser
Library for extracting text and timestamps from multiple subtitle files (.ass, .ssa, .srt, .sub, .txt).
Stars: ✭ 40 (-45.21%)
Mutual labels:  ssa, subtitle
Srt
A simple library for parsing, modifying, and composing SRT files.
Stars: ✭ 210 (+187.67%)
Mutual labels:  subtitle
Subtitle.js
Stream-based library for parsing and manipulating subtitle files
Stars: ✭ 234 (+220.55%)
Mutual labels:  subtitle
Captioning
A collection of tools made to help you create and edit subtitles in different formats (Subrip, WebVTT, Substation Alpha...)
Stars: ✭ 197 (+169.86%)
Mutual labels:  subtitle
Crunchyroll Html5
A fully fledged HTML5 player for Crunchyroll.
Stars: ✭ 175 (+139.73%)
Mutual labels:  subtitle
klara
Automatic test case generation for python and static analysis library
Stars: ✭ 250 (+242.47%)
Mutual labels:  ssa
svg2ass
Svg2ass - convert SVG vector graphics to ASS subtitle draw instructions.
Stars: ✭ 22 (-69.86%)
Mutual labels:  ass
libgosubs
golang library to read and write various subtitle formats
Stars: ✭ 20 (-72.6%)
Mutual labels:  ass
Collapsingtoolbarlayout Subtitle
Standard CollapsingToolbarLayout with subtitle support
Stars: ✭ 244 (+234.25%)
Mutual labels:  subtitle
daany
Daany - .NET DAta ANalYtics .NET library with the implementation of DataFrame, Time series decompositions and Linear Algebra routines BLASS and LAPACK.
Stars: ✭ 49 (-32.88%)
Mutual labels:  ssa
analysis-net
Static analysis framework for .NET programs.
Stars: ✭ 19 (-73.97%)
Mutual labels:  ssa
MHArmory
Armor Set Search application for Monster Hunter: World
Stars: ✭ 20 (-72.6%)
Mutual labels:  ass
Penguin Subtitle Player
An open-source, cross-platform standalone subtitle player
Stars: ✭ 194 (+165.75%)
Mutual labels:  subtitle
ass
在线视频字幕文件(ASS)编辑器 Online video subtitle (ASS) editor
Stars: ✭ 26 (-64.38%)
Mutual labels:  ass
BDMatch
An automatic subtitle shifter from a video to another. 将字幕由一个视频匹配到另一个的自动时间轴平移工具。
Stars: ✭ 44 (-39.73%)
Mutual labels:  subtitle
chaos
Singular Spectrum Analysis methods implementation in Python
Stars: ✭ 22 (-69.86%)
Mutual labels:  ssa
pssa
Singular Spectrum Analysis for time series forecasting in Python
Stars: ✭ 119 (+63.01%)
Mutual labels:  ssa

ass-compiler

GitHub Action Coverage Dependencies NPM version License File size jsDelivr

Parses and compiles ASS subtitle format to easy-to-use data structure.

Online Viewer

Installation

npm install ass-compiler

Usage

You can use parse or compile as your need.

import { parse, stringify, compile, decompile } from 'ass-compiler';

// ASS file content
const text = `
[Script Info]
; ...
`;

// parse just turn ASS text into JSON
const parsedASS = parse(text);
const stringifiedText = stringify(parsedASS);

// compile will get rid of invalid tags, merge duplicated tags, transform drawings, etc.
const compiledASS = compile(text, options);
const decompiledText = decompile(compiledASS);

options

{
  // A Style named `Default` will be automatic generated by options.defaultStyle
  // if it is not exists in `[V4+ Style]` section.
  defaultStyle: {
    Name: 'Default',
    Fontname: 'Arial',
    Fontsize: '20',
    PrimaryColour: '&H00FFFFFF&',
    SecondaryColour: '&H000000FF&',
    OutlineColour: '&H00000000&',
    BackColour: '&H00000000&',
    Bold: '0',
    Italic: '0',
    Underline: '0',
    StrikeOut: '0',
    ScaleX: '100',
    ScaleY: '100',
    Spacing: '0',
    Angle: '0',
    BorderStyle: '1',
    Outline: '2',
    Shadow: '2',
    Alignment: '2',
    MarginL: '10',
    MarginR: '10',
    MarginV: '10',
    Encoding: '1',
  },
}

For details of data structure, please use the online viewer.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].