Download for Windows Download for Linux Download for FreeBSD Download for Mac Manual Wiki Forum IRC Trac

Thursday, July 24, 2008

VSFilter hacks

There's lots of versions of Gabest's VSFilter subtitle renderer around, some people are even still using versions that are several years old and are missing features and bugfixes. There's cases of people still distributing these old versions around, sometimes as part of a package with other software such as VirtualDub.

Now it happens that some time in 2006, Gabest seems to have lost interest in working on VSFilter, so nothing has happened from his side, not even bugfixes. Fortunately VSFilter is open source, so we have picked it up and made a fork. We have included both some existing bugfixes and improvements that existed as patches, and also made our own bugfixes and further improvements.

I'm going to talk about some of the improvements we have made throughout this post.


First, I'm going to assume you're familiar with most regular ASS override tags, if not you can get a refresher in our manual. Second, not all of these improvements are available in the version of VSFilter we ship with the current release (2.1.2) of Aegisub, but they should all be in the next one (which will be 2.1.3 or 2.2.0, depending on circumstances.)

Four lines of text, each positioned 0.2 pixels further to the right, showing the effect of sub-pixel positioningSometimes you need sub-pixel precision when positioning text and drawings. Normally you've only been able to get this by setting the script resolution (PlayResX and PlayResY) to something larger than the video resolution, but the "float \pos" patch changes this. It allows you to use decimal/floating point numbers for positioning lines and gives you up to 1/8th pixel precision.

The image to the left shows four lines of text positioned at different X coordinates. You can see how they move ever so slightly, although not a full pixel.


The tags \fax and \fay allow you to do shearing operations on your text. This is a bit like rotations, except that it's not. They are especially useful for doing perspective correction when you are typesetting signs rotated in 3D.

Demonstration of \fax and \fay tags

Shortly before Gabest dropped development of VSFilter, he introduced the "ASS2" format. This isn't very well known, and it only has minor changes over the original ASS format. One of the things was a new karaoke timing tag, \kt. While Aegisub can read ASS2 files it can't write them, so if you edit them in Aegisub you will lose some information. It doesn't have support for timing with the \kt tag either, but you can of course still use that and use all the additional features of ASS2 if you edit the file with a text editor.

So what is \kt? It's "set absolute timing", it allows you to move both back and forth in time of highlight without highlighting other syllables. It is probably best illustrated with an example:
{\kf10}ABC {\kt20\kf10}DEF {\kt10\kf10}GHI

When you render this example, you will first see ABC highlight. Then GHI will follow, because its highlight is set to start at time 10 by \kt. Finally, DEF will highlight because its start time was set to 20 by \kt. You can also use \kt to make karaoke syllables overlap in timing.


Originally the \be tag (Blur Edges) only allowed blurring to be turned on or off, and was very "weak", the blur effect was hard to notice at all. We have updated it so it supports variable strength blur effects now, and you can also use it with \t to animate the blur strength.

Because \be doesn't look very high at high values we have also introduced the alternate \blur tag, which performs the blur effect using a two-pass gaussian blur algorithm. This gives a much nicer and wider blur, especially at high values.

Demonstration and comparison of \be and \blur tags with different parameters

I will discuss why \be and \blur are "blur edges" effects and not "blur everything" effects tomorrow.


Demonstration of \xshad and \yshad tagsIf you've ever wanted the shadow to be positioned differently than just "X down and X right", the \xshad and \yshad tags are probably just what you want. These work like \shad except that they set only the X or Y displacement. You can even use negative values with them!


Demonstration of \xshad and \yshad tagsFinally there's the \xbord and \ybord tags. They can be useful for various things, but one of the intentions was to better support anamorphic video: The \xbord and \ybord tags allows you to control the border width in X and Y direction separately. You can even disable border in one direction entirely!

You can also combine this with strong \be or \blur and maybe some shadow for other interesting effects.


Again, remember that many of these tags require a very new version of VSFilter. For example, the \blur tag was only added yesterday..! The next release of Aegisub will ship with a VSFilter version that supports all of them, so if you want to safe you can wait until then. If you're impatient, you can follow development on the Aegisub forum.

