View Full Version : SRestore help
SKY4
13th June 2025, 00:33
Hi,
I am trying to get SRestore to guess/remove blended frames. It has a consistent pattern. I have gone through numerous tutorials and have tried various code examples and cannot figure it out.
Wonky_Monkey helped me with an amazing script that perfectly removed blended frames, but because some of the cuts in each episode occur mid-field I have to do this on each cut in the show. It also needs 2 good frames followed by 2 blended frames in order for the script to work, but a cut doesn’t always have 2 frames at the very beginning of the scene.
I am going to use SRestore to do an overall pass, then the script I am already using to only correct scenes SRestore missed.
I really need to figure this out so I would really appreciate it if someone is able to help. I noticed as soon as the thread reached page 2 suddenly the thread went dead.
I have everything else figured out, I just need to figure out what code to put for SRestore. Ideally also how to offset the starting frame for the second bit of code, but I can get this done as long as I know how what script to feed SRestore.
Thanks
Sharc
13th June 2025, 07:51
I don't know what exactly you are referring to, but an automatic restoration like SRestore requires a few frames to settle with a particular cadence (pattern). If the cadence changes one may see a few glitches before the algo settles on the new condition. So some manual action may be required with inconsistent patterns or with the first few frames.
SKY4
13th June 2025, 16:39
Hi Sharc! Oh that’s no problem at all. We have a manual way of dealing with the first few bad frames. I’m just looking for an example of a short script that would basically tell SRestore to detect and attempt to fix the blended frames. I see various examples people post and I’ve been able to get Avisynth to do various things but I can’t figure out what to type script wise to make SRestore do this.
If you can give me an example of a starter script that I can run that would really be awesome. I should be in good shape after that.
Selur
13th June 2025, 17:08
You either need to tell sRestore the frame rate it should reduce the input to. (easy to calculate if there is a pattern)
i.e.
sRestore(frate=23.976) (a full example script (https://pastebin.com/vARi2p5i))
If there is a fixed pattern, using SelectEvery or TDecimate should be faster.
SKY4
13th June 2025, 22:00
Awesome, thanks. Will the example script you gave me have SRestore attempt to detect/guess the blended frames andfix/remove them?
For context, there is definitely a fixed pattern There is a ‘but, though . It is always 2 blended frames followed by 4 good frames (AABBBB). Here is the ‘but’: the cuts occasionally occur midfield from the original film, so even though the pattern never changes, if a cut occurs in the middle of a field (29.97) then when the angle cuts it can give the appearance of being 1 frame over or under. That’s why I’m wanting to use SRestore to do the guess pass. I have a script that works great for a fixed pattern, but because of mid-field angle changes sometimes it is a frame early or late once the camera cuts. It also requires that each shot starts with exactly two good frames, two blended frames and the following four good frames to work.
I would prefer to use SRestore as it will try to detect and fix the blended frames - my understanding is TDecimate will simply get rid of the blended frames without combining the info in the blended frames.
Therefore my plan was to use SRestore to do an overall guess of the entire 52 min video and see what blended frames it can get rid of. Whatever SRestore misses, I will apply the other script only for areas SRestore missed. That way, I don’t have to process 200+ short videos for every cut and then reassemble the entire show in Premiere - just the clips SRestore missed and graft the fixed clips. Sort of a hybrid solution.
Selur
14th June 2025, 07:31
Will the example script you gave me have SRestore attempt to detect/guess the blended frames andfix/remove them?
It will try to:
a. archive the given frame rate
b. reduce blended frames in that process
aside from some special cases sRestore/cdeblend/.. all can't do any 'fixing' () but will only remove frames or replace them with others. (see oMode description over at http://avisynth.nl/index.php/Srestore or directly in the documentation of the sRestore script version you are using)
ExBlend deblender (https://forum.doom9.org/showthread.php?t=175948) is more likely to 'fix' blended frames, but at least for me, it's hard to get working.
(Might be because I mainly use Vapoursynth nowadays and there is no port of it and I don't know of any step-by-step guide which explains it in some detail.)
Cu Selur
SKY4
17th June 2025, 00:11
Hi. Update! Installed all the plugins needed per your script (thanks!) However, it keeps giving me an error for ‘mtmodes.avsi’ in red. Says ‘Unexpected character “è”. So I can’t get the script to load.
The only file I could find for mtmodes.avsi was some text file that the tutorial says to save as that. This seems to be my primary road block.
The script was also giving me an error that these are all 64 bit plugins - apparently I have the 32 bit version - so I went back and put the 32 bit version of each plug in and updated the destination, and that seemed to get rid of those errors, but the mtmodes.avsi seems to be the issue.
Where can I get an mtmodes.avsi that will let me load your awesome script? :-)
Thanks!
Selur
17th June 2025, 18:22
"mtmodes.avsi" shouldn't be needed at all. you can simply ignore that line, but I also uploaded the version Hybrid used: https://pastebin.com/697Zc1Pv
SKY4
18th June 2025, 19:02
Awesome thanks so much!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.