Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th June 2005, 13:44   #1  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
another restore function

Bad telecined sources with blended fields seems to be normal in my country. The possible solutions for this problems are really rare. For example tdeint(mode=1, tryweave=true) with unblend and a decimater or the the great but really complex function restore24.
That's why I have written the function srestore (18.11.2009).
You can download the necessary plugin, Masktools v2 (latest version), here.

For more informations please read the readme or take a look at the wiki.
I hope this is a helpful function. Nice tryout.

Last edited by MOmonster; 16th December 2009 at 10:03.
MOmonster is offline   Reply With Quote
Old 23rd June 2005, 09:04   #2  |  Link
yaz
n00b ever
 
Join Date: May 2002
Posts: 627
Quote:
Originally Posted by MOmonster
No posts....? It seems that nobody need such a function. Hmm.
sorry for my late reaction but my spare time is very limited. i tackle with a very bad source for a long time (see here ) yesterday i found some time to give your function a go and i must say i was amazed. your script has given me far the best result so far. it cleared most of the banding and most of that funky ghosting.
would it be possible somehow that u have a look at on that dvd. it's not my plain selfish i bet u will find some more ideas how to improve your script further.

i noticed u dropped further versions of cdeint but i had no time to test that, but sure i will.

some questions :
- if i get it right the noise parameter (nlv) is very important but the way u suggsted prompts nlv=20 which i find too high. so, i tried nlv=0-20 stepwise but, amof, i couldn't have seen any difference. how's it possible ?
- what if i get nlv too high or too low ?
- i compared the 'cdeint'ed stream to the 'tfm'ed one but i found (almost) no difference. why this two step process ? isn't cdeint enough alone ?

pretty good job, man! pls, go on ! if u need a tester (and a propagator ) just call me !

thx
y
yaz is offline   Reply With Quote
Old 23rd June 2005, 11:07   #3  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
hehe... lack of replies does not equal lack of interest i haven't had much use for a deblender of late because i tend to do more in the direction of creating the problem than solving it

i think i could probaly use it on some old telecined (the peculiarblend method) footage in the coming few weeks. apart from that my sources are all clean, just waiting for me to blend them.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 23rd June 2005, 11:14   #4  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Quote:
Originally Posted by Mug Funky
because i tend to do more in the direction of creating the problem than solving it
What a traitor you are
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 23rd June 2005, 11:53   #5  |  Link
yaz
n00b ever
 
Join Date: May 2002
Posts: 627
@mug funky
hah ... now i know whom to bless for this masterpiece. (would u, pls, drop your address)
yaz is offline   Reply With Quote
Old 23rd June 2005, 15:58   #6  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@yaz
Nice to read some replies. The new version works a lot better on bad quality sources. The bmode is really helpful for it. Yes the nlv parameter should be used to tweak the blend detection, but this parameter is only helpful for static noise, for example from analoge materials or DV-sources. Useful values are between 0 and 4, anything higher effects the opposite. So it´s not a useful parameter for dvd-sources, keep it 0. (really 20, and you took a scene without any motion?)
In your thread you wrote, that your source looks strange also after using separatefields. Maybe this is a yv12 problem. Use converttoyuv2(interlaced = true) before the deinterlacing. Does this help. If not maybe you can send me just 5mb (a motion scene with problems). You can uploud it for example this way.
http://rapidshare.de

If you use Cdeint alone, please use the modified Version. You would lost some clean frames if you do it with the other version. The combination with tfm, first is faster than using it alone, but the more important advantage is the matching process, because Cdeint itself can´t weave the fields. So for maximum resolution use it this way or the modified version with tdeint(mode=1, tryweave=true) (much slower). Cdeint just choose the right frames of the inputed bobbed source, not more.

Last edited by MOmonster; 25th July 2005 at 23:34.
MOmonster is offline   Reply With Quote
Old 24th June 2005, 09:06   #7  |  Link
yaz
n00b ever
 
Join Date: May 2002
Posts: 627
@momonster
sorry but i didn't go further. maybe on the weekend
Quote:
Originally Posted by MOmonster
The new version works a lot better on bad quality sources. The bmode is really helpful for it.
when u say 'new' what version do u mean ? 'cdeintmod' or the silent mod of the 1st version ? nevermind. i will try all
Quote:
Originally Posted by MOmonster
Useful values are between 0 and 4, anything higher effects the opposite. So it´s not a useful parameter for dvd-sources, keep it 0. (really 20, and you took a scene without any motion?)
maybe i was dumbass but instead of scrolling thru the movie chasing for 'real' static scenes i just checked a 'plain black' part having 15-20 frames. however, the very high value seems to be realistic as the noise (a kinda vibration) is clearly visible. now i'm musing about to make a lowpass filtering before 'deblending' as this way i loose too much 'clear' frames.
Quote:
Originally Posted by MOmonster
In your thread you wrote, that your source looks strange also after using separatefields. Maybe this is a yv12 problem.
maybe or maybe not. i'm sure this dvd was prepared by people being as incompetent as just can. like me
Quote:
Originally Posted by MOmonster
... maybe you can send me just 5mb (a motion scene with problems)
ok. i try to do sg. would someone suggest a reliable vob cutter, i've never used such stuffs before.

