Log in

View Full Version : another restore function


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [18]

real.finder
6th August 2019, 01:40
srestore(frate=24.975, thresh=14, cache=8)

work fine for me

edit: are you using MT Prefetch() in avs+? if yes then that known thing that mt not work (yet) with real-time functions like srestore

simple_simon
6th August 2019, 02:24
Ahhh! That's what it was. Thank you.

What's it mean that a filter is a realtime filter and how do i tell to avoid using prefetch with them?

real.finder
6th August 2019, 05:46
Ahhh! That's what it was. Thank you.

What's it mean that a filter is a realtime filter and how do i tell to avoid using prefetch with them?

http://avisynth.nl/index.php/Runtime_environment

foobar2000
16th March 2020, 00:08
PAL with blends.. hard to deal with..

hi folks I came across two PAL dvds, both with blends..

the first one is progessive but I tried many filters can't fix it, seems to be hard double-telecine?

the second is interlaced with more blends, even more messy

the first one is TFF, second one BFF

here're the samples, thanks a lot

http://www.mediafire.com/file/biwgkp...PAL_blends.rar

manolito
24th May 2020, 23:40
Follow-up to this old post:
https://forum.doom9.org/showthread.php?p=1844334#post1844334

So using an old MaskTools version together with a new SRestore script will not work, but what about the other way around?

Using an old SRestore script (v 2.7e) with he latest pinterf MaskTools2 version? Is this safe if I stay away from Hi BitDepth and Hi Color?

real.finder
25th May 2020, 04:48
Follow-up to this old post:
https://forum.doom9.org/showthread.php?p=1844334#post1844334

So using an old MaskTools version together with a new SRestore script will not work, but what about the other way around?

Using an old SRestore script (v 2.7e) with he latest pinterf MaskTools2 version? Is this safe if I stay away from Hi BitDepth and Hi Color?

if you use new masktools then why you need old SRestore?!!

anyway it should work, new SRestore should also work with old masktools2 in avs 2.5 but new SRestore in avs 2.6 or avs+ will need new masktools2

manolito
25th May 2020, 12:39
:thanks:

The reason because I want to keep the old SRestore script is that I use at least three different computers for my video conversions, and one of them is my ancient WinXP machine with with a P3 Coppermine CPU (no SSE2), and I do not want to maintain different plugin folders with different versions of the filters. Least common denominator, and this means using older plugins from the pre "modernization effort" era. And this old SRestore version 2.7e has always worked well for me...

real.finder
25th May 2020, 12:53
:thanks:

The reason because I want to keep the old SRestore script is that I use at least three different computers for my video conversions, and one of them is my ancient WinXP machine with with a P3 Coppermine CPU (no SSE2), and I do not want to maintain different plugin folders with different versions of the filters. Least common denominator, and this means using older plugins from the pre "modernization effort" era. And this old SRestore version 2.7e has always worked well for me...

you can ask pinterf for c only build :devil:

anyway you have others like 2.7i or older like 2.7g, should work with older masktools

real.finder
31st May 2020, 14:47
:thanks:

The reason because I want to keep the old SRestore script is that I use at least three different computers for my video conversions, and one of them is my ancient WinXP machine with with a P3 Coppermine CPU (no SSE2), and I do not want to maintain different plugin folders with different versions of the filters. Least common denominator, and this means using older plugins from the pre "modernization effort" era. And this old SRestore version 2.7e has always worked well for me...

you can ask pinterf for c only build :devil:

anyway you have others like 2.7i or older like 2.7g, should work with older masktools

hope this will make you happy https://www.solidfiles.com/v/nDeywNzjnKyKG

it's the last version but build with /arch:SSE

manolito
31st May 2020, 17:47
Thanks for this build, but it does not work on my ancient WinXP machine.

I removed the old mt-masktools.dll and copied your build of masktools2 into my plugin folder. Then replaced the old SRestore.avsi with your latest version, then I also needed the file Zs_RF_Shared.avsi in the plugins folder.

When calling SRestore I got this error:
"There is no function MT_Makediff"

