View Full Version : PAL capture lines


Wawazat71
18th January 2004, 04:50
Hi - first time poster. Great forum BTW, I'm a relative newcomer but got a pile of very useful info from here.

Would like any suggestions to a solution to this though, its a PAL capture from a VHS source, and you can see the purplish lines evident in the green part, and also on the faces a little.

http://users.bigpond.net.au/goo/footy.bmp

I'm transferring this from VHS, and gonna leave it interlaced, just wanna cut out the slight purplish flickering effect.

Now I can get rid of that using the 2d comb filter for virtualdub. I would like to make avisynth do the work instead.

I'm guessing the solutions somewhere in guavacomb, but I'm unsure of where to go with the settings.

Any ideas much appreciated!

scharfis_brain
18th January 2004, 11:56
try rmPAL for Virtualdub on this source.
http://homepages.fh-giessen.de/~hg6423/rmPal/index.englische-uebersetzung--translated-into-english.html

Wilbert
18th January 2004, 13:26
Following script is AviSynth's equivalent:

ConvertToYUY2(interlaced=true) # or ConvertToYV12(interlaced=true); if source is RGB
clip = SeparateFields()
even = clip.SelectEven()
odd = clip.SelectOdd()
clip_even = MergeChroma(even, odd, 0.5) # U and V planes of even and odd fields are averaged, luma even untouched
clip_odd = MergeChroma(odd, even, 0.5) # U and V planes of even and odd fields are averaged, luma odd untouched
Interleave(clip_even, clip_odd)
Weave()

mf
18th January 2004, 13:41
isn't it easier to just do:
ConvertToYV12(interlaced=true)
MergeChroma(Blur(0, 1))

scharfis_brain
18th January 2004, 13:48
IMO this is the right way (assuming, mf's code is working for progressive video)
because the chroma lines are 2 pixels high (take a closer look at his picture)
and this code will retain the interlaced (temporal) -chroma-information

ConvertToYUY2(interlaced=true)
separatefields()
MergeChroma(Blur(0, 1))
weave()

mf
18th January 2004, 13:52
Originally posted by scharfis_brain
IMO this is the right way (assuming, mf's code is working for progressive video)
because the chroma lines are 2 pixels high (take a closer look at his picture)
and this code will retain the interlaced (temporal) -chroma-information
Looks to me like that screenshot had progressive chroma upsampling for an interlaced source.

scharfis_brain
18th January 2004, 14:05
I don't think so!
Because you don't see any corresponding luma-combing that could explain this chroma alternating.

It is just a manner of recording the video to PC.
In VERY past I somtimes had such recordings, too. But I cannot reconstruct under which conditions this chrma-alternation occurs or not.

It seems to be, that the internal PAL Dec-(En-)Coder messes up the 180° shifting every other line in the fields.

the PAL-Standard submits every chroma-line twice.
1st time 0 degree shifted
next line 180 degree shifted

the decoder delays the 1st line, shifts the next line by again by 180 degrees (2x180 = 0degree) and then adding them.

This is made to avoid the chroma-problem NTSC suffers, when a phase-shift is indroduced into the transmitted video signal.

It seems to be, that the capture-device does not have a chroma-delay. It seem just to shift every other line by 180 degrees.

my script is replacing this missing delaying and adding of both chroma lines.

It is definitley not interlaced sampled as progressive.

Wawazat71
18th January 2004, 21:06
Thanks guys - I'll try those suggestions when I knock off work tonight

For the record that screenshot is an enlarged portion of the whole picture. The full shots provided FYI

http://users.bigpond.net.au/goo/image1.gif

FredThompson
19th January 2004, 02:53
If this is something you plan to do frequently, perhaps you should invest in a multi-format VCR.

I bought one for use with PAL tapes which has RCA connectors. This allows me to capture PAL as PAL, a huge benefit. You can probably find them with S-CART as well.

The players which try to do format conversion internally are...uh...expensive junk.

Wawazat71
19th January 2004, 04:01
Fred - thanks for the suggestion, but it's a PAL player, playing back PAL VHS tapes (recorded with same player), I'm not doing any format changing

I actually got a chance to have a quick fiddle with some of the suggested scripting and looks like that might be a solution, I'll have a better go at it tonight, but initially seems to be on the right track! :cool:

FredThompson
19th January 2004, 04:13
Ah, yes, what I saw isn't what you typed :P

Mug Funky
19th January 2004, 07:32
@ Wawazat71: something tells me you're an aussie... hehehe.

what are you capturing with? i've not come across this problem with VHS caps before (although shcarfis' explanation seems true enough.)

all my previous caps have been done with DV camcorders.

Wawazat71
19th January 2004, 07:39
VIVO port on my leadtek Geforce 4200 mate.

I've also got a pinnicle PCTV card but it's pretty old and a dog to get capturing. Maybe it might be worth the trouble to at least make a comparision

Mug Funky
19th January 2004, 07:54
hmm. the pinnacle might be better... honestly i have no idea. but if you're getting those lines then i'd say the geforce has been modified to capture in PAL, but doesn't do it correctly. there might be driver upgrades to fix that sort of thing, but i'm not sure as most of my sources are DV or DVD (or CG :))

[edit]

isn't foxtel DVB? i seem to remember it is. if that's so you might be able to find some way of capturing digital... this probably means getting a nice and expensive card to do it though.

Wawazat71
19th January 2004, 07:59
Heres the results from scarfis's suggestion:

http://users.bigpond.net.au/goo/image1.bmp

(Taken after mpeg2 conversion)

You can see the RHS of the picture is much cleaner than the left (I superimosed the 2 together) same on the next sample

http://users.bigpond.net.au/goo/image2.bmp

Once again, much better

Thanks guys. I might have a fiddle around with the suggestion made by Wilbert as well, but it's definately got me on my way. Thanks again

Mug - I'll give the pinnacle a crack. If I remember right though the GEF gave an overall better capture. bit grey on that lol..

scharfis_brain
19th January 2004, 09:17
I see a chroma-shift in your Video.
This can easily be knocked out with.

ConvertToYUY2(interlaced=true)
separatefields()
MergeChroma(Blur(0, 1).crop(0,x,0,0).addborders(0,0,0,x))
weave()

where x is the number of lines to shift the chroma upwards.
try 1 or 2 here.

Wawazat71
19th January 2004, 09:26
Tried that - seemed to introduce a worse blue shift above the boxes the players heads are in - was the shift you spotted in the top right part of the picture, where the green plying feild and the white boundary meet? (apologies, still learning :) )

scharfis_brain
19th January 2004, 09:38
what do you mean by "wrong blue shift"?

On your Pictur, all colors are shifted by the same amount of lines downwards.

look at the red fox-logo,
the players shoulders,
the bleeding green of the half-circle,
the bleeding blue of the line between half-circle and white player-boxes.
All are shifted down.

This seems to be also a PAL/VHS-issue. it is increasing with every generation(copy of copy) of the VHS tape.
1st generation (1 record) chroma-shift by 1 line per field (2 lines per frame)
2nd gen. 4 lines / frame
3rd gen. 6 lines...

this is introduced due to the PAL-chroma-delaying-line
(to decode PAL, because PAL & NTSC are stored the same way on VHS, exept speed & number of lines)
within the VCR.

FredThompson
19th January 2004, 09:50
Oh, that sounds interesting. There's a progressive shift downwards with PAL VHS copies? yuck. Seems I must train my eyes to properly clean up the few PAL VHS tapes which come my way.

Is there a good detainled explanation of this somewhere? I'm having trouble following your explanation.

scharfis_brain
19th January 2004, 10:21
I don't know, where this chromashift is described. I did only read some PAL-docs and thought that this is the only way, the VHS-chroma-shift can occur.

Above in this Thread, I described the PAL-Chroma-Decoding process.

- mixing two following chroma-lines together (1st line is delayed)
- this introduces a chroma-shift by 2 lines downwards on the hole frame (or 1 line one a field)

normally the transmission is like this way:

Brodcaster -> PAL -> TV/CaptureCard -> delayline (chromashift) -> YUV

(to get a unshifted image here, I assume (but I am not sure), that the broadcaster is sending a pre-shifted signal)

the VHS transmission will look like this:

recording: Broadcaster -> PAL -> VCR -> delayline (chromashift) -> Tape
playback:Tape -> PAL -> TV/CaptureCard -> delayline (chromashift) -> YUV

as you can see, there is a 2nd chromashift. And this thing will be visible in the resulting image.

and now lets make a copy of that tape:

recording: Broadcaster -> PAL -> VCR -> delayline (chromashift) -> Tape
copying: Tape -> PAL -> Composite/S-Video -> VCR -> delayline (chromashift) -> Tape
playback: Tape -> PAL -> TV/CaptureCard -> delayline (chromashift) -> YUV

here, the copy will introduce the next chroma-delaying per one line, resulting in a additional shift of two lines per frame

mf
19th January 2004, 12:41
Drat the VCR makers. They should've made it to be:
recording: Broadcaster -> PAL -> VCR -> delayline (chromashift) -> Tape
playback:Tape -> shift lines back up -> PAL -> TV/CaptureCard -> delayline (chromashift) -> YUV

scharfis_brain
19th January 2004, 16:45
HaHa!
Who can store two full fields for getting the chroma shifted up?

The only solution would be, to shift down the luma as well.

VCRs have to be cheap for mass market.

FredThompson
19th January 2004, 16:47
@scharfis_brain,

Would you explain what you see that tells you there is a chroma shift and how do you know the number of lines? I'm not used to working with PAL so what is obvious to your eyes is not obvious to mine.

I looked at the red FOX logo as you suggest and see some blue corruption near the top of the letters. It looks like one line of blue where it should be red.

When I look at the green half-circle, I see green lines below it for many lines, not just one.

Can you explain a little more the visual aspects which you see?

mf
19th January 2004, 20:11
scharfis_brain owned everyone in the thread :D.

scharfis_brain
20th January 2004, 00:43
It is very hard to explain it on THIS example, I need a NON-GIF-Version of that picture.
PNG (24bit) or JPG @ Q17 / 85%

the 8bit-dither destroys every fine chroma....

Wawazat71
20th January 2004, 01:26
I'll getcha a PNG when I get home tonight.

FredThompson
20th January 2004, 02:28
Thanks. This stuff is a little hard to follow for NTSC-types.

Wawazat71
20th January 2004, 09:04
here tis. sorry bout the size but it's as requested.This is the raw capture, no processing

http://users.bigpond.net.au/goo/image1.png

FredThompson
20th January 2004, 09:49
Looks like you used the undocumented hair bleaching and cutting filter, huh?

(See embedded clip #3 on preceeding page)

Wawazat71
20th January 2004, 11:27
Originally posted by FredThompson
Looks like you used the undocumented hair bleaching and cutting filter, huh?

(See embedded clip #3 on preceeding page)

lol!

Can you belive there was a time this technology never existed ?!?

http://www.keratin.com/az/maggieday.JPG

:confused: :scared: :D