VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab and copy, convert or make Blu-rays and DVDs! :)
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 44
Thread
  1. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    http://avisynth.org/mediawiki/DeVCR
    http://avisynth.org/mediawiki/Import

    What am I missing here?
    There's nothing to download for DeVCR. I'm guessing it's a function to be imported.
    Am I supposed to take the code there and make something myself?

    It's awesome that these people make programs, filters, plugins, sites dedicated to it all...
    ... but I wanted to grab them sometimes, shake them, and scream "Instructions, mother ******s, instructions!"
    This is worse than many of the PHP scripts I work with.
    Quote Quote  
  2. The function is listed. Those lines define the function.


    function DetectVCRLines(clip c,int threshold)
    {
    spacial_data = GeneralConvolution(ConvertToRGB(c),0,"0 -1 0 0 2 0 0 -1 0")
    bar_data = ConvertToRGB(BilinearResize(spacial_data,16,c.height))
    st_data = Overlay(bar_data,Trim(bar_data,1,0),mode = "subtract")
    st_data2 = Greyscale(Levels(st_data,threshold,10.0,threshold+1,0,255,c oring = false))
    st_data3 = Greyscale(Levels(st_data2,127,10.0,128,0,255,coring = false))
    st_data4 = Overlay(st_data3,st_data3,y = -1, mode = "add")
    return PointResize(st_data4,c.width,c.height)
    }

    function deVCR(clip c,int threshold)
    {
    mybars = DetectVCRLines(c,threshold)
    return Overlay(c,Trim(c,1,0), mask = mybars,greymask = true)
    }

    Either:

    1) You would copy & paste it into your script below your source filter

    or

    2) Copy & paste that into an .avs file in the plugins directory to use the Import() function

    or

    3) Copy & paste that into an .avsi file in the plugins directory to autoload


    (.avs and .avsi files are just notepad text files with the extension renamed to .avs or .avsi from .txt)
    Quote Quote  
  3. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    I guessed that part, but what about

    fixedclip = deVCR(myclip,30)

    What does that number mean? What can or can't be changed?
    Just dropping that into the AVS did almost nothing to the file. Not much of a filter.
    Surely settings can alter how it acts?

    I wanted to see if it could remove magnetic dropouts from degraded VHS tapes.
    Quote Quote  
  4. I've never used this filter, but 30 is the threshold according to the code . "Threshold" is usually a variable in most filters that increasing usually increases the strength (this is counter intuitive for me, because "threshold" to me implies a minimum level to reach before something occurs)

    But you're right the documentation is sparse in this filter Usually it's the other way around - there are pages of documentation that bore you to death


    Usually if a good filter is laying around, people hear about it (not to say that this one is bad, but I haven't even heard of it...)
    Quote Quote  
  5. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Thanks for you help. Much appreciated.

    Originally Posted by poisondeathray View Post
    Usually it's the other way around - there are pages of documentation that bore you to death
    ... that is written using English words, but often doesn't make any sense to non-engineers or non-programmers. It gets worse when the coder is non-English, and you end up with Engrish engineering copy. Making it worst of all is that many times variables and names are completely made up. Or as you've noted (with "threshold"), their use of something doesn't make much sense compared to normal use.

    I've seen people wonder why Avisynth isn't used more. I think it's obvious.
    Quote Quote  
  6. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by lordsmurf View Post
    I've seen people wonder why Avisynth isn't used more. I think it's obvious.
    What the f*** are you up to? Making post after post trashing Avisynth because you can't understand a function after looking at it for 10 seconds?

    DeVCR isn't a part of the distribution. All the core functions at least are described in detail in the included documentation


    The Avisynth Wiki is compiled, like Wikipedia, by volunteers.
    The pages you cite are functions that some user wrote and posted, probably originally on Doom9. And that person or someone else thought it worth cataloguing and created the wiki page. And later someone else might modify it or add some more documentation. Same idea as the User Guides here.

    What does that number mean? What can or can't be changed?
    It says what it is IN THE CODE. It's a threshold. So it determines the sensitivity of detection of the horizontal lines. Since there's only one variable, just experiment with it. Use AvsP and get a slider.

    Go to Doom 9 and ask intelligent questions -- not this petulant whining -- and you'll get help.
    Last edited by AlanHK; 10th Jul 2010 at 10:45.
    Quote Quote  
  7. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by AlanHK View Post
    What the f*** are you up to? .
    What am I up to?
    It's a public criticism of how useless software is when it lacks coherent documentation.

    You obviously don't know how to use it either, given your typical smart-ass response.
    Quote Quote  
  8. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by lordsmurf View Post
    Originally Posted by AlanHK View Post
    What the f*** are you up to? .
    What am I up to?
    It's a public criticism of how useless software is when it lacks coherent documentation.
    Avisynth itself is very well documented.

    What's more, and better, it has an active community you can consult for help.
    If you don't keep spitting in their faces, that is.

    Your "criticism" is equivalent to declaring that "English is an incoherent language because I don't understand this book."


    Originally Posted by lordsmurf View Post
    You obviously don't know how to use it either, given your typical smart-ass response.
    I don't have sources that might need it. If I did, I'd spend the time and try to work it out. And then I might improve the documentation in the wiki.

    Seeing as it only has one parameter, it wouldn't take long.
    Less time than you've spent whining about it, I think.

    From a brief look it detects transient horizontal lines and makes a masked overlay from adjacent frames to attempt to repair them.

    You're missing the whole point of the Avisynth style of editing: a script language that you can use to easily construct, combine, and reuse procedures.

    The native functions are exhaustively documented. It's the huge wealth of user-written functions that you can draw on that you have to take your chances with. Unlike someone trying to explain how to use a GUI to do some complex task, any user can share a script by pasting some text, and it will work the same for everyone; if you are motivated you can work out exactly what it does and why, or even improve on it.
    Last edited by AlanHK; 13th Jul 2010 at 02:44.
    Quote Quote  
  9. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by AlanHK View Post
    Avisynth itself is very well documented.
    Indeed. If only Lordsmurf would take the time to start at the beginning!

    Still, I think LS wants to dislike AVIsynth - he's avoided it for all these years, convinced hardware is better. Maybe it is for him. Some people just don't get on with writing software.

    Cheers,
    David.
    Quote Quote  
  10. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    For the record, I've been using it for somewhere between 7 and 9 years now.

    But no, I don't like it, because many of the filters are NOT well documented.
    And no, I don't use it much, because it can be avoided by using hardware and other software.
    Quote Quote  
  11. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by lordsmurf View Post
    For the record, I've been using it for somewhere between 7 and 9 years now.
    And after nine years you don't know how to use a 10-line script function?

    You're just being intentionally obtuse.
    Quote Quote  
  12. Member
    Join Date
    Jul 2010
    Location
    UK
    Search PM
    Originally Posted by poisondeathray View Post
    I've never used this filter, but 30 is the threshold according to the code . "Threshold" is usually a variable in most filters that increasing usually increases the strength (this is counter intuitive for me, because "threshold" to me implies a minimum level to reach before something occurs)
    It appears to work the other way round (the intuitive way) in this filter. Moving the threshold to zero increases the effect, moving it to 255 reduces it. On the sample avi I'm using, from a VHS source which has a large number of thin speckly dropouts, there is some worthwhile reduction when using very low threshold values (5 or less - zero is best).

    However... since the filter is using replacement pixels from the next frame, you can get a smearing effect if there's motion in that part of the frame. Also, even with the threshold on the highest setting, objects in motion can acquire a slight blur when the filter is active - use AvspMod to toggle the filter to see this effect. For these reasons, I decided not to use it for my current project.
    Last edited by Baldrick; 8th Aug 2010 at 06:24. Reason: just testing
    Quote Quote  
  13. Member pirej's Avatar
    Join Date
    Mar 2008
    Location
    Macedonia
    Search Comp PM
    Hi, i did some experiments with devcr today, and.. i kind of like it
    I'm still(over a year) trying to find the best way to fix some ugly vhs video, and from time to time i come back to it.. trying something new.
    Today i did this, i used devcr 3 times in a row with
    Code:
    fixedclip = deVCR(myclip,0)
    and although "resizing the clip to 16 pixels wide is more than enough" .. i used 32pixels resizing
    And then used videofred's script for 8mm film restoring( mvdegrainmulti with 6 reframes and denoising_strenght=600 etc)
    I like what devcr does, and maybe 3 times is to much but... it removes more of the lines than when used 1 time..
    Image Attached Thumbnails Click image for larger version

Name:	before.after frm.1614.jpg
Views:	954
Size:	455.3 KB
ID:	3275  

    Quote Quote  
  14. I would call that a definite improvement pirej . Your "noise band" is fairly thick , so there isn't much salvagable information in that area, and if I'm not mistaken, the filter works spatially, not temporally .

    Is that screenshot representative of the repair you're getting (with different frames? )

    Did you try tweaking the settings for DeVCR to see if you could get some different results ?
    Quote Quote  
  15. Member pirej's Avatar
    Join Date
    Mar 2008
    Location
    Macedonia
    Search Comp PM
    Yes , the improvement is constant, some frames are even more improved.
    Actually.. im not familiar with "spatially/ temporally things" so i dont have the answer , i allways do it by some mine logic and testing(a lot).
    What would(could) you tweak in devcr?? Is it the Grayscale levels or what?
    Here is another frame that is REALY "damaged".. and the restored(in the same order) one.
    Image Attached Thumbnails Click image for larger version

Name:	frame488.jpg
Views:	475
Size:	115.4 KB
ID:	3277  

    Quote Quote  
  16. spatial filter means its just looking within the same frame

    temporal filter means it looks at forward/backward frames for information ; many of the filters in video fred's script work temporally

    I don't know what you could tweak in deVCR, I never used it before ... I was just asking to learn

    IMO, it's videofred's script that's is doing the "heavy lifting" here, deVCR is only making a minor difference . For example, what does that last screenshot look like without deVCR (only videofred's filters) ?
    Quote Quote  
  17. Member pirej's Avatar
    Join Date
    Mar 2008
    Location
    Macedonia
    Search Comp PM
    Well according to http://avisynth.org/mediawiki/DeVCR dvcr is temporal filter, it compares the pixels of the current with the next frame.
    I did another test to see for my self, and to give you the answer... and this is the same frame, the same filtering, just WITHOUT devcr.
    So.. devcr does it's thing, its not just the videofred's script.
    Image Attached Thumbnails Click image for larger version

