Quantcast ffdshow post-processing & high-resolution soft-subs for anime materials >> My collection of short anime reviews
imouto.my background image - Tsunetsuki Matoi of Sayonara Zetsubou Sensei

ffdshow post-processing & high-resolution soft-subs for anime materials

Shortlink of this page: http://wp.me/PrgSo-3D (use this in your BBS/forum/Facebook/Twitter messages). Download the PDF version of this page here.

Changelog: 5 July 2010 – The deband part of this article has been modified, as I wait for the last episode of FMA Brotherhood to be released.

WARNING: THIS POST CONTAINS MANY LOSSLESS PNG IMAGES. IT MAY TAKE SOME TIME FOR THEM TO LOAD.

ffdshow is a decoder-cum-post-processing package that is common in codec packs such as CCCP and K-Lite Codec Pack. It not only can decode various video and audio formats, but also do some post-processing on them. Post-processing allows you to improve picture quality, repairing bad ones and some other features like logo scrubbing etc.

In this article I will focus upon how to use ffdshow post-processing feature to try and improve the picture quality (PQ) in anime (or cartoons and the likes), based upon my own experience of playing with it while watching hours upon hours of anime. I should warn you though that you will not be able to use DXVA for h.264 videos if you chooses to do this, thus a reasonably fast CPU will be needed here (or use CoreAVC CUDA). A decent quad-core or a fast dual like Intel E8400 is what I will recommend. Plus, post-processing shouldn’t be done on high-definition material from Blu-ray/HD-DVD sources, but you may have to do it from OTA sources.

There is a thread at avsforum which configure ffdshow with avisynth scripts like seesaw and limitedsharpenfaster for use. From my tests, the seesaw works better with sharper PQ without too many noise/ringing/halo being introduced to it.

Original:-

Open picture in new window/tab by clicking here.

Limitedsharpenfaster:-
Limitedsharpenfaster
Open picture in new window/tab by clicking here.

Seesaw:-
Seesaw
Open picture in new window/tab by clicking here.

ffdshow post-processing

If you have a really fast CPU, like an overclocked Q6600 or E8400, you can try using those settings at that thread to get a noticeable PQ improvement. But then again, those scripts are geared more towards non-animation DVD sources. Below is what you can use without the need of Avisynth scripts to improve the PQ of your anime videos.

First filter – Deband.

Deband is simply the most important ffdshow filter you will want to turn on when it comes . This will reduce colour banding as shown below.

If deband is off:-

Open picture in new window/tab by clicking here.

Deband turned on (threshold: 1.2):-

Open picture in new window/tab by clicking here.


Open picture in new window/tab by clicking here.

The colour gradient is smoother when deband is turned on. Banding are more common on animation like Japanese anime than real-life videos, especially in (HD)TV rips that are used by most of the fansub groups out there.  Banding is even more noticeable when you are using LCD monitors. Not that DVD is not affected, just ask Dr. Akagi. The default value is 1.2, though feel free to increase/decrease it to match your preferences. The Wolf and Spice example could have done with extra couple of notches, but 1.2 usually do the job.

The biggest drawback of the deband filter is that it cannot be used in FullHD videos unless you have a very fast top of the line Core i7 system that is overclocked to the max with liquid nitrogen and stuff. Even then, if you have such setup, the deband filter will still probably not work because it is single-threaded. In fact, in some cases, the deband filter doesn’t work in certain fansubbed 720p anime titles too, such as Taka’s Koukaku no Regios (in their ED themes with hardsubbed outrageous karaoke effects that trips the filter). Therefore your alternative is to use Avisynth with its various deband plugins within ffdshow.


Open picture in new window/tab by clicking here.

From top left, clockwise:

  1. Deband applied with multithreaded Avisynth gradfun2DB plugin in default config.
  2. Deband applied with multithreaded Avisynth gradfun2DBmod plugin in customized configuration.
  3. Original image, if deband is not applied.
  4. Deband applied using ffdshow video decoder deband filter in default config.

In case no.1 – deband with gradfun2DB using MT Avisynth –  you can now deband FullHD videos even if you only have a middling dual-core system (like mine). If you have a top-of-the-line Core i7 system overclocked to the hell and back with liquid nitrogen, you can try the gradfun2DBmod plugin (used more for pre-processing before encode instead of playback post-processing) instead for high-quality debanding process. Maybe you can set “mask=true” too.

