Dogway / Avisynth-Scripts

AviSynth+ 3.7.3+ Filters
GNU General Public License v3.0
92 stars 13 forks source link

Question about mask. #79

Closed Kuronoe-Ookami closed 1 year ago

Kuronoe-Ookami commented 1 year ago

Hi, I was looking inside Scenes Pack and Mask Pack for some mask able to detect frameblend. I'm trying to write the detected frames in a notepad using the "WriteFileIf" function in avpsmod's analysis mode, as in the example below, where I use the combmask to detect frames with problems in lines.

CombMask2()
WriteFileIf("path.txt", "AverageLuma() > 1.0", "current_frame")

The idea is to put the frames in a notepad and use them as bookmarks to manually determine if the next or next frame is better. Similar to how srestore does it, the result of this one didn't work with the video I have.

An example of the type of frameblend I'm trying to solve can be seen here: https://files.catbox.moe/p9hbkz.mp4

Would you have any suggestions?

Thanks for any tip.

Dogway commented 1 year ago

You would need to blend every two frames in different opacities to check which one matches (less diff) the blended frame better (in case it matches), then mark the frame as blended with the opacity value.

This is cumbersome and I don't think you need to reinvent the wheel, StainlessS has ExBlend whith a bunch of features. Since it's anime I think you might be able to dup the blended frame with the previous or next one instead of actually deblend it. Try to carefully read its Readme.

Kuronoe-Ookami commented 1 year ago

I already tried almost all of the wiki before it was turned off, but they always lose a frame and usually a frame that can be exchanged for the next ones. besides the panoramic scenes, they usually choke in the use of srestore and others. So I needed something that just writes the frames, so I could manually look at them without playing the entire video.

Anyway, thanks for the tip.

Dogway commented 1 year ago

Use ExBlend(mode=1), check the created logs, you might need to also adjust the settings for the analysis pass so it picks all blended frames. Then you can run ExBlend(mode=2, Decimate=false) and I'm sure there is a dup argument but didn't look for it. I'm on vacations mode.

Dogway commented 1 year ago

Closing for now. Ask StainlessS for details to replace with dups in ExBlend if necessary, either by using DISP=2 in mode=1 or DISP=4, mode=2, Decompix=n.