![]() |
Upscaling DV still shows aliasing?
1 Attachment(s)
I was deinterlacing+upscaling analog PAL captures in vapoursynth with following commands, which works well:
clip = haf.QTGMC(clip, Preset='Slower', TFF=True) clip = core.resize.Lanczos(clip, 1440, 1080 ,matrix_in="6",matrix="1") The stairstepping/jagged lines/aliasing go away which is nice. But now when I do it on PAL DV, as follows: clip = haf.QTGMC(clip, Preset='Slower', TFF=False) clip = core.resize.Lanczos(clip, 1440, 1080 ,matrix_in="6",matrix="1") there's still some aliasing visible, see attached zoomed example: Attachment 18507 It is also present in the DV source so probably due to the DV codec itself. Is there a way to fix this without blurring? |
I would input the DV file into vdub2 and output as lossless AVI or compressed lossless HuffYUV AVI yuv2 or similar codec to get rid of the DV codec first, then proceed with your normal script as if it was an analog capture, Also when you resize to 1440x1080 make sure to switch to rec.709.
|
Do you think there's something going wrong when feeding DV directly to vapoursynth?
I'll try the preconversion to lossless and let you know... matrix 1 is already rec.709, according to http://www.vapoursynth.com/doc/funct...resize.Lanczos When I compare the colors of the source/input and the output, it's the same, so that should be already correct. |
try this:
Code:
main=last |
I did the conversion to lossless first and then vapoursynth, same result.
Quote:
I'll have to lookup and install the equivalent for that... -- merged -- I did it with this and it looks better now: clip = xaa(clip,mode="di2 znedi3", mask=0, chroma=1) But should I do it before or after de-interlacing(QTGMC) ? |
I would investigate the root cause first, I see this in forums all the time when someone presents a problem everyone jumps in with a patch solution instead of focusing on addressing the root cause of the problem. Maybe post few seconds sample of the raw DV so we can examine.
|
1 Attachment(s)
OK here it is attached: Attachment 18516
I was briefly thinking it could be something to do with the camera'a digital zoom, but it's also visible in wide/zoomed out shots. |
PAL DV uses 4:2:0 chroma subsampling and so the reds and blues will have less resolution than the greens.
In my experience, Topaz AI works well on NTSC DV, you might try it with your PAL DV. -- merged -- I tried to upscale the video in Topaz AI but it did not satisfactorily resolve the aliasing issues. It's a tough problem. |
Thanks for the input. I'll do it with the xaa antialiasing in vapoursynth.
Rests the question, is it best before or after deinterlacing? |
AA must come after, but noting QTGMC has some built in.
|
1 Attachment(s)
I just looked at the sample, The problems you are facing are baked in the original DV file, They are not caused by Vapoursynth, Thick vertical lines, image overexposed, not sure what happens during the shooting of the footage. One thing for sure, you can't bring back the over exposed areas like her face, Also it's hard to fix those vertical lines in post.
https://www.digitalfaq.com/forum/att...1&d=1732260352 |
1 Attachment(s)
Quote:
Quote:
Quote:
I did the AA after QTGMC + resizing and it looks better, see Attachment 18520 So if the camera(Sony TRV-620E) recorded the aliasing, is there a problem with it, or is it just a DV codec problem due to low resolution etc? I also noticed that the DV rec has only 32Khz audio, which is a bit crappy... Should I convert it to 48Khz AAC in MP4 or leave it 32Khz? |
After QTGMC, I would try fixing the chroma shift, apply Santiag with in a vertical flipped video, adjust the colors then try denoising,... https://imgsli.com/MzIzMTE0/0/3 and only after that think about upscaling.
|
Looks better indeed, for this clip at least. I see you also did a lower gamma. What syntax did you use for these?
|
Quote:
|
Quote:
As to the audio recording of the speaker onstage it's typical of an amateur recording with a "from the audience" camera and onboard mic. That's the basic limitation here, not the audio sample rate. Converting to 48 kHz sample rate wont bring back audio between 15 kHz and 23 kHz which was never recorded, and even if it could, it would make essentially no difference. |
Quote:
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="470bg", range_s="limited") clip = core.std.Levels(clip=clip, min_in=16, max_in=235, min_out=16, max_out=235, gamma=0.85)[/code] |
Quote:
The overexposed face part is also a small portion of the full recording, I just chose this part deliberately to upload here because the face isn't recognizable :) Quote:
Quote:
Also then I have to do something like this now to convert it back to YUV for the next processes in line: Code:
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="470bg", range_s="limited") |
Without BasicVSR++ on the chroma:
Code:
# ImportsCode:
# ImportsCu Selur |
Quote:
I'm playing with your config and using BasicVSR (this line to be specific: clipMerge = BasicVSRPP(clip=clipMerge, model=4) ), it runs 1 full minute on the same test.avi, versus only 6 seconds if disabled... My GPU = nvidia 1080ti For other comparison, my own old config including upscaling + encoding is only 2 seconds. |
On my system, BasicVSR++ isn't that slow, but I use a Ryzen 9 7950x and a Geforce RTX 4080, so that is to be expected.
|
Ryzen 9 3900X and a Geforce GTX 1080Ti here.
I did some test runs and it comes to ~20 hours of runtime per 1 hour of video, and since I have a LOT of hours video to process I'm gonna pass on that for now :) How slow/fast does it run exactly in your system? |
The "with BasicVSR++ applied on the chroma" script runs at ~11.5fps the one without at ~162fps per second. :)
|
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.