But if Avisynth scares the hell out of you, you may stick with ffdshow deband filter, which is good for 720p resolutions and lower.

Second filter – Sharpen

Unlike the deband filter that removed imperfections, sharpen filter enhance the PQ of a video.

No sharpening:-

Open picture in new window/tab by clicking here.

Sharpening turned on, setting: unsharp mask (strength:60)

Open picture in new window/tab by clicking here.

Sharpening turned on, setting: msharpen high quality (Strength:70, Threshold: 15)

Open picture in new window/tab by clicking here.

As you can see above, the sharpen filter enhance the lines and edges of things. From the ffdshow setting, there are 5 sharpening methods available, but IMHO the good ones are only the first three (xsharpen, unsharp mask and msharp). Personally I use unsharp mask with 20-60 strength, mainly because it gives the best quality/performance ratio. For  really bad encodes (like this), a full blown msharp HQ with high strength value is needed. Sharpening filters must be used judiciously, because too strong the filter being used, it will look bad with halos and/or ringing effects. The unsharp mask sample above with strength of 60 is a prime example of oversharpening, you can see slight halos on the left side of Kokonoe Rin’s humongous hair.

Below is sharpening with ATI AVIVO AVP2 edge-enhancement with strength at 40.

Open picture in new window/tab by clicking here.

Above is the same frame being sharpened with ATI AVIVO AVP 2.0 edge-enhancement algorithm (strength = 40), combined with denoiser effect (strength = 10). It also looks sharper, but with much less halo and noise. Hardware-based sharpeners is not only faster and takes less CPU resources, it also is of higher quality than ffdshow-based software sharpeners. I will make another post regarding hardware-based post-processing in the future, so check out this blog often.

The following filters are optional.

Third filter – Blur & NR.

This filter will try to remove noise from the video. This filter is optional, mainly because animation is less prone to noise/grain compared to real-life videos. The source must be really bad for noise to appear, maybe a VHS rip.

Fourth filter – Post Processing

This filter should only be used if you also use ffdshow as your decoder instead of external decoder like DiVX, CoreAVC or XviD. Do not use this if you do not use ffdshow as a decoder.

Example:-

Fifth filter – Deinterlacer

Use this if your source is interlaced, like that EVA Directors Cut DVD box set I have. Almost all TV-rip-based (and so are Blu-ray and HD-DVD rips) releases are progressive, so no need to turn this on. If you see combing (from DVD rippers who does not know how to encode), this filter will help mitigate it too. Good deinterlacers are TomsMoComp, 5-tap lowpass, kernel deinterlacer and kernel bob.

That’s about it with ffdshow filters. The order they are stacked upon in ffdshow are important too, so assuming that you enable it all, the order from top to bottom should be:-

- Deinterlacer.
– Post-processing.
– Deband.
– Sharpen.
– Blur & NR.

Question: How about the resizing filter?
– Personally I think it is better for the graphic card itself to do the resizing using the card’s pixel shaders than using ffdshow to do CPU-based software resizing. The difference in quality is negligible between hardware-based bicubic resizing with pixel shaders (doable with Haali Video Renderer, VMR7/9 renderless and EVR custom presenter) and software-based Lanczos 2-tap/spline ffdshow resizing.

Subtitles

Majority of the anime fansub videos nowadays are released in .mkv or .mp4, usually with embedded subtitles (srt or ass or even ttext). For users of codec packs like CCCP or KLite Mega Codec Pack and did not use software like VLC or KMPLayer, there are 3 methods that can be used to display subtitles:-
– vsfilter a.k.a. DirectVobSub.
– ffdshow subtitle filter.
– MPC(HC) internal subtitle engine.

For those who only has 15-19” monitors, the problem will not be apparent, but users of higher resolution monitors will notice that their subtitles will look jagged when watched full screen. Example of a low-quality subtitle (from Hauu’s Higurashi no Naku Koro ni Kai SD) displayed fullscreen on 1680×1050 resolution:-


Subtitle engine:- DirectVobSub with MPC-HC.

You may think “What’s wrong with that subtitle?”. If you ask that question, take a look below.