anyway, isn't a dvd rent there around. it'd worth to have a thorough look on that source.

thx
y
yaz is offline   Reply With Quote
Old 24th June 2005, 10:37   #8  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@yaz
I mean both versions. I also updated the first. The modifield version just have some more conditions, that it can be used as standalone function.
You can use mpegtools from tmpgenc for example to demux the m2v videostream from the vob and then use cutterman to cut the videostream.

Last edited by MOmonster; 24th June 2005 at 11:34.
MOmonster is offline   Reply With Quote
Old 24th June 2005, 11:48   #9  |  Link
yaz
n00b ever
 
Join Date: May 2002
Posts: 627
thx, but i think i can do it in a way w/dgdecode. however, u must wait till the next week (i'm banned again at my 'private ip'; 'limit exceeding, use of undue authority, aso aso'; what a bad guy i am). in the meantime, i hope, i can make some further experiments. i'm about it.
thx
y
yaz is offline   Reply With Quote
Old 24th June 2005, 13:22   #10  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
MoMonster, I didn't test your unblender due te lacking time

So I have one question: how does it handle the Starship Voyager Intro video?
Is it able to deblend the nebula scene without jerkyness?
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 24th June 2005, 14:04   #11  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
I gave it a quick try on CDeintMod yesterday. Seems to work pretty good, overall.

While the blend removal was quite successful (perhaps even better than R24 - I didn't count the misses for both), it produced yet too much skipped frames on scenes where motion happens only in small areas.

Though I don't get fully get the mechanism behind it, the function shows good potential for sure. Good work, Momonster!

Note: Work on R24 resumed
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 24th June 2005, 18:05   #12  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
I work on a better condition function for Cdeintmod, that should save more clean frames, but ofcourse it would never save the clear frames as good as restore24, because it just take the bobbed input and choose one of two frames to output. That mean that the bobber you choose give two frames for one original frame. My function just try to find out what is the blend and give back the clear field. For my sources, everytime when tfm is not able to find a match it´s because a blend, that´s why this simple way works that way (till now smoother and better than the mod version, but there will be further tweaking).
The mod version I created to save more clear fields. So it looks to some more conditions, but there is still some work necessary.
@Didee
Ok, I try to explain short, how the blenddetection work.
The condition is that the blend is the product of the two clear fields around. The blenddetection use a smart bobbed clip, this makes the test easier. I found out, if the blendlevel (the level, the clear fields around are merged together) is 50%, the differences between the blending to the field before and the field after are nearly the same. If the blendlevel is 20%, the difference to the field after is smaller than the difference to the field before.
And this seems logical. So my function try to create the blend with the both differences to the clear fields around. Then it compares the created blend with the original field. If they match, we know, this is a blend.
To make this process more accurate, the function compares the result of the first blendtest with the results of the next blendtest.
I also tried to make it more accurate by using the total difference, but it only slows down things a little bit, and don´t really help, the lumadifference seems to work quite well. In your restore24 thread I posted my first basic function, maybe this is easier to understand.
If there are more questions, just ask me.
@scharfis_brain
If you could upload a small part of the intro, I could work a little bit with that source to tweak my function.

Last edited by MOmonster; 24th June 2005 at 19:10.
MOmonster is offline   Reply With Quote
Old 27th June 2005, 09:46   #13  |  Link
yaz
n00b ever
 
Join Date: May 2002
Posts: 627
@momonster (and other gurus interesting)
i've uploaded two short examples. link and comments are here. sorry for crosslinking but i think the files belong there even if we discuss the problems here (hopefully). and i don't want to crosspost.

@momonster
'man proposes God disposes' ... of course, i had time far less than i expected but i'd made some further short tests w/the modded versions. i must confess, i found no difference betw them. however, the results were amazing. most of the blended frames were recovered or cleared significantly. what remained is that strange ghosting i outlined in the other thread.
further, i felt as if i had lost 'too much' clear frames while decoming was defective on frames where it'd been needed only on small regions. however, i haven't checked these more throughly but, imho, they are not 'fatal', so, i could live w/them happy.

a short question. you, and other gurus too, recommend to restore fps24 ? why do u think it's beneficial ? i see that wout some decimation the stream gets jerky but i want to keep fps25. any ide how to do so ? (other than fps25 is hella jerky on a pal tv)

thx a lot
y
yaz is offline   Reply With Quote
Old 27th June 2005, 09:55   #14  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
field-blends use up buttloads of bitrate and require bobbing on playback... that's the main reason to restore the non-blended source. also if you plan on standards-converting it a second time and don't want to have blurry crap as an output.

if you have bitrate to spare, you can easily encode an interlaced xvid and play back with on-the-fly bobbing. it's quite a good solution for anime, where there's lots of static scenes.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 27th June 2005, 17:12   #15  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@yaz
Ok, I dowloaded your clips. What a strange conversation, a soft picture, but no analoge noise and not to heavy artefacts. I´ll take a closer look, if I have a little bit more time.
Why decimating to 24fps?
In most cases the original has 24fps and than converted with strange conversations like temporal fieldshifting fielddoubling and of course fieldblending to 25 or 29,976fps. You see it shouln´t be 24fps, but 23,976fps. Sometimes the original has only 17fps and one time I have a source, that was already speed upped to 25fps before the strange conversation. So we can´t say that it is general right to decimate the clip to 24fps. So you have to decide, if the 25fps output looks already smooth enough for you, there is no need to decimate. If the 24fps decimated clip have a smoother motion for you, than you can decimate and than speed up the source to 25fps, that you have your pal standard.

As I said before the modded version works not so good till now. I already have another condition function for Cdeintmod. It works better than now and with the right settings already better than the silent Cdeint with tfm. I will update the function, if I have a little bit more time, till now it´s recommed to use the non modded version.

I also think about another modified version that is not only able to use one of two, but is able to use one of three frames to save more clear fields, but I have no such strange sources. We´ll see, what brings us the future.

Last edited by MOmonster; 27th June 2005 at 17:43.
MOmonster is offline   Reply With Quote
Old 28th June 2005, 08:32   #16  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
@all
Once more, I updated the functions. The bmode 2 no longer needs the unfilter and the functions have a better handling. The modded version no longer has the nlv value, but a very important motion level value (please read the updated text at the beginning).
I added a new configurable parameter to tweak the blend detection, but in general I wouldn´t touch this parameter, called "hv". This parameter is used for the internal calculation ot the blendtest. Useful values are between 0.6 and 1,4. Normally, higher values help to find the blendings better, so for the silent Cdeint you can use for example 1.0 (default is 0.9). For A clean, sharp (not oversharpened) source set smaller parameter. For worse sources use higher values. If you see that there are blends with factore under 20% are left the default value is maybe to less. For the modded version this value should be set more accurate (default is 0.8), because of the updated internal condition function, it have to recognize really clear.

@yaz
Like you can see it, because of the posts in your thread, I also see no way to restore this nicely. Now I know why my function works better for your source (because of the many blends that stays together). But won´t help you much. If we just take all the clear fields the source look not so bad, a little bit soft, but no strange artefacts because of the compression. It looks like a bad conversation from Pal to Ntsc and another bad conversation back to Pal or somthing like this.
The big probleme, that some clear fields between two blends are totally missed. So to get not a to strange motion, we have to took one of the blends. Ok some blends left won´t be the probleme I think, but the strange dark stripes, we can see in every blend. This looks to bad. I don´t think that you get better results than using Cdeint with tfm (or to save some more clear fields the new modded version, but this won´t make the difference) on it.
Maybe sharfis_brain or Didee know what to do against this strange artefacts, but killing more blends won´t be good for the motion. Only theoretical it is possible to restore this missing clear fields by adding the two blends together and than substract the blend of the two clear fields around. If we exactly know the blendlevel, it is possible to restore also this cases. But sorry this is just to rare and the function really to complex and would only work with really good compressed material, so I think I won´t try something like this in near future. Maybe it is the best to buy the ntsc version. I don´t believe that it will also be that bad.

Last edited by MOmonster; 25th July 2005 at 23:45.
MOmonster is offline   Reply With Quote
Old 28th June 2005, 09:17   #17  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
Screenshot of those "dark stripes", please (can't get yaz' samples, currently) ?

Some time ago, scharfis_brain had a source with something he called "negative blending", and this here sounds similar.
For scharfi's sample, I fiddled a spatio-temporal repair function that seemed to work sufficiently. Perhaps it can be applied on yaz' source, too.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 28th June 2005, 12:51   #18  |  Link
yaz
n00b ever
 
Join Date: May 2002
Posts: 627
Quote:
Originally Posted by Didée
Screenshot of those "dark stripes", please
here you are
Quote:
Originally Posted by Didée
(can't get yaz' samples, currently) ?
naah ... what to say ...
thx
y
yaz is offline   Reply With Quote
Old 28th June 2005, 13:34   #19  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
I know the strong limitations of this server. I uploaded the clip on another server. Download it here:
http://www.megaupload.com/?d=22K8DY2Z
MOmonster is offline   Reply With Quote
Old 29th June 2005, 03:39   #20  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
When I click on the link it takes to megaupload.com. What to do next to get the image?
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Reply

Tags
mrestore, srestore

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.