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. |
26th April 2019, 12:28 | #1 | Link |
Registered User
Join Date: Jan 2019
Posts: 13
|
How to deinterlace PAL TV recording of a NTSC TV show
How do I properly deinterlace video recorded from PAL DVB-T of a NTSC TV show without ghosting?
Sample: https://mega.nz/#!2BJlyaxJ!fwvqDNLJr...1imx24fyuR4qhY Thank you for help. |
26th April 2019, 17:33 | #2 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
I think the following simple script does a pretty good job on this clip (except for the first couple of frames, but this is probably due to editing a Transport Stream).
Quote:
Cheers manolito Last edited by manolito; 26th April 2019 at 17:35. |
|
26th April 2019, 19:37 | #3 | Link |
Registered User
Join Date: Jan 2019
Posts: 13
|
Thank you for help, but when I use your script I can still see noticeable ghosting:
Sample with this scene: https://mega.nz/#!yQoR3AaZ!EbbopgJDD...GNSfd-u6hCx4cI Is it possible to get rid of it totally? |
26th April 2019, 20:36 | #4 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
You could play with the Srestore parameters. You should check the double blend removal feature. In another thread I found a post by hello_hello, he used these pasrameters:
Quote:
manolito |
|
29th April 2019, 08:53 | #5 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,903
|
Oh God...
You see, those are the bad things of legacy hardware encoders. When I tried to index it with FFMpegSource2, it reported the wrong framerate as 50fps, while it's really 25i. LWLibavVideoSource actually got it right as 25i. When I tried to bob it to get 50fps progressive, I quickly noticed what they have done: blending. Basically, I believe that this was originally at a lower framerate (23.976fps I think) and that it has been brutally field blended to 25i. (50fps). You have three choices: Choice #1: You can bob-deinterlace it to 50fps progressive and get it exactly as people saw it on TV when it went on air: Code:
#Indexing video=LWLibavVideoSource("test.ts") audio=LWLibavAudioSource("test.ts") AudioDub(video, audio) #Bobbing QTGMC() Code:
tdeint(mode=1, 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) Code:
Bob() Choice #2: You can deinterlace it to 25fps progressive and at least get less blending, but it's still gonna be annoying every second: Code:
#Indexing video=LWLibavVideoSource("test.ts") audio=LWLibavAudioSource("test.ts") AudioDub(video, audio) #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) Choice #3: Deinterlace it to 25fps and then use SRestore to try to recover the original 23.976fps. It may not be perfect, but it's worth giving a shot (even though the default parameters fail to properly detect blending in this case, so you are better off with the ones provided by Manolito). Code:
#Indexing video=LWLibavVideoSource("test.ts") audio=LWLibavAudioSource("test.ts") AudioDub(video, audio) #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) #Decimating SRestore(frate=23.976) Choose your preferred option. If you ask me, I would bob it to 50fps and stick with blending as it's not too painful to watch or better still, keep it interlaced while re-encoding it. As to the problem you've got in your screenshot, that's only because of screwed up fields that have been improperly deinterlaced; I bet that DirectShowSource fucked up while decoding it (and if you drop something in an interlaced source, that's what happens). Cheers, Frank. Last edited by FranceBB; 29th April 2019 at 09:06. |
1st May 2019, 02:15 | #6 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Quote:
It works ok a good source filter is used (not directshow) . But there is a slight blend when a cleaner frame could have been chosen on the screenshot in post#3 using default settings. Perhaps settings could be tweaked, or manual override could be specified. But it's hardly noticable during playback since it's right before the scene change Quote:
|
||
24th May 2019, 11:12 | #9 | Link | |
Registered User
Join Date: Jan 2019
Posts: 13
|
Quote:
I'm currently messing with QTGMC, but I'm getting low fps and I don't know if I should tune QTGMC or just wait. Is there much difference between QTGMC presets for SD content? My script: (don't know if I choose right MT parameters, I'm getting 100% CPU usage on my i7 2600) Code:
SetMTMode(5, 8) SetMemoryMax(1024) LoadPlugin("E:\DVBT\Megui\tools\dgindexnv\DGDecodeNV.dll") DGSource("I:\tmp\DVBT\vip\S03E18 - TV6-21052019-1054_cut.dgi") SetMTMode(2) QTGMC(Preset="Slower", EdiThreads=4) SRestore() crop(4, 10, 0, 0) Spline36Resize(640,462) # Spline36 (Neutral) Code:
x264.exe "script.avs" --level 4.1 --preset veryslow --tune film --crf 21.0 --vbv-bufsize 78125 --vbv-maxrate 62500 -o asd.264 Code:
x264.exe "script.avs" --level 4.1 --preset ultrafast --tune film --crf 21.0 --vbv-bufsize 78125 --vbv-maxrate 62500 -o asd.264 Is there something else I could tweak to get more fps? Maybe MT parameters? Thanks for help. EDIT: I don't know why, but I get much less ghosting when using Yadifmod2(mode=1, order=1)+SRestore, than QTGMC+SRestore, for example: Frame after frame: (QTGMC) Frame after frame: (Yadifmod2) What am I doing wrong? Last edited by sebastiang; 24th May 2019 at 16:11. |
|
25th May 2019, 20:43 | #10 | Link | ||
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Quote:
Quote:
Cheers manolito |
||
29th May 2019, 23:21 | #12 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Padding removes the blinking lines at the top and the bottom of a clip when using YADIF as a bobber. See this thread:
https://forum.doom9.org/showthread.p...74#post1325574 |
31st May 2019, 11:47 | #13 | Link |
Registered User
Join Date: Jan 2019
Posts: 13
|
I want to give QTGMC a try, but I can't get rid of ghosts. Why am I getting them in the encode, even though I don't see any when I preview my script in AvsPmod? Example, same frame: (screeshots from AvsPmod)
Code:
SetMTMode(5, 8) SetMemoryMax(1324) LoadPlugin("E:\DVBT\Megui\tools\dgindexnv\DGDecodeNV.dll") DGSource("I:\tmp\DVBT\vip\TV6-29052019-1054_cut.dgi") AssumeTFF() SetMTMode(2) QTGMC() AssumeTFF() SRestore() crop(6, 10, 0, 0) Spline36Resize(640,464) Code:
LoadPlugin("E:\DVBT\Megui\tools\dgindexnv\DGDecodeNV.dll") DGSource("I:\tmp\DVBT\vip\encode.dgi") What am I doing wrong? |
2nd June 2019, 02:01 | #15 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
I think the two AssumeTFF() calls come from my example script...
The first one makes sure that the bobber gets the correct source field order from AviSynth, and the second call is not needed in this case (but I think it also does no harm). It is a leftover from my standard conversion script which reinterlaces after resizing. Quote:
Cheers manolito |
|
3rd June 2019, 03:48 | #16 | Link |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Maybe nothing. SRestore needs some time to lock in the cadence so you have to kind of 'sneak up' on the place you really want to check.
If you begin maybe a hundred frames back, are those trees still ghosted? Alternatively, have you actually encoded it yet and found problems afterwards? It probably won't be perfect, especially at scene changes. Blame the geniuses that created the abomination. Last edited by manono; 3rd June 2019 at 03:50. |
Thread Tools | Search this Thread |
Display Modes | |
|
|