Log in

View Full Version : ugly PAL source


wim
13th August 2003, 15:20
hi guys, i am trying to encode an old b&w movie "the trial". the source has some combing or sort of weird interlace stuff. i have already done four full avis: tried FD, i tried toms twice, and then i tried the deinterlacer built in the div5 codec, and i just can not get a good looking result. here (http://www.susanglenn-hume.com/wim/host/trial.vob) is a vob fragment of a guy walking across the room which shows the troubles clearly (the whole movie is like this) - look at just the separate fields and even they look pretty messy. do the experts have any advice?

-w

killingspree
13th August 2003, 15:35
hi,
welcome to the world of old b&w movies :)
i will have a look at the vob file as soon as i get home from work, but here's what i think you're dealing with:

an interlaced source that is not truly 25 fps.

in other words, if you're going for divx/xvid you should use decimate to get as close to the true fps as possible.

to do so, first use a deinterlacer(e.g. fielddeinterlace) and then load the avs into vdub to check if there's duplicated frames (i bet there are)
afterwards add decimate and see if that helps

oh and btw: the ultimate expert in this field is manono ;)

steVe

edit: typos

killingspree
13th August 2003, 19:43
ok, i've been looking at it, but haven't gotten much smarter from it. i think iwas wrong with my first assumption though. It seems as if the movie is truly 25 fps.

while looking at it i noticed some fairly bad blending, which you can at least partly get rid of by using Fielddeinterlace(blend=false). Still the results are far from being satisfactory.
so bottom line is, i think i'm missing something truly simple, but i do not know what it is... perhaps some unusual field order or alike...

oh well... i guess it is really a case for manono :)

steVe

toraneko
14th August 2003, 09:32
I can't download the sample clip (restricted amount of download), but does KernelDeint (http://neuron2.net/kerneldeint/kerneldeint.html)(threshold=0,order=1,sharp=true) look better ?

cheap-red-wine
16th August 2003, 03:33
It's not a "movie", i.e., not film. It is 25fp interlaced video. There are no progressive frames. There is field blending, for which there is no good solution. Use a deinterlacer of your choice and be happy that the blends are not so objectionable when the clip is played at normal speed.

wim
2nd December 2003, 13:08
thanks guys

tried just about everything on this one but i got tired of having these vobs on my HD and just gave up trying to make it look perfect..
used tomsmocomp in the end and it's not so bad in playback, only when you're looking at single frames.

jggimi
2nd December 2003, 16:48
Thanks for sharing the .vob fragment. It does indeeed look like 25fps, but you can see "ghosting" in the separated fields, most obviously at the doorways.

Don't give up entirely... please leave the .vob fragment available a little while longer. Manono is very experienced working with old B&W sources. I'll PM him and ask him to take a look at the .vob and see what he thinks.

manono
2nd December 2003, 18:46
Nah, it's hopeless. I think they took a telecined 30fps NTSC source and started blending fields/frames to get it down to 25fps for PAL. Damn shame, really, treating Kafka that way. Deinterlacing is about all you can do with that piece of junk. I think you've already done the best that can be done with it.

scharfis_brain
2nd December 2003, 21:04
hot hopeless, if there is a constant Pattern!

function unblendpattern(clip clip, int offset, float fps, bool refitfps, bool debug)
{

a = (debug == true) ? clip.ShowFrameNumber() : clip
b = changefps(trim(a,0,-1),framerate(a)*100).assumefps(framerate(a))
out = (offset == 0) ? changefps(a, fps) : changefps((b.trim(0, -offset) + a), fps)
out = out.trim(int(offset / (framerate(a)/fps)) , 0)
out = (refitfps == true) ? out.assumefps(framerate(a)/2, true).resampleaudio(audiorate(a)) : out
return out
}


mpeg2source("trail.d2v")
dgbob(order=1)
unblendpattern(22,24,true,false)

delivers a nearly blend-removed 25fps progressive Video.

my function uses changefps to create a pattern to select the "good" frames.

manono
3rd December 2003, 03:30
Hi scharfis_brain-

I actually thought about bringing up the work you've been doing in this area, but since it's too much for my poor brain to handle, I decided against it. I've seen your other posts here and at neuron2's site as you've been developing this. But your full explanation in the AviSynth Forum (http://forum.doom9.org/showthread.php?s=&threadid=66093) was made after your (and my) post here. Otherwise I might have linked it in case wim wanted to give it a try. I see NTSC versions of this kind of thing all the time, so I'm going to have to attempt it one of these days. It looks like groundbreaking work, and I just wish neuron2 were around to make a full-fledged filter out of it to automate it.

if there is a constant Pattern

And of course, that's a big if. ;)

scharfis_brain
3rd December 2003, 11:34
manono, this function should also work with NTSC sources (I've written that as compatible a possible [no fixed framerates etc.])!
in the cause of NTSC, some things could be easier (I assume, but cannot test, hehe)
shorter pattern repeats due to higher framerate difference
PAL: 24fps source 50 fps Video -> pattern repeats every 50 frames
NTSC 25fps source 60fps video -> pattern repeats every 12 frames

so it is easier to find the offset and the real framerate of the source.

btw. this function does not work on the fieldblended PAL Startrek-series or fieldblended Musicvideos, because you would have to apply a new offset after each scenechange.
This would be a extreme
trim(video,x,y).unblendpattern()+trim(video,x,y).unblendpattern()+trim(video,x,y).unblendpattern()+....
orgy!

wim
3rd December 2003, 14:45
hi

@scharf
i downloaded the vob fragment myself and tried this function, does look a little bit better than toms, and there does seem to be a pattern in the frames all through the dvd but of course it would be a long shot whether or not this goes throughout the whole thing without any bumps/offsets. i wasn't expecting anymore replies in this thread so unfortunately i have deleted the vobs from disk and am not able to check right now if this function works all the way through.

@manono
shame for old kafka that i don't think there are even any prints of the film reels in good condition..because it is mainly a visually-driven movie - kind of like an eerie dream. the audio is a bit dodgy too where it is hard to understand some dialogue, but still nice to see for orson welles.

@all
one other thing i noticed while watching was that the source (which should be b&w) had some colourful patches occassionally which twinkled the spectrum kind of like oil-slick in water effects..which i guess might have been some type of aliasing. and of course the divx faithfully reproduced these defects from the source. these are distracting/annoying to see and it made me wonder whether there is a way to force the divX codec to encode in greyscale? surely if you were dealing with a b&w source you could get a big compression advantage if the codec knew this...i'm not sure how mpeg4 stores colour information but intuitively i'd be thinking of forgetting three numbers for rgb and just keeping one number for luminance or intensity?

manono
3rd December 2003, 16:44
Too bad you got rid of the vobs (gee, after only 3.5 months on the hard drive).

But for almost all black and whites, some sort of greyscale is necessary. I use:

Tweak(Sat=0)

Others use:

Greyscale()

Just add one or the other to your .avs. Not much compression gain, but you'll get rid of the colors/rainbows/moire patterns. If you use other filters, put the greyscale at the bottom, in case one of the other filters adds color of its own.