VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. Took a jab at restoring an old music video again... everything was going good until I hit a roadblock. I do not know how to remedy these three artifacts seen in the pics below.

    1
    Image
    [Attachment 52297 - Click to enlarge]


    2

    Image
    [Attachment 52298 - Click to enlarge]


    3
    Image
    [Attachment 52299 - Click to enlarge]


    And here is my AviSynth script so far:

    Code:
    FFmpegSource2("1.vob")
    tfm(mode=4)
    tdecimate()
    MosquitoNR(strength=16, restore=128, radius=2, threads=0)
    smdegrain()
    Lanczos4Resize(720,540)
    sharpen(.4)
    Quote Quote  
  2. try qtgmc after this:
    qtgmc("slower",inputtype=1,border=true,denoiser="d fttest",edithreads=2)
    or:
    qtgmc("slower",inputtype=1,EZDenoise=3,denoiser="d fttest",TR2=2,ChromaMotion=true, border=true,ChromaNoise=true,DenoiseMC=true,GrainR estore=0.5,edithreads=4)
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  3. Originally Posted by themaster1 View Post
    try qtgmc after this:
    qtgmc("slower",inputtype=1,border=true,denoiser="d fttest",edithreads=2)
    or:
    qtgmc("slower",inputtype=1,EZDenoise=3,denoiser="d fttest",TR2=2,ChromaMotion=true, border=true,ChromaNoise=true,DenoiseMC=true,GrainR estore=0.5,edithreads=4)
    It seems the second one helped slightly for the "breaking (?)" artifact, but otherwise no change.
    Quote Quote  
  4. Your last bet would be frame interpolation: you create a new frame by using 2 adjacents frames. You'll need SvPFlow plugin (and load both dll svpflow1.dll, svpflow2.dll)
    avisource()
    ReplaceFramesSVPFlow(1968,1) # 1st argument: number of image, 2nd: duration

    # script:
    function ReplaceFramesSVPFlow(clip Source, int N, int X)
    {
    # N is number of the 1st frame in Source that needs replacing.
    # X is total number of frames to replace
    #e.g. ReplaceFramesSVPFLow(101, 5) would replace 101,102,103,104,105 , by using 100 and 106 as reference points for SVPFlow interpolation

    start=Source.trim(N-1,-1) #one good frame before, used for interpolation reference point
    end=Source.trim(N+X,-1) #one good frame after, used for interpolation reference point

    start+end
    AssumeFPS(1) #temporarily FPS=1 to use mflowfps

    super=SVSuper("{gpu:1}")
    vectors=SVAnalyse(super, "{}")
    SVSmoothFps(super, vectors, "{rate:{num:"+String(X+1)+", den:1}}", url="www.svp-team.com", mt=1).Subtitle("SVPFlow")

    AssumeFPS(FrameRate(Source)) #return back to normal source framerate for joining
    Trim(1, framecount-1) #trim ends, leaving replacement frames

    Source.trim(0,-N) ++ last ++ Source.trim(N+X+1,0)
    }
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  5. Originally Posted by themaster1 View Post
    Your last bet would be frame interpolation: you create a new frame by using 2 adjacents frames. You'll need SvPFlow plugin (and load both dll svpflow1.dll, svpflow2.dll)
    avisource()
    ReplaceFramesSVPFlow(1968,1) # 1st argument: number of image, 2nd: duration

    # script:
    function ReplaceFramesSVPFlow(clip Source, int N, int X)
    {
    # N is number of the 1st frame in Source that needs replacing.
    # X is total number of frames to replace
    #e.g. ReplaceFramesSVPFLow(101, 5) would replace 101,102,103,104,105 , by using 100 and 106 as reference points for SVPFlow interpolation

    start=Source.trim(N-1,-1) #one good frame before, used for interpolation reference point
    end=Source.trim(N+X,-1) #one good frame after, used for interpolation reference point

    start+end
    AssumeFPS(1) #temporarily FPS=1 to use mflowfps

    super=SVSuper("{gpu:1}")
    vectors=SVAnalyse(super, "{}")
    SVSmoothFps(super, vectors, "{rate:{num:"+String(X+1)+", den:1}}", url="www.svp-team.com", mt=1).Subtitle("SVPFlow")

    AssumeFPS(FrameRate(Source)) #return back to normal source framerate for joining
    Trim(1, framecount-1) #trim ends, leaving replacement frames

    Source.trim(0,-N) ++ last ++ Source.trim(N+X+1,0)
    }
    SVPflow costs money, doesn't it?
    Quote Quote  
  6. Originally Posted by jagabo View Post
    Oh, nevermind that, I have it running now.
    Quote Quote  
  7. Originally Posted by themaster1 View Post
    Your last bet would be frame interpolation: you create a new frame by using 2 adjacents frames. You'll need SvPFlow plugin (and load both dll svpflow1.dll, svpflow2.dll)
    avisource()
    ReplaceFramesSVPFlow(1968,1) # 1st argument: number of image, 2nd: duration

    # script:
    function ReplaceFramesSVPFlow(clip Source, int N, int X)
    {
    # N is number of the 1st frame in Source that needs replacing.
    # X is total number of frames to replace
    #e.g. ReplaceFramesSVPFLow(101, 5) would replace 101,102,103,104,105 , by using 100 and 106 as reference points for SVPFlow interpolation

    start=Source.trim(N-1,-1) #one good frame before, used for interpolation reference point
    end=Source.trim(N+X,-1) #one good frame after, used for interpolation reference point

    start+end
    AssumeFPS(1) #temporarily FPS=1 to use mflowfps

    super=SVSuper("{gpu:1}")
    vectors=SVAnalyse(super, "{}")
    SVSmoothFps(super, vectors, "{rate:{num:"+String(X+1)+", den:1}}", url="www.svp-team.com", mt=1).Subtitle("SVPFlow")

    AssumeFPS(FrameRate(Source)) #return back to normal source framerate for joining
    Trim(1, framecount-1) #trim ends, leaving replacement frames

    Source.trim(0,-N) ++ last ++ Source.trim(N+X+1,0)
    }
    Alright, I have SVPflow up and running but I'm not sure what to change in this script?
    Quote Quote  
  8. only change what's in bold : ReplaceFramesSVPFlow(1968,1)
    here that's an example frame 1968 will be replaced (by an interpolated frame)
    if you want to replace frame 1968 and 1969 >>ReplaceFramesSVPFlow(1968,2)

    etc...
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  9. Originally Posted by themaster1 View Post
    only change what's in bold : ReplaceFramesSVPFlow(1968,1)
    here that's an example frame 1968 will be replaced (by an interpolated frame)
    if you want to replace frame 1968 and 1969 >>ReplaceFramesSVPFlow(1968,2)

    etc...
    Ok, I see how it works. The results actually aren't that good though, the blending is almost worse then what was there before. Also, I have to paste the script for every frame sequence, right? That seems inefficient as these artifacts occur all throughout the video.
    Quote Quote  
  10. Originally Posted by embis2003 View Post

    Also, I have to paste the script for every frame sequence, right?
    No.

    Maybe it would be better if you made available a part of the untouched video that produces one of those artifacts. VOB or M2V. You can cut the M2V using DGIndex (which you should be using anyway, and not FFMPEGSource2).
    Quote Quote  
  11. Originally Posted by embis2003 View Post
    Ok, I see how it works. The results actually aren't that good though, the blending is almost worse then what was there before. Also, I have to paste the script for every frame sequence, right? That seems inefficient as these artifacts occur all throughout the video.
    Just paste this line as many times you want
    ReplaceFramesSVPFlow(number of frame,duration)
    This script is kinda old now, i'm pretty sure there is a better one on doom9
    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  12. Originally Posted by manono View Post
    Originally Posted by embis2003 View Post

    Also, I have to paste the script for every frame sequence, right?
    No.

    Maybe it would be better if you made available a part of the untouched video that produces one of those artifacts. VOB or M2V. You can cut the M2V using DGIndex (which you should be using anyway, and not FFMPEGSource2).
    Oh, okay. I'll get DGIndex and upload a sample soon.
    Quote Quote  
  13. Ok. The sample is attached below.

    Its very short because the rest of the video has some rather lewd sequences in it, but it contains all the artifacts appearing in the screenshots above.
    Image Attached Files
    Quote Quote  
  14. Oops, duplicate post.
    Quote Quote  
  15. To get rid of the blending start with:

    Code:
    QTGMC() # or Yadif(mode=1) or your favorite bob deinterlacer
    SRestore()
    That leaves artifacts like these (especially visible over his shoulders):

    Image
    [Attachment 52334 - Click to enlarge]


    You can blur those away if you can figure out how to isolate them
    Quote Quote  
  16. Originally Posted by jagabo View Post
    To get rid of the blending start with:

    Code:
    QTGMC() # or Yadif(mode=1) or your favorite bob deinterlacer
    SRestore()
    That leaves artifacts like these (especially visible over his shoulders):

    Image
    [Attachment 52334 - Click to enlarge]


    You can blur those away if you can figure out how to isolate them
    Yes! Tried it out seemed to have fixed the blending. Thanks. Only problem is now I get a bouncy or jerky type motion sometimes which fluctuates depending on which field order I assume...

    EDIT: If I use Yadif instead of QTGMC, the jerkiness goes away.. but my golly does Yadif look like trash compared to QTGMC.
    Last edited by embis2003; 12th Mar 2020 at 21:39.
    Quote Quote  
  17. What source filter are you using? For MPG/VOB you should use DgIndex to build an index then open the video via that index file with Mpeg2Source("filename.d2v"). That source filter is very good at handling out-of-order frame requests. QTGMC() in a situation like this is very likely to make out-of-order requests. Mpeg2Source() will automatically set the field order too. But your source is TFF so it wouldn't hurt to put AssumeTFF() right after Mpeg2Source().

    Also, SRestore() can take several/many frames to lock onto the unblended frames. It doesn't work well if you random seek around the video in an editor. But it should work well when you encode the video from start to end.
    Quote Quote  
  18. Originally Posted by jagabo View Post
    What source filter are you using? For MPG/VOB you should use DgIndex to build an index then open the video via that index file with Mpeg2Source("filename.d2v"). That source filter is very good at handling out-of-order frame requests. QTGMC() in a situation like this is very likely to make out-of-order requests. Mpeg2Source() will automatically set the field order too. But your source is TFF so it wouldn't hurt to put AssumeTFF() right after Mpeg2Source().

    Also, SRestore() can take several/many frames to lock onto the unblended frames. It doesn't work well if you random seek around the video in an editor. But it should work well when you encode the video from start to end.
    Ah, yes. That makes since. I rendered out the video and the jerkyness is gone. Great! I guess that only leaves the weird artifact you noticed before. Very strange artifact... mosqutioNR has a slight effect on it but its still very visible...
    Quote Quote  



Similar Threads

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