Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd November 2018, 20:21   #1  |  Link
camjac251
Registered User
 
Join Date: Aug 2017
Posts: 9
Progressive Film PAL in Interlaced DVD (noisy)

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, 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.
Code:
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
Code:
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
VTS_03_1.demuxed.m2v

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?

Last edited by camjac251; 5th November 2018 at 04:03. Reason: Dropbox links should direct download
camjac251 is offline   Reply With Quote
Old 2nd November 2018, 21:58   #2  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
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.
LemMotlow is offline   Reply With Quote
Old 2nd November 2018, 22:04   #3  |  Link
camjac251
Registered User
 
Join Date: Aug 2017
Posts: 9
Quote:
Originally Posted by LemMotlow View Post
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.

Last edited by camjac251; 2nd November 2018 at 22:12.
camjac251 is offline   Reply With Quote
Old 3rd November 2018, 01:12   #4  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
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.
johnmeyer is offline   Reply With Quote
Old 3rd November 2018, 01:52   #5  |  Link
camjac251
Registered User
 
Join Date: Aug 2017
Posts: 9
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?
camjac251 is offline   Reply With Quote
Old 3rd November 2018, 02:37   #6  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
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.
johnmeyer is offline   Reply With Quote
Old 3rd November 2018, 03:26   #7  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
Quote:
Originally Posted by johnmeyer View Post
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.
LemMotlow is offline   Reply With Quote
Old 3rd November 2018, 05:53   #8  |  Link
camjac251
Registered User
 
Join Date: Aug 2017
Posts: 9
update script

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?
Code:
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
Just QTGMC
All Filters
and a nice comparison viewer

This is the script I'm using now.
Code:
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")

Last edited by camjac251; 3rd November 2018 at 05:56.
camjac251 is offline   Reply With Quote
Old 3rd November 2018, 11:14   #9  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Quote:
Originally Posted by camjac251 View Post
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. 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).
hello_hello is offline   Reply With Quote
Old 5th November 2018, 04:00   #10  |  Link
camjac251
Registered User
 
Join Date: Aug 2017
Posts: 9
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

Code:
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
Code:
a = Trim(28261,28286)
b = Trim(28764,28794)
c = Trim(29441,29468)
return (a + b + c)
fastshow_rawsample.mkv
fastshow_processedsample.mkv

Last edited by camjac251; 7th November 2018 at 06:02. Reason: Dropbox links should be direct download links now
camjac251 is offline   Reply With Quote
Old 5th November 2018, 04:15   #11  |  Link
camjac251
Registered User
 
Join Date: Aug 2017
Posts: 9
Quote:
Originally Posted by LemMotlow View Post
...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?

Last edited by camjac251; 5th November 2018 at 04:25.
camjac251 is offline   Reply With Quote
Old 7th November 2018, 12:58   #12  |  Link
camjac251
Registered User
 
Join Date: Aug 2017
Posts: 9
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.


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

Last edited by camjac251; 8th November 2018 at 03:15.
camjac251 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.