Subtitle engine:- KMPlayer internal subtitle engine.

You got to be blind not to see that the 2nd subtitle looks WAY BETTER than the first one. The environment is the same, and the video has not been resized (which is the requirement of DirectVobSub if you want to get better looking subtitles). This is because KMPlayer has one of the best (if not the best already) subtitle engine out there (actually this is already obselete with Beliyall’s MPC-HC build). But then again, KMPlayer is not exactly svelte like ZoomPlayer or MPC-HC, and it takes long to load and the time it takes to open a file can take up to 5 seconds. Those who like a fast and lean player like MPC-HC will not like the speed of KMPlayer.

But then take a look again at the screenshot below:-


The subtitle above are also done with DirectVobSub and MPC-HC, but the difference is that DirectVobSub has ben instructed to double the resolution of the video being sent to the video renderer. This enhance the subtitle quality immensely but at the price of heavy CPU usage. Plus, this will make DirectVobSub almost unusable for high-definition videos (imagine a 1080p video being upscaled 100% ).


Above picture are subtitles taken with ffdshow subtitle filter with MPC-HC, without video resizing. Not exactly beautiful and sharp am I right?


It looks so much better when the ffdshow resize filter is activated (to resize to desktop resolution – resize filter must be above subtitle filter). In fact, probably look better than even KMPlayer.  For those who thinks to use ffdshow subtitle filter, forget it. It isn’t feature complete, and unable to render complex subtitles properly. The speed and quality is decent though, which is a pity.

Thus, the only recourse you have for a high-resolution subtitle is the MPC-HC internal subtitle engine. Now take a look at how it looks at default setting (800×600 round up to the power of 2):-


To me, it looks like a slightly inferior version of the KMPlayer subtitle engine, and definitely better than original DirectVobSub. Now how about if the setting is changed to use Desktop resolution?


Well, it does look sharper than the previous one, about as good as KMPlayer, a little bit superior to DirectVobSub double resolution but nowhere as good as ffdshow desktop resolution.

I can already see you thinking about using ffdshow subtitle engine, but no you shouldn’t, yet. See below.


MPC-HC at desktop resolution.


DirectVobSub double resolution.


ffdshow desktop resolution.

ffdshow subtitle filter chokes at every opportunity when complex subtitles are involved. And do not get me started upon positional subtitles (the ones you see on signboards etc.) because more often than not ffdshow will screw up that one too.

In other words, the best subtitle engine you can have for now, if you do not want to use KMPlayer, is the MPC internal subtitle engine. It is reasonably fast, feature-complete, DXVA-compatible and looks better too than normal DirectVobSub. Just set it up like below and you should be set.

Another method that you can use is to resize the video to desktop resolution using ffdshow and then let DirectVobSub render the subtitles over it. It should achieve the same effect as the method above, with the penalties of higher CPU utilizations and loss of DXVA functionality.

Written by ranpha on Jul 24,2008 in: |

36 Comments »

  • lilwill says:

    Sorry if this a stupid question but im genuinely confused over to pick this over DXVA my specs are 4gigs of ram, Intel Core Duo E8400 3.00GHz,and my card is ATI radeon HD 4600 Series I was told its better off me using ffdshow show post processing over DXVA.

    • ranpha says:

      If you need ffdshow post-processing and has enough CPU power, there should be no problem for you to use software decoding. DivX 8 or ffdshow ffmpeg-mt are two fast software decoders out there that are free of charge.

  • wat says:

    how do I use the plugin gradfun2DB for avisynth in ffdshow?

  • naoan says:

    Hi, thanks for the guide, inspired by this I’ve researched avisynth for some time and got some pretty nice result using it ffdshow. Check it out on my site. :)

  • ranpha says:

    Just enable 'Auto-load Subtitles' in Options —> Playback, then use VMR7/9 renderless, Haali Video Renderer or EVR custom presenter and you can use the internal subtitle engine.

  • Tryzik says:

    Thanks for your wonderful guides. It has been a great help. I have a computer with an Intel GMA X3100 video processor. Can this use the internal MPC subtitle renderer? Thanks!

  • ranpha says:

    Nothing really has changed since this guide was written. ffdshow subtitles filter has improved, but only slightly. If you have any suggestions, feel free to reply here.

  • eMa says:

    Is possible update this guide with new version of FFDshow,CoreAVC 2.0 & MPC-HC?

    Thanks

  • verhak says:

    I have a question about Vsfilter & DXVA functionality. I read that when you use Vsfilter (for the subtitles) it breaks the DXVA functionality.

    What’s not clear to me is whether it completely disables the dxva for all formats or not… For example, when I install Vsfilter, startup Graphstudio and open a MKV (x264) I can see the Vsfilter block in the diagram, and thus disabling DXVA, right? But when I open a Mpeg-2 (eg. used for live-tv) I don’t see the Vsfilter block, so I wonder whether it also breaks the DXVA functionality when playing this format (eg. when using the native mce7 codec, or powerdvd codec)?

    Can somebody clarify this for me. Is there also a way so that I can check whether DXVA is used or not (while playing)?

    Thanks!

    • ranpha says:

      @verhak

      if you use MPC-HC, you can see whether DXVA is used at the bottom-left corner of MPC-HC. To see whether DXVA is used in Graphstudio test render, just right-click upon the ‘MPC-Video Decoder’ and select ‘Properties’ when playing a video file to see whether DXVA is enabled or not.

      BTW, MPC-HC MPEG2 external decoders doesn’t support DXVA, so whether vsfilter is enabled or not, no hardware acceleration for you.

  • shiroh says:

    unsharpmask and msharpen looks crappy. lol halo.
    avivo looks somewhat decent.
    original still looks superior.
    and that is just a matter of preferrence. some people doesn’t mind haloes. i do.
    anyway with hd broadcast and blurei (real hd, not upscaled) becomes more common, sharpening is pointless.

  • Samuel Orozco says:

    Hi!
    First of all, thank you for all your previous tips. They have been really helpful.

    I have a couple of questions:

    1. Is it possible to add FFDshow Audio decoder to VLC Player??

    2. Do you recommend any decoder or function to adjust my contrast, brightness, etc using MPHC?? Im currently using the FFDShow VD Picture Properties function but I dont really like it.

    Thank you!!

  • [...] here are 2 setups i know of FFDShow settings for divx/xvid – AVS Forum ffdshow post-processing & high-resolution soft-subs for anime materials | My collection of short… [...]

  • Luis says:

    Great Guide, this probably the best guide I have seen for FFDshow.

  • Samuel Orozco says:

    Hi, thanks.
    This has happened with a couple of videos. For example with Eclipse’s Clannad After Story .mkv, It also happened with School Days but I cant remember who did the fan-subbing.
    Thank you.

  • Samuel Orozco says:

    Hi Ranpha.
    One quick question:
    I’m using MPC HC internal subtitle engine (I set it up just like in the pic above). However, I fond that there are some subtitles that this engine wont show. I therefore have to use ffdshow subtitles.
    I was wondering if I had done something wrong or if that was normal.
    Thank you!

    • ranpha says:

      Hard to say really without seeing the video myself, but I think it is normal. I know that there are some certain situations where this can happen. What is the video?

  • Master Asia says:

    To the Author,

    Try this version of MPC-HC:

    http://forum.doom9.org/showthread.php?t=123537

    which features MadVR Renderer:

    Explained here: http://forum.doom9.org/showthread.php?t=146228

    Try adjusting scaling settings with softcubic strength level of 50, 60, 70 or 80.

  • john owen says:

    You can download the full version of kmplayer 2.9.4 for free here: http://www.pendriveapps.com/kmplayer-portable-media-player/

  • ranpha says:

    warpsharp/awarpsharp is similar to unsharpmask, but with lesser haloing/ringing artifacts but takes more CPU even with optimizations. Maybe you can try it if you have good CPUs?

    But then again, if you have the best CPU like Intel quad-core Q6600 or an i7 processor (plus humongous amount of RAM), go use the Avisynth seesaw configuration described in the link at the avsforum at http://www.avsforum.com/avs-vb/showthread.php?t=719041 that I demoed with the Higurashi clip. That will give you the best sharpening method with almost non-existant ringing/haloing.

  • Dikei says:

    Thanks for the guide.
    How about the warpsharp filter ?

  • [...] Player Classic Home Cinema + ffdshow · (config 1 + config 2) = experiencia cinematográfica / [...]

  • piotrsan says:

    Thanks , this has worked quite well. Could you tell me thought which anime are those 2 deband pictures from http://j4xokg.bay.livefilestore.com/y1pByRH7cqBGHba7AFF8vH9yMHkkQM_BNUH6Q4H4Mf_8aL5hIBjTIvj4tv_rMI8Ajg9uAAKTaRt-Ng/snapshot20081007020311.jpg.png

  • ranpha says:

    @Samuel.

    Get a HDTV with good scalers like the Pioneer Kuro and let its built-in scaler upscale the SD anime to the HDTV native resolution. If you mainly watch SD content, might as well stay with the existing TV. If you got more HD videos, then an upgrade is in order to enjoy them better.

  • Samuel Orozco says:

    Hi. I have followed all your advices and everything works excellent. Really really good! thanks a lot!!
    now, I have a very very good non HD Plasma tv.. and my anime looks amazing… however now that HD is really getting popular I was thinking of upgrading to a Full HD tv but I have heard that non HD content looks worse in HDTVs than in regular 480p tvs. is this true? is there anything you can do to make it look good? should I keep my tv? would a HD cinema projector work better??
    Thank you very much!!!

  • Anon says:

    Thanks for this nice guide. Finally have I found a good guide for FFDshow aimed at anime :)

  • ranpha says:

    The MPC-HC internal subtitle engine needs a Direct3D-capable videocard to function properly. Assuming that you do not need DXVA, I suggest that you just get a laptop with a Core 2 Duo T7xxx CPU and plenty of RAM (2GB or more), then use DirectVobSub for subtitles.

    Good graphic cards isn’t really necessary for watching good-quality anime, unless your source is a Blu-ray disc.

  • Samuel Orozco says:

    Hi, Im lookig for a new laptop and I want to be able to watch anime in .avi and .mkv with really good quality. I dont use my pc for gaming. However, I was wondering if I should buy a videocard and which one should I buy considering the one on the pc I want is an integrated one.
    Bottom line: Do I need a graphics card to watch good anime? Thanks

  • [...] public links >> reviews ffdshow post-processing & high-resolution soft-subs for anime… Saved by madape on Sun 28-9-2008 Ryzom : Free Accounts All Out! Saved by ollivesterinen on Fri [...]

  • ranpha says:

    @piotrsan

    Wolf and Spice.

RSS feed for comments on this post. TrackBack URL


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

If you have any problems with the reCAPTCHA-enabled form, you can contact me using the contact form or by e-mailing me directly.
User's homepage links are nofollow-free.

Powered by WordPress [Secure Login]. Theme: TheBuckmaker. CopyPaste, Bauanleitung, BLOGbal.
Blog Directory | Quick Link Submission Approval in 24 Hours - Submit your Website Today | Promote my blog
Powered by: DNS Made Easy | imouto.my's Privacy Policy | About This Blog | Sitemap | Background image: Tsunetsuki Matoi (Sayonara Zetsubou Sensei)


This blog is best viewed in high definition, using Mozilla Firefox, Internet Explorer 7+, Opera 10.x+ or any Webkit-based browsers.
Blog DirectoryArtsArts BlogsBlog Directory & Search engineTop Arts blogsAdd to Technorati FavoritesBest Blogs Asia DirectoryJoin My Community at MyBloglog!blog directoryblog search directoryBlogarama - The Blog DirectoryFree web directory, click hereWebfeed (RSS/ATOM/RDF) submitted to http://www.feeds4all.nl
Blog Directory 001feedNuts Feed ProfileBlog DirectoryMy collection of short anime reviewsArts Blogs - Blog RankingsListed in LS Blogs the Blog Directory and Blog Search EngineBlogRankers.comBlog DirectoryReadABlog.com Blog Search EngineBlog RatingsTopOfBlogsBloglisting.net - The internets fastest growing blog directory
My collection of short anime reviews at Blogged
Creative Commons License
Unless noted otherwise, this work by ranpha (text only) is licensed under a Creative Commons Attribution 3.0 Unported License. All comments belongs to the respective Posters. Screenshots of all anime titles here belongs to their respective authors and companies.
Get listed in a premiere web site directory for free This site is listed under Anime Directory