VirtualDub Deshaker - > softening?

RichMacDonald wrote on 2/10/2005, 8:08 PM
Question for anyone using VirtualDub deshaker, especially John Meyer who is our resident expert:

For some particular work, I am using motion smoothness settings of:

Resampling: Bicubic
Edge compensation: None
Use previous and future frames to fill in borders is checked
Preious frames = future frames = 30
Extra zoom factor: 1
Motion smoothness:
Horizontal panning: 3000
Vertictal panning: 3000
Rotation: 0
Zoom: 0
Max correction limits:
horizontal = vertical = 99
rotation = zoom = 1

IOW, there is no rotation and no zoom and I simply wish to adjust horizontal and vertical movement. I was using these settings under the assumption that this would provide zero redution in quality (apart from the edges). Simply take the rectangle from the current frame, adjust it horizontally and vertically and place it on the new frame, then add pixels to fix the edges. With no zooming and no rotation the algorithm should never need to resample.

I believe I was mistaken. I am seeing some definite softening in the result. If I pick different resampling algorithms, I can see a difference, thus deshaker is unnecessarily curve-fitting and resampling.

First, have I picked the settings correctly for what I am attempting? And if so, well DAMN :-!

Comments

johnmeyer wrote on 2/10/2005, 10:12 PM
Well, it sure sounds like it is doing more than just moving the pixels left/right/up/down. I assume that the other settings in Pass 2 are set according to the guide. It's worth checking:

Destination pixel aspect: same as your original video. For NTSC, set to Standard NTSC (0.911). Similarly, make sure the far left column (Pass 1&2) has the source pixel aspect set to Standard NTSC (0.911), and lower field first (if your source is DV).

Back to pass 2. If your source is DV, make sure you set destination video size to 720x480.

These are the obvious things I can think of. You might also set ALL the max correction limits to 99. I just went back and looked at the email from the author (Gunnar Thalin) and he said he put these in for a special thing one user wanted, but they aren't generally useful.

You might also get some additional insight from the author's own instructions:

Deshaker
RichMacDonald wrote on 2/12/2005, 6:24 PM
I had an email discussion with the author. He concurs that softness will always occur. His response:

----------------
Yes, it always resamples the video exactly once no matter what settings you
use. Even if you just smooth the panning, it almost always needs to correct
the position by a fractional number of pixels, which means it needs to
resample. (You can't offset a frame by half a pixel without resampling it.)

If your video is progressive you should be able to use nearest neighbor to
get the result you want (i.e. no resampling), but I don't think it would
look very good.

If your video is interlaced the result is always worse since each field is
resampled separately and a field has half the number of lines of a whole
frame but is still "stretched" to fill the entire height of the frame. I
guess resampling interlaced video could be done in a smarter way, but it's
not easy and I actually hate interlaced video and won't lift a finger to
support it more than I already do :-P

Maybe you could try using a very good deinterlacer first and then deshake
the resulting video as progressive (with nearest neighbor if you think that
looks better, although i doubt it).
----------------

I understand the fractional pixels issue. Although I'd like to see the result of forcing integer pixel adjustments only, since I doubt pixel fraction adjustments are really crucial. And too bad about the interlacing issue. I would assume deinterlacing would be a far worse "cure".

While I am disappointed, I must say the tool really is excellent and most of the time the extra softness is not significant. I still highly recommend it.