View Full Version : What's the best way to de-interlace this film?
mantis2k
13th November 2005, 13:46
Download clip... (http://www.rarekungfumovies.com/new/LostSwordship.m2v)
I tried this code, but unfortunately the video comes out really jerky...
loadplugin("c:\program files\AviSynth 2.5\plugins\dgdecode.dll")
loadplugin("c:\program files\AviSynth 2.5\plugins\leakkerneldeint.dll")
MPEG2Source("dvd.d2v",upConv=1)
leakkerneldeint(order=1,threshold=7)
Please can you analyse the clip and tell me the best way of de-interlacing it? Any help would be much appreciated!
foxyshadis
13th November 2005, 14:19
If you do a separatefields you'll see that it isn't 50i, so a simple deinterlace isn't enough; it's been through the wringer a few times in fact. There seem to be two separate rounds of interlacing, one done before resizing; likely the conversion to pal was done very quickly and badly.
It's not going to be pretty restoring the original framerate and quality to that video.
mantis2k
13th November 2005, 14:31
Please excuse my ignorance, as I'm not very technical when it comes to this sort of thing; are you saying it's not genuine PAL framerate?
PowerDVD seems to play it back fine with it's built-in de-interlacer, but what's the best way of de-interlacing the video with AviSynth?
scharfis_brain
13th November 2005, 14:56
this film has been converted badly from NTSC to PAL. it is called a fliedblend.
restore24 wasn't that happy with this footage. it produced jerkyness, too.
you could try walking the tough way with manual deblending.
all you need to do is finding the correct offsets manually. this requires you scrolling through the whole movie checking for remained blends.
mpeg2source("D:\FORUM\mantis2k\LostSwordship.d2v") #,cpu=4)
crop(8,88,-8,-84,align=true)
tdeint(mode=1)
changefps(23.976*10)
selectevery(10,7)
bicubicresize(width,336)
addborders(0,72,0,72)
changing the offset is done via the 2nd number of selectevery.
valuable numbers are form 0 to 9.
7 actually works pretty well on that sample you provided.
if the blend-pattern changes during the movie, you need to trim it into several sections, apply another offset to it an then re join them.
the script above is built to reencode to NTSC-FILM DVD (23.976 fps progressive, 704x480, Letterboxed)
Guest
13th November 2005, 18:15
Forum rule 12: do not ask what's best.
:readrule:
mantis2k
13th November 2005, 19:07
Many thanks, scharfis_brain; I'm running your method now! I hope the new framerate/screensize is compatible with DVD, and the audio won't go out of sync?
neuron2, what method would you use to de-interlace this horrid DVD of mine? :confused:
Didée
13th November 2005, 19:47
restore24 wasn't that happy with this footage. it produced jerkyness, too.
Yeah, I'm sure poor old R24 doesn't like this too much. Shiny new R24 does like this (http://home.arcor.de/dhanselmann/_samples/LostSwordship_NewRestore24_test.avi), at some 15fps -- no need for manual intervention. :)
(Pity I can't work on all tools at the same time, isn't it.)
Scripts as they have been used are here (http://home.arcor.de/dhanselmann/_stuff/LostSwordship_test_scripts.rar). I give no support yet for this version of R24. It is WIP.
mantis2k
13th November 2005, 19:51
scharfis_brain's method seems to have less ghosting than PowerDVD, so that's a result! Have I correctly modified the last 2 lines for 16:9?
bicubicresize(width,456)
addborders(0,12,0,12)
foxyshadis
13th November 2005, 20:26
I'm curious, but is this a general method for removing fieldblends, or more a last ditch for when restore24 doesn't work? I have a video [sample] (http://foxyshadis.slightlydark.com/random/blues4cut.m2v) in NTSC that was possibly originally PAL, although I counted blends and seemed to end up closer to FILM (~1/4 of fields were blends). I wonder if I should try tweaking restore24.
(I tried to find an offset resulting in the least blends as well, but they seem to jump around too much.)
Edit: Helps if I have the link in there.
mantis2k
13th November 2005, 21:34
Didée, thanks for posting the scripts and clip, but unfortunately I can't get it to work.
http://www.rarekungfumovies.com/new/error24.jpg
Any ideas what the problem might be?
scharfis_brain
13th November 2005, 21:56
@mantis2k:
better use this for 16:9 anamorphic:
bicubicresize(width,448)
addborders(0,16,0,16)
16:9-height = 4:3-height * 1.33333
and please ensure, that the pattern ist constant all over the whole movie.
(scroll through it in VDub and look for blended, dropped, or repeated frames)
@didee: Oh, new stuff.
mantis2k
13th November 2005, 22:14
scharfis_brain, according to my authoring software, 23.976 is an invalid framerate for DVD; can the video be de-blended, but kept in 25fps?
Should I use DGPulldown? BTW, besides progressive-only, is there any disadvantage to using DGPulldown? I'm wondering why not everyone uses this software for PAL to NTSC standards conversion?
mantis2k
13th November 2005, 22:18
OMG, DGPulldown just messed it up!!! :angry: It looks jerky again with repeated frames! :o
scharfis_brain
13th November 2005, 22:39
23.976 is 'invalid' for PAL DVD.
I suggest you to make a NTSC-DVD.
if you want to make a PAL DVD anyways, you have to leave out every resizing, or
use
bicubicresize(width,538)
addborders(0,20,0,18)
to make an anamorphic PAL MPEG with 23.976 out of it.
afterwards apply DGPulldown with the setting
23.976 -> 25.000
this will insert two field duplications when playing it back on TV.
you will notice a stutter, of course.
the only alternative is to speed it up from 23.976 to 25.000 fps. but this will force you to speed up the audio, too.
mantis2k
13th November 2005, 22:58
the only alternative is to speed it up from 23.976 to 25.000 fps. but this will force you to speed up the audio, too.
DGPulldown is not acceptable for 23.976 -> 25.000, so please can you tell me a solution for speeding up the video and audio to 25fps? Also, how would you recommend I make an NTSC DVD; this would need to be changed to 29.97!!
scharfis_brain
13th November 2005, 23:11
Nope. NTSC-FILM DVD is encoded at 23.976 fps with 3:2 Pulldownflags.
(this will have exactly the SAME judder as the PAL-DVD with its blending before deblending!)
During playback on your PC the Pulldown flags will be ignored, so the motion is fluent 23.976 fps.
There is no need to blow it up to 29.97 fps interlaced.
Didée
13th November 2005, 23:27
@ mantis2k
you need the prerelease of Removegrain:
http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar
@ scharfi
Not so hot new. It's exactly the version I PM'ed you about, several weeks ago ... :)
mantis2k
13th November 2005, 23:32
scharfis_brain, my authoring software won't accept this framerate to make an NTSC-FILM DVD, so do I have to set the pulldown flags or something? I think I worked out how to speed up the video and audio to 25fps using TMPGEnc, but I'm still testing it now. However, DGPulldown only produces stutter when the output is played back on Winamp or Windows Media Player, so I need to test this too, on a standalone player; I may not need to speed up the streams afterall!
scharfis_brain
13th November 2005, 23:50
Do NOT playback a pure m2v (elementary stream)file.
A program stream (mpg) is needed for smooth playback.
a m2v file without puldown flags will run smmoth, but a m2v file with pulldown flags will stutter. Mux it y=with your audio and you will see that it runs smoothly.
your authoring program will accept the DGpulldowned file.
(pulldown flags for NTSC-FILM are mandatory!)
If it doesn't accept in though, the authoring program is crap.
btw.: in your final encode you should stick to Tdeint.
(i hope the bob() you used in your sample isn't the thing you'll use for the DVD...)
mantis2k
13th November 2005, 23:51
Didee, my MPEG encoder is outputting the restore24 file @ 696x392! How do I resize this to 16:9 anamorphic for both PAL and NTSC?
scharfis_brain
13th November 2005, 23:57
leave the width alone. just addborders to reach 704
for NTSC anamorph calculate this:
392/1.2*1.3333 = 436 pixel vertically
bicubicresize(width,436)
addborders(4,22,4,22)
for PAL anamorph
just multiply 392 with 1.3333:
bicubicresize(width,522)
addborders(4,28,4,26)
__________________
here the numbers derive from:
PAL -> NTSC: divide the height by 1.2
NTSC -> PAL: multiply the height with 1.2
4:3 Letterboxed to 16:9 anamoprh: multiply the height with 1.333333
16:9 anamoprh to 4:3 Letterboxed: divide the height by 1.333333
mantis2k
14th November 2005, 00:55
Thanks scharfis_brain, I'll make a note of that for future reference!
BTW, I can't get this restore24 script to work with TMPGEnc, but it works with Virtualdub; anyone please advise?
Boulder
14th November 2005, 08:10
You shouldn't feed the Restore24 script directly into TMPGEnc, you're only asking for trouble. Save it into a lossless avi (with HuffYUV for example) in VDub and feed that into the encoder.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.