VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Hello.

    I'm a beginner and am not familiar with video editing. I would like to ask for advice from more experienced people on how to get rid of these artifacts with the video attached in the sample. I have tried doing it myself in Hybrid with the TFF and QTGMC options but without success. What options or what script to use. I would like to ask for your help.
    Thanks in advance.
    Image Attached Files
    Quote Quote  
  2. You need to go back to the original source. Not a resized and reencoded sample.

    About the best one can do with that WMV file is blur it vertically,

    Code:
    LWLibavVideoSource("Sample.wmv", cache=false) 
    Spline36Resize(width, 288).Spline36Resize(width, height).Sharpen(0.0, 0.5)
    You'll probably want to deblock it too.
    Image Attached Files
    Last edited by jagabo; 18th Apr 2023 at 12:36.
    Quote Quote  
  3. In Hybrid you can enable resizing and "Filtering->Vapoursynth->Misc->Script->Lower res. before resize->Spline36->2.5->Only->height" to get the effect. (if you add additional filters, like deblocking&co best move them behind the resizing, problem is that to get rid of this strong blocking some heavy deblocking is needed which will destroy quite some details)
    You need to go back to the original source. Not a resized and reencoded sample.
    I agree.

    Cu Selur
    Last edited by Selur; 18th Apr 2023 at 13:24.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Thanks for your help.
    I don't have the original source.
    I would like to remove only the sharp edges of the interlacing - in that case is there an better method and I wouldn't lose detail?
    I think I could erase the rest of the source artifacts using Topaz ai.
    Quote Quote  
  5. The original was interlaced, but it was resized progressively . You can try to use an inverse kernel to "reverse" the process to attempt to recover some of the original fields. In this example, "Debicubic" to reverse a cubic resizer (common in software). This can partially preserve the 60 samples/sec motion in some parts so the motion is smoother (it was encoded as WMV, and VFR in CFR, only some parts have 60 fps content) , if you feed it into a double rate deinterlacer

    This example downscales to 480 height using debicubic, and uses simple Lanczos3 upscale. If you are using VEIA, can omit the last upscaling step and upscale there. VEIA currently does not have as good of a deinterlacer as QTGMC

    This example only addresses the "combing" artifacts from interlace; it does not address the severe macroblocking in some parts. I would differentially filter the blocky frames, otherwise you will degrade the "normal" frames.

    There is a blockdetect filter, and theoretically you can automatically use a deblock strenght based on the level of blockiness detected, but it needs a lot of tweaking currently
    https://github.com/Asd-g/AviSynthPlus-BlockDetect

    Code:
    FFVideoSource("Sample.wmv")
    Crop(160,0,-160,0)
    DebicubicResizeMT(640,480)
    AssumeBFF().QTGMC(border=true, sharpness=0.2)
    LanczosResize(960,720)
    Image Attached Files
    Quote Quote  
  6. Originally Posted by poisondeathray View Post
    The original was interlaced, but it was resized progressively . You can try to use an inverse kernel to "reverse" the process to attempt to recover some of the original fields. In this example, "Debicubic" to reverse a cubic resizer (common in software). This can partially preserve the 60 samples/sec motion in some parts so the motion is smoother (it was encoded as WMV, and VFR in CFR, only some parts have 60 fps content) , if you feed it into a double rate deinterlacer

    This example downscales to 480 height using debicubic, and uses simple Lanczos3 upscale. If you are using VEIA, can omit the last upscaling step and upscale there. VEIA currently does not have as good of a deinterlacer as QTGMC

    This example only addresses the "combing" artifacts from interlace; it does not address the severe macroblocking in some parts. I would differentially filter the blocky frames, otherwise you will degrade the "normal" frames.

    There is a blockdetect filter, and theoretically you can automatically use a deblock strenght based on the level of blockiness detected, but it needs a lot of tweaking currently
    https://github.com/Asd-g/AviSynthPlus-BlockDetect

    Code:
    FFVideoSource("Sample.wmv")
    Crop(160,0,-160,0)
    DebicubicResizeMT(640,480)
    AssumeBFF().QTGMC(border=true, sharpness=0.2)
    LanczosResize(960,720)
    Thank you very much.
    I did as you wrote. I used DebicubicResize together with QTGMC, then upscaled with topaz to proteus x2 auto and added minimal grain. The result is very good (video attached).

    I did a lot of reading before I installed all the plugins myself and ran your avisynth script, but it worked and I learned a lot while doing it.
    I also tried to use this AviSynthPlus-BlockDetect, I installed plugins and it still doesn't work for me. I don't know how to use this script.
    Could someone send an example script using this BlockDetect?
    Image Attached Files
    Quote Quote  
  7. Maybe it's just me, but I see no improvement, either in poisondeathray's result or in what the OP just posted. There are still all sorts of vertical lines and other artifacts.
    Quote Quote  
  8. Originally Posted by Beginner329 View Post
    I also tried to use this AviSynthPlus-BlockDetect, I installed plugins and it still doesn't work for me. I don't know how to use this script.
    Could someone send an example script using this BlockDetect?

    BlockDetect is complicated to use as-is right now, because the measurement is given in frameprops, and you have to code the variable deblocking based on thresholds - essentially a bunch of if/then's or script clip

    How long is the video, and how many sections have to blocky problem ? It might be easier just to apply some deblocking filter using Trim. ANY deblocking fill will degrade the image, hence the suggestion to selectively apply the filter.
    Quote Quote  
  9. Originally Posted by johnmeyer View Post
    Maybe it's just me, but I see no improvement, either in poisondeathray's result or in what the OP just posted. There are still all sorts of vertical lines and other artifacts.

    That script only addresses horizontal artifacts from "combing" . The separate issue not addressed in the script is the blocking in some frames. Many frames do not have severe blocking artifacts (relatively clean)

    Originally Posted by poisondeathray View Post
    This example only addresses the "combing" artifacts from interlace; it does not address the severe macroblocking in some parts. I would differentially filter the blocky frames, otherwise you will degrade the "normal" frames.

    The video was interlaced at one point and upscaled progressively (while still arranged in fields) instead of a proper interlace-aware resize, or deinterlacing prior to upscaling. As you already know, that causes "problems"

    If you try to deinterlace as is , or watch it on a TV or media player - the co-mingled fields will exhibit the characteristic "horizontal wavy bad interlaced resize artifacts" with repeats at 30p. It's far from perfect, but now you have 60p motion from the partially reconstructed fields

    This is an apng, it should animate in most browsers. If not, try opening in a new tab

    Quote Quote  
  10. wow, that IS a big improvement. Don't know how I missed that. I was concentrating on the vertical artifacts around the knees as the camera panned down.
    Quote Quote  
  11. Originally Posted by poisondeathray View Post
    Originally Posted by Beginner329 View Post
    I also tried to use this AviSynthPlus-BlockDetect, I installed plugins and it still doesn't work for me. I don't know how to use this script.
    Could someone send an example script using this BlockDetect?

    BlockDetect is complicated to use as-is right now, because the measurement is given in frameprops, and you have to code the variable deblocking based on thresholds - essentially a bunch of if/then's or script clip

    How long is the video, and how many sections have to blocky problem ? It might be easier just to apply some deblocking filter using Trim. ANY deblocking fill will degrade the image, hence the suggestion to selectively apply the filter.

    The problem only occurs when the person recording moves the camera quickly. Sections are about 1-2 seconds long each and there are several of them in a 30-minute clip.
    Where the camera is static or moving slowly the problem does not occur.

    I was thinking of some kind of smoothing filter for this fast motion that would also mitigate these block artifacts in these short sections, but I don't know enough about video editing.
    Quote Quote  
  12. Originally Posted by Beginner329 View Post
    The problem only occurs when the person recording moves the camera quickly. Sections are about 1-2 seconds long each and there are several of them in a 30-minute clip.
    Where the camera is static or moving slowly the problem does not occur.

    I was thinking of some kind of smoothing filter for this fast motion that would also mitigate these block artifacts in these short sections, but I don't know enough about video editing.

    The "block" artifacts are not typical sized macroblocks, so typical deblocking filters might not work as well

    Blockdetect registers many false positives on your video, and the scores are too low for some blocky frames with low motion; despite playing with the settings or applying on source, or after debicubic, or deinterlacing . It probably gets confused by the field resampling artifacts, and by the size of the non standard blocks. I don't think blockdetect be useful to automate filters in this case

    I definitely wouldn't filter everything with the same deblocking filter(s), you'd just turn the "good" frames to mush.

    If it's only "several" blocky sections , you can divide it up manually in very blocky, light blocky, and none (passthrough, no filter) sections, or some combination like that to combat different levels of "blockiness". There are ways apply the filters to sections - such as replaceframes, or clipclop, or just using Trim and AlignedSplice. You can use a script editor such as avspmod to preview and get the frame numbers. Think of it as mixing and matching frames of differently filtered versions of the video.

    The transitions can be abrupt if you only have say, very blocky vs. none . It will look "normal" and suddenly very blurry during the filtered blocky sections. Another way would be to use a curve editor, or vary the opacity using curves of filtered layers in a video editor

    As for what to use for "deblocking", downscaling (h,v) then upscaling is one way . There is also destripeh and destripev . Eitherway, the blocky sections are going to be severely degraded and blurred if you attempt to filter them. You have to experiment to see what is "acceptable" to you. Leaving them blocky is an option too, because severe blurring for those sections might look worse to some people
    Quote Quote  



Similar Threads

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