weizhenye / Ass
Licence: mit
A JavaScript ASS subtitle format renderer
Stars: ✭ 356
Programming Languages
javascript
184084 projects - #8 most used programming language
Labels
Projects that are alternatives of or similar to Ass
auto-movie-tagger
A Python script that auto tags and adds poster to mkv or mp4 movie files.
Stars: ✭ 49 (-86.24%)
Mutual labels: subtitle
obs-auto-subtitle
Show the subtitle as long as you speak
Stars: ✭ 135 (-62.08%)
Mutual labels: subtitle
PersianSubtitleFixer
Fix Arabic and Persian subtitles by converting them into UTF-8
Stars: ✭ 25 (-92.98%)
Mutual labels: subtitle
HandySub
Download Subtitle from Subscene and other sources
Stars: ✭ 42 (-88.2%)
Mutual labels: subtitle
pysub-parser
Library for extracting text and timestamps from multiple subtitle files (.ass, .ssa, .srt, .sub, .txt).
Stars: ✭ 40 (-88.76%)
Mutual labels: subtitle
Subsync
Automatically download subtitles for your movies
Stars: ✭ 270 (-24.16%)
Mutual labels: subtitle
nekocap
Browser extension for creating & uploading community captions for YouTube, niconico and other video sharing sites.
Stars: ✭ 27 (-92.42%)
Mutual labels: subtitle
srtmerger
subtitle merger is a tool for merging two or more subtitles for videos.
Stars: ✭ 35 (-90.17%)
Mutual labels: subtitle
VTT-to-SRT-Converter
Convert WebVTT subtitles to SubRip.
Stars: ✭ 29 (-91.85%)
Mutual labels: subtitle
subslider.js
A script to fix out of sync subtitles - in javascript
Stars: ✭ 16 (-95.51%)
Mutual labels: subtitle
PyonFX
An easy way to create KFX (Karaoke Effects) and complex typesetting using the ASS format (Advanced Substation Alpha).
Stars: ✭ 101 (-71.63%)
Mutual labels: subtitle
Go Astisub
Manipulate subtitles in GO (.srt, .ssa/.ass, .stl, .ttml, .vtt (webvtt), teletext, etc.)
Stars: ✭ 305 (-14.33%)
Mutual labels: subtitle
iptvx
IPTV player and streamer for Linux that allows to play any stream that LibVLC can play, offers an overlay based on WebKit using HTML5, JavaScript and CSS and uses XMLTV data for EPG information. It allows the playback of URLs, files and can grab URLs from shell scripts. XMLTV EPG data can be downloaded from URLs or grabbed from shell scripts.
Stars: ✭ 65 (-81.74%)
Mutual labels: subtitle
ASS.js
ASS.js uses ass-compiler to parse ASS subtitle file format, and then renders subtitles on HTML5 video.
ASS specs(zh-Hans)
Installation
npm install assjs
Usage
<video id="video" src="example.mp4"></video>
<script src="dist/ass.min.js"></script>
<script>
fetch('/path/to/example.ass')
.then(res => res.text())
.then((text) => {
const ass = new ASS(text, document.getElementById('video'));
});
</script>
API
Initialization
const ass = new ASS(text, video, {
// Subtitles will display in the container.
// The container will be created automatically if it's not provided.
container: document.getElementById('my-container'),
// see resampling API below
resampling: 'video_width',
});
Resize
If you change the size of video, you should call it.
ass.resize();
Show
ass.show();
Hide
ass.hide();
Destroy
ass.destroy();
Resampling
When script resolution(PlayResX and PlayResY) don't match the video resolution, this API defines how it behaves. However, drawings and clips will be always depending on script origin resolution.
There are four valid values, we suppose video resolution is 1280x720 and script resolution is 640x480 in following situations:
-
video_width
: Script resolution will set to video resolution based on video width. Script resolution will set to 640x360, and scale = 1280 / 640 = 2. -
video_height
(default): Script resolution will set to video resolution based on video height. Script resolution will set to 853.33x480, and scale = 720 / 480 = 1.5. -
script_width
: Script resolution will not change but scale is based on script width. So scale = 1280 / 640 = 2. This may causes top and bottom subs disappear from video area. -
script_height
: Script resolution will not change but scale is based on script height. So scale = 720 / 480 = 1.5. Script area will be centered in video area.
ass.resampling = 'video_width';
TODO
Items with strikethrough means they won't be supported.
- [Script Info]
Synch PointPlayDepth- WrapStyle: 0, 3
- Collisions: Reverse
- [Events]
PictureSoundMovieCommand-
Dialogue
-
Effect
-
Karaoke: as an effect type is obsolete - Scroll up: fadeawayheight
- Scroll down: fadeawayheight
- Banner: fadeawaywidth
-
-
Text (override codes)
- \k, \kf, \ko, \kt, \K: Karaoke
- \q: 0, 3
- \t([<t1>, <t2>, ][<accel>, ]<style modifiers>): <accel>, \2c, \2a, \[i]clip
-
Effect
[Fonts][Graphics]
Known issues
-
\N
in Aegisub has less height than<br>
in browsers, subbers should avoid to use multiple\N
to position a dialogue, use\pos
instead. - A dialogue with multiple
\t
is not rendered correctly, for transforms in browsers are order-sensitive. - When a dialogue has Effect (Banner, Scroll up, Scroll down) and
\move
at the same time, only\move
works. - For I'm using the
clip-path
CSS property to implement\clip
, IE and Edge are not supported yet. -
\be
is just treated as\blur
.
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].