Related Posts by Categories


  1. Can we (ever) expect to see VSFilter doing stuff to the alpha channel so karaokes can be pre-rendered?

  2. How will this end up affecting your development and the results that are done in OverLua? Or is one of the main goals here to bring ASS back to a level of usefulness such as you were originally planning for in OverLua?

  3. silverfire: that is possible already through a minor hack, and indeed Aegisub's PRS generator does just that. The trick is to render the same subtitles to a white background, and then to a black background, and subtract the results. That gives you the alpha information, which you can then use to approximate the original color information.

    I don't know if PRS exporting is enabled right now, but it could be enabled again if there is demand for it... there is an Avisynth filter for it, so it could be used for pre-rendering karaokes.

  4. The guliverkli2 fork of the original guliverkli has a patch in place that adds the MaskSub() Avisynth function to VSFilter. That one functions as a source filter that produces an RGBA stream.

    I will be merging all my patches into guliverkli2 very soon, so the best of both worlds should be available ^^

  5. Oh, and VSFilter will never be able to be a replacement for OverLua. They're completely different, VSFilter is a subtitle renderer that reads declarative files and is intended for realtime rendering, OverLua is a video overlay engine that executes a script program and is intended for offline rendering.

  6. the tags who has said on this page, are able on what version of aegisub?

    I use Aegisub v2.1.0 RELEASE PREVIEW SVN r1847, but the tags are'nt run!

    Can you help me?
    Thanks by advance

    NB: sorry, but i don't speak very well english.

  7. Yes, you're using Aegisub 2.1.0, which is about 2 years old. Please upgrade to version 2.1.8.

    If you need to ask more questions, please do it on our forums, linked on the top of the page.

  8. The blog comment service is best if you are very fond of making comments and writing also. The best part is when you write with your heart things gone better.

  9. The Nike Kobe 11 Elite is set to release tomorrow in another brand new colorway, but this time it’s for the kids. Known for recycling their colorways with their sneakers, Nike NBA Shoes gives the Kobe 11 Elite the always-popular “Oreo” treatment as the latest induction to the Kobe 11 series. The sneakers feature a grey Flyknit upper on top of a white stephen curry shoes midsole with a black speckled design throughout the sneakers. The Nike Kobe 11 Elite “Oreo” is available now at Nike and select local retailers.
    The nature of LeBron James’ relationship Cheap KD Shoes with Kevin Love has been shaped by media to be, for lack of a better word, tumultuous. All that was put to rest when K-Love and King James embraced at Curry 2 the end of Game 7 of the NBA Finals earlier this year, and with the UCLA alumni contracted with CLE for the next few years, its clear that the two KD Shoes For Sale are more than just teammates on the court. That said, roasting sessions between friends are the norm, but LeBron just char-broiled Love and his S-dot-Carter look-alike struggle kicks from this Golden State Warriors Jerseys High School photo taken back in 2006 posted by SLAM. Not cool, LeBron.
    The University of Texas Longhorns unveiled their latest Nike KD 9 PE, an annual tradition given that NBA Stars Shoes Kevin Durant became the first freshman to be named Naismith College Player of the Year while suiting up in burnt orange and white back in 2006. Fast forward to a Kobe 11 decade later and KD is making noise by teaming up with Steph Curry and the Golden State Warriors for what will be must-watch basketball throughout this season.The Nike KD 9 kobe basketball shoes Texas PE features a crisp white Flyknit construction for a decidedly “Home” feel while an icy outsole contrasts the burnt orange speckling on the midsole. That same shade of signature Kobe 8 Texas Longhorns orange wraps around the inner lining and hits the Swoosh branding for a nice finish. What do you think of the latest KD 9 PE? Check out a Nike Hyperrev full look below and stay tuned for more of the latest updates right here on Sneaker News.
    News of a new Nike Kobe silhouette has been swirling around for the Basketball Shoes past couple of months, and now we have confirmation that the upcoming Nike Kobe A.D. will be the first shoe to release post-Kobe retirement. Today we get a first look KD 6 at the model, as the Kobe A.D.

  10. Life becomes more interesting and wonderful when you share your memorable moments with friends and family through unique photographs. You can create your own unique style impressed with image editing software. And after hours of work stress you can also

    tank trouble, tank trouble 2, tank trouble games, tank trouble

  11. Life becomes more interesting and wonderful when you share your memorable moments with friends and family through unique photographs. You can create your own unique style impressed with image editing software. And after hours of work stress you can also
    dr driving, dr driving baixar ,download dr driving, dr driving

  12. You need to have time to take care of the active. It in fact was a amusement account it. Look advanced to far added agreeable from you.

    banana kong download , banana kong , baixar banana kong , download banana kong , banana kong baixar

  13. Mostly people have all the same things when they are writing academic task or any other writing, especially light music most people like during the writing.

    subway surf , baixar subway surf, subway surf download , download subway surf

  14. Thanks I have read your article, it is very interesting and exciting
    download go launcher, go launcher apk, go launcher , go launcher androi,

  15. Mostly people have all the same things when they are writing academic task or any other writing, especially light music most people like during the writing.
    dream league soccer download , dream league soccer apk , download dream league soccer , dream league soccer

  16. [url=][b]NFL Jerseys[/b][/url]

    [url=][b]Yeezy Boost 350[/b][/url]

    [url=][b]Longchamp Bags[/b][/url]

    [url=][b]Nike Air Max 2016[/b][/url]

    [url=][b]Adidas Sale[/b][/url]


    [url=][b]Under Armour Outlet[/b][/url]

    [url=][b]Timberland Boots[/b][/url]

    [url=][b]Jordan 12[/b][/url]

    [url=][b]Yeezy Shoes[/b][/url]

    [url=][b]Nike Outlet[/b][/url]

    [url=][b]Nike Huarache[/b][/url]

    [url=][b]Keds Shoes[/b][/url]

    [url=][b]Nike Roshe Run Shoes[/b][/url]

    [url=][b]Yeezy Shoes[/b][/url]

    [url=][b]Ugg On Sale[/b][/url]

    [url=][b]Nike Air Max[/b][/url]

    [url=][b]Adidas NMD[/b][/url]

    [url=][b]Cheap Jordan[/b][/url]

    [url=][b]Toms Outlet Online[/b][/url]

    [url=][b]Uggs Outlet[/b][/url]

    [url=][b]Adidas Ultra Boost uncaged[/b][/url]

    [url=][b]MLB Jerseys[/b][/url]

    [url=][b]Kate Spade Outlet[/b][/url]

    [url=][b]Adidas Outlet[/b][/url]

    [url=][b]Timberland Outlet[/b][/url]

    [url=][b]Ray-Ban Sunglasses[/b][/url]

    [url=][b]Adidas NMD[/b][/url]

    [url=][b]Kate Spade Outlet[/b][/url]

    [url=][b]Polo Ralph Lauren[/b][/url]


  17. In your blog I was happy to see your article, better than last time, and have made great progress, I am very pleased. I am looking forward to your article will become better and better.
    hotmail login | red ball |


If you need help with Aegisub or have a bug report please use our forum instead of leaving a comment here. If you have a feature request, please go to our UserVoice page.

You will get better help on our forum than in the blog comments.