VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. I'm experimenting with restoring an old film from the 30s to some extent which was apparently "lost". The only version I can find looks to have had a terrible transfer. It's been badly encoded to 29.97p, where it seems every other frame was duplicated. Once that's been rectified I'm left with a 20p source that's been badly blended. 3 out of 5 frames seem to be blended, plus It's been deinterlaced as well to compound the issue.

    I'm not great with Avisynth but I've been experimenting. I've had some mild success with an old plugin called RestoreFPS, but the documentation is lacking and as it didn't seem massively popular, so finding examples is hard. Is there another deblend plugin that might be able to attempt to split the blended frames into separate frames?

    Code:
    LWLibavVideoSource("\\nas\Restoration\source\sample.avi", cache=false, prefer_hw=2)
    
    # remove duplicate frames
    tfm(display=false)  
    tdecimate(display=false,mode=0,cycleR=2,cycle=6)
    
    
    # remove blending
    
    function phase(clip c, float phi){
    c
    RestoreFPS(25, phi)
    }
    
    Animate(0,100,"phase",0.0,0.3)
    There also appears to be some missing frames, but those are another issue. Any advice on trying to unblend some of the frames would be really helpful.

    Here's a sample:

    https://mega.nz/file/VKZEzByS#ArscTqzWEU1M_CkQkYeGYOn6b6sQIvU6pSdgYDqLn-M

    Worst blending in sample:

    Image
    [Attachment 60387 - Click to enlarge]


    After Restore FPS:

    Image
    [Attachment 60389 - Click to enlarge]
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Not from my own experience, just from reading many other threads ... you may want to read about SRestore which has been recommended several times.
    Quote Quote  
  3. I've attempted srestore but as far as I can work out, srestore will not actually restore frames from blended frames. At least from my testing.

    Unless you can point me at an example? I cannot find one that achieves this. It seems to do the inverse (restore 29.97 to 25, not recreate 25 to 29.97 for example).

    ExBlend seems like it might do what I need, but I'm not sure it can work out which frames are blended from my source. It seems to ignore the worst of them.
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Perhaps you should post a 15 second clip here to the thread for analysis
    Quote Quote  
  5. Originally Posted by davexnet View Post
    Perhaps you should post a 15 second clip here to the thread for analysis
    There’s a sample in the original post (mega link)

    https://mega.nz/file/VKZEzByS#ArscTqzWEU1M_CkQkYeGYOn6b6sQIvU6pSdgYDqLn-M
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by domb84 View Post
    Originally Posted by davexnet View Post
    Perhaps you should post a 15 second clip here to the thread for analysis
    There’s a sample in the original post (mega link)

    https://mega.nz/file/VKZEzByS#ArscTqzWEU1M_CkQkYeGYOn6b6sQIvU6pSdgYDqLn-M

    Is that Will Hay? Which movie is it?

    No need to use mega.nz for these short clips, better to upload them here directly to the thread
    Quote Quote  
  7. None of the usual blend reducers will work with this video. You need a custom script:

    Code:
    AviSource("sample.avi") 
    Trim(1,0)
    
    unblendbefore = Overlay(last, Loop(2,0,0), mode="Subtract", opacity=0.25).ColorYUV(gain_y=85)
    unblendafter = Overlay(last, Trim(1,0), mode="Subtract", opacity=0.25).ColorYUV(gain_y=85)
    
    ConditionalFilter(last, unblendbefore.Subtitle("before"), last, "(current_frame-1)%6")
    ConditionalFilter(last, unblendafter.Subtitle("after"), last, "(current_frame-3)%6")
    SelectEvery(6, 0,2,4,5)
    
    Interframe(cores=4, FrameDouble=true) # generated a motion interpolated frame between each frame
    SelectEvery(8,0,2,4,6,7) # pick only the interpolated frame we need, #7)
    The basic idea is to subtract a portion of the previous frame or next frame to remove the blending. Then brighten the frame to restore the original levels. Unblendbefore is a clip of every frame with the previous frame partially subtracted, unblendafter is a clip of all frames with the next frame partially subtracted. ConditionalFilter is used to substitute those unblended frames where necessary. SelectEvery is used to remove a duplicate and redundant blended frame in the remain groups of six. Then Interframe and SelectEvery are used to add a motion interpolated frame in place of the missing frame. Unfortuantely, Interframe, like all motion interpolating frame rate converters, introduces some distortions and blending. Use another if you like.

    This works pretty well up until about frame 100 (output frame number) where there's a break in the pattern -- probably because of the difference between the script's 24.975 output rate rather than 25 fps. You'll have to work in sections and adapt the code for each section.
    Image Attached Files
    Quote Quote  
  8. Yes it’s Will Hay, Where’s that Fire. I just used ffmpeg, to copy 12 seconds or so of video. I didn’t even specify audio and haven’t listened too it as it’s not relevant this stage.


    That script is great much appreciated, I’ll take a look at that. I believe UnBlend can do something similar using overrides as well so I’m sure I can produce something workable using both. I just need an example to get started and yours is really helpful @jagabo
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Did you look at this 25 fps Youtube version ?
    https://www.youtube.com/watch?v=vDraFl_IpqM

    NO blends or stutter there
    Quote Quote  
  10. Originally Posted by davexnet View Post
    Did you look at this 25 fps Youtube version ?
    https://www.youtube.com/watch?v=vDraFl_IpqM

    NO blends or stutter there
    I thought I had pulled that one already to be honest and it was the same, but you're right that is a better source potentially.
    Quote Quote  
  11. Originally Posted by domb84 View Post
    Originally Posted by davexnet View Post
    Did you look at this 25 fps Youtube version ?
    https://www.youtube.com/watch?v=vDraFl_IpqM

    NO blends or stutter there
    I thought I had pulled that one already to be honest and it was the same, but you're right that is a better source potentially.
    That is much cleaner though it may have a little less detail in places. You might even be able to get the uploader to provide his source which should be even better.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!