So it looks like my Non-SSE2 machine does not like this build...

real.finder
31st May 2020, 18:18
Thanks for this build, but it does not work on my ancient WinXP machine.

I removed the old mt-masktools.dll and copied your build of masktools2 into my plugin folder. Then replaced the old SRestore.avsi with your latest version, then I also needed the file Zs_RF_Shared.avsi in the plugins folder.

When calling SRestore I got this error:
"There is no function MT_Makediff"

So it looks like my Non-SSE2 machine does not like this build...

seems I forget something... this should do it https://www.solidfiles.com/v/55Gr45VPeDVYa

manolito
31st May 2020, 19:09
seems I forget something... this should do it https://www.solidfiles.com/v/55Gr45VPeDVYa

Yes, this build works. Thanks a lot...

real.finder
31st May 2020, 19:17
Yes, this build works. Thanks a lot...

now you don't have any excuse for not using new SRestore :)

manolito
31st May 2020, 20:17
I knew that you would tell me this...

But I have other old AVSI scripts like LSFMod and QTGMC which also rely on MaskTools and MVTools and more. If I just use your MaskTools2 build together with the latest SRestore script I would most likely get some issues with the other old scripts. I would have to replace all these old scripts with newer versions (I know they exist thanks to you and some others). And I would have to ask you to compile an MVTools2 build for my Non-SSE2 machine.

I think that I do not need all this. The main new features of all these new versions are Hi Color and Hi Bitdepth. And I really do not care about these features.

So I do not loose anything by sticking with my older plugins and scripts.

But still a big thank you for taking the time to make these builds for me...

real.finder
31st May 2020, 20:23
I knew that you would tell me this...

But I have other old AVSI scripts like LSFMod and QTGMC which also rely on MaskTools and MVTools and more. If I just use your MaskTools2 build together with the latest SRestore script I would most likely get some issues with the other old scripts. I would have to replace all these old scripts with newer versions (I know they exist thanks to you and some others). And I would have to ask you to compile an MVTools2 build for my Non-SSE2 machine.

I think that I do not need all this. The main new features of all these new versions are Hi Color and Hi Bitdepth. And I really do not care about these features.

So I do not loose anything by sticking with my older plugins and scripts.

But still a big thank you for taking the time to make these builds for me...

only new masktools2 is needed in new scripts (since there are some changes in lut things), others can be either old or new one, also new masktools2 work with older scripts, so there are no excuse :rolleyes:

also you did this sin https://forum.doom9.org/showthread.php?p=1912772#post1912772 :devil:

bruno321
16th June 2020, 07:39
Here's a snippet from a source I'm working on https://1fichier.com/?injetdcnteq796v59b05 progressive 29.97fps and lots of blended frames. Standard srestore(23.976) or srestore(25) are not giving good results, it skips frames. I'm confused by the more advanced options of srestore. Could it help in deblending this, or should I abandon hope and keep it at 29.97fps?

Boulder
16th June 2020, 12:15
I didn't take a look at the sample, but chances are it's telecined content which has been deinterlaced. You can try SRestore(omode="pp3") followed by TDecimate() to repair it. Do not bob the source before SRestore, use it as it is.

