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 > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th July 2010, 12:40   #1  |  Link
heyt
Registered User
 
Join Date: Jan 2007
Location: Hamburg, Germany
Posts: 6
Blending PAL and NTSC film material

Hi,

I'm working on backup copies of some of my LD showing first signs of laser rot.

Since I got a PAL and NTSC version of some of the films I thought of restoring original 24 fps and blending both versions to reduce the video noise present on the LDs and the first errors caused by laser rot.

For now, I already managed to restore the original 24 fps of both versions and cleaned at least some white stripe caused by laser rot. But now blending gives me some headache. I cropped the black borders from the original material, corrected the PAR to 1:1 and AR to 2.35:1. But still both versions differ a bit in height, weight and position. This is easy to fix for a single scene, but sadly the alignment changes after almost every scene.
So is there any way to do the alignment automatically?

By the way the result for a single scene looks perfect. Quite sharp and a low noise level. More then I ever thought of when starting with LD material. In combination with the original 5.1 AC3 material it will be worth all the work.

Thanks
Heyt
heyt is offline   Reply With Quote
Old 18th July 2010, 15:11   #2  |  Link
um3k
Registered User
 
Join Date: May 2007
Posts: 220
Perhaps this thread will help? Particularly, my script in post #14. You'll have to change the numbers around to match your particular source, however. If you post a sample of your source, including a problematic scene change, I'll attempt to make the necessary modifications.
um3k is offline   Reply With Quote
Old 18th July 2010, 20:03   #3  |  Link
heyt
Registered User
 
Join Date: Jan 2007
Location: Hamburg, Germany
Posts: 6
Thanks, your script works very well for my purpose.

The only thing left is "zooming". The different PAR of PAL and NTSC video seem to result in some problem in AR after correction. So it is not real zooming but more a correction in height and width separately. But for now it seems I don't have to change the zoom for some bigger parts of the movie. It is only necessary after a change in telecine or change of LD side. So only a few adjustment that can be handled manually.

Anyway if you have any suggestion for a script solution I'd be very grateful since I have some more LD to do this stuff. I uploaded a short clip of PAL and NTSC original video to http://www.megaupload.com/?d=7F4Q06SX

The code I am using at the moment comes here:
Code:
NTSC = AviSource("C:\Users\Heyt\Desktop\NTSC.avi").ConvertToRGB
PAL = AviSource("C:\Users\Heyt\Desktop\PAL.avi").ConvertToRGB

NTSC = Crop(NTSC,8,0,-8,0)
NTSC = Lanczos4resize(NTSC,704,640)
NTSC = Crop(NTSC,0,80,0,-80)
NTSC = Lanczos4resize(NTSC,702,473).AddBorders(1,4,1,3)
NTSC = Trim(NTSC,1,0)

PAL = Crop(PAL,8,0,-8,0)
PAL = Lanczos4Resize(PAL,704,640)
PAL = Crop(PAL,0,80,0,-80)
#PAL = Crop(PAL,0,72,0,-72)
PAL = AssumeFPS(PAL,24000,1001)

bPAL = PAL.AddBorders((800-PAL.Width)/2, (650-PAL.Height)/2, (800-PAL.Width)/2, (650-PAL.Height)/2, color=$000000)
bNTSC = NTSC.AddBorders((800-NTSC.Width)/2, (650-NTSC.Height)/2, (800-NTSC.Width)/2, (650-NTSC.Height)/2, color=$000000)

int = Interleave(bNTSC,bPAL).ConvertToYV12()
est = int.Greyscale().depanestimate(range=1,pixaspect=1.0,zoommax=1,improve=false,trust=0)
dep = int.depaninterleave(est,pixaspect=1.0,prev=0,next=1,subpixel=2,mirror=0)#.ShowFrameNumber(x=300,y=300)
acol = dep.SelectEvery(4, 1)

Overlay(bNTSC,acol,mode="blend",opacity=0.5)
Crop(49,137,-49,-134)
AddBorders((720-Width)/2, (480-Height)/2, (720-Width)/2, (480-Height)/2, color=$000000)
Most important here is the small correction of the size of the NTSC clip (second resize). Here I have to figure out the exact values to achieve good results after each major change to the video material. The values given work very well for the given clip.
heyt is offline   Reply With Quote
Old 19th July 2010, 02:36   #4  |  Link
um3k
Registered User
 
Join Date: May 2007
Posts: 220
I'm trying to download that footage, but it keeps quitting about 2/3 of the way through the download. Could you try uploading to another site, such as MediaFire (seems to be the preferred site around here).
um3k is offline   Reply With Quote
Old 19th July 2010, 03:54   #5  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by heyt View Post
NTSC = Lanczos4resize(NTSC,702,473).AddBorders(1,4,1,3)
You screw up the chroma channels by cropping to an odd number, even if making it even again with the AddBorders. If progressive always crop the height by Mod2, if interlaced by Mod4.
manono is offline   Reply With Quote
Old 19th July 2010, 04:54   #6  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 602
I imagine these are two different telecine transfers, probably done on different machines, and this was in the era of CRT telecine. So you have different levels of geometric distortion and shading to factor in.

Wouldn't it be a better idea to capture one version (probably PAL would be best for higher resolution) multiple times and overlay the different captures, rather than trying to mix standards?
Lyris is offline   Reply With Quote
Old 19th July 2010, 09:50   #7  |  Link
heyt
Registered User
 
Join Date: Jan 2007
Location: Hamburg, Germany
Posts: 6
@um3k
I have uploaded to http://www.mediafire.com/?vn9cuqidu5n5vk9. Please check if it is working now.

@manono
Yes your right, I thought about it too. But do I really harm the complete chroma channels? Or is it a local effect on the lower end of the picture. This would not matter too much since I left some of the black border from the letterbox picture there and just crop it in the end.
Please correct me if I am wrong, I'm still not that advanced in those color room thing. In all cases I have change the resizing in the later on cropping to mod2 to be sure. Resizing to 472 gives almost the same results than resizing to 473.

@Lyris
You are probably right. For testing I use the Star Wars SE Laserdisc from 1997 in the German and US version. And I always thought about two different transfers. I only have doubts when I see the NTSC version to have the sharper picture.
Nonetheless what you propose was my first thought too. I had up to 5 different captures of the PAL meterial, even with two different capture devices, and tried different combinations of blending them without luck. I am sorry I don't have any result files any more I could show you. When I tried with NTSC and PAL version the result looked amazingly better. There are only some scenes directly after the scroll text and right at the end where I have to switch back to the single versions due to not perfectly identical material.
heyt is offline   Reply With Quote
Old 19th July 2010, 15:17   #8  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 602
Out of interest, could you upload a raw sample of the LD source without any processing added?
Lyris is offline   Reply With Quote
Old 19th July 2010, 15:43   #9  |  Link
heyt
Registered User
 
Join Date: Jan 2007
Location: Hamburg, Germany
Posts: 6
Sure. You find in the archive a short clip of PAL and NTSC version. Both completely unprocessed. The sound you find with the files is a recording of the analog output of the LD player. I use it just to later on synchronize the original bit correct audio dubs and the 5.1 dub of the NTSC version to the processed video.
I have also put a blended and fully processed (up to now) version of the same scene.
heyt is offline   Reply With Quote
Old 19th July 2010, 17:20   #10  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
Some things I noticed looking at the two clips:

1) The NTSC clip seems to have a higher horizontal resolution than the PAL clip (look at those white locker things in the background)

2) The PAL clip seems to have a higher vertical resolution (as expected), but not as much as to be expected.

3) The NTSC clip seems to have a slight tint to it and the saturation is too high, while the PAL clip's saturation seems a bit low. (Use Tweak or SmoothTweak and don't judge it on a computer screen).

4) I think I found out where the different ARs of the two clips originates from.
I mean there is no question that if you convert the NTSC frame to PAL (or vice versa) the correct way* they should match up perfectly aspect ratio wise (alignment and size/zoom and blanking can still differ).
It seems the NTSC version was sampled digital in a 720x486 frame (definitely not impossible for a 1997 release) before playing it out to a LD recorder. While the actual active NTSC picture is 711x486 the sampling probably occured with the full 720 pixels holding what belongs into 711 pixels leading to a aspect ratio error (very common mistake).
How am I so sure about that? Well guess what, if you convert the NTSC frame to PAL* and do not correct for exactly that difference** (711<->720) the two pictures suddenly match up perfectly aspect ratio wise. Two errors cancel each other out in this case.
So, in a nutshell, if you correct the NTSC clip to the PAL's aspect ratio then you're doing the right thing.

*Padd to 486 scanlines then resize to 711x576, then padd to 720, this is a proper NTSC to PAL conversion.
**i.e. doing it wrong, which cancels out the AR error in this case is resizing the 720x486 to 720x576, see pictures.

Only the zoom and blanking are still very slightly different, which is normal.

Last edited by TheSkiller; 19th July 2010 at 17:25.
TheSkiller is offline   Reply With Quote
Old 19th July 2010, 22:20   #11  |  Link
heyt
Registered User
 
Join Date: Jan 2007
Location: Hamburg, Germany
Posts: 6
The AR thing is an interesting point. I never thought about such a problem. But OK, why not? The whole NTSC transfer caused me a lot of trouble already. It seems they cut some frames after telecine and then mixed the whole thing with 30i material for the blend before the totally screwed up credits. But OK its already fixed. And with your explanation for the wrong AR I can now reproduce my values for the AR correction by a clean calculation. Thanks for this. In addition it might solve my zoom problem too, since the AR error should be the same for the whole transfer. I have to check tomorrow.
heyt is offline   Reply With Quote
Reply

Tags
align, laser rot, laserdisk

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:52.


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