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 22nd November 2018, 21:48   #1  |  Link
reshways
Registered User
 
Join Date: Oct 2018
Posts: 2
I cant identify this gross ghost artifact generated by some library

Im converting some old interlaced stuff, im really new and i figured on empirical way how it works after reading usual artifacts you get when you fix another problem

info of input video
Stream Type: MPEG2 Program
Profile: main@main
Frame Size: 720x480
Display Size: 720x480
Aspect Ratio: 4:3 [2]
Frame Rate: 29.970030 fps
Video Type: NTSC


libraries and config im using:

DeDot(luma2d=20, lumaT=20, chromaT1=15, chromaT2=5)
MosquitoNR(strength=16, restore=128, radius=2, threads=4)
funkydeblock(quant=10, th=3, radius=4, deblock=true, depump=true)
BlindPP(cpu=5, quant=16, cpu2="xxooxo")
AssumeTFF().QTGMC(Preset="Slow")
degrainmedian(mode=1,interlaced=false)
Vinverse(sstr=2.7, amnt=255, uv=2, scl=0.25)
mcdaa3()
DAAMod()
SMDegrain(tr=3,thSAD=4500,refinemotion=true,lsb=true,prefilter=2,str=8,plane=0,chroma=false)
#yadifmod(mode=1, order=1, edeint=nnedi3(field=-2))
LimitedSharpenFaster(soft=-1).LimitedSharpenFaster(strength=50,soft=-1)
AssumeFrameBased
ComplementParity
Srestore()




I always faced the jumpy movements (back-forth) on someones, but this is so unpleasant to watch i get some decent results on handbrake whit good quality source then i get some good results here too but a few ones, so maybe its messing some factor about the code and interlaced type input, please someone can help me to identify on the code, whats the one causing that ghost artifact and delayedncoming frames

Last edited by reshways; 22nd November 2018 at 21:58.
reshways is offline   Reply With Quote
Old 23rd November 2018, 06:25   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Upload a sample, otherwise we can't help you.
From what I can see, though, you are filtering out issues before deinterlacing.
Just deinterlace first, then use other filters (unless they specifically support interlaced contents and you choose the right mode), otherwise you'll screw up fields.
You could try with something simpler, like:

Code:
#Deinterlace
tdeint(mode=2, order=-1, field=-1, mthreshL=6, mthreshC=6, map=0, type=2, debug=false, mtnmode=1, sharp=true, cthresh=6, blockx=16, blocky=16, chroma=true, MI=64, tryWeave=true, link=1, denoise=true, slow=2, opt=4)

#Denoise
dfttest(sigma=64, tbsize=1, lsb_in=false, lsb=false, Y=true, U=true, V=true, opt=3, dither=0)

#Debanding
f3kdb(range=15, Y=45, Cb=30, Cr=30, grainY=0, grainC=0, sample_mode=2, blur_first=true, dynamic_grain=false,  opt=3, mt=true, keep_tv_range=true, input_depth=8, output_depth=8)
I don't think you need that much filtering, nor SRestore.
If there are still dups after deinterlacing, it means that it's telecined.
In that case, use this instead:

Code:
tfm(mode=1,pp=5,slow=2,micmatching=2,clip2=tdeint(mode=2,type=3)) 
tdecimate()
Besides, it seems that levels are pretty screwed up, but without a sample I don't know whether it's the source or one of the filters you used.

Last but not least, which version of Avisynth are you using?
Is it Avisynth or Avisynth+?
I'm asking, 'cause some of the plugins you used are really old.

Last edited by FranceBB; 23rd November 2018 at 06:29.
FranceBB is offline   Reply With Quote
Old 24th November 2018, 08:18   #3  |  Link
reshways
Registered User
 
Join Date: Oct 2018
Posts: 2
Re

Quote:
Originally Posted by FranceBB View Post
Upload a sample, otherwise we can't help you.

Besides, it seems that levels are pretty screwed up, but without a sample I don't know whether it's the source or one of the filters you used.

Last but not least, which version of Avisynth are you using?
Is it Avisynth or Avisynth+?
I'm asking, 'cause some of the plugins you used are really old.
There you go sir, the vob extract sample:
https://mega.nz/#!stpgVYhR!R4xzRxydd...8i5D6KDh1NCkKs

This sample is the one generated whit my messy old libraries code:
https://mega.nz/#!01xECIgY!ZHffKZA7-...ZpUIh6UYY6YpCs