bruno321
16th June 2020, 12:51
Thanks. I did try that, but it also skips some frames (e.g. between 211 and 212 once you've applied that).

Boulder
16th June 2020, 13:39
How does the result look right after SRestore and before decimating, are there duplicates and with a constant pattern?

bruno321
16th June 2020, 14:15
There are duplicates then, haven't yet looked for the pattern, but there's already frames skipped at that stage...

manono
17th June 2020, 04:34
You should buy the DVD instead of downloading garbage from the internet. It's from a PAL source that's been blend deinterlaced. It has 3 blends in every 6-frame sequence although one of them is lighter. Exblend is about the only filter that can even begin to handle this kind of damage:

LWLibavVideoSource("22-nofix.mkv")
ExBlend(PAL=1,Show=0)
TDecimate(Cycle=6,CycleR=1)

https://www.sendspace.com/file/fiu21g

bruno321
17th June 2020, 06:56
Hey, that looks good! Thanks!

FWIW the source -is- a DVD. Well, an encoded bit, but the only thing I did was crop & greyscale, so I figured it's the same as providing an untouched m2v snippet for these purposes.

Could you explain or link to an explanation for what "blend deinterlacing" is?

manono
17th June 2020, 07:43
...so I figured it's the same as providing an untouched m2v snippet for these purposes.

You figured wrong. When providing samples, always provide untouched samples direct from your source. In this case it does mean the M2V. You're the one asking for help. Don't mislead - intentionally or unintentionally - the people willing to help.

Blend deinterlacing is just what the name says. An interlaced frame is blended together to make it progressive. It's perhaps the worst way to deinterlace anything. From the Wikipedia article on deinterlacing:

Blending is done by blending, or averaging consecutive fields to be displayed as one frame. Combing is avoided because the images are on top of each other. This instead leaves an artifact known as ghosting. The image loses both vertical resolution and temporal resolution. Although video produced with this technique only requires half the number of pixels vertically, it is often combined with a vertical resize so that the output has no numerical loss in vertical pixels. When interpolation is used, it can result in an even softer image. Blending also loses half the temporal resolution since two motion fields are combined into one frame
https://en.wikipedia.org/wiki/Deinterlacing

bruno321
20th August 2020, 16:20
I'm back with a similar case, progressive NTSC DVD with blended frames. Here's a snippet (untouched! straight from the DVD :))

https://www.sendspace.com/file/hndq7i

The lines from #871 are not giving good results. I also tried

srestore(mode=-4,omode="pp3")
Tdecimate(0,1,6)

which after a cursory examination seems not to work too bad, but I'd like to know if there's something better that can be done. Thanks!

manono
21st August 2020, 03:23
The lines from #871 are not giving good results.
Odd, isn't it? The source is similar to the previous one but the same settings don't work worth a damn. I find the docs for all the StainlessS filters to be completely unintelligible so I have no idea whether or not there's a setting to adjust the sensitivity. Maybe he'll come along and help with the video. Sorry.

StainlessS
21st August 2020, 15:00
Not suitable for ExBlend, which requires at minimum 3 good frames, two blends, repeated.
Your clip regularly has 3 or 4 blends in a row.

EDIT: Also shows damage comverting to AVI (maybe clean disk)

C:\FLV>("C:\BIN\ffmpeg.exe" -i ""."\snippet.demuxed.m2v.mp4" -vcodec utvideo -ac
odec pcm_s16le ""D:"\snippet.demuxed.m2v.mp4.AVI" )
ffmpeg version r89612 git-3e0de97dd8 Copyright (c) 2000-2017 the FFmpeg develope
rs
built on Dec 28 2017 00:32:52 with gcc 7.2.0 (GCC)
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 8.100 / 58. 8.100
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 7.100 / 7. 7.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
[mpegvideo @ 03e4f580] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegvideo, from '.\snippet.demuxed.m2v.mp4':
Duration: 00:00:43.17, bitrate: 4800 kb/s
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR
8:9 DAR 4:3], Closed Captions, 4800 kb/s, 29.97 fps, 29.97 tbr, 1200k tbn, 59.94
tbc
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> utvideo (native))
Press [q] to stop, [?] for help
Output #0, avi, to 'D:\snippet.demuxed.m2v.mp4.AVI':
Metadata:
ISFT : Lavf58.3.100
Stream #0:0: Video: utvideo (ULY0 / 0x30594C55), yuv420p, 720x480 [SAR 8:9 D
AR 4:3], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
Metadata:
encoder : Lavc58.8.100 utvideo
frame= 349 fps=0.0 q=-0.0 size= 91142kB time=00:00:11.54 bitrate=64672.2kbits
frame= 690 fps=689 q=-0.0 size= 192262kB time=00:00:22.92 bitrate=68708.9kbits
frame= 1045 fps=696 q=-0.0 size= 281606kB time=00:00:34.76 bitrate=66351.5kbits
[mpeg2video @ 0031f140] ac-tex damaged at 15 5
[mpeg2video @ 0031f140] Warning MVs not available
[mpeg2video @ 0031f140] concealing 1125 DC, 1125 AC, 1125 MV errors in P frame
frame= 1294 fps=700 q=-0.0 Lsize= 338181kB time=00:00:43.20 bitrate=64114.5kbit
s/s speed=23.4x
video:338145kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxin
g overhead: 0.010645%