Name:	without devcr.jpg
Views:	498
Size:	110.9 KB
ID:	3278  

    Quote Quote  
  18. Yes, I see that now it works temporally, I should have read the info page myself, but was too lazy...and going by my bad memory. Lodovico even mentioned it above

    That's interesting. They seem to work much nicer together than apart, a synergistic effect

    Thanks for sharing the results . Maybe you can come up with even better combination soon , or tweak the threshold settings ?

    EDIT: nevermind, Lodovico said "0" was the strongest, and you are using "0"
    Last edited by poisondeathray; 28th Aug 2010 at 19:39.
    Quote Quote  
  19. Member pirej's Avatar
    Join Date
    Mar 2008
    Location
    Macedonia
    Search Comp PM
    Yes they work nice together, it's like devcr gives more useful data for mvdegrainmulti to work on, at least on in this video.
    So far.. this is probably the best combination of filters for my video, maybe some tweaking/raplacing on the rest of the filter's is needed, so i'll have to try again, and again....
    I hope that my example of the effect of devcr will help someone, and maybe someone who is more experienced could make devcr use more than 1(next) frame for replacing the pixels.
    Quote Quote  
  20. Member
    Join Date
    Jul 2010
    Location
    UK
    Search PM
    DeSpot is also worth trying: http://avisynth.org.ru/despot/despot.html

    I found it worked at least as well as DeVCR for my particular noise problem (thin speckly horizontal lines) and with no undesirable side effects - at least, none that I couldn't tune out with some tweakage in AvspMod.

    Not sure how well it would work on a thick band of noise like in pirej's examples, though.
    Quote Quote  
  21. Member pirej's Avatar
    Join Date
    Mar 2008
    Location
    Macedonia
    Search Comp PM
    Thanks Lodovico, im doing a test(right now) encoding with the same setup/same short clip, but using despot instead of devcr.
    How did you setup despot??
    I use(with separated fields)
    Code:
    DeSpot(interlaced=false,p1=20,p2=12,pwidth=768,pheight=576,mthres=80,merode=33,sign=0,show=0,seg=0,color=true,motpn=true)
    Quote Quote  
  22. Member
    Join Date
    Jul 2010
    Location
    UK
    Search PM
    I used DeSpot(p1=41, p2=13, mthres=16, pwidth=23, pheight=3, p1percent=10)

    There are so many available parameters it's a filter that needs to be adjusted carefully for each problem (unlike DeVCR). There's a Doom9 guide with some advice here: http://www.doom9.org/index.html?/capture/descratch.html

    As I mentioned, AvspMod is very useful for this filter, as you can set up sliders for each parameter you want to experiment with.
    Quote Quote  
  23. Member pirej's Avatar
    Join Date
    Mar 2008
    Location
    Macedonia
    Search Comp PM
    Ok, so the encoding is done, and... its almost the same result with bout of them.
    In some of the frames devcr wins, an in some.. despot does, probably despot is (really)little more effective in doing that, but in the same time it kind of softens the picture, and the video gets little.. weave-ish (im not strong with the english).
    So.. maybe some tweaking is necessary.. by the way, i did a lot of testing today to come to this settings for despot.
    Here is comparison screen shot of with bout of them.
    p.s. i use Avsp all the time, never tried AvspMode.
    edit:
    Thanks for the guide, i have never read it.
    I tried using despot the way you use it, and it does almost nothing to my video, or maybe nothing at all, are you shore it did you any good using it like this?
    Image Attached Thumbnails Click image for larger version

Name:	frame488devcr.despot.jpg
Views:	577
Size:	372.5 KB
ID:	3301  

    Last edited by pirej; 29th Aug 2010 at 18:47.
    Quote Quote  
  24. Member
    Join Date
    Jul 2010
    Location
    UK
    Search PM
    Originally Posted by pirej View Post
    I tried using despot the way you use it, and it does almost nothing to my video, or maybe nothing at all, are you shore it did you any good using it like this?
    Yes, but my noise problem was very different from yours, like a thin spray of white specks and streaks across the frame. I found it quite easy to get DeSpot to recognise and remove that noise; the main difficulty was preventing it from interfering with the rest of the image.

    I'm surprised DeSpot did so well with your example. Thanks for posting these tests.
    Quote Quote  
  25. Member pirej's Avatar
    Join Date
    Mar 2008
    Location
    Macedonia
    Search Comp PM
    Well my ""HQ"" video needed big dogs, with big teeth to fight with
    Anyway thanks for the idea, now i'm thinking of using devcr & despot together, and then filter as needed.
    By for now, i'm going to bed, its 01.17 AM here.
    Quote Quote  
  26. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Originally Posted by pirej View Post
    Today i did this, i used devcr 3 times in a row and although "resizing the clip to 16 pixels wide is more than enough" .. i used 32pixels resizing
    And then used videofred's script for 8mm film restoring( mvdegrainmulti with 6 reframes and denoising_strenght=600 etc)
    I like what devcr does, and maybe 3 times is to much but... it removes more of the lines than when used 1 time..
    What exactly do you mean by 3 times in a row? Maybe you can post your script?
    I have a tape with line going through most of it (pixelated, sometimes with dropout), probably like Lodivico's problem. Tried DeScratch but didn't seem to do anything. Tried DeVCR and also didn't do much, but I probably need to experiment (and maybe try DeSpot)..
    Quote Quote  
  27. Member pirej's Avatar
    Join Date
    Mar 2008
    Location
    Macedonia
    Search Comp PM
    I meant something like..
    Code:
    myclip = AVISource("C:\test.avi")
    fixedclip = deVCR(myclip,0)
    
    myclip2=fixedclip
    fixedclipB = deVCR(myclip2,0)
    
    myclip3=fixedclipB
    fixedclip3 = deVCR(myclip3,0)
    I'm not shore if it's a correct way of using it, but..
    Quote Quote  
  28. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Thanks. Previewing it in AvsP shows some improvement. There's artifacts when things are in the motion, I guess from the interlaced fields. Did you have a problem with that?
    Quote Quote  
  29. Member pirej's Avatar
    Join Date
    Mar 2008
    Location
    Macedonia
    Search Comp PM
    Everything was fine with that short part of my video, no artifact's, BUT on other parts of the video (with more motion) artifact's appear.
    So.. this is not the solution for me, its good only for some part's of the video.
    I'm looking for something different, but nothing effective so far.
    Quote Quote  
  30. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    I'd like to specify just part of the screen so the rest wouldn't be affected.
    Quote Quote  



Similar Threads