VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 43
Thread
  1. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    I would like suggestions to repair this video and apply the correct filters to try to improve it

    Sample:
    Image Attached Files
    Quote Quote  
  2. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Can I remove these stripes from the video?
    Image Attached Thumbnails Click image for larger version

Name:	Sample-1986 Supercross Bercy.mp4_snapshot.jpg
Views:	100
Size:	49.5 KB
ID:	46479  

    Quote Quote  
  3. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Aggressive temporal NR and aggressive chroma NR would severely reduce it.
    But the clip also suffers from block noise, mosquito noise, and deinterlace artifacts.

    It was just a crappy transfer from a rotten non-quality VCR. Probably nth gen, copy of copy, each using lousy VCR along the way.

    It can never be 100% removed, but it can be severely reduced.

    CCD and Dyn MMX NR in VirtualDub improved it some.
    But KNLmeansCL may be even better.
    With help of poison here at VH, I (re)wrote a script that did great with worse source:
    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 1)
    AVISource("c:\.avi") 
    ConvertToYV16(interlaced=true)
    
    orig=last
    ev=orig.assumetff().separatefields().selecteven()
    od=orig.assumetff().separatefields().selectodd()
    
    ev
    ue_chroma = UToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=1, a=2, h=6, device_type = "GPU", device_id = 0, channels="Y")
    ve_chroma = VToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=1, a=2, h=6, device_type = "GPU", device_id = 0, channels="Y")
    YToUV(ue_chroma, ve_chroma)
    MergeLuma(ev)
    ev_filtered=last
    
    od
    uo_chroma = UToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=1, a=2, h=6, device_type = "GPU", device_id = 0, channels="Y")
    vo_chroma = VToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=1, a=2, h=6, device_type = "GPU", device_id = 0, channels="Y")
    YToUV(uo_chroma, vo_chroma)
    MergeLuma(od)
    od_filtered=last
    
    interleave(ev_filtered,od_filtered)
    assumefieldbased().assumetff().weave()
    
    Prefetch(6)
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS
    Quote Quote  
  4. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by lordsmurf View Post
    Aggressive temporal NR and aggressive chroma NR would severely reduce it.
    But the clip also suffers from block noise, mosquito noise, and deinterlace artifacts.

    It was just a crappy transfer from a rotten non-quality VCR. Probably nth gen, copy of copy, each using lousy VCR along the way.

    It can never be 100% removed, but it can be severely reduced.

    CCD and Dyn MMX NR in VirtualDub improved it some.
    But KNLmeansCL may be even better.
    With help of poison here at VH, I (re)wrote a script that did great with worse source:
    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 1)
    AVISource("c:\.avi") 
    ConvertToYV16(interlaced=true)
    
    orig=last
    ev=orig.assumetff().separatefields().selecteven()
    od=orig.assumetff().separatefields().selectodd()
    
    ev
    ue_chroma = UToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=1, a=2, h=6, device_type = "GPU", device_id = 0, channels="Y")
    ve_chroma = VToY(ev).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=1, a=2, h=6, device_type = "GPU", device_id = 0, channels="Y")
    YToUV(ue_chroma, ve_chroma)
    MergeLuma(ev)
    ev_filtered=last
    
    od
    uo_chroma = UToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=1, a=2, h=6, device_type = "GPU", device_id = 0, channels="Y")
    vo_chroma = VToY(od).blur(0,1.5).binomialblur(5).ttempsmooth(maxr=6,lthresh=150, strength=6).KNLMeansCL(d=1, a=2, h=6, device_type = "GPU", device_id = 0, channels="Y")
    YToUV(uo_chroma, vo_chroma)
    MergeLuma(od)
    od_filtered=last
    
    interleave(ev_filtered,od_filtered)
    assumefieldbased().assumetff().weave()
    
    Prefetch(6)

    Ohh... thank you very much!
    But I get error on KNLMeansCL, i download it but get error...no named function...
    Quote Quote  
  5. I don't have a supported GPU so I can't use KNLMeansCL. Another option with TNLMeans:
    Code:
    LSmashVideoSource("Sample-1986 Supercross Bercy.mp4") 
    Spline36Resize(width/2, height)
    MergeChroma(RemoveDirtMC(100).TNLMeans(ax=4, ay=4, az=4, h=6).aWarpSharp(depth=20))
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    SmoothTweak(saturation=1.3)
    Santiag()
    aWarpSharp(depth=5)
    Sharpen(0.3,0.0)
    nnedi3_rpow2(2, cshift="SPline36Resize", fwidth=width*2, fheight=height)
    In the end it's a little better but I don't think it's worth the time and effort. Sample attached.
    Image Attached Files
    Last edited by jagabo; 15th Aug 2018 at 00:13.
    Quote Quote  
  6. The big problems I saw was the disappearance of certain colors (mostly in the red end of the spectrum) for one frame at a time. If I were to devise a script for this, it would look something like this:

    1. Separate luma and chroma layers.
    2. Average chroma over two frames. Possibly use motion estimation to get better alignment.
    3. Recombine averaged chroma with original luma.

    You could then apply noise reduction to deal with the normal bad video artifacts that you have.
    Quote Quote  
  7. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by lordsmurf View Post
    Aggressive temporal NR and aggressive chroma NR would severely reduce it.
    But the clip also suffers from block noise, mosquito noise, and deinterlace artifacts.

    It was just a crappy transfer from a rotten non-quality VCR. Probably nth gen, copy of copy, each using lousy VCR along the way.

    It can never be 100% removed, but it can be severely reduced.

    CCD and Dyn MMX NR in VirtualDub improved it some.
    But KNLmeansCL may be even better.
    With help of poison here at VH, I (re)wrote a script that did great with worse source:
    I would really like to see how this works, I'm getting error in KNLMeansCL, would you like to put a sample of this result? Thank you!
    Quote Quote  
  8. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    I don't have a supported GPU so I can't use KNLMeansCL. Another option with TNLMeans:
    Code:
    LSmashVideoSource("Sample-1986 Supercross Bercy.mp4") 
    Spline36Resize(width/2, height)
    MergeChroma(RemoveDirtMC(100).TNLMeans(ax=4, ay=4, az=4, h=6).aWarpSharp(depth=20))
    TemporalDegrain(SAD1=100, SAD2=75, sigma=4)
    SmoothTweak(saturation=1.3)
    Santiag()
    aWarpSharp(depth=5)
    Sharpen(0.3,0.0)
    nnedi3_rpow2(2, cshift="SPline36Resize", fwidth=width*2, fheight=height)
    In the end it's a little better but I don't think it's worth the time and effort. Sample attached.
    This is looking very good Master, heavy routine, around 1 hour to encode 1 minute on my pc (Wtf!), would you risk any more filter like QTGMC or Mctemporal?
    Quote Quote  
  9. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by johnmeyer View Post
    The big problems I saw was the disappearance of certain colors (mostly in the red end of the spectrum) for one frame at a time. If I were to devise a script for this, it would look something like this:

    1. Separate luma and chroma layers.
    2. Average chroma over two frames. Possibly use motion estimation to get better alignment.
    3. Recombine averaged chroma with original luma.

    You could then apply noise reduction to deal with the normal bad video artifacts that you have.
    Sim, eu gostaria de ter mais cores nesse video...
    Mas como?
    Quote Quote  
  10. If you're looking for more noise reduction increase the TemporalDegrain() settings rather than adding more temporal denoising filters.
    Quote Quote  
  11. Image
    [Attachment 46483 - Click to enlarge]


    MergeChroma(TemporalMedian(2))

    That's it.
    Quote Quote  
  12. Originally Posted by Chief Mouse View Post
    Image
    [Attachment 46483 - Click to enlarge]


    MergeChroma(TemporalMedian(2))

    That's it.
    That causes a loss of color on fast moving objects. Of course, MergeChroma(RemoveDirtMC()) may do that too, just less often.
    Quote Quote  
  13. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    I was really happy with the solutions posted here, thank all very much!

    I would like to catch the opportunity of the topic to see if there is a solution for this:

    1-How to correct this aspect ratio, I know the original VHS video was PAL 25fps 720x576 but was converted and cut wrong for NTSC 720x480 29fps ....
    (1-Sample-1999 MX 125.mpg)

    2-There are jumps in the frames, wrong framerate? what is this anomaly?
    (2-Sample-1992 Bercy SX.avi)
    Image Attached Files
    Quote Quote  
  14. Some of the jerkiness comes about because someone converted 25 fps pal to 29.97 fps ntsc by duplicating frames. You can remove those with:

    Code:
    Mpeg2Source("1-Sample-1999 MX 125.d2v", CPU2="ooooxx", Info=3) 
    TDecimate(Cycle=6, CycleR=1)
    QTGMC()
    Some of the jerkiness is just from a bad capture where several frames were dropped.

    As for the aspect ratio, There isn't any good reference within the clip but it appears that someone took a 720x576 PAL frame and cropped 96 lines off the bottom to give a 720x480 NTSC frame. It that's the case it has a PAL ITU SAR of 12:11. So resizing the frame to 786x480 (786 ~= 720 * 12 / 11) and cropping the black borders may give you the right display aspect ratio for a square pixel encoding.
    Last edited by jagabo; 18th Aug 2018 at 20:12. Reason: fixed typo, 11 -> 12
    Quote Quote  
  15. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    Some of the jerkiness comes about because someone converted 25 fps pal to 29.97 fps ntsc by duplicating frames. You can remove those with:

    Code:
    Mpeg2Source("1-Sample-1999 MX 125.d2v", CPU2="ooooxx", Info=3) 
    TDecimate(Cycle=6, CycleR=1)
    QTGMC()
    Are you referring to video 2?

    This: 2-Sample-1992 Bercy SX.avi
    ?
    Quote Quote  
  16. The script was for the indicated file. The later comment about some of the jerkiness was more generally about both clips.
    Quote Quote  
  17. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post

    As for the aspect ratio, There isn't any good reference within the clip but it appears that someone took a 720x576 PAL frame and cropped 96 lines off the bottom to give a 720x480 NTSC frame. It that's the case it has a PAL ITU SAR of 12:11. So resizing the frame to 786x480 (786 ~= 720 * 11 / 11) and cropping the black borders may give you the right display aspect ratio for a square pixel encoding.
    For you to have a reference the aspect near the correct would be something around 16:10
    No matter if I stick with black bars, I wanted to reduce the flattened side a bit...
    Image Attached Thumbnails Click image for larger version

Name:	1-Sample-1999 MX 125a.png
Views:	92
Size:	753.4 KB
ID:	46522  

    Click image for larger version

Name:	1-Sample-1999 MX 125b.png
Views:	88
Size:	803.5 KB
ID:	46523  

    Quote Quote  
  18. When I said there was no reference I mean there was nothing in the video with a definitive shape to analyze. Like something that is known to be a perfect square, a perfect circle, etc. I believe my analysis of the aspect ratio is probably correct. Or at least very close.
    Quote Quote  
  19. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    When I said there was no reference I mean there was nothing in the video with a definitive shape to analyze. Like something that is known to be a perfect square, a perfect circle, etc. I believe my analysis of the aspect ratio is probably correct. Or at least very close.
    Yes really yes,
    I misunderstood some things, but I'm too lay to know how to define these proportions, how do I do that?

    Sorry my " jerkiness" master, hehe
    Quote Quote  
  20. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    I obtain this on hanbrake:
    Picture 720x480 (keep aspect ratio:none)
    Anamorphic: none
    Modulus:16


    Aspect Result: 3:2
    Image Attached Files
    Quote Quote  
  21. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Is Correct 3:2 to "1-Sample-1999 MX 125.mpg" ?
    Quote Quote  
  22. Originally Posted by Caiosouza View Post
    Is Correct 3:2 to "1-Sample-1999 MX 125.mpg" ?
    No. The correct display aspect ratio after removing black borders appears to be about 1.6:1.

    Find a shot with a wheel is viewed directly from the side (ie parallel to the axle), as large as possible. A perspective something like this:

    Click image for larger version

Name:	perspective.jpg
Views:	502
Size:	42.3 KB
ID:	46526


    Then check the width and height of the wheel. When the display aspect ratio is correct the wheel should have the same width and height.
    Quote Quote  
  23. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by Caiosouza View Post
    Is Correct 3:2 to "1-Sample-1999 MX 125.mpg" ?
    No. The correct display aspect ratio after removing black borders appears to be about 1.6:1.

    Find a shot with a wheel is viewed directly from the side (ie parallel to the axle), as large as possible. A perspective something like this:

    Image
    [Attachment 46526 - Click to enlarge]



    Then check the width and height of the wheel. When the display aspect ratio is correct the wheel should have the same width and height.
    Something like this?
    Image Attached Files
    Quote Quote  
  24. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Could this grotesque creature improve in any way?
    Image Attached Files
    Quote Quote  
  25. 1999MX-1.mpg is close. It's not perfectly aligned but it's not off by too far. It looks like the video is already close to square pixel. In this square pixel view in VirtualDub the box around the rim is 98x95 pixels:

    Click image for larger version

Name:	square.jpg
Views:	670
Size:	56.4 KB
ID:	46542
    Quote Quote  
  26. Originally Posted by Caiosouza View Post
    Could this grotesque creature improve in any way?
    You can adjust the levels but you can't fix the blown out brights. You can probably use Gradation curves in VirtualDub to get better colors.
    Quote Quote  
  27. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    1999MX-1.mpg is close. It's not perfectly aligned but it's not off by too far. It looks like the video is already close to square pixel. In this square pixel view in VirtualDub the box around the rim is 98x95 pixels:

    Image
    [Attachment 46542 - Click to enlarge]
    This is a video source, but, the question is:how is the process to adjust the aspect ratio to something close to what it should be?

    704x432 16:10
    And fail again...
    Image Attached Files
    Last edited by Caiosouza; 20th Aug 2018 at 23:01.
    Quote Quote  
  28. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by Caiosouza View Post
    Could this grotesque creature improve in any way?
    You can adjust the levels but you can't fix the blown out brights. You can probably use Gradation curves in VirtualDub to get better colors.
    Thank you very much, I try it
    Quote Quote  
  29. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    All I did here was remove the color noise with KNLmeansCL.
    But you can do a lot more from here, with this new source, far less color/chroma damage now.
    Image Attached Files
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS
    Quote Quote  
  30. Member Caiosouza's Avatar
    Join Date
    Nov 2013
    Location
    Capćo da Canoa, RS, Brazil
    Search Comp PM
    Originally Posted by lordsmurf View Post
    All I did here was remove the color noise with KNLmeansCL.
    But you can do a lot more from here, with this new source, far less color/chroma damage now.
    Thank You,
    Where do I get KNLmeansCL?
    I downloaded some, but is giving error
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!