C:\FLV>Pause
Press any key to continue . . .

bruno321
23rd August 2020, 07:37
Thank you both for looking at it. I've no idea what that log you posted demonstrates, StainlessS.

Do you guys have better suggestions than the srestore+decimation lines I posted above?

StainlessS
23rd August 2020, 14:56
The log is saying that the file is damaged, and ffmpeg is trying to conceal/hide the errors in the file during convert lossless to UT_Video AVI.
(so that they are less visible in the new AVI). File is corrupt, maybe dirty DVD.

real.finder
4th September 2020, 12:22
Yes, this build works. Thanks a lot...

can you try this https://www.solidfiles.com/v/MD42MQKzezwP3 ? it's last update for now, I made it since there are issue with older avs/avs+ that fixed today by pinterf

also if you didn't note, I made QTGMC work with old mvtools2 for you months ago, if you has any problems with updates scripts I did you can tell me about them here https://forum.doom9.org/showthread.php?t=174121

AdamCarter
7th October 2020, 07:33
This has probably been thought up.

But the dain app has the ability via AI to interpolate frames from adjacent frames,

Wonder if there was away to detect blended frames and export all frames as pngs with a number and have the blended frame be skipped in number so dain could fill in missing frame with an interpolated frame or have the blended frames marked with an asterisk so i can delete them before running dain app to likewise fill the blended frame with an ai generated interpolated progressive frame.

bruno321
16th October 2020, 17:03
Another one similar to the two ones that I brought up above... but neither srestore nor Exblend (with or without PAL mode activated) are giving good results:

https://fex.net/s/tpytxl3

Is there anything I can do to get rid of those blends?

Metal-HTPC
5th June 2021, 09:01
hello,
I'm having a PAL VHS which runs in NTSC speed but is a NTSC->PAL conversion with field blending.
Am I able to apply a fix blend for both the interlaced and deinterlaced version (I don't have the hq interlaced versions for all clips for some I only have the low resolution ones which appear to be already deinterlaced)
so they could match with my NTSC hard telecined film which I would IVTC with TFM().TDecimate() ?

https://workupload.com/file/nmUpb9S3DD9

I'm also getting a script error with Srestore "expected ')' . In The line 63: avs26=!(VersionNumber() 2.6)

Line 60-65

# ==================================================================================================================================

