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 26th April 2019, 12:28   #1  |  Link
sebastiang
Registered User
 
Join Date: Jan 2019
Posts: 10
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.
sebastiang is offline   Reply With Quote
Old 26th April 2019, 17:33   #2  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,467
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:
DSS2("test.ts")
AssumeTFF()
Yadif(mode=1)
Srestore()
Of course you can use different source filters and a better bobber. And if you need a PAL result you have to speed up the 23.976 frame rate to 25.


Cheers
manolito

Last edited by manolito; 26th April 2019 at 17:35.
manolito is offline   Reply With Quote
Old 26th April 2019, 19:37   #3  |  Link
sebastiang
Registered User
 
Join Date: Jan 2019
Posts: 10
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?
sebastiang is offline   Reply With Quote
Old 26th April 2019, 20:36   #4  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,467
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:
SRestore(mode=-1,omode="pp3", thresh=12, speed=-1, cache=10)
Good luck
manolito
manolito is offline   Reply With Quote
Old 29th April 2019, 08:53   #5  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 539
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()
If you think that it's too slow, you can try with tdeint:

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)
if you still think that it's too slow you can try with Bob:

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)
By the way, for this kind of interlaced .ts sources, one of the best indexers is DGDecode.




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.
__________________
Broadcast Encoder

Last edited by FranceBB; 29th April 2019 at 09:06.
FranceBB is offline   Reply With Quote
Old 1st May 2019, 02:15   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,793
Quote:
Originally Posted by FranceBB View Post

Choice #3:
Deinterlace it to 25fps and then use SRestore to try to recover the original 23.976fps.
You have to double rate deinterlace (to 50fps in this case) for srestore to work correctly . It has to choose from the remaining blends . If you discard 1/2 of them before it chooses, it won't make the correct choice

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:
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).
Yes, post #3 is most likely a directshow decoding problem
poisondeathray is offline   Reply With Quote
Old 3rd May 2019, 12:04   #7  |  Link
sebastiang
Registered User
 
Join Date: Jan 2019
Posts: 10
Thank you guys for help!

Quote:
Originally Posted by poisondeathray View Post
Yes, post #3 is most likely a directshow decoding problem
I was actually using DGIndexNV and DGSource there.
sebastiang is offline   Reply With Quote
Old 3rd May 2019, 19:39   #8  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,877
Maybe try the another indexer/decoder, because it looks fine here.

LWLibavVideoSource("D:\ghost.ts.lwi")
Yadif(mode=1)
SRestore()
Info()

hello_hello 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 19:04.


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