Stabilization Tools Pack v1.7 for Avisynth [DOWNLOAD]
1 Attachment(s)
Stabilization Tools Pack v1.7
I developed a set of tools to work with common stabilization issues, mainly from telecine process. For aggressive handheld camera shaking I still recommend vdub's Deshaker. FilmGateFix() First there is FilmGateFix() which is very straight forward although the least out-of-the-box experience from the pack. I set defaults to my needs and although very conservative worked quite well. It's still open to suggestions and somewhat experimental. This function does 2 assumptions. That after a scene change the worst film gate frame is the second, and the third frame is stable. And two, that the source is cel animation based since simple freezeframe() filters are being used. The function can be expanded in the future with frame interpolation for live footage, and refactored settings for better results. Test and share your experience, don't forget to upload a chunk of the source so I can check. FillBorders() The other two tools are related mainly to stab(). This is my main stabilization filter because it's very production friendly; works fine in one pass without too much parameter tweaking. As all deshakers go there is one main problem, mismatches. This generally creates black borders around the source frames to compensate for the stabilization, for that in stab() you can use the "mirror" parameter, something like mirror=15 will do the job, this can be called the "patchy" method. It won't fix the huge (over 5px) stabilization mismatches specially problematic in tilts and pans. This method requires you to go through the whole source and check carefully where stab() failed, sometimes not as evident as we used the mirror edge filling feature. A nicer more passive method was in need so I made the next two functions. After Stab() without the use of the mirror option I recommend to crop by at least 2 pixels on all sides, then we apply a pass of the new filter FillBorders(). This will fill dark borders with adjacent content, it uses AVSInpaint plugin hence results are much nicer than simple mirror filling. This filter will also work with retail sources that present random black borders, by using the "thr" setting you can tell how dark it must be to be validated as a border. Do tweaks while in debug mode. RAW........................................ ... FillBlackLines().............................. FillBorders() http://www.digitalfaq.com/forum/imag...90iOqS0t-1.png...........http://www.digitalfaq.com/forum/imag...ITIpE5yt-1.png...........http://www.digitalfaq.com/forum/imag...hS9Og6It-1.png FindBlackBorders() The previous FillBorders() will work with black borders up to 3px, let's call this false positives because they are inherent stabilization borders we decided to fill rather than crop. After that threshold of 3px (plus 2px previously cropped) we are still left with some thick borders result of serious stab() mismatches, the better approach here is to trim out the whole scene. To avoid the tedious process of carefully rewatching the film/episode from start to finish, I created a second function, FindBlackBorders(). This will detect if any of the borders present a black or "thr" defined border and report to a statistics file. Meanwhile it will output the input clip untouched so you can do two things at the same time, render a preview clip to check stab() mismatches, and WriteFile border statistics to a file. This comes handy with very heavy filters or long episodic series. Examples: So far our script looks like this: First/Debug Pass Code:
# stabilization pass Now all we need to do is use F3 to jump through all bookmarks and manually trim out problematic scenes, hopefully saving us a few precious hours and eye health issues. For the trims I like using ClipClop() by StainlessS. After we finished, we replace our FindBlackBorders() line with the new ClipClop() one and render our main script. Second/Final Pass Code:
unstab=Crop(2, 2, -2, -2) Changelog: Code:
v1.7 - Refactored FindBlackBorders() again for TRUE border detection
|
Remember to attach files to the forum. External links too often disappear, are subjected to malware, etc.
And anytime you have updates or new versions, just attach those in a reply, and we'll get it sorted for you (added to original post, etc). |
If I attach the file outsiders can't download the script. I want everyone to use my tools without constraints, is it possible to add both options?
|
All anybody has to do is register for the forum.
But sure, you can do both. At minimum, however, it needs to be attached for longevity. |
Can I edit posts? I can't find how.
|
You can edit posts for 60 minutes. See also: http://www.digitalfaq.com/forum/news...embership.html
After an hour, just post a reply. Site Staff will help maintain posts like this, by merging or editing to keep it updated. |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.