function Srestore(clip sourceo, float "frate", "omode", float "speed", float "blocks", int "mode", float "thresh", int "cache", clip "dclip")
{
avs26=!(VersionNumber() < 2.6)

Which doesn't make any sense to me since I already use all the required plugins.
thanks in advance for your help

real.finder
5th June 2021, 09:30
make sure you have last update from https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/Srestore.avsi and https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/Zs_RF_Shared.avsi

Metal-HTPC
5th June 2021, 14:08
ok it's working. I tried all the different options of srestore but can't seem to get it to the same frames as the dvd source and that is the interlaced I'm not at the progressive yet. So if anyone wants to check out the samples any help would be greatly appreciated. thanks a lot

rjansen1
23rd August 2021, 11:01
FYI: After installing AVS+ 3.70 Srestore gave an "expected )" error. I found I needed to change the position from which to extract the version number in the AvsPlusVersionNumber function for it to start working again:

function IsAvsPlus()
{
FindStr(VersionString, "AviSynth+") != 0
}

function AvsPlusVersionNumber()
{
# IsAvsPlus ? eval(MidStr(VersionString(),17,4)) : 0

# adjusted search position for new AVS+ 3.70
IsAvsPlus ? eval(MidStr(VersionString(),19,4)) : 0
}

StainlessS
23rd August 2021, 14:43
From recent [maybe latest] Real.Finder Zs_RF_Shared.avsi,

####################
#### some of StainlessS AvsVersion.avsi https://forum.doom9.org/showpost.php?p=1897680&postcount=5103
Function IsAvsNeo() { FindStr(VersionString," Neo")!=0}
Function IsAvsPlus() { FindStr(VersionString,"AviSynth+")!=0||IsAvsNeo}
Function AvsPlusVersionNumber() { V=VersionString Off=(!IsAvsPlus)?0:FindStr(V,"(r") return (Off==0)?0:V.MidStr(Off+2).Value.Int } # Avs+ & Neo, (More than 4 digits, Max 24 bit, ~16M)

I personally ignore the Neo thing now.

malze
6th February 2022, 14:18
I was wandering if there is a 64-bit verison of Srestore plugin or similar plugin of this.

Boulder
6th February 2022, 14:21
real.finder has kept the function up-to-date.

https://forum.doom9.org/showthread.php?t=174121

Tlen
2nd August 2022, 13:31
Hi,
I have a double blended PAL DVD, that is blended on the semi-frame.

My idea was to try to remove the double blending doing a

SeparateFields
srestore

Then a Weave to reunite the deblended semi-frames.

But i'm not able to end up with a pure 50fps de-blended result.

Srestore seems just not kicking in.

Is that workflow possible?

manono
7th August 2022, 02:21
SeparateFields
srestore

Doesn't that by itself give you 23.976fps for a PAL source? If so, then SRestore is 'kicking in'. Why would you want 50fps?

Tlen
7th August 2022, 15:42
Why would you want 50fps?

Honestly, i was looping on the fact that i wanted to maintain the original 25.00 fps,
and srestore wasnt't giving me results (or i was not able to make it function in that way),

but thinking about it, the original frate it's not a strict requirement, so i can try with the 23.976 path too.

Thank you for the reply.

tormento
28th September 2023, 22:52
Perhaps I should have posted here this (https://forum.doom9.org/showthread.php?p=1992102#post1992102).

Long story short: 59.98i to 23.976p, one video badly resized and perhaps telecined, the other simply interlaced.

Can you find some good use for srestore in that case scenario?

fabioseixal
11th October 2023, 03:24
Perhaps I should have posted here this (https://forum.doom9.org/showthread.php?p=1992102#post1992102).

Long story short: 59.98i to 23.976p, one video badly resized and perhaps telecined, the other simply interlaced.

Can you find some good use for srestore in that case scenario?

For the 1st clip, is this (https://mega.nz/file/t2ZWkL5K#pjrCsOxwYbdTZDRSOfYheBRMSjCG_-WpKmG0CQ6WNv4) ok?

I had to resize because I have an old PC...

kedautinh12
11th October 2023, 04:02
It's still dancy text :D

tormento
22nd September 2024, 00:51
I can't sort this (https://www.mediafire.com/file/6950qap3b2lxwjo/2_oav_10.mkv) out.

My next step is to downsize to native (540p I suppose), retaining 444 croma at the end.

My suspect is that I have to resize before applying any kind of deblend/fake deinterlace.

I can't really fix the rainbow/blending/weaving.

Any help is welcome.

Selur
22nd September 2024, 10:10
Maybe ExBlend (https://forum.doom9.org/showthread.php?t=175948) can help a bit.

Trixter
22nd September 2024, 19:28
I can't sort this (https://www.mediafire.com/file/6950qap3b2lxwjo/2_oav_10.mkv) out.

My suspect is that I have to resize before applying any kind of deblend/fake deinterlace.


You generally don't resize before fixing. Resizing is destructive, so you do it last.

Your footage shows some sort of multi-frame blending, like it was the result of a poor PAL to NTSC to inverse-telecine conversion. There are instances of half-frame horizontal blending halfway down the frame, for example. exblend might help, but for the most part this was mangled during conversion, and it's terribly difficult to unscramble eggs.