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 > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th March 2025, 07:51   #1  |  Link
25FPSBB
Registered User
 
Join Date: Jan 2025
Location: Germany
Posts: 8
Chromashift before or after denoising

Question for the experts. Is it better to use chromashift before or after denoising? In my scripts, after i use QTGMC lossless (without sharpening, sharp=0.0), I usually use TemporalDegrain2 with postFFT=1 and set the sigma afterwards. After that, I adjust chromashift and do sharpness with LSFmod. My problem is that the left edges are 99% perfect in the image, but the right edges often have a very slight halo or still a tiny bit of chromableeding. There used to be a filter called FixVHSOversharp that you could use for the right or left side but it works only in Avisynth not Avisynth+. I know there is DeHalo_Alpha but i only use DeHalo_Alpha in an emergency because it usually destroys too many details in the image. Is there an alternative to FixVHSOversharp, or is it my fault that I shift the chroma at the wrong time. My captures are most from old retail VHS PAL widescreen movies and the target is to get a anamorphic widescreen DVD.

Here is the script i use most of the time and i tweak the settings to the capture i have done:

Avisource()
KillAudio()
AssumeTFF()
QTGMC(Preset="slow",SourceMatch=3,lossless=2,MatchPreset="slow",MatchPreset2="slow",TR1=2,TR2=1,NoiseTR=2,Sharpness=0.0,EdiThreads=4)
SelectEven()
Crop()
ConvertToYV12
TemporalDegrain2(degrainTR=1,grainLevel=1,postFFT=1,postsigma=2.0,postsigmaC=2.0,fftThreads=4)
ChromashiftSP()
LSFmod(Strength=60,Smode=5,ss_x=1.5,ss_y=1.5)
AddBoarders()
ConvertToYUY2()
Splin36Resize()
Prefetch()

I know you want samples of my raw Capture and my encode. But i think there is no need for it because this problem is in most of my encodes. And i set the Chromashift on different places already to test it out but i can't get it perfect. For capturing i use a Phillips or JVC or Sharp VCR with TBC or a Panasonic without TBC ( belongs of the tape) passthrough Panasonic ES10 or ES60 or a electronic Design TBC to my Hauppauge LiveUSB for PAL/ Secam or Diamond 500 for NTSC. I capture with Lagarith or Huffyuv in Virtualdub or AmarecTV. And i use Histogram in Virtualdub to avoid black - white crush. My results are very good and sometimes they look like commercial DVD's but to get it perfect i want to kill this last small error.

Last edited by 25FPSBB; 25th March 2025 at 08:55.
25FPSBB is offline   Reply With Quote
Old 25th March 2025, 15:19   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,625
Quote:
Originally Posted by 25FPSBB View Post
Is it better to use chromashift before or after denoising?
It depends on the source, but ususally before, otherwise shifted chroma can negatively the subsequent filters, such as chroma denoising around edges and make the problem worse


Quote:
There used to be a filter called FixVHSOversharp that you could use for the right or left side but it works only in Avisynth not Avisynth+.
I just tested it and it works ok in avs+, but it's x86 only. You can use it (or most x86 only filters) in a x64 avs host script with mp_pipeline


Quote:

I know you want samples of my raw Capture and my encode. But i think there is no need for it because this problem is in most of my encodes. And i set the Chromashift on different places already to test it out but i can't get it perfect.
It won't be perfect, because the effective chroma resolution is so low for VHS, that you will get diffuse bleeding everywhere , in all directions, but perhaps 1 direction slightly more than others. Along with shifting, you can also try sharpening the chroma a bit, aligning it with luma with mergechroma(awarpsharp2(depth=somevalue)) . Try 20 or 30

Quote:
My results are very good and sometimes they look like commercial DVD's but to get it perfect i want to kill this last small error.
Not with the SelectEven() line... You discard 1/2 the temporal resolution

And if it's 25p content, you discard 1/2 the spatial resolution with QTGMC .
poisondeathray is offline   Reply With Quote
Old 25th March 2025, 15:50   #3  |  Link
25FPSBB
Registered User
 
Join Date: Jan 2025
Location: Germany
Posts: 8
Quote:
It depends on the source, but ususally before, otherwise shifted chroma can negatively the subsequent filters, such as chroma denoising around edges and make the problem worse
Ok this is what i was thinking too.


Quote:
I just tested it and it works ok in avs+, but it's x86 only. You can use it (or most x86 only filters) in a x64 avs host script with mp_pipeline
Thank you very much, now i must figure out to get it work.

Quote:
It won't be perfect, because the effective chroma resolution is so low for VHS, that you will get diffuse bleeding everywhere , in all directions, but perhaps 1 direction slightly more than others. Along with shifting, you can also try sharpening the chroma a bit, aligning it with luma with mergechroma(awarpsharp2(depth=somevalue)) . Try 20 or 30
Must try this.


Quote:
Not with the SelectEven() line... You discard 1/2 the temporal resolution

And if it's 25p content, you discard 1/2 the spatial resolution with QTGMC .
So and how to get it progressiv PAL to DVD ???? I do this for 13 years now and was always thinking this is right. Never saw a progressiv PAL DVD with 50p ??? Or do you mean i should set the SelectEven() line to the end of my script so after filtering.

Last edited by 25FPSBB; 25th March 2025 at 16:08.
25FPSBB is offline   Reply With Quote
Old 25th March 2025, 16:12   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,625
Quote:
Originally Posted by 25FPSBB View Post

So and how to get it progressiv PAL to DVD ???? I do this for 13 years now and was always thinking this is right. Never saw a progressiv PAL DVD with 50p ???
Correct, 50p is not supported by PAL DVD, you would use 25i

What is your original content source ? Cinema, home video, sports , news etc...

For a 25p (progressive content) PAL DVD , it's encoded and stored as 25i (50 field per second interlaced), but the content is progressive. On playback, the equipment field matches and detects 2:2 pulldown so you get full resolution image.

For 25p content - deinterlacing take 1 field and interpolates in the scanlines that were just discarded, so you lose 50% of the vertical resolution right off the bat . The quality loss will not be as noticable with lower quality sources , but the 50% loss is significant with higher quality sources .

For progressive sources, you should be field matching with TFM or similar, not deinterlacing with QTGMC

For lower quality sources, sometimes applying QTGMC will help fix the various problems in the source, and the real effective resolution is so low to begin with that you don't notice the degradation as much.


If your content was true interlaced (e.g. home video , sports) , and the destination was DVD, then you should keep it interlaced 25i. Otherwise you lose 1/2 the temporal information - motion is less smooth. Even if you intermediate steps process with progressive filters, you should re-interlace the result before putting it on PAL DVD
poisondeathray is offline   Reply With Quote
Old 25th March 2025, 17:13   #5  |  Link
25FPSBB
Registered User
 
Join Date: Jan 2025
Location: Germany
Posts: 8
Quote:
Correct, 50p is not supported by PAL DVD, you would use 25i

What is your original content source ? Cinema, home video, sports , news etc...

For a 25p (progressive content) PAL DVD , it's encoded and stored as 25i (50 field per second interlaced), but the content is progressive. On playback, the equipment field matches and detects 2:2 pulldown so you get full resolution image.

For 25p content - deinterlacing take 1 field and interpolates in the scanlines that were just discarded, so you lose 50% of the vertical resolution right off the bat . The quality loss will not be as noticable with lower quality sources , but the 50% loss is significant with higher quality sources .

For progressive sources, you should be field matching with TFM or similar, not deinterlacing with QTGMC

For lower quality sources, sometimes applying QTGMC will help fix the various problems in the source, and the real effective resolution is so low to begin with that you don't notice the degradation as much.


If your content was true interlaced (e.g. home video , sports) , and the destination was DVD, then you should keep it interlaced 25i. Otherwise you lose 1/2 the temporal information - motion is less smooth. Even if you intermediate steps process with progressive filters, you should re-interlace the result before putting it on PAL DVD
You are right about TFM with NTSC. I do not deinterlace NTSC with QTGMC i always use TFM. But what i do most is movies - cinema PAL movies ( i am from germany we had PAL). Sometimes 40 years old rental tapes i buy on ebay or find them on a flea market. I never had problems with smoothness when playing back my custom DVD's that i deinterlaced with qtgmc and use selecteven() !!! So i was shocked that you say i do it wrong .... and as far as i understand PAL - you have 50 half frames per sec. If you deinterlace you get 25 full frames per sec. The problem what QTGMC does, it Bob's so you have 50 full frames per sec - double framerate you don't need that is why the selecteven () line is in the script. And i never lose resolution so PAL 50 half frames per sec is 720x576 and PAL 25 full frames per sec is 720x576. And i do never re-interlace because i hate scanlines when watching movies on a big LCD 65inch TV. Although I have good 4K Blu-ray players that do decent upscaling and deinterlacing, I hate watching old store-bought DVDs because of the interlacing. You can always see jaggies along the edges, especially with PAL DVD's.
25FPSBB is offline   Reply With Quote
Old 25th March 2025, 17:38   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,625
Quote:
Originally Posted by 25FPSBB View Post
I never had problems with smoothness when playing back my custom DVD's that i deinterlaced with qtgmc and use selecteven() !!!
Nor should you, when the content is cinema. The smoothness loss being referred to earlier is with interlaced content - such as sports, home video

Quote:
So i was shocked that you say i do it wrong .... and as far as i understand PAL - you have 50 half frames per sec. If you deinterlace you get 25 full frames per sec. The problem what QTGMC does, it Bob's so you have 50 full frames per sec - double framerate you don't need that is why the selecteven () line is in the script. And i never lose resolution so PAL 50 half frames per sec is 720x576 and PAL 25 full frames per sec is 720x576.

Definitely wrong

The "resolution" I'm referring to is "effective resolution" or real quality. If you upscale a DVD to UHD, it doesn't mean the quality is suddenly UHD quality better than blu ray resolution

You lose real effective resolution when you deinterlace progressive content . You're upscaling the individual field from 720x288 to a full 720x576 frame when you deinterlace. In contrast, field matching for progressive content combines the scan lines (known as "weave") so you keep the full 720x576 resolution instead of starting with 720x288. 2 fields from the same moment in time are combined for full progressive quality frame. Deinterlacing uses only 1 field, so you lose 50% quality for a progressive source


Quote:
And i do never re-interlace because i hate scanlines when watching movies on a big LCD 65inch TV. Although I have good 4K Blu-ray players that do decent upscaling and deinterlacing, I hate watching old store-bought DVDs because of the interlacing. You can always see jaggies along the edges, especially with PAL DVD's.
Re-interlacing mentioned above is for interlaced content. Not cinema or progressive content - ie If you had home video, sports etc..

For interlaced content you start out with 50 samples/s . If you double rate deinterlace and go frame by frame, in a scene with motion, each frame there is motion

In contrast, for progressive content, such as cinema, dramas etc.. you start with 25 samples/s . 2 field make up the full quality frame. If you double rate deinterlace, and go frame by frame, in a scene with motion, each frame pair show duplicates instead. That's why deinterlacing reduce quality by 50% in this case - you discard 1/2 the spatial information because you're throwing away half the full frame
poisondeathray is offline   Reply With Quote
Old 25th March 2025, 18:13   #7  |  Link
25FPSBB
Registered User
 
Join Date: Jan 2025
Location: Germany
Posts: 8
Ok now i understand what you mean. That is why i never had this problem because i work with cinema content. Thank you very much with mergechroma(awarpsharp2(depth=somevalue)) i test it now on my other pc with a movie and it looks very good all edges are clean !!! and i set my ChromaShiftSP() line on the top of my script after deinterlacing as you mentioned.

Last edited by 25FPSBB; 25th March 2025 at 18:22.
25FPSBB is offline   Reply With Quote
Old 25th March 2025, 19:24   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,625
Quote:
Originally Posted by 25FPSBB View Post
O
and i set my ChromaShiftSP() line on the top of my script after deinterlacing as you mentioned.

I wrote before denoising, not after deinterlacing.

I wrote that shouldn't be deinterlacing at all, because it's not interlaced content

I wrote that you should field match or weave a progressive source such as cinema, not deinterlace. If the fields are already aligned in phase, you don't even need to field match

The "Don't Deinterlace Progressive Content" saying in early 2000's Doom9 days, is still solid advice . The underlying reason is explained above - you lose half the scan lines when you deinterlace. You're starting with 1/2 the vertical resolution. It's avoidable quality loss. QTGMC with the default InputType=0 is a deinterlacer.
poisondeathray is offline   Reply With Quote
Old 26th March 2025, 17:37   #9  |  Link
25FPSBB
Registered User
 
Join Date: Jan 2025
Location: Germany
Posts: 8
Sorry my fault for the misunderstanding. My content are movies from old tapes PAL. They are interlaced. Here is a sample from a capture ( could be done better was without histogram settings so white has a small crush ) of a not so good in shape 40 year old tape:

https://gofile.io/d/zxkbTK


Here is my script i use with your MergeChroma :

AviSource()
KillAudio()
QTGMC(Preset="slow",SourceMatch=3,lossless=2,MatchPreset="slow",MatchPreset2="slow",TR1=2,TR2=1,NoiseTR=2,Sharpness=0.4,EdiThreads=4)
SelectEven()
Crop(24,108,-4,-106)
ChromaShiftSP(x=0.5,y=1.6)
ConvertToYV12()
MergeChroma(awarpsharp2(depth=30))
TemporalDegrain2(degrainTR=1,grainLevel=1,postFFT=1,postsigma=2.0,postsigmaC=2.0,FFThreads=4)
LSFMod(strength=70,Smode=5,ss_x=1.5,ss_y=1.5)
AddBorders(0,38,0,38)
Spline36Resize(720,576)
ConvertToYUY2()
Prefetch(4)

Than it look like this:

https://gofile.io/d/fsfD0Y

Could be done better maybe TemporalDegrain and LSFMod need to be a little tweak in the settings. Now i encode it with HCencoder to PAL 25p MPEG2 16:9 anamorphic. Than i authore my DVD and can watch it on my big 65inch TV.

Last edited by 25FPSBB; 27th March 2025 at 07:06.
25FPSBB is offline   Reply With Quote
Old 26th March 2025, 19:03   #10  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,625
Quote:
Originally Posted by 25FPSBB View Post
My content are movies from old tapes PAL. They are interlaced.
To clarify : All VHS is stored interlaced - but the content is progressive for this example - as all cinema sources are - otherwise after QTGMC you'd have 50p, every frame with motion . Notice you have duplicates after QTGMC . True interlaced content would not have duplicates during motion

On low quality sources, you might not notice the degradation when deinterlacing progressive content. As mentioned earlier, it might even be slightly beneficial to use QTGMC to smooth over the source problems - it can be beneficial for the denosing
poisondeathray is offline   Reply With Quote
Old 26th March 2025, 19:11   #11  |  Link
25FPSBB
Registered User
 
Join Date: Jan 2025
Location: Germany
Posts: 8
Ok thank you .
25FPSBB is offline   Reply With Quote
Reply

Tags
vhs remaster

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 02:55.


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