Log in

View Full Version : Help using Deshaker with Dissolve


foobaz
21st November 2011, 06:56
I've been trying for two days now to do what seems like a simple task. All I want to do is to apply Deshaker to 4 separate clips and then Dissolve them together. The problem is that Deshaker is a VD plugin, not an Avisynth one, so I can't just script it in along with Avisynth commands. Even if I use the VD script version of it, I don't see a clear way to apply it, using separately saved 1st pass log files, to each clip in turn, and then dissolving them together.

If I just apply the filter to a dissolve sequence, it produces motion artifacts in some of the transitions where a shaky end of one clip transitions to a steady beginning of the next clip. It is very noticeable. Note that applying the filter to concatenated clips does not produce this artefact. It easily detects scene changes in this case. The problem is, it does not recognize any scene change at a dissolve transition. Adding a single blank frame to the end of a clip does not work for the dissolve case. I've changed the scene detection threshold, but that is tedious and time-consuming, and hasn't worked so far. I'd much rather not have to save processed clips separately and then dissolve them together. That would be very tedious and would involve 2 re-encodes. There must be some way to apply the filter separately to each clip before doing a dissolve. At least I hope there is.

This obviously must be a common problem that users of this very useful filter encounter, yet I have found nothing either here, or on the 'net, in general, on it. Someone here must have solved this problem ages ago. I hope you will share your solution. I doubt I'm the only one having this problem.

Gavino
23rd November 2011, 13:20
How about adding a short filler clip (blank or otherwise, enough for it to register as a scene change) between each section in VDub before applying Deshaker, then saving the results. These extra frames can be removed before dissolving in your Avisynth script.

foobaz
23rd November 2011, 22:19
How about adding a short filler clip (blank or otherwise, enough for it to register as a scene change) between each section in VDub before applying Deshaker, then saving the results. These extra frames can be removed before dissolving in your Avisynth script.

Thanks for your input. Based on what you suggest, I tried a few variations of this. The one that worked best was to run Deshaker on 2 short sample clips concatenated together and then save the result to disk in uncompressed format. I didn't need to add any blank frames for it to detect the scene change but you could if it were necessary. Then I simply did a dissolve on the resultant stabilized clip, trimming it into 2 clips at the scene change frame. The exact frame(s) can be gotten from the Deshaker log file. This gave me the same dissolve effect that the unstabilized clips would give, only stabilized. There are no artifacts at the scene transition:

http://www.youtube.com/watch?v=kzOc2uwksZ0&feature=mfu_in_order&list=UL

Note that the tree movement in the top frame is eliminated in the bottom frame.

Though I'd prefer not having to save an intermediary file, saving the stabilized clip and then doing a dissolve on the split clip gives better results than expected:

http://www.youtube.com/watch?v=uc9jR-auWvw&feature=mfu_in_order&list=UL

This method could be applied to any number of clips and it is much easier than applying Deshaker to individual clips and saving each one. You could tweak Deshaker on just the clips that really need it. Otherwise you could use the same settings on all clips.