VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Page 8 of 11
FirstFirst ... 6 7 8 9 10 ... LastLast
Results 211 to 240 of 318
Thread
  1. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by poisondeathray View Post
    You don't need AE for this approach, any decent NLE can do basic compositing with keyframed masks (vegas, premiere). You can do it in Blender for free as well, but there is a bit of a learning curve. . . .
    Good NLE's are beyond my wallet, but I could look around at the likes of Blender. I spied an older Premiere for 32-bit XP, but forums reported it was pirateware with activation issues (shucks). Offered to pay my nephew for a student version, he wouldn't go for it (shucks). Then there's the worldwide conspiracy to keep me from working on videos (shucks). I should consult an analyst about this nonpaying job, because I can't quit.

    Luckily (? I use the term loosely) none of the credits involve fades. Even if they did, fades are so messy on this video I overlay them with my own in AviSynth or VDub, always as a last step. As for titles on backgrounds...

    Name:  credits.jpg
Views: 654
Size:  17.8 KB

    Several minutes of both rolling and static credits. They don't "jump" as much here, but you can see that they stumble on themselves vertically. This kinda stuff just dares me to fix it anyway. Thank you for all this info.

    Originally Posted by poisondeathray View Post
    TTempSmooth seems to work much better on the titles than vdub's temporal smoother
    I'll take you up on TTempSmooth. I'm in the, uh, final tweak process (how do you "tweak" a disaster?), it'll come in handy. Still have a copy on my hard drive from a while ago, back when I would never have attempted to work on anything like The Capture From Hell.
    Quote Quote  
  2. Originally Posted by poisondeathray View Post
    Also for the "simmering blob" , I noticed the black level was a tad high - there is a bit of room to bring it down and that would disguise the "blob" a bit better as well
    I thought that too.
    Quote Quote  
  3. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by jagabo View Post
    You might try a stronger temporal filter on the darker areas. Something like:
    . . .
    Thanks, jagabo. Yes, I tried that earlier on the area at the right, then cropped it and overlayed it onto the main clip in AviSynth. It helped visibly, but I'll try your script. Seems stronger than my re-try. The problem with the overlay was its border being a bit obvious. But I'll try to tweak the overlay somehow. Thanks again.

    I have a feeling those blobs will keep bugging me until I rework that whole group of shots from scratch. There goes another weekend.
    Quote Quote  
  4. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by poisondeathray View Post
    Also for the "simmering blob" , I noticed the black level was a tad high - there is a bit of room to bring it down and that would disguise the "blob" a bit better as well
    I thought that too.
    Problem: The background in the image is darker than the original, but it's a continuous scene where the singer moves in and out of view of an even darker background with significant details that are plot elements. It's hard to say what the original brightness levels could have been (I don't even know what the colors are supposed to be, I'm just guessing from other scenes). I'll play with some of the lower midtones and blacks some more.
    Last edited by sanlyn; 26th Jun 2011 at 20:04.
    Quote Quote  
  5. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    (Little Bits Of Some Of) Least-Worst Moments in Act 2 - Scene 1

    F1A_Act2_Sc1_original.mpg
    Herewith, short clips from 3 smaller nightmares on Diskette #2. These are MPEG direct copies from the crappy DVD, no processing. (a) Scene 1 fade-in. Noise typical for Diskette 2. Color gets better later. Damage gets worse. (b) 90 seconds later, the baroness sings away. I keep calling her The Countess. She's a baroness. Europeans, forgive me. I'll try to keep it straight. (c) 34 minutes later, Scene 2 end and fade-out.
    Free download. (NTSC MPEG2 352x480, Layer2 Audio (no left channel), 22-secs, 10 MB)
    http://dc357.4shared.com/download/Nv4WYJ8Y/F1A_Act2_Sc1_original.mpg

    F1B_Act2_Sc1_Early_Efforts.mpg
    Same shots, after initial chubbyrain2/Tweak/ColorYUV/NeatVideo, and clean the top and right borders. (a) Fade-in is oversaturated here on purpose to show the left-hand blue stain I harp about. Free software won't fix this. Lower blue, raise Red and Green, and there's little or no detail underneath. Complicated by a blue floodlight offstage left. (b) The baroness before further color work. The low-density image has faded below the noise level. The more color you get, the more noise. (c) Scene-1 fade-out, after initial denoising. Instead of simmering blobs I get dancing blobs.
    NTSC MPEG2 352x480, Layer2 Audio, 21-secs, 10 MB
    http://dc364.4shared.com/download/f4EGFzio/F1B_Act2_Sc1_Early_Efforts.mpg

    F1C_Act2_Sc1_ToDate.mpg
    Same scenes, but frames might not match exactly because I altered the fade-in and fade-out in AviSynth. After more denoise (some FFT3D, CNR2, light NeatVideo, and whatnot), and guessing at colors. Guess I'll have to live with stains across the top 1/3 and these results, but (b) I'm dissatisfied with the Baroness. I keep changing her shots. . .I finally figured why she looks weird: besides damage and corrupt color, I oversharpened. Live and learn. Reworking her 3 minutes now. (c) Used BadFrames at fade-out, but I might redo these last seconds with motion interp. There goes another weekend.
    NTSC MPEG2 352x480, Layer2 Audio, 20-secs, 9.3 MB
    http://dc383.4shared.com/download/XEzom4t5/F1C_Act2_Sc1_ToDate.mpg
    Last edited by sanlyn; 26th Jun 2011 at 14:02.
    Quote Quote  
  6. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Off Topic: I see a couple of eBay listings for AE (Windows only) for $300 USD under MSRP. ...Hmm... I have an old 'puter and good hardware going unused, all I need is a mobo, AMD chip, RAM, and Win7 (many combo offers go cheap on Newegg).

    Hmm.
    Quote Quote  
  7. Do you still have a nephew in school?

    People can say all they want about greedy "Adobe corporate moneybags", but there are incredible academic discounts available for Adobe products . They are often 70-80% off. (They are identical in functionality to the retail versions). You can get the Production Premium Suite for ~$450-550 (that includes AE, Photoshop, Illustrator, Premiere, Encore, Audition, AME, a few others.)
    Quote Quote  
  8. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Poison, thanks for the word. I'd never use all those apps. I have Photoshop, and alas the nephew moved on. I've built dozens of PC's, but I haven't tried all that hard to get a premium NLE like AE: I just don't have sources that look as bad as TCFH. But at the asking price and with my hardware, that cuts the cost of AE + PC to less than half.

    Well, shucks, back to fixing these first and last minutes of the two diskettes. If not for those few minutes, I'd have finished this months ago. I have 8 days to make up my mind on advanced stuff. You're discerning and knowledgeable, so I'd have confidence in anything you recommend. You already have me digging into AviSynth again. You sure know how to plant seeds in my head . . .
    Last edited by sanlyn; 26th Jun 2011 at 20:06.
    Quote Quote  
  9. Originally Posted by sanlyn View Post
    .. but I haven't tried all that hard to get a premium NLE like AE..
    Just to clarify, After Effects is a compositing effects program, and Premiere Pro is a NLE for editing - they have different primary functions. You can do editing in AE, but it's way easier in PP. You can do simple keyframed masks, track mattes and some effects in PP, but it's way easier in AE.
    Quote Quote  
  10. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I've been browsing PDF and FAQs for both products. No problem with edits. It's garbage like this opera that has me ruminating overtime about something like of AE. Twirling dissolves, sparkles, etc., not for me, but I could sure use masking, layers, motion tracking.

    Ahem. Back to work.
    Quote Quote  
  11. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Nice work , this is a marathon . I especially like what you've done with the screwed up colors so far



    RE: "simmering blobs"
    Not sure mvtools is suitable for this sort of thing. It calculates motion vectors, but how would that be useful here , even when used for with other functions?

    The artifact is definitely more perceptible on more brightly calibrated setups, and it doesn't look that bad if you consider the original source quality LOL



    Already tried motion interp, it made a mess of it, very blurry. Note that the motion in this piece is really quick anyway, the original and the "fixed" look pretty much alike but without the "flash". There are other scenes that are far, far worse, but nothing to be done about them; they are 100% noise, with nothing to "interpolate" for a dozen frames or more. Will just have to let those go as-is. The only flashes worth working with are the 1-frame or 2-frame problems. When they hit 140 frames (like the one climactic boo-boo near the very end), it's just no use.
    IMO, it does a better job (less blurry) than a blend, if you apply it on fields. In the grand scheme of things, this is a very low motion scene, so mvtools should have no problems with it. (e.g Compare to a race car video, now that's what I would call high motion, where there is a large difference between frames or fields). In the original video, only the top field is damaged, the lower field isn't; but in the "fixed" video, since you replaced it with a blend, both top and bottom fields have to be replaced.

    You're right in that it's useless for long stretches. Only single bad frames or fields that have surrounding "good" frames or fields might be improved effectively
    Forgive me, poisondeathray, but I just spent hours trying to go back to some motion-interp script I got from Doom9, that I referred to above, but haven't found it anywhere. I'm trying to rework some of these BadFrames sequences with mvtools and separating fields. I got blurs with motion interp, but I must have done something wrong (which is why I don't like copying scripts without knowing what the script is doing). How did you manage to isolate that particular frame? OR did mvtools just "see" this field as it went along and cleaned up the flash?
    Quote Quote  
  12. Originally Posted by sanlyn View Post
    Forgive me, poisondeathray, but I just spent hours trying to go back to some motion-interp script I got from Doom9, that I referred to above, but haven't found it anywhere. I'm trying to rework some of these BadFrames sequences with mvtools and separating fields. I got blurs with motion interp, but I must have done something wrong (which is why I don't like copying scripts without knowing what the script is doing). How did you manage to isolate that particular frame? OR did mvtools just "see" this field as it went along and cleaned up the flash?

    You can use the same syntax in 2BDecided's example, but you have to would apply it on fields, so this means grouping even and odd fields, then applying they filter, while they are in grouped even and odd fields. Then you interleave and weave to put it back into interlaced. This is the general concept to use any filter that doesn't have an interlaced mode

    So the general syntax for any filter (that doesn't have an interlaced switch) applied to an interlaced source:

    SourceFilter()
    SeparateFields()
    f1=SelectEven().FilterStack1
    f2=SelectOdd().FilterStack1
    Interleave(f1,f2)
    Weave()


    I'm still looking for a wrapper function for mflowinter that accepts a .txt file that automatically replaces the fields or frames in that list... but no go. The closest thing I could find (instead of typing that clunky example of mflowinter and trim statements for every field - which I had been doing) was to use the "RecoverOneFrame" function in this post from Pirej, with changes from Gavino
    https://forum.videohelp.com/threads/308840-old-VHS-restoration/page3


    I relabelled it "R" in this example, so if you had a list of bad fields to replace it would be easier. If I wanted to replace 34, 64, 96, it would just be like this instead of that clunky mflowinter and various trims
    .
    .
    .
    R(34)
    R(64)
    R(96)
    .
    .
    .

    Important to note, when done this way the numbering refers to their relationship in grouped even and odd fields, not separated field numbering, not frame numbering


    This was the script used on "D_A01a9_newframe.mpg" . Since the bad field had been replaced by a blended frame in this version, both field pairs had to be replaced. If you look in the original sample, only the top field had to be replaced.

    Code:
     
    MPEG2Source("D_A01a9_newframe.d2v")
    o=last
     
    even=o.assumetff.separatefields.selecteven
    odd=o.assumetff.separatefields.selectodd
     
    ##Even Fields Processing
     
    even
    Super_Even = even.msuper()
    bv1 = manalyse(Super_Even, isb=true, delta=2)
    fv1 = manalyse(Super_Even, isb=false, delta=2)
    global  CandidatesForN = mflowinter(Super_Even, bv1, fv1, time=33.3, ml=100)
    global  CandidatesForO = mflowinter(Super_Even, bv1, fv1, time=66.7, ml=100)
    global   CandidatesForC = mflowinter(Super_Even, bv1, fv1, time=50.0, ml=100)
    even
    R(135)
    filtered_even=last
     
     
     
    ##Odd Fields Processing
     
    odd
    Super_Odd = odd.msuper()
    bv1 = manalyse(Super_Odd, isb=true, delta=2)
    fv1 = manalyse(Super_Odd, isb=false, delta=2)
    global  CandidatesForN = mflowinter(Super_Odd, bv1, fv1, time=33.3, ml=100)
    global  CandidatesForO = mflowinter(Super_Odd, bv1, fv1, time=66.7, ml=100)
    global   CandidatesForC = mflowinter(Super_Odd, bv1, fv1, time=50.0, ml=100)
    odd
    R(135)
    filtered_odd=last
     
    interleave(filtered_even, filtered_odd)
    weave
     
     
    function RP(clip Source, int N)
    {
     # N is number of the first frame in Source that needs replacing. 
     # Frames N and N+1(O) will be replaced.
     
     Source.trim(0,N-1) ++ CandidatesForN.trim(N-1,-1) \
        ++ CandidatesForO.trim(N-1,-1) ++ Source.trim(N+2,0)
    }
    function R(clip Source, int N)
    {
     # N is number of the frame in Source that needs replacing. 
     # Frame N  will be replaced.
     
     Source.trim(0,N-1) ++ CandidatesForC.trim(N-1,-1) ++ Source.trim(N+1,0)
    }

    Note, I forgot to add Gavino' s change in the function above, it doesn't work for frame #1
    Also your functions won't work for the case N=1.
    You need to replace Source.Trim(0, N-1) by Source.Trim(0, -N).
    https://forum.videohelp.com/threads/308840-old-VHS-restoration?p=2077991&viewfull=1#post2077991
    Quote Quote  
  13. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Yep. I should have thought about that FilterStack business.

    Originally Posted by poisondeathray View Post
    Important to note, when done this way the numbering refers to their relationship in grouped even and odd fields, not separated field numbering, not frame numbering
    Tricky. I recall a script using "fr" counters for frames, f's for fields. Lordy, I thought when I retired from programming I'd never see another counter.

    I know many scripts/plugins for rebuilding frames won't work on frame 0 or last frame. Makes sense. On frame 0 there's no "before", on last frame there's no "after". The logic I was trying to figure is how to group fields from frames, but I see how it can be done.

    Sorry, I just realized you didn't really isolate that bad frame earlier, you just showed fields. Shoulda remembered seeing that myself. Coffee time again? I'm running out of Keurig K-Cups!

    This will take a while. Going to Canada with the mrs in 2 days. Too bad the PC won't fit in the car (she wouldn't let me work on this anyway), but I can load scripts into the laptop.

    Been playing with MCTemporalDenoise all morning. Tracing thru error messages is getting tiresome. It'll run sooner or later, or I'll just try separate parts and see what I get. The opera's opening minutes are such a mess! Also trying something you did with FFT3D a couple of days ago in another thread.

    Thank you, poisondeathray. This did much to clear a path. I did some heavy C, PL/1, high-octane VB, but I'm still getting used to some AviSynth usage. Whatever happened to my retirement?
    Last edited by sanlyn; 28th Jun 2011 at 11:33.
    Quote Quote  
  14. LOL I don't blame you for taking a vacation from trying to fix this! Enjoy the trip .
    Quote Quote  
  15. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by poisondeathray View Post
    LOL I don't blame you for taking a vacation from trying to fix this! Enjoy the trip .
    It's the wife's idea. I'd just stay here and keep trying. She says I'm crazy. She's right.
    Quote Quote  
  16. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Note, I forgot to add Gavino' s change in the function above, it doesn't work for frame #1
    The other correction I pointed out is also required if you are going to use function RP (which replaces two consecutive bad frames). You need to add
    Code:
    bv = manalyse(Super_Even, isb=true, delta=3)
    fv = manalyse(Super_Even, isb=false, delta=3)
    in the 'even' section, and
    Code:
    bv = manalyse(Super_Odd, isb=true, delta=3)
    fv = manalyse(Super_Odd, isb=false, delta=3)
    in the 'odd' section and use bv and fv instead of bv1 and fv1 in the settings of CandidatesForN and CandidatesForO in both sections.

    Originally Posted by sanlyn View Post
    I know many scripts/plugins for rebuilding frames won't work on frame 0 or last frame. Makes sense. On frame 0 there's no "before", on last frame there's no "after".
    That's right. Sometimes the process makes no sense for the first or last frame, but often it's just because the script writer or programmer has failed to take into account the special case processing required to make it work.

    Here the problem was actually with frame=1, which is the second frame (Avisynth numbers from 0), and is because of the special treatment of 0 in the Trim function. To get the first frame, you cannot use Trim(0, 0), because the second 0 means 'end of clip', so you have to use Trim(0,-1). Unless forewarned, it's easy to overlook this when using Trim in a general function with the frame number as a parameter. This classic Doom9 post by stickboy should be required reading for all budding Avisynth function writers:
    Caveats of using trim in functions
    Quote Quote  
  17. Thanks gavino .

    How would it be possible to clean it up for a generic function? Something somebody could just download as an avsi or import as an .avs function. Maybe a fixed version could be uploaded to the avisynth mediawiki? (I don't know who the original author is either) . What would be super cool is to have a function that accepts a list of field or frames for replacement, although this way is still faster than the mflowinter documentation example

    I probably shouldn't have included that "RP" or "recover frame pair" at all. I find 2 consecutive bad frames (or fields) are never replaced properly with these functions, even on ideal low motion footage
    Quote Quote  
  18. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Gavino, poisondeathray: I'm paying very close attention!

    Meanwhile . . . (A Bit Of) The Very Worst Of Act 3

    Wouldn't you know it. The worst crap on this capture, at the final Magic Moment. Mignon rises on the stage, the lights go down around the scene, and some big amber floodlights (heavenly light, I guess) go crazy center-stage. Then the whopper. 500 frames of doodoo. I don't even know why I bothered.

    Image of the last good frame before damage: The bright lights have just come up. The tape's owner managed to fry highlights and crush darks. I know it's supposed to be high contrast lighting, but this is murder. The 'scope from ColorTools shows colors climbing over (and under) the walls.
    Click image for larger version

Name:	originals.jpg
Views:	262
Size:	80.9 KB
ID:	7610

    Lower it in YUV, RGB, try to help the blacks. Doesn't matter. The highlights are g-o-n-e. Horrible, even for VHS.
    Click image for larger version

Name:	lowereds.jpg
Views:	260
Size:	78.5 KB
ID:	7611

    Starting with the very next frame, somebody turns on the proverbial fan. 3 of the next 204 frames. Altogether it goes on for 500 frames.
    Click image for larger version

Name:	breaks.jpg
Views:	473
Size:	35.3 KB
ID:	7612

    G1_End_original.mpg
    Sorry for the file size. This clip is the last 47 disappointing seconds from the unprocessed original DVD. The worst of all possible times for damage. NO LEFT CHANNEL AUDIO. NTSC MPEG 352x480, Layer-2, 47-secs, 16-MB
    http://dc376.4shared.com/download/2Z9CBNYS/G1_End_original.mpg

    G2_End_Today.mpg
    I rescued 5 decent frames from this sequence, made short clips in AviSynth, then joined with dissolves. Biggest problem was getting the saved frames to look like the "good" ones in level and color, and then getting audio to sync. Made 7 versions of the dissolves with various software, they all looked exactly alike (This was with TMPGEnc MPEG Editor v3). From start to finish, the sequence used 10 separate clips. The dissolve to white was a separate clip dissolved between 2 others. I also tried a plain white RGB-215 graphic, but that would be cheating, n'est-ce pas? This off-white is from the original; I never did get rid of the stains. A slightly lower bitrate than the final. NTSC MPEG 352x480, Layer-2, 44-secs, 22.3-MB
    http://dc376.4shared.com/download/2Z9CBNYS/G1_End_original.mpg

    I think I'll just leave the ending as-is. There are still other problems, and I wanna carefully track what Gavino and poisondeathray are doing.
    Last edited by sanlyn; 28th Jun 2011 at 17:44. Reason: url correction
    Quote Quote  
  19. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Know what? I'll bet the dissolve looks clunky because those 5 short clips might not be interlaced properly from AVI to MPEG.
    Quote Quote  
  20. You'll probably hate me for this, but there are about 30-40 frames in the first bad sequence of the "G1_End_original.mpg" using mflowinter or related functions if you bob, apply it on frames (not fields) , then reinterlace

    Do this exercise:

    Mpeg2Source()
    AssumeTFF()
    Bob()

    And step through the video. Those sections that alternate good-bad-good-bad .... can be repaired fairly well, since this is such a low motion sequence.

    Similarly , the section before the white out final ending where there are distortions in the faces and dropouts, the defects only occur in the lower field. In the bobbed example, you can see it too (ie.. good-bad-good-bad). There's probably > 100 frames that can be salvaged there (including those dropouts) . It does work fairly well, I tested it out with the function listed above doing the same thing, but just modified for progressive frames.

    It will look something like this, where every 2nd frame is specified

    .
    .
    .
    R(859)
    R(861)
    R(863)
    .
    .
    .


    The reason why this approach on frames (not fields) will work for this part of the video is the position of the defects w.r.t top and bottom fields. The defects in those sequences occur on the same grouping (ie. just odd or just even). So that's why interploating on grouped even and odd fields won't work for this section, because you'd be interpolating from a bad field, propogating that defect. The reason why you can't just use separatefields() before interploating, is fields are positionally offset. You cannot interpolate from translocated data - the motion vectors will be off and you get blurry image. When you use separatefields() and step through, you notice the picture goes up & down. That's what bobbing fixes.

    When you bob the video you alterate top, bottom, top, bottom, fields; essentially each field is bicubic resized into a full frame and positioned properly. You don't want to use a temporal bobber here, QTGMC will give worse results because it will mix in the defects from the "bad" fields (temporal is bad in this case) . Once it's "fixed" you can reinterlace it

    There is a long section with bad-bad-bad-bad (ie. VERY bad). That can't be helped with mvtools
    Last edited by poisondeathray; 28th Jun 2011 at 18:23.
    Quote Quote  
  21. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    I'll work on your idea, poiisondeathray. <sigh> Duty calls, I gotta repair a customer's PC tonight, will be working late. I'll be at the grindstone tomorrow.

    Looks as if I'll still be fixing this in the rest home.
    Quote Quote  
  22. Here is a quick proof of concept for one of the sections

    You can open it up in vdub and go frame by frame. You will see the interpolated frames look ok, especially given the source quality. The motion is fine (e.g hand movement looks natural, dude walking looks ok) . The usual problems you usually want to look for motion interpolated frames are errors around edges of objects. It looks like edge morphing. But since this is such a low motion sample, and you have 2 adjacent "good" frames to interpolate from for each "bad" frame, the interpolation works ok

    It's pretty quick to do for long sections where every 2nd frame is replaced, you can copy & paste from an excel spreadsheet into an .avs because it will auto fill the numbers if you drag the column , and it will fill in the "R" and brackets in other columns when you drag to fill. I did 669-1289 in this example and it literally took less than a minute in excel and to copy & paste into the .avs . (that's over 300 frames replaced for this section)

    Then I added depan and stab to stabilize the frame. I think that's a better starting point . Presumably you've saved your scripts , filters or program presets for noise and color , so it wouldn't be too much work
    Image Attached Files
    Quote Quote  
  23. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by poisondeathray View Post
    How would it be possible to clean it up for a generic function? Something somebody could just download as an avsi or import as an .avs function. Maybe a fixed version could be uploaded to the avisynth mediawiki? (I don't know who the original author is either) . What would be super cool is to have a function that accepts a list of field or frames for replacement, although this way is still faster than the mflowinter documentation example
    If we restrict ourselves to replacing single frames (as you said replacing two consecutive ones rarely works well), it can be done fairly simply making use of ReplaceFramesSimple (from stickboy's RemapFrames plugin).
    Code:
    function FixBadFrames(clip c, string frames) {
    # Replace each frame from a list of 'bad' frames by using MFlowInter to interpolate
    # between the nearest pair of 'good' frames
      c
      sup = MSuper()
      bv = MAnalyse(sup, isb=true, delta=2)
      fv = MAnalyse(sup, isb=false, delta=2)
      candidates = MFlowInter(sup, bv, fv, time=50.0, ml=100).DuplicateFrame(0)
      ReplaceFramesSimple(candidates, mappings=frames)
    }
    The list of frames to be replaced must be supplied as a string, eg
    FixBadFrames("34 64 96")

    To work with fields, separate into odd and even and apply the function to each branch as you described earlier.
    Since ReplaceFramesSimple also accepts the list of frames from a file, the function could optionally be extended to do this too.
    Quote Quote  
  24. Nice! Thanks Gavino
    Quote Quote  
  25. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Just got back from a PC repair, and my client wants me to fix 2 more tomorrow (it's a few bucks closer to that pricey Adobe stuff). I just looked over the last few posts. Juicy. I'm flabbergasted that you've contributed all this good info. You folks are really determined to keep me busy.
    Quote Quote  
  26. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Presumably you've saved your scripts , filters or program presets for noise and color , so it wouldn't be too much work
    Always. Already burned a 50-disc spool of DVD's storing old work on this monster, and an extra 320-GB drive half full of AVI's.

    I'm working on these very illuminating ideas now. Will take a couple of days, I have 2 PC clients later today. These occasional jobs keep my PayPal account going for video gear. Again, I can't thank you and the other contributors enough. Will post some results as soon as I can.
    Quote Quote  
  27. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Here is a quick proof of concept for one of the sections . . .

    Attached Files
    I finally sneaked in some time today to download and watch the avi. Amazing work, poisondeathray. (Gosh, it'll only take me a mere week to do that!). Can't do much with the busted frames preceding these, but from the dissolves I used I can "cut in" to the clip earlier than before.
    Quote Quote  
  28. The section before the very bad section can be treated fairly well (409-486) with that method, but not every 2nd frame is bad, so you have to pick & choose and modify it a bit for the double bad frames, even replace the double bad frames with dupes or blends. I think you can still salvage them all.

    But the long section from (487-652) is composed of ALL bad frames, either completely wrecked or black/white. There is no good information to interpolate from .

    One way you might be able to treat that long bad section in AE is to rotoscope sections like a face, a hand, the dude moving in front, etc... - so you would take the last good frame, and the first good frame that are on the ends of the bad section as references , basically your goal is to go from point A to point B within that 165 bad frame span. Then you would animate the roto'ed objects maybe with something like the puppet pin tool. You don't need to do every frame, because there is keyframe interpolation

    One way you can complement this or speed it up is to generate "intermediate keyframes" using mvtools or related functions/filters . e.g. You would take that A, B point and generate a middle point using interpolation. Then do it again, and repeat. So what you are basically doing is generating middle points for each iteration, and "halving" the distance. The problem is the distance between the frames is so great that the interpolation won't be as good as if from a true neighboring frame. It's might be possible to tweak the settings for a "cleaner" interpolation - I haven't looked into it. I included a zip file that has the "A" point, the "B" point and the interpolated middle frame using default settings - you can see it's noticably blurrier and can see the edge morphing that I talked about earlier. Each interation after that will be even worse, because you are using that as new reference
    Image Attached Files
    Quote Quote  
  29. The "automatic" method might work ok... considering that sequence of frames are severely damaged in the first place, you don't really "lose" anything

    It's actually not as bad as I thought, because each interation doubles, so 2, 4, 8, 16, 32, 64, 128... So what I did was use Interleave() with BlankClip(), and each iteration, blankclip framecount doubles. Interleave alternates 2 clips, so the idea is to put a black frame between each "good" frame, so you can use mvtools to replace that black frame with interpolated frame. Since every 2nd frame is replaced, you can use the same excel trick and copy & paste, so it really only takes a few minutes. So starting from those 2 good "bookends", you generate 166 "in between" frames . I bet Gavino could write a super sexy iterative function that does this automatically, but the copy & paste method isn't too bad.

    256 is too many "in between" frames, but 128 is too few. So I used TDecimate(mode=2 , rate=167) to attempt to decimate semi-evenly spaced frames. So those will replace 487-652, or the "bad bad section". I suppose you can use mvtools again to generate more inbetween frames to get perfect cadence, but this should be ok for smoothness. In fact it's TOO smooth.

    So this sample clip represents 400-1291 . There are some interpolation errors, but IMO those artifacts are minor compared to the completely damaged frames. The main problem with that big long stretch, is it seems to be slower timing compared to the sections around. I don't know what the timing of the audio or the clip is, but every "bad frame" in that stretch was replaced. So maybe there were actually too many superfluous bad frames in that sequence. For example , maybe you only need 1/2 the frames for example, and fix the audio to match
    Image Attached Files
    Quote Quote  
  30. I'm still here, silently listening and paying too much attention to this interesting lesson about video restoration.

    Poisondeathray, man, what you did with 400-1291.xvidq3.avi is amazing! I could say, it's indeed a miracle! I never knew it could be done with that so damaged piece of video. Congrats!
    Thank you.
    Quote Quote  



Similar Threads