From Avisynth wiki
Revision as of 22:47, 16 February 2021 by Pinterf (Talk | contribs)
Jump to: navigation, search
Author lachs0r, TheFluff
Version v0.29
Category Subtitling
License Source code is MIT license, binaries are GPL
Discussion Doom9 Thread



AssRender is an AviSynth plugin that renders ASS/SSA and SRT (without the HTML-like markup) subtitles. It uses libass to render the subtitles, which makes it the fastest and most correct ASS renderer for AviSynth.

This also means that it is much more picky about script syntax than VSFilter and friends, so keep that in mind before blaming the filter. Yes, people have reported a lot of errors that were actually the script author’s fault.

Note: AssRender is a C-plugin so it must be loaded using LoadCPlugin, except if you're using AviSynth+, it allows autoloading of C-plugins.


Syntax and Parameters

assrender (clip, string file, string "vfr", int "hinting", float "scale", float "line_spacing", float "dar", float "sar", int "top", int "bottom", int "left", int "right", string "charset", int "debuglevel", string "fontdir", string "srt_font", string "colorspace")

clip   =
Input clip.

string   =
Your subtitle file. May be ASS, SSA or SRT.

string  vfr =
Specify timecodes v1 or v2 file when working with VFRaC.

int  hinting = 0
Font hinting mode. Choose between:
  • none (0, default), light (1), normal (2) and Freetype native (3) autohinting.

float  scale = 1.0
Font scale. Defaults to 1.0.

float  line_spacing = 1.0
Line spacing in pixels. Defaults to 1.0 and won’t be scaled with frame size.

float  dar =
float  sar =
Aspect ratio. Of course you need to set both parameters.

int  top = 0
int  bottom = 0
int  left = 0
int  right = 0
Margins. They will be added to the frame size and may be negative.

string  charset = "UTF-8"
Character set to use, in GNU iconv or enca format. Defaults to UTF-8.
Example enca format: enca:pl:cp1250 (guess the encoding for Polish, fall back on cp1250)

int  debuglevel = 0
How much crap assrender is supposed to spam to stderr.

string  fontdir = ""
Additional font directory.
Useful if you are lazy but want to keep your system fonts clean.

string  srt_font = "Sans"
Font to use for SRT subtitles. Defaults to whatever Fontconfig chooses for “Sans”.

string  colorspace = "guess"
The color space of your (YUV) video. Possible values:
  • "Rec709", "BT.709"
  • "Rec601", "BT.601"
Default is to use the ASS script’s “Video Colorspace” property, else guess based on video resolution (width > 1280 or height > 576 → BT.709).




2012-04-20 - lachs0r 
    * Version 0.25:
        - code restructured
        - added support for the BT.709 color space and the “Video Colorspace”
          property that has been introduced with recent versions of Aegisub.
            - updated everything, switched to MinGW-w64
              (same toolchain as mplayer2 now)

2011-09-22 - lachs0r 
    * Version 0.24.1:
            - updated libass to current git HEAD
            - switched Harfbuzz to libass’ compatibility branch
            - compiled Harfbuzz without Uniscribe backend
              fixes lots of crashes and misbehavior

2011-07-29 - lachs0r
    * Version 0.24:
            - updated libass to current git HEAD:
                - fixed performance regression

2011-07-29 - lachs0r
    * Version 0.23:
        - disabled font hinting by default
            - updated libass to current git HEAD and included Harfbuzz:
                - added support for bidirectional text, Arabic shaping etc.
                - added proper support for @fonts (vertical writing)
                - slight performance regression
                  (glyph cache not hooked up with Harfbuzz yet)
            - updated FreeType to current git HEAD:
                - fixed outline stroker for some broken fonts

2011-06-16 - lachs0r
    * Version 0.22:
        - fixed hang when a glyph with zero dimensions was encountered
          (mostly vector clips)

2011-06-08 - lachs0r <>
    * Version 0.21:
        - finally implemented proper subsampling for YV12
        - temporarily removed YV16 support
        - renamed parameter verbosity → debuglevel
        - code cleanups
            - reverted to GCC 4.5.2 (4.6 miscompiles MinGW)

2011-06-01 - lachs0r
    * Version 0.20:
        - fixed the masksub stuff
        - properly output debug messages to stderr instead of stdout
        - reformatted source and corrected/removed some comments
        - modified CMakeLists.txt to strip the binary by default
            - now built with GCC 4.6 instead of 4.5.2
            - included enca again
            - patched fontconfig:
                - prettier debug output
                - use the correct location for its cache

2011-02-01 - lachs0r
    * Version 0.19:
        This is a bugfix/cleanup release.
        - fixed possible buffer overflows in timecodesv1 and SRT parsing
        - fixed random crashes on unloading
        - probably fixed compilation with MSVC (patch by TheFluff)
        - very slightly improved performance with GCC
        - various code cleanups

2011-01-25 - lachs0r
    * Version 0.18:
        - improved YV12 support (should be somewhat usable now)
        - added support for RGB24, YV24, YV16 and Y8 (YUY2 coming soon)
        - added SRT subtitle format support
            additional parameter: srt_font (font to use for srt subs)
        - exposed some libass parameters:
            line_spacing (line spacing)
            dar, sar (aspect ratio)
            top, bottom, left, right (margins)
            fontdir (additional font directory)
        - masksub equivalent if used on a blankclip
            (still buggy - read source for details)
        - no more global variables

2011-01-17 - lachs0r 
    * Version 0.17:
        - added rudimentary YV12 support (chroma subsampling still needs work)
        - binary: Previously, I linked against a very old avisynth_c.lib - now
                  you shouldn’t get any error messages about “avisynth_c.dll”
        - tidied up the RGB32 blitter a bit

2011-01-16 - lachs0r
    * Version 0.15:
        - reimplemented as AviSynth C plugin - this fixed several crashes and
          got rid of the major pain in the ass that is MSVC
        - binary: built with patched Fontconfig (no longer needs fonts.conf)
    * Version 0.16:
        - implemented VFRaC support via timecodes files (v1 and v2 supported)

Archived Downloads

Version Download Mirror
v0.25 assrender-0.25.7z assrender-0.25.7z

External Links

  • GitHub - Updated version (v0.29)
  • GitHub - Updated version (v0.28), only source code available.

Back to External Filters

Personal tools