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



65 comments:

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

    ReplyDelete
  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?

    ReplyDelete
  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.

    ReplyDelete
  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 ^^

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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

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

    ReplyDelete
  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

    ReplyDelete
  16. [url=http://www.nfljerseys.us/][b]NFL Jerseys[/b][/url]

    [url=http://www.yeezyboost350.us.com/][b]Yeezy Boost 350[/b][/url]

    [url=http://www.longchampbags.us.com/][b]Longchamp Bags[/b][/url]

    [url=http://www.airmax2016.us.com/][b]Nike Air Max 2016[/b][/url]

    [url=http://www.adidas-uk.org.uk/][b]Adidas Sale[/b][/url]

    [url=http://www.yeezys.org/][b]Yeezys[/b][/url]

    [url=http://www.underarmouroutlet.us.com/][b]Under Armour Outlet[/b][/url]

    [url=http://www.timberlanduk.org.uk/][b]Timberland Boots[/b][/url]

    [url=http://www.jordan12.us/][b]Jordan 12[/b][/url]

    [url=http://www.yeezy-shoes.us.com/][b]Yeezy Shoes[/b][/url]

    [url=http://www.nikeoutlet.org.uk/][b]Nike Outlet[/b][/url]

    [url=http://www.nikehuarache.us/][b]Nike Huarache[/b][/url]

    [url=http://www.kedsshoesforwomen.com/][b]Keds Shoes[/b][/url]

    [url=http://www.nikerosherun.us.com/][b]Nike Roshe Run Shoes[/b][/url]

    [url=http://www.yeezy.com.co/][b]Yeezy Shoes[/b][/url]

    [url=http://www.uggbootsonsale.us/][b]Ugg On Sale[/b][/url]

    [url=http://www.nikeairmax.us/][b]Nike Air Max[/b][/url]

    [url=http://www.adidasnmd.us.com/][b]Adidas NMD[/b][/url]

    [url=http://www.cheap--jordanshoes.us.com/][b]Cheap Jordan[/b][/url]

    [url=http://www.outlettoms.us/][b]Toms Outlet Online[/b][/url]

    [url=http://www.uggs--outlet.us/][b]Uggs Outlet[/b][/url]

    [url=http://www.ultraboostuncaged.us/][b]Adidas Ultra Boost uncaged[/b][/url]

    [url=http://www.mlb-jerseys.us/][b]MLB Jerseys[/b][/url]

    [url=http://www.katespadeoutlets.us/][b]Kate Spade Outlet[/b][/url]

    [url=http://www.adidas-outlet.org/][b]Adidas Outlet[/b][/url]

    [url=http://www.timberland-outlet.us/][b]Timberland Outlet[/b][/url]

    [url=http://www.rayban-sunglasses.ca/][b]Ray-Ban Sunglasses[/b][/url]

    [url=http://www.adidas-nmd.org.uk/][b]Adidas NMD[/b][/url]

    [url=http://www.katespadeoutlet.us.org/][b]Kate Spade Outlet[/b][/url]

    [url=http://www.ralphlaurens.org.uk/][b]Polo Ralph Lauren[/b][/url]

    ReplyDelete

  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 | 192.168.1.1

    ReplyDelete
  18. باقل الاسعار توفر شركة مكافحة حشرات مصرية كل الوسائل التي تغنيك عن الكثير من المبيدات باهظة الثمن و تتم عمليات و خدمات شركة ابادة حشرات في ساعات قليله و بدون الحاجة الي تفريغ المنزل

    ReplyDelete
  19. يمكنك الان توفير الامان لافراد اسرتك من خلال خدمات حراسات امنية التي يت توفيرها بافضل الاسعار من خلال اكبر شركة امن و حراسة بمصر شركة الحارس الخاص

    ReplyDelete
  20. يمكنك الان معرفة الاعطال الشائعه للتكيفات من خلال مركز صيانة جولدي الذي يقدم خدمات الدعم الفني من خلال متخصصين في صيانه جولدى المركزية المعتمده لحلول و صيانات سريعة للاعطال

    ReplyDelete
  21. فريق صيانة يونيون اير يقوم بالاشتراك في حملات صيانة دوريه مع مركز صيانة كاريير لصيانة جميع انواع التكييفات حيث انه من المحتمل وجود اكثر من ماركة تكييف بالمنزل وذلك بغرض توفير وقت العميل و تقليل التكلفه

    ReplyDelete
  22. في شركة عزل خزانات بمكة يوجد احدث الاجهزة التي تستخدم بالعالم في خدمات توزيع مواد العزل التي تستخدمها الشركة كما يوجد بالشركة خدمات تنظيف خزانات بمكة بمواد امنه علي الصحة وغير قابله للتفاعل مع المياه و جسم الخزان ايضا

    ReplyDelete



  23. استمتع مع افضل شركة مكافحة حشرات بالقصيم بالكثير من الاعمال المتميزه والمتطورة في العمل افضل التقنيات المتميزه من خلال افضل شركة عزل خزانات بالقصيم باقل الاسعار علي يد اكبر فريق متخصص في المملكة الان سوف اقدم اليكم افضل شركة عزل اسطح بالقصيم باحداث التقنيات المتميزه والمتطورة في العمل استمتع بالكثير من الخدمات المتميزه افضل شركة كشف تسربات المياه بالقصيم في المملكة .

    ReplyDelete
  24. تعتبر شركة سوقني من اكبر الشركات المتخصصه في اشهار المواقع عبر محرك البحث والوصول بها الي الصفحات الاولي حيث يمكنك الاعتماد علي مسك كلمات خاصه بالشركة والتسويق اليها .

    ReplyDelete
  25. لطلب خدمات مكافحة حشرات بمكة يمكنك الان التواصل مع شركة العنود اليت تعمل باحدث الادوات في شركة ابادة حشرات بمكة متخصصه وتوفر فريق عمل مدرب لتلك المهام .

    ReplyDelete
  26. يحتاج الان الكثيرين الي دار مسنين لرعاية كبار السن حيث انهم يحتاجون الي اشراف طبي متخصص بالاضافه الي توفير اعمال رعايه مسنين بالمنزل لضمان توفير الرعاية الصحية علي ايدي امهر الاطباء والممرضين

    ReplyDelete
  27. يمكنك الان التواصل مع شركة الحارس الخاص شركة حراسات امنية تقوم بتوفير الادوات والمعدات الامنية الخاصه ووضعها يف اماكن امنية لتوفير امن وحراسة الشركات والمصانع والممتلكات بالاضافه الي حماية الاشخاص .

    ReplyDelete
  28. يمكنك الان ضمان اصلاح الاعطال بالاجهزه الكهربائية من صيانة فيليبس المتخصصه في اعمال الصيانة الدورية والتي تعمل باحدث الاساليب والطرق الخاصه التي تضمن عدم تكرار العطل مرة اخري بالاضافه الي اعمال الصيانة الفورية من صيانة كاريير التي تقوم بتدريب العمال لديها علي اتباع احدث الاساليب العالمية .

    ReplyDelete
  29. خدمات متميزه في انتاج قرميد احدث باقل الاسعار التي تتميز بها الشركة عن غيرها من الشركات بالاضافه الي اشكال متميزه من قرميد اسباني ويتم تصنيعها علي ايدي امهر الخبراء .

    ReplyDelete
  30. Good article, but it would be better if in future you can share more about this subject. Keep posting.

    ReplyDelete
  31. The blog or and best that is extremely useful to keep I can share the ideas of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.
    animal jam | five nights at freddy's | hotmail login

    ReplyDelete
  32. Thanks for your post! Through your pen I found the problem up interesting! I believe there are many other people who are interested in them just like me! Thanks your shared!... I hope you will continue to have similar posts to share with everyone! I believe a lot of people will be surprised to read this article!
    abcya

    ReplyDelete
  33. Ở Việt Nam, tỷ lệ phụ nữ mắc các bệnh phụ khoa rất cao, đa số mọi người thường nghĩ viêm nhiễm phụ khoa, đặc biệt là viêm âm đạo là chuyện bình thường.

    bệnh viêm phụ khoa là gì, biểu hiện bệnh viêm âm đạo, biểu hiện viêm nhiễm phụ khoa ,

    ReplyDelete
  34. لحراسة جميع الاماكن والمنشات بافضل الطرق الامنية في
    شركة امن وحراسة نستخدم افضل الاساليب الامنية في الحراسة والتعامل مع المواقف الصعبة وكافة خدمات امن وحراسة من خلال افراد امن مؤهلين موقعنا الالكتروني:

    http://www.guards-security.com/

    ReplyDelete

  35. خدمات رعاية متميزة ومتكاملة من دار مسنين بالقاهرة لان لدينا متخصصين في رعاية المسنين وخبرة طويلة في الدار ولدينا جليسة مسنين ونوفر لكم اسعار جليسة مسنين مناسبة موقعنا الالكتروني:
    http://www.careolder.com/

    ReplyDelete
  36. تخلص من جميع مشاكل الحشرات في شركة مكافحة حشرات لدينا ابادة حشرات للمولات وخدمات متخصصة للاماكن العامة والواسعه ابادة حشرات للمصانع وتخفيضات هائلة في ابادة حشرات للمطاعم ومبيدات متخصصة من افضل الانواع في مكافحة حشرات للجناين موقعنا:
    http://www.anti-insects.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%A7%D9%84%D9%85%D8%B5%D8%A7%D9%86%D8%B9-%D8%A7%D9%84%D9%85%D8%B7%D8%A7%D8%B9%D9%85-%D8%A7%D9%84%D9%85%D9%88%D9%84%D8%A7%D8%AA-%D8%AC%D9%86%D8%A7%D9%8A%D9%86/

    ReplyDelete
  37. Thank you for such a sweet tutorial - all this time later, I've found it and love the end result. I appreciate the time you spent sharing your skills.
    sushi-cat2.com

    ReplyDelete
  38. Jim Corbett National Park, the first word which comes to our mind after listening to this word is Jungle Safari/jeep Safari.
    Jim Corbett Safaris are world renowned and tourists from all over the world visit Jim Corbett National Park for Jim Corbett Safari.
    you can admire different-2 animals through corbett safari. For best packages check out now at
    Jim Corbett Safari

    ReplyDelete
  39. I was very impressed by this post, this site has always been pleasant news. Thank you very much for such an interesting post. Keep working, great job! In my free time, I like play game: douchebagworkout2.org. What about you?

    ReplyDelete
  40. I found a lot of information here to create this actually best for all newbie here. Thank you for this information.

    potaup

    ReplyDelete
  41. The article you have shared here very good. This is really interesting information for me. Thanks for sharing!
    hotmail login |hotmail sign in |free hotmail login

    ReplyDelete

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.