Log in

View Full Version : NTSC user confused on how to deinterlace a PAL VHS capture


FulciLives
26th May 2004, 08:35
Hello :)

Well I live in the USA and I'm used to seeing that 3:2 (give or take) pattern and the signs of interlacing which are easy to see.

Well I'm really confused because I have a multi-system VHS VCR and I am playing back some PAL VHS tapes and the captures look progressive in VirtualDubMod ... in other words I don't see your normal NTSC type interlacing artifacts.

Some of these movies have subtitles and when the subtitles fade in or fade out I can almost sorta see interlacing there a bit but that's about it.

So I have no clue as to what to do!

My reason for deinterlacing is because I want a 25fps progressive source because I want to then slow it down to 23.976fps progressive to make a NTSC DVD

So I'm thinking if I deinterlace the PAL capture first in the script then add AssumeFPS(23.976fps, true) then all should be well.

Any ideas?

- John "FulciLives" Coleman

P.S.
I'm using a BT based capture card (AverTV Stereo) and I have it set up for 25fps PAL capture from the PAL VHS tapes which the VCR is playing back in PAL format. Captures are 768x576

scharfis_brain
26th May 2004, 08:48
on PAL System, godd mastered FILMs are always progressive, but subtitles are often show using a interlaced-based machine.

I would NOT deinterlace that content.
Just leave that combing as it is.
You won't notice it when viewing this movie normally.
Thus that combing will not affect compression that much.

Just treat that movie progressive.

violao
26th May 2004, 08:59
Originally posted by FulciLives
Some of these movies have subtitles and when the subtitles fade in or fade out I can almost sorta see interlacing there a bit but that's about it...
Then you probably have progressive content (film) telecined to 25fps by speed increase so you don't need to de-interlace. The effect with subtitles is what we see here in PAL lands when we watch a movie from TV broadcast (or VCR tapes) on progressive display. You will probably want to change fps to 23.976, but you'll also need to resample (speed down) audio.

If you had real interlaced content (like from camcorder) you would have seen a lot of combing in moving objects, especially around diagonal edges.

And set up your capture card to 720 width maximum, otherwise you'll get wrong aspect.

Wilbert
26th May 2004, 11:08
And set up your capture card to 720 width maximum, otherwise you'll get wrong aspect.
Before I say incorrect, what do you mean with wrong aspect?

FulciLives
26th May 2004, 18:02
Thanks for the help :)

As for the captured resolution of 768x576 I thought that a width of 768 captured then resized to 720 width was the "proper" way of capturing PAL material but admittingly I am new to all this.

So far I've only captured a few sample clips from a few tapes I haven't done any of the PAL VHS tapes I have from start to finish just yet.

So should I just do 720x576 then?

Also I intend to resize to 720x480 for NTSC conversion so I guess I don't have to worry about "interlaced" resizing methods since everyone is saying to treat this as progressive ... right?

- John "FulciLives" Coleman

scharfis_brain
26th May 2004, 18:22
either capture with 768 pixels and resize to 704.
Or do a capture with 704 pixels.

720 is not a valid resolution for PAL, if there is no overscan adder left & right.

Wilbert
26th May 2004, 20:22
It doesn't matter which size your capture at (768, 720 or 704), assuming you resize to a 4:3 format after that.

This is actually not entirely correct, but you will have to wait for the new version of the analog cap guide for an explanation. The problem is that sometimes more and sometimes less of the 4:3 image is captured.

If your capture contains much black border (left & right), you should cap at 720x576, crop 18 pixels, and resize to a 4:3 format after that.

trevlac
26th May 2004, 21:29
I live in NTSC land and have never touched PAL video, but I would say he should cap at 696x576, pad to 704x576, and resize to 704x480 for NTSC DVD.

This is based upon the comments that there is no interlacing and the numbers from this thread (2nd post down on General BT PAL measurements). Oh yeah, and my ability to read minds. :D

http://forum.doom9.org/showthread.php?s=&threadid=66191&highlight=capture+window

FulciLives
27th May 2004, 01:01
Originally posted by trevlac
I live in NTSC land and have never touched PAL video, but I would say he should cap at 696x576, pad to 704x576, and resize to 704x480 for NTSC DVD.

This is based upon the comments that there is no interlacing and the numbers from this thread (2nd post down on General BT PAL measurements). Oh yeah, and my ability to read minds. :D

http://forum.doom9.org/showthread.php?s=&threadid=66191&highlight=capture+window
Had a chat with Trevlac via PM on VIDEOHELP.COM (http://www.videohelp.com/) and I found out (thanks to that btTool program and a webiste Trevlac provided) that my AverTV Stereo PCI capture card (BT878) captures PAL at 696x576 for a proper aspect ratio.

Strange though (in a way) because using the same drivers (the offical Avermedia drivers) I need to capture NTSC at 688x480 to get a proper aspect ratio. You would think that the width would be the same for PAL or NTSC but I guess not. Again verified both using btTool.

Anyways I'm resizing my capture from 696x576 to 696x480 then padding up to 720x480 in my Avisynth script along with AssumeFPS(23.976, true) for PAL to NTSC conversion. Looking good so far in the test samples I've done.

For the hell of it I tried the decomb511.dll along with FieldDeinterlace(blend=true) as well as just FieldDeinterlace() and the image doesn't seem to loose any detail but doing that (either way) removes the interlacing artifacts of the subtitles (which I mentioned before).

But now I guess you guys are gonna yell at me and tell me that I shouldn't do this type of deinterlacing hehehe

- John "FulciLives" Coleman

Wilbert
27th May 2004, 09:17
But now I guess you guys are gonna yell at me and tell me that I shouldn't do this type of deinterlacing hehehe
Yup, in your case, you shouldn't deinterlace at all. Please, provide full script, then we can say how to change it.

Boulder
27th May 2004, 19:06
I've used FieldDeinterlace with a very high threshold to deinterlace only those frames with the combed subtitles.

trevlac
27th May 2004, 20:42
Originally posted by trevlac
I live in NTSC land and have never touched PAL video, but I would say he should cap at 696x576, pad to 704x576, and resize to 704x480 for NTSC DVD.

This is based upon the comments that there is no interlacing and the numbers from this thread (2nd post down on General BT PAL measurements). Oh yeah, and my ability to read minds. :D

http://forum.doom9.org/showthread.php?s=&threadid=66191&highlight=capture+window


Actually I made a slight error on my resize comment. (What was I thinking :confused: Musta got caught up in the horizontal size thing.)

NTSC is really 486 not 480. You should resize from 696x576 to 696x486 and then crop 4 lines from the top and 2 from the bottom.

Might be nice if someone else confirmed this. It's probably somewhere on this page: http://www.uwasa.fi/~f76998/video/conversion/

scharfis_brain
27th May 2004, 21:08
trevlac, I did calculate, that 704x576 and 704x480 represent exaclty the same aspect ratio.
Only the active video area is lowered overall (left, top, right, bottom) but AR is absolutely correct

I think, resizing 702x576 to 711x486 and then crop and letterbox is way to complex to have any benefits from doing so.
(especially, because you need to scale in both directions! the easy way only scales the y-acsis)

FulciLives
27th May 2004, 21:11
Originally posted by Boulder
I've used FieldDeinterlace with a very high threshold to deinterlace only those frames with the combed subtitles.
I'm interested in hearing more about this threshold thing i.e., what settings you would suggest I use.

Anyways I've done some sample captures from a couple of PAL VHS tapes I intend to capture in full ... then convert to NTSC.

This one is 4:3 full frame:

LoadPlugin("Convolution3d.dll")
LoadPlugin("decomb511.dll")
avisource("D:\CAPTURE\cap9.avi")
crop(4,4,-4,-12) #Capture resolution is 696x576
fielddeinterlace(blend=true)
Convolution3D (0, 32, 128, 16, 64, 10, 0)
AddBorders(16,8,16,8) #Brings it to 720x576
LanczosResize(720,480)
AssumeFPS(23.976, true)
ConvertToYUY2()

And this is the script for a 4:3 WS PAL which I will be converting to 16x9 NTSC

LoadPlugin("Convolution3d.dll")
LoadPlugin("decomb511.dll")
avisource("D:\CAPTURE\cap5.avi")
crop(4,72,-4,-72) #Capture resolution is 696x576
fielddeinterlace(blend=true)
Convolution3D (0, 32, 128, 16, 64, 10, 0)
AddBorders(16,0,16,0) #Brings it to 720x432
LanczosResize(720,480)
AssumeFPS(23.976, true)
ConvertToYUY2()

I've tried both fielddeinterlace() as well as fielddeinterlace(blend=true) and can't really see a difference between them (loading the AviSynth AVS file into VirtulDubMod and eyeballing it).

Also interested to hear what people think of Trevlac's mention to resize the height to 486 crop 6 rather than straight resize to 480

- John "FulciLives" Coleman

Boulder
28th May 2004, 06:13
John,

FieldDeinterlace() and FieldDeinterlace(blend=true) are the same as blending is enabled by default;)

You can adjust the threshold easily by using FieldDeinterlace(full=false,threshold=20,show=true). Then find a frame with the combed subtitles and start raising the threshold value (20 is the default) until you find the value where the frame is no longer considered combed. Lower the value slightly so that FieldDeinterlace thinks of it as combed and you should be done. It's, of course, recommended to check that frames without any visible combing don't get deinterlaced and that other frames with combed subs get deinterlaced.

Then you'll just use the line FieldDeinterlace(full=false,threshold=x) and only the frames with the combed subs should be deinterlaced.

Hope this helps:)

FulciLives
28th May 2004, 06:39
Originally posted by Boulder
John,

FieldDeinterlace() and FieldDeinterlace(blend=true) are the same as blending is enabled by default;)

You can adjust the threshold easily by using FieldDeinterlace(full=false,threshold=20,show=true). Then find a frame with the combed subtitles and start raising the threshold value (20 is the default) until you find the value where the frame is no longer considered combed. Lower the value slightly so that FieldDeinterlace thinks of it as combed and you should be done. It's, of course, recommended to check that frames without any visible combing don't get deinterlaced and that other frames with combed subs get deinterlaced.

Then you'll just use the line FieldDeinterlace(full=false,threshold=x) and only the frames with the combed subs should be deinterlaced.

Hope this helps:)
Thank you so much :)

I'll have to play around with the settings then and see what I come up with ... will probably start my full PAL VHS captures tomorrow.

- John "FulciLives" Coleman

Boulder
28th May 2004, 06:50
Regarding your captures, some PAL stuff is pure interlaced video (most BBC shows for example). You'll notice it even when watching the tape as motion is fluid compared to the material that is originally non-interlaced. In those cases, KernelDeint() might be a good choice and I recall scharfis_brain recommended a threshold of 5.

trevlac
28th May 2004, 19:18
Originally posted by scharfis_brain
trevlac, I did calculate, that 704x576 and 704x480 represent exaclty the same aspect ratio.
Only the active video area is lowered overall (left, top, right, bottom) but AR is absolutely correct

I think, resizing 702x576 to 711x486 and then crop and letterbox is way to complex to have any benefits from doing so.
(especially, because you need to scale in both directions! the easy way only scales the y-acsis)

@Scharifs

We may be saying the same thing here. I'm not sure. I agree that 704x576 and 704x480 have the same AR, given the samples were taken at the same rate (13.5MHz most likely). This is because the 486 went to 480 via crop, hence no AR change.

I also agree that resizing in 2 dimensions is a bit much. However, John only has to resize the height if he can cap at 696. 696 is the number of 13.5MHz (aka DVD) pixels captured by his card. These are not PAL pixels. He needs DVD pixels and they are also 13.5MHz for NTSC.

If John really wants to get it spot on, he should resize from 576 to 486 and then crop as I said. 576 and 486 are the equilivent sizes in the height dimension.

From "A Quick Guide"

3.1 How To ...
2. Calculate the vertical conversion factor by using the following formula: vertical_conversion_factor = target_active_picture_height / source_active_picture_height.

...

5. Calculate the new vertical size: target_sampling_matrix_height = vertical_conversion_factor * source_sampling_matrix_height

6. Resample the image to the new size

7. Check if the new size matches the target resolution's sampling matrix dimensions. If not, crop (i.e. cut at the edges) and pad (i.e., add black borders) accordingly so that it will.


So this gives (2.) 486/576 = 0.84375 (5.) 0.84375*576 = 486.
Then resize to 486 and crop to 480.

I'd suggest 4 from the top, 2 from the bottom. Although given what a VCR does, any focus on this is probably way too excessive.


Now of course, this is all a bit excessive in the details ... hard to say if anyone could ever notice the difference. :)