Fixing grain and deinterlacing? (Code Geass)

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Dext3r
Joined: Wed May 18, 2011 3:40 am
Org Profile

Fixing grain and deinterlacing? (Code Geass)

Post by Dext3r » Tue Jul 23, 2013 7:42 pm

Hello, so I have two questions regarding a Code Geass AMV I'm working on.

One thing I was told by another user is that there's a deinterlacing issue, that I don't know how to fix.
Spoiler :
Image
Image
The first one's a frame where the motion/shake has her up. In the second one, she moves down relative to the camera. You can see some of the green tint, from what's probably the previous frame, right above her hair. It's slight, but if's there. It might be there in the original animation, or its some kind of deinterlacing issue. Does anyone know how to fix this?

Secondly, I've noticed a lot of what I think is noise?
Spoiler :
Image
Image
Image
I'm not exactly sure how to fix this either (if I'm even identifying this correctly).

Please let me know if you guys have any idea how to fix these issues.

Regards,

Dexter

P.S. Here is the AVS script I used for all my Code Geass DVD's

Mpeg2Source("K:\Revolution\Source Footage\Code Geass\1-5\MainMovie\CG 1-5\VIDEO_TS\CG 1-5.d2v", cpu=4)
LUTDeRainbow()
ConvertToYV12()
Spline36Resize(848,480)
#TTempSmooth()
FastLineDarkenMod()
LSFmod(strength=120)

User avatar
Dext3r
Joined: Wed May 18, 2011 3:40 am
Org Profile

Re: Fixing grain and deinterlacing? (Code Geass)

Post by Dext3r » Tue Jul 23, 2013 7:45 pm

I don't know why I can't edit my post, here's the fixed comparison from the first issue:
Spoiler :
Image
Image

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: Fixing grain and deinterlacing? (Code Geass)

Post by l33tmeatwad » Tue Jul 23, 2013 9:15 pm

Dext3r wrote:Mpeg2Source("K:\Revolution\Source Footage\Code Geass\1-5\MainMovie\CG 1-5\VIDEO_TS\CG 1-5.d2v", cpu=4)
LUTDeRainbow()
ConvertToYV12()
Spline36Resize(848,480)
#TTempSmooth()
FastLineDarkenMod()
LSFmod(strength=120)
First off, how are you removing the interlacing, was it soft telecined and you used force film? Additionally, since the artifacts (as it appears) in those samples are going vertically, it isn't interlacing (as that would be horizontal), that would be aliasing. Secondly, with TTempSmooth() commented out (with the # in front of it) you have NO noise reduction set (outside of the deblocking in mpeg2source). Third, why are you using a derainbow filter? I'm fairly certain those DVDs do not have a rainbow issue (maybe I'm wrong).

To be honest, most of your questions about cleaning up the source are answered in this guide here on the org.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Fixing grain and deinterlacing? (Code Geass)

Post by mirkosp » Wed Jul 24, 2013 12:35 am

l33tmeatwad wrote:First off, how are you removing the interlacing, was it soft telecined and you used force film?
Most important question to answer, indeed. However...
Additionally, since the artifacts (as it appears) in those samples are going vertically, it isn't interlacing (as that would be horizontal), that would be aliasing.
No, the user reported another issue, specifically the chroma. Compare the two images he posted: in the latter, the coloring of her hair is out of place, as it is above her head.
This could be due to a number of different reason, from issue in source, to bad deinterlace, hence why whomever the other user might be, his suggestion of double checking the deinterlacing isn't too bad per se.
It's just that, without an actual m2v sample of the scene, it's hard to tell.
Honestly I don't think the light aliasing shown there is anything to worry about, and I think "fixing" it would introduce more issues, instead. But something should be done about the chroma, if possible.
Secondly, with TTempSmooth() commented out (with the # in front of it) you have NO noise reduction set (outside of the deblocking in mpeg2source).
I don't think ttempsmooth would be the best choice here anyway, and using mpeg2source's cpu parameter to deblock is a bad way to go about it to boot (so I suggest to change the cpu parameter to 0).
For blocking, mosquito noise, and ringing, I'd suggest a combination of smoothd2, nlmeanscl, and possibly hqdering as well.
As a reminder, stay low with the parameters, as it's better to underfilter than to overcompensate, unless you're doing a frame-based filtering, in which case you can afford to overfilter individual frames. Keep in mind these are all issuess introduced by the encoder (MPEG-2 is especially bad on this, considering how old and limited of a format it is, particularly with DVD restrictions) since it didn't have enough bitrate to properly store the frames, so clearly some frames are going to be in a worse shape than others and would need a different amount of filtering.
Third, why are you using a derainbow filter? I'm fairly certain those DVDs do not have a rainbow issue (maybe I'm wrong).
I think it was his attempt at fixing the chroma problem he has shown in the screenshots.
Anyway, I'd also get rid of:
ConvertToYV12(): Your source already is i420, so using ConvertToYV12() is a NOP() right now, thus useless.
FastLineDarkenMod(): Please don't do line darkening unless you have extremely valid reasons to ─ keep in mind that recent sources (digital ones as opposed to transfers from analog sources, in most cases) do not need it.
LSFmod(strength=120): Please don't sharpen unless you have valid reasons to ─ if it's because of a blur introduced by the denoising/deblocking, see if using better deblocking/denoising parameters or perhaps contrasharpening afterwards are of more help; if it's due to the source being an upscale, inverse upscale back to the original resolution; if it's because the source looks to be somewhat blurry, it might make sense, but first try to understand whether it was an artistic choice or not (possible in recent sources); in older sources, it most likely makes sense if there is a bit of sharpening needed.
To be honest, most of your questions about cleaning up the source are answered in this guide here on the org.
Not quite... I haven't really done almost anything about it yet, but the avtech really does need improvements on a few things, avs filters being one of the most prominent issues.
Image

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: Fixing grain and deinterlacing? (Code Geass)

Post by l33tmeatwad » Wed Jul 24, 2013 3:03 am

mirkosp wrote:No, the user reported another issue, specifically the chroma. Compare the two images he posted: in the latter, the coloring of her hair is out of place, as it is above her head....Honestly I don't think the light aliasing shown there is anything to worry about, and I think "fixing" it would introduce more issues, instead. But something should be done about the chroma, if possible.
I was waiting on an answer to the IVTC answer before going in to that, but derp...I should have pointed that out.
mirkosp wrote:I don't think ttempsmooth would be the best choice here anyway...
Didn't say it was, was just pointing out there was no noise reduction set and was pointing out it was commented out (in case the user did not know).
mirkosp wrote:
To be honest, most of your questions about cleaning up the source are answered in this guide here on the org.
Not quite... I haven't really done almost anything about it yet, but the avtech really does need improvements on a few things, avs filters being one of the most prominent issues.
It indeed does need some updates, but aside from the chroma issue (derp...), the guide doe have acceptable solutions for most of the other noise in the footage.
Last edited by l33tmeatwad on Wed Jul 24, 2013 3:14 am, edited 1 time in total.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

User avatar
Dext3r
Joined: Wed May 18, 2011 3:40 am
Org Profile

Re: Fixing grain and deinterlacing? (Code Geass)

Post by Dext3r » Wed Jul 24, 2013 3:12 am

mirkosp wrote:
l33tmeatwad wrote:First off, how are you removing the interlacing, was it soft telecined and you used force film?
Most important question to answer, indeed. However...
Additionally, since the artifacts (as it appears) in those samples are going vertically, it isn't interlacing (as that would be horizontal), that would be aliasing.
No, the user reported another issue, specifically the chroma. Compare the two images he posted: in the latter, the coloring of her hair is out of place, as it is above her head.
This could be due to a number of different reason, from issue in source, to bad deinterlace, hence why whomever the other user might be, his suggestion of double checking the deinterlacing isn't too bad per se.
It's just that, without an actual m2v sample of the scene, it's hard to tell.
Honestly I don't think the light aliasing shown there is anything to worry about, and I think "fixing" it would introduce more issues, instead. But something should be done about the chroma, if possible.
Secondly, with TTempSmooth() commented out (with the # in front of it) you have NO noise reduction set (outside of the deblocking in mpeg2source).
I don't think ttempsmooth would be the best choice here anyway, and using mpeg2source's cpu parameter to deblock is a bad way to go about it to boot (so I suggest to change the cpu parameter to 0).
For blocking, mosquito noise, and ringing, I'd suggest a combination of smoothd2, nlmeanscl, and possibly hqdering as well.
As a reminder, stay low with the parameters, as it's better to underfilter than to overcompensate, unless you're doing a frame-based filtering, in which case you can afford to overfilter individual frames. Keep in mind these are all issuess introduced by the encoder (MPEG-2 is especially bad on this, considering how old and limited of a format it is, particularly with DVD restrictions) since it didn't have enough bitrate to properly store the frames, so clearly some frames are going to be in a worse shape than others and would need a different amount of filtering.
Third, why are you using a derainbow filter? I'm fairly certain those DVDs do not have a rainbow issue (maybe I'm wrong).
I think it was his attempt at fixing the chroma problem he has shown in the screenshots.
Anyway, I'd also get rid of:
ConvertToYV12(): Your source already is i420, so using ConvertToYV12() is a NOP() right now, thus useless.
FastLineDarkenMod(): Please don't do line darkening unless you have extremely valid reasons to ─ keep in mind that recent sources (digital ones as opposed to transfers from analog sources, in most cases) do not need it.
LSFmod(strength=120): Please don't sharpen unless you have valid reasons to ─ if it's because of a blur introduced by the denoising/deblocking, see if using better deblocking/denoising parameters or perhaps contrasharpening afterwards are of more help; if it's due to the source being an upscale, inverse upscale back to the original resolution; if it's because the source looks to be somewhat blurry, it might make sense, but first try to understand whether it was an artistic choice or not (possible in recent sources); in older sources, it most likely makes sense if there is a bit of sharpening needed.
To be honest, most of your questions about cleaning up the source are answered in this guide here on the org.
Not quite... I haven't really done almost anything about it yet, but the avtech really does need improvements on a few things, avs filters being one of the most prominent issues.
Yes, I used the "Force Film" method in DGindex to remove the interlacing.

To be honest, most of the filters I use here were things that I was using regularly on a lot of different sources, just because I can never tell what I should and shouldn't use, so its a bit of a wake-up call to hear that I shouldn't be using almost ANY of these (especially considering most of my other sources have turned out fine? At least in my opinion).

I'll try a combination of those three to fix the noise and see what I can come up with, thank you. It really is just confusing with so many filters figuring out what to use and what not to use.

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: Fixing grain and deinterlacing? (Code Geass)

Post by l33tmeatwad » Wed Jul 24, 2013 3:22 am

Dext3r wrote:Yes, I used the "Force Film" method in DGindex to remove the interlacing.

To be honest, most of the filters I use here were things that I was using regularly on a lot of different sources, just because I can never tell what I should and shouldn't use, so its a bit of a wake-up call to hear that I shouldn't be using almost ANY of these (especially considering most of my other sources have turned out fine? At least in my opinion).

I'll try a combination of those three to fix the noise and see what I can come up with, thank you. It really is just confusing with so many filters figuring out what to use and what not to use.
Yeah, you should redo your d2v to "Honor Pulldown Flags" and use TIVTC to handle the interlacing removal. I would try out some of the filters mirkosp suggested, but take a look at the guide first. The main reason I'm suggesting the guide is the screenshots it provides for many different types of noise that you will commonly face. As mirkosp pointed out, the guide needs updating because there are better ways to handle some of the things pointed out in it, but it is a good starting place for those that don't know much about filtering and will teach you what certain noises are and give you a good place to start from in terms of researching new filters for any particular problem.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

User avatar
Dext3r
Joined: Wed May 18, 2011 3:40 am
Org Profile

Re: Fixing grain and deinterlacing? (Code Geass)

Post by Dext3r » Wed Jul 24, 2013 3:26 am

l33tmeatwad wrote:
Dext3r wrote:Yes, I used the "Force Film" method in DGindex to remove the interlacing.

To be honest, most of the filters I use here were things that I was using regularly on a lot of different sources, just because I can never tell what I should and shouldn't use, so its a bit of a wake-up call to hear that I shouldn't be using almost ANY of these (especially considering most of my other sources have turned out fine? At least in my opinion).

I'll try a combination of those three to fix the noise and see what I can come up with, thank you. It really is just confusing with so many filters figuring out what to use and what not to use.
Yeah, you should redo your d2v to "Honor Pulldown Flags" and use TIVTC to handle the interlacing removal. I would try out some of the filters mirkosp suggested, but take a look at the guide first. The main reason I'm suggesting the guide is the screenshots it provides for many different types of noise that you will commonly face. As mirkosp pointed out, the guide needs updating because there are better ways to handle some of the things pointed out in it, but it is a good starting place for those that don't know much about filtering and will teach you what certain noises are and give you a good place to start from in terms of researching new filters for any particular problem.
Wait, this source is progressive, not interlaced according to DGIndex?

The only reason I'm using the Forced Film on my d2v is because its a film source, which was what was recommended in the guide?

And I've hit that guide before for the filters, but I'm trying to figure out these other ones and I'm confused, do I need to actually download and set all these up or do they exist in the AMVapp?

User avatar
l33tmeatwad
Joined: Wed Feb 16, 2005 3:22 pm
Location: Christiansburg, VA
Contact:
Org Profile

Re: Fixing grain and deinterlacing? (Code Geass)

Post by l33tmeatwad » Wed Jul 24, 2013 3:33 am

Dext3r wrote:Wait, this source is progressive, not interlaced according to DGIndex?
Post the info from the txt that DGIndex created.
Dext3r wrote:The only reason I'm using the Forced Film on my d2v is because its a film source, which was what was recommended in the guide?
Not everything in the guides are the perfect solutions :sweat:
Dext3r wrote:And I've hit that guide before for the filters, but I'm trying to figure out these other ones and I'm confused, do I need to actually download and set all these up or do they exist in the AMVapp?
The filters mirkosp suggested are not included in AMVapp, you will need to download them separately and place the required dll files in the plugins folder for AviSynth.
Software & Guides: AMVpack | AMV 101 | AviSynth 101 | VapourSynth 101
PixelBlended Studios: Website | Twitter | YouTube

User avatar
Dext3r
Joined: Wed May 18, 2011 3:40 am
Org Profile

Re: Fixing grain and deinterlacing? (Code Geass)

Post by Dext3r » Wed Jul 24, 2013 3:39 am

l33tmeatwad wrote:
Dext3r wrote:Wait, this source is progressive, not interlaced according to DGIndex?
Post the info from the txt that DGIndex created.
Dext3r wrote:The only reason I'm using the Forced Film on my d2v is because its a film source, which was what was recommended in the guide?
Not everything in the guides are the perfect solutions :sweat:
Dext3r wrote:And I've hit that guide before for the filters, but I'm trying to figure out these other ones and I'm confused, do I need to actually download and set all these up or do they exist in the AMVapp?
The filters mirkosp suggested are not included in AMVapp, you will need to download them separately and place the required dll files in the plugins folder for AviSynth.
Image

I don't know what you mean by a txt created from DGIndex, but here's the preview I use to get all my info (and yes, I know that I need to run this with Honor Pulldown Flags as the setting to get accurate results).

Locked

Return to “AviSynth Help”