This is the one generated whit just cleanly deinterlaced code you give me:
https://mega.nz/#!YkoWFQYa!FmcIzkS3D...JCZpjHsStuRoNI


i recognize im messing arround whit no good results i thought SMDegrain and QTGMC were interlaced based libraries , but im stuck literally dont know where to go, please if you can tell me what to replace or figure out whats the parameter im messing, to get some good quality since my code is garbage on some files but on others i got some good content thats why im stubborn about it, but feel free to give me some info advice cause i really want to master this videos once for all and rid off this big dvd folders and bury them on some harddrive forever
ps: im using avisynth+

Last edited by reshways; 24th November 2018 at 16:31.
reshways is offline   Reply With Quote
Old 24th November 2018, 08:47   #4  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
It was shot on film but edited as video. Plus it has added effects. As a result, there are lots of orphaned fields and frames being deinterlaced. You can use a straight TFM().TDecimate(), but in cases like this I prefer to use a better deinterlacer, one such as QTGMC:

tdeintted = QTGMC(FPSDivisor=2)
tfm(clip2=tdeintted).tdecimate()


I'll leave the filtering to my betters but it looks to me like you're doing way too much filtering. Just remember, "Less is more". Kind of like what FranceBB recommended.
manono is offline   Reply With Quote
Old 28th November 2018, 10:57   #5  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
I downloaded your sample and it does have some issues.
First of all, whoever encoded it, thought that the content was Full Range (0-255) and applied a levels conversion in order to bring it to Limited Range (16-235), but the content was already in Limited TV Range (16-235 // 0.0-0.7V), so he screwed up blacks and whites by "compressing" them twice.

As you can see from the luma waveform, black is too high, at about 29, while it's supposed to be at 16:





As to the whites, they are not as high as they should be, but they have been clipped anyway, as you can see from this shot:



Once I manged to get blacks and whites at 16-235, I started fixing other issues like the pretty bad chroma which suffers from raimbowning artifacts:



Deraimbowning:



Last but not least, I noticed that there's a lot of noise as well.
Whenever I have to deal with noise, it's always up to the encoder: some people just want a clean picture at the expense of getting rid of details, other people just wanna preserve every single detail and are less prone to apply denoise.
In this case, there aren't many details anyway, so I applied a pretty strong denoise with 16bit precision - trying not to make banding - and then I applied debanding (at 16bit precision) just to be sure.
As a final step, I cropped inactive lines outside the safe area, I re-applied the borders and I upscaled to 16:9 848x480 via Spline64Resize.
This is the result:

Original:



Filtered:



Resized:



AVS Script:

Code:
FFMpegSource2("VTS_04_1.mpg", atrack=-1)

#Inverse Telecine
tfm(mode=1,pp=5,slow=2,micmatching=2,clip2=tdeint(mode=2,type=3)) 
tdecimate(mode=2, rate=23.976)

#Crop
Crop(10, 68, -10, -68)

#Levels adjustment
Levels(29, 1, 202, 16, 235, coring=false)

#Deraimbowning
ChubbyRain2(th=10, radius=10, show=false, sft=10, interlaced=false)

#Denoise with 16bit precision
dfttest(sigma=64, tbsize=1, lsb_in=false, lsb=true, Y=true, U=true, V=true, opt=3, dither=0)

#Debanding with 16bit precision
f3kdb(range=15, Y=45, Cb=30, Cr=30, grainY=0, grainC=0, sample_mode=2, blur_first=true, dynamic_grain=false,  opt=3, mt=true, keep_tv_range=true, input_mode=1, input_depth=16, output_mode=1, output_depth=16)

#Converting from 16bit stacked to regular 16bit
ConvertFromStacked(bits=16)

#Dithering down to 8bit with the Floyd-Steinberg error diffusion
ConvertBits(bits=8, dither=1)

#Adding borders back
AddBorders(0, 20, 0, 20)

#Little upscale to 16:9
Spline64Resize(848, 480)
Encoded file via x264, NeroAAC and MP4Box: https://we.tl/t-b1bzS4g3No


p.s as Manono said, if you don't think that the deinterlace I used is enough, you can try with QTGMC (it's gonna be slow, though).

Cheers

Last edited by FranceBB; 28th November 2018 at 11:01.
FranceBB is offline   Reply With Quote
Reply

Tags
artifact, blur, frame, ghost, interlaced

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 20:05.


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