Nikon D90 Video "Stair-Step" Fix |
||||||||
|
Updated November 9th, 2008 An updated version of the AviSynth script has been uploaded. This updated version is based off work by hdkhang in the dvxuser.com forums, and has been optimized for improved rendering speed (from ~7fps to ~18fps). Overview of the Problem Lee Wilson did a fine job of explaining the problem on the dvxuser.com forums, so I'm just going to copy his explanation:
(Mostly guess work + some lies) The D90 seems to arrive at 1280 x 720p by firstly arriving at 1280 x 800p and then throwing away a
horizontal line every 9 pixels. So we need to put back in a horizontal line every 9 pixels and then squeeze our new 1280 x 800p file
down to 1280 x 720p.
The following video from Vimeo shows the problem quite well (be sure to view at full 720p resolution):
Additional points: a) I don't think it really works like this (above) but it is a convenient illustration. b) As well as some horizontal lines being thrown away I can also see that some vertical lines are also thrown away (although I might have been fooled by compression artefacts) - but the horizontal lines are the most obvious. c) The 'missing' line of pixels is not every 9 lines - it is more like 9 - 9 - 9 - 9 - 9 - 8 - 9 - 9 - so it throws a '8' at you every now and again. That's the theory part finished with, I hope you enjoyed that, now take a break for 20 minutes - have a cup of coffee or maybe sleep for an hour or two. Notice the jagged edges which are especially visible in high-contrast areas such as the letters. Here is a screenshot detailing the problem:
Fixing the Problem Fortunately Lee Wilson not only described the problem, but also determined a method by which it can be fixed (or at least improved greatly). If you would like a lot more detail about the fix, be sure to check out the dvxuser.com forum topic. Of course, the best way to fix this would be for Nikon to do it with a D90 firmware update (pretty please)! I'm assuming that is unlikely to happen soon (if ever), so in the meantime this method can be used. There are a number of different programs you can use to fix this problem, including commercial applications like The Foundry's Nuke or Adobe After Effects. However, it is also possible to implement this fix using 100% free software, and that is the method I will detail. For this you will need the following:
Saving the new video will take some time, so go out and shoot some more videos or photos with your D90 while you wait! Once it is done, your video file should look better, with the jagged edges removed. Here is an example before and after:
Special Thanks Big thanks to Lee Wilson for discovering this method and posting information about it in the dvxuser.com forums. I also must thank buildyo who posted the "magic code" in the dvxuser.com forums which I used as a basis for my AviSynth script (with a couple tweaks) The updated AviSynth script with better rendering speed was created by hdkhang from the dvxuser.com forums Tweaks and Other Updates I am by no means an expert with AviSynth - in fact this is the first script I have ever written! It is certainly possible there is a better way to do this, so if you would like to contribute tweaks or any other improvements please e-mail them to me at dcgear@gmail.com |