View Full Version : Progressive Film PAL in Interlaced DVD (noisy)
camjac251
2nd November 2018, 20:21
Hi there. I am attempting to restore these old DVDs of a UK Show but am running into some issues with my inexperience. I am attempting to only restore certain skits from this TV series that look like they were from a Film source rather than a true interlaced source since they don't look like they're interlaced when I play the file in AvsPmod (https://www.videohelp.com/software/AvsP), before any filters. From what I can tell there's a good amount of mosquito noise and ghosting going on in the segments I'm trying to extract. I tried to remove them with the following but the ghosting is still present.
mpeg2source("ULTIMATE_FAST_SHOW_COLLECTION_D2\VIDEO_TS\VTS_03_1.d2v", cpu=4, info=3)
ConvertToYV12()
TFM()
LSFMod(Strength=75, Smode=5, Smethod=4, secure=True,preblur="FFT3Dfilter(sigma=4,plane=0)")
GradFun3()
LimitedSharpenFaster(ss_x=1.5, ss_y=1.5, dest_x=last.width, dest_y=last.height, Smode=4, strength=50, radius=2, Lmode=1, wide=false, overshoot=1, edgemode=0, special=true, exborder=0)
ColorMatrix(mode="Rec.601->Rec.709")
nnedi3_rpow2(rfactor=2,cshift="Spline36Resize",fwidth=1920,fheight=1536)
The above gives the best result but I've also tried this as well which may be incorrect as it's not interlaced
mpeg2source("ULTIMATE_FAST_SHOW_COLLECTION_D2\VIDEO_TS\VTS_03_1.d2v", cpu=4, info=3)
ConvertToYV12()
QTGMC( Preset="Slower" )
SRestore(frate=25)
LSFMod(Strength=75, Smode=5, Smethod=4, secure=True,preblur="FFT3Dfilter(sigma=4,plane=0)")
GradFun3()
LimitedSharpenFaster(ss_x=1.5, ss_y=1.5, dest_x=last.width, dest_y=last.height, Smode=4, strength=50, radius=2, Lmode=1, wide=false, overshoot=1, edgemode=0, special=true, exborder=0)
ColorMatrix(mode="Rec.601->Rec.709")
nnedi3_rpow2(rfactor=2,cshift="Spline36Resize",fwidth=1920,fheight=1536)
I saw that using QTGMC was recommended for its noise reduction which does give nice results but artifacts in some places whereas the first script gives a noisier but cleaner result.
Here is a link to a sample with a bit of the interlaced stuff (not for restoration, just there to show what's on the DVD, if useful) and then the next scene which is what I'd like to clean up (film source?) that isn't interlaced as I can see.
VTS_03_1.d2v (https://www.dropbox.com/s/00u368ali3cn128/VTS_03_1.d2v?dl=1)
VTS_03_1.demuxed.m2v (https://www.dropbox.com/s/c17p30lewnvznbp/VTS_03_1.demuxed.m2v?dl=1)
What would you recommend for this scene? Does it need deinterlacing? I notice that the hair looks like it's being blended together when I run either filter above and that there's major ghosting on edges like the chair. Is it possible to make the edges sharp? I was able to get them to look much better with WarpSharp but that seems to make everything too cartoony (and the filter isn't listed on the Avisynth External Filters page anymore, I guess since it's replaced with something else?). Also, is it possible to fix up the white spots (film dust) that happen?
LemMotlow
2nd November 2018, 21:58
One of your download links is a .d2v file. No one but you and your PC can use a .d2v project file. A d2v is an index, not a video.
Both links ask the user to start a DropBox account. I'm not willing to do that, and neither is anyone else AFAIK.
In any case, if you bypass the account request and click Download, nothing happens.
camjac251
2nd November 2018, 22:04
One of your download links is a .d2v file. No one but you and your PC can use a .d2v project file. A d2v is an index, not a video.
Both links ask the user to start a DropBox account. I'm not willing to do that, and neither is anyone else AFAIK.
In any case, if you bypass the account request and click Download, nothing happens.
I included the .d2v in case anyone wanted to open it in a text editor to find what options d2index is using, in case the m2v differs.
For the dropbox link, it does popup asking you if you want to sign in but has a "No thanks, continue to view" link towards the bottom center of the popup. I was able to hit the "Download" dropdown and click "Direct Download" in a private browsing window in my browser and wasn't logged in.
johnmeyer
3rd November 2018, 01:12
The opening scene is 25 fps interlaced PAL. There is a little weirdness for the first few frames, but that probably happened when you cut the clip for upload.
The second scene is 25 fps progressive PAL.
So, you need to treat the interlaced and progressive footage separately, if you want good results.
camjac251
3rd November 2018, 01:52
If it's progressive in an interlaced encode, do I need to apply TFM or anything to make it proper? Do you think that it could be telecine'd?
johnmeyer
3rd November 2018, 02:37
Nothing is telecined, so TFM/Tdecimate is not needed. It is simply 25 fps PAL progressive and 25 fps PAL interlaced. If you treat the entire thing as interlaced, whatever you want to do will probably work. Progressive, after all, is interlaced video where there is no temporal movement between fields.
LemMotlow
3rd November 2018, 03:26
Nothing is telecined, so TFM/Tdecimate is not needed. It is simply 25 fps PAL progressive and 25 fps PAL interlaced. If you treat the entire thing as interlaced, whatever you want to do will probably work. Progressive, after all, is interlaced video where there is no temporal movement between fields.
It's more complicated than that. Let's say you're going to use a filter that requires progressive or otherwise non-interlaced video. Whether you use a deinterlacer or SeparateFields(), the interlaced segment frames will give you two fields with two different images and motion components, but each frame in the progressive segments will give you two identical images with identical motion components. Repeated or identical frames throw off temporal filters, especially temporal filters that use motion compensation or interpolation.
There are also problems with colorspace changes if they become necessary in filtering. When separating fields, YV12 chroma doesn't line up the same way in true interlaced video compared with progressive video encoded as interlaced. There was a thread that started with upsampling interlaced YV12 and led to differences in chroma storage between interlaced video encoded as interlaced and progressive video encoded as interlaced:https://forum.doom9.org/showthread.php?t=79028. I've seen other threads with similar discussions.
camjac251
3rd November 2018, 05:53
I ended up getting a better result with a few changed settings but still run into some haloing from the noise reduction in QTGMC.
I like the sharpness but it adds more noise to the fire. If I try to use the denoising examples in the QTGMC wiki without that previous QTGMC filter line, the video ends up looking much darker like its Linear, no longer sRGB. I'm not sure if it's with AviSynth+ that this is causing the problem or maybe a missing/wrong plugin.
Does the following work for you on this example? QTGMC( Preset="Slower", NoiseProcess=2, GrainRestore=0.4, NoiseRestore=0.2, Sigma=1.8, NoiseDeint="Generate", StabilizeNoise=true
How does this look? The ConvertToYV12 and ColorMatrix filters are enabled in all images.
No Filters (https://images2.imgbox.com/dc/af/fRR31agy_o.png)
Just QTGMC (https://images2.imgbox.com/5d/af/gK9COI96_o.png)
All Filters (https://images2.imgbox.com/e8/c0/yngk0s9f_o.png)
and a nice comparison viewer (https://imgsli.com/MjIwMA)
This is the script I'm using now.
mpeg2source("I:\Footage\Pogo\fastshow\BoxSet\ULTIMATE_FAST_SHOW_COLLECTION_D2\VIDEO_TS\VTS_03_1.d2v", cpu=0, info=3)
ConvertToYV12(matrix="Rec601", interlaced=true)
QTGMC(Preset="Slower", InputType=2, SourceMatch=3, Sharpness=1.2, TR2=3, Lossless=2)
LSFMod(Strength=75, Smode=5, Smethod=4, secure=True,preblur="FFT3Dfilter(sigma=4,plane=0)")
GradFun3()
ColorMatrix(mode="Rec.601->Rec.709")
hello_hello
3rd November 2018, 11:14
I ended up getting a better result with a few changed settings but still run into some haloing from the noise reduction in QTGMC.
Try the new version of TemporalDegrain (https://forum.doom9.org/showthread.php?t=175798). It now uses similar denoising to QTGMC. In my very limited experience with it, TemporalDegrain2 doesn't enhance the halos quite as much as QTGMC. I'm not sure about adding back grain or stabilising though.
Have you tried InputType=1 for QTGMC? That's generally what I'd use for a progressive source (I haven't had a chance to look at your samples).
camjac251
5th November 2018, 04:00
I really like the results that TemporalDegrain2 gives. I experimented a bit with different settings but just went back to the defaults.
This is currently the script I'm using for the source
mpeg2source("ULTIMATE_FAST_SHOW_COLLECTION_D2\VIDEO_TS\VTS_03_1.d2v", cpu=0, info=3)
ConvertToYV12(matrix="Rec601", interlaced=true)
TemporalDegrain2()
LSFmod(Strength=75, Smode=5, Smethod=4, secure=True,preblur="FFT3Dfilter(sigma=4,plane=0)")
GradFun3()
nnedi3_rpow2(rfactor=2, nsize=6, nns=4, cshift="Spline36Resize")
ColorMatrix(mode="Rec.601->Rec.709")
Trim(28261,30009)
Although I think I'm missing a step. TemporalDegrain cleans up the image quite nicely but doesn't help as much with the mosquito noise or deblocking without blurring the image a bit. I'd be fine with keeping the noise if I can find a nice sharpen tool to undo the dvd compression but in the sharpeners I've tried, it didn't help much.
I did try using amDCT which did help cleanup some of the color noise and blocking but left the image blurry.
Here's a link to a sample I made of before/after the filters are applied (rawsample has nnedi3_rpow2 & colormatrix applied)
with this trim instead of the one above
a = Trim(28261,28286)
b = Trim(28764,28794)
c = Trim(29441,29468)
return (a + b + c)
fastshow_rawsample.mkv (https://www.dropbox.com/s/379sn6vnql0dpfr/fastshow_rawsample.mkv?dl=1)
fastshow_processedsample.mkv (https://www.dropbox.com/s/81q345ruc2d8zdb/fastshow_processedsample.mkv?dl=1)
camjac251
5th November 2018, 04:15
...but each frame in the progressive segments will give you two identical images with identical motion components. Repeated or identical frames throw off temporal filters, especially temporal filters that use motion compensation or interpolation.
With the sample, do you recommend I apply any filters to sort out the progressive scene in an interlaced file? Right now, I do not have any filters before my Degrain. mediainfo shows that the file is Interlaced with Top Field First.
I am only trying to restore frame 28261 to 30009, just that scene. I believe it's a film scan unlike other scenes which are hard interlaced. If that's the case, is it likely they blended the frames from 23.976 to 25fps for the dvd? Any way to undo that?
camjac251
7th November 2018, 12:58
TemporalDegrain seems to work well with cleaning up all of the noise and remove the blocking. Although I am seeing another issue with this source. Every few frames there will be what looks like combing on one frame and none on the next. Even with TemporalDegrain applied, the combing still appears in highlights. QTGMC is able to remove them on InputType's 2 and 3, 1 doesn't remove all of the combing. Although with QTGMC, the compression block artifacts are still there. I tried using Deblock_QED but it wasn't strong enough without losing detail. vinverse2 works well for TemporalDegrain but still leaves artifacts.
Here's two sequential frames, first is without combing, then the next one has combing.
https://i.postimg.cc/qzYsRS1t/VTS-03-1-raw000281.png (https://postimg.cc/qzYsRS1t) https://i.postimg.cc/D8mQ7nPk/VTS-03-1-raw000282.png (https://postimg.cc/D8mQ7nPk)
If the source framerate is 25fps, could it have been telecine'd from 23.976 to 25fps and that is why the combing exists? Could those be blended frames?
Here is another sample that includes those two frames above VTS_03_1-SecondSample.demuxed.m2v (https://www.dropbox.com/s/kiezlh6dqji3rhc/VTS_03_1-SecondSample.demuxed.m2v?dl=1)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.