Log in

View Full Version : Convert PAL DVD from an NTSC Master


Smithee
26th February 2011, 10:06
I've just recently installed VirtualDubMod, AVISynth and DGIndex after hearing so much about them. I've also installed MEGUI, which has been helpful getting a grasp of all these tools.

Everything is new to me but so far so good with the simple conversions I've done with hard-telecined film material.

However I have a PAL DVD that I would like to convert. The title has never been released in NTSC except for a VHS, so it's worth the time to convert it. However, the PAL DVD is mastered from an NTSC source, since the running time is exactly the same as the US VHS. I have a region-free DVD player but the film doesn't play like a typical progressive PAL DVD. And no wonder--it's heavily interlaced. Why Universal UK released such a poorly encoded DVD is beyond me.

I'm still taking baby steps when it comes to what can be done with the tools at hand. I took the easiest approach and deinterlaced the entire film using various deinterlacers. Keeping the framerate at 25fps isn't a problem since I simply used DGPulldown in the process of mastering an NTSC DVD. The film looks OK but of course is a rather poor man's progressive. I tried all the deinterlacers bundled with MEGUI (Yadif, TDeint, LeakKernelDeint, TomsMoComp and Decomb) but it's obvious to me that standard deinterlacing isn't the way to approach things. Perhaps I'm expecting too much, though.

In the past I've done PAL to NTSC conversions using DGPullown and TMPGEnc 4.0 XPress, but PAL video from an NTSC master is obviously more complicated.

Is there anyone who would be willing to download a sample clip from the film, analyze it and provide a script to get the film in progressive form without the latency and ghosting of deinterlacing? There must be others who have come across PAL video mastered from an NTSC source. As mentioned, perhaps I'm expecting too much.

It would be appreciated very much if someone experienced in this sort of thing could give it a try.

A lossless, DVD-compliant clip (15MB), chosen for its movement, is available here:

http://vanc.igs.net/~roughley/LFL_PAL_clip.mpg

Thanks!

manono
26th February 2011, 10:27
Welcome to the forum,

Try this:

Yadif(Mode=1)#or the bobber of your choice
SRestore()

http://avisynth.org/mediawiki/Srestore
http://forum.doom9.org/showthread.php?t=95924

Emulgator
26th February 2011, 11:04
MPEG2Source("D:\LFL_PAL_clip.d2v")
QTGMC()
SRestore(FRate=25000/1001)
#MedSharp2(str=3) #if you can afford slow sharpening
Lanczos4Resize(704, 480, 10, 0, -4, -0).AddBorders(0, 0, 0, 0, color=$000000)#in case AR needs to be tweaked.
AssumeFPS(23.976023976)

And you will have to fix audio separately, stretch to 1001/1000 of its original duration.

Ah, manono was faster. I took to much time for testing... ;-)

Mug Funky
26th February 2011, 11:47
Why Universal UK released such a poorly encoded DVD is beyond me.

a combination of the cost of getting a better master (both in time and money), and the "nobody will ever notice" fallacy that is so prevalent among video professionals.

speaking as someone who noticed quality differences in grain, sharpness and colour since i barely knew how to play a VHS tape, i really dislike the "nobody will ever notice" attitude. even if people have trouble describing an artefact, does not mean they can't see it. one only has to search this forum :)

/rant

EuropeanMan
26th February 2011, 15:33
Welcome to the forum,

Try this:

Yadif(Mode=1)#or the bobber of your choice
SRestore()

http://avisynth.org/mediawiki/Srestore
http://forum.doom9.org/showthread.php?t=95924

Just off the top of my head...you're going to result in a video @ 20fps, no?

Edit: it goes to 23.976...hmmm.

So MY question goes...why do this manono? Why go to 23.976 or does THIS particular source demand it?
Couldn't you just do yadif/1 to keep @ 25fps and now progressive and then do DGPulldown to 29.97 for an NTSC DVDR?

manono
26th February 2011, 16:16
Couldn't you just do yadif/1 to keep @ 25fps and now progressive and then do DGPulldown to 29.97 for an NTSC DVDR?
Maybe you want a duplicate frame every second and more blended frames, but I don't. An NTSC master was used for the PAL DVD. Is NTSC 25fps? Did you even look at the sample? That question makes about as much sense as did your opening remark:
Just off the top of my head...you're going to result in a video @ 20fps, no?

Actually, I'd probably do it like so:

Yadif(Mode=1)#or the bobber of your choice
SRestore(Frate=24)

But in the interest of simplicity I left it at the default value of 23.976fps.

Smithee
27th February 2011, 09:17
Welcome to the forum,

Try this:

Yadif(Mode=1)#or the bobber of your choice
SRestore()

http://avisynth.org/mediawiki/Srestore
http://forum.doom9.org/showthread.php?t=95924

Ahhhhh... I tried this and, well, it's wonderful video alchemy! Thank you.

And Emulgator, thank you for your suggestion. I tried it as well.

The first method took 90 minutes to encode to MPEG, while the second method reported it would take 24 hours, so I aborted for the time being. I think I'll just export directly from VirtualDub using the Huffyuv codec since it reported 10 hours, then just encode the subsequent AVI to MPEG.

I compared both and can't say whether one is better than the other. The real test will be when both are compared on the re-authored DVDs, playing in realtime.

In any case, both look great.

Many thanks...

Smithee
27th February 2011, 21:07
MPEG2Source("D:\LFL_PAL_clip.d2v")
QTGMC()
SRestore(FRate=25000/1001)
#MedSharp2(str=3) #if you can afford slow sharpening
Lanczos4Resize(704, 480, 10, 0, -4, -0).AddBorders(0, 0, 0, 0, color=$000000)#in case AR needs to be tweaked.
AssumeFPS(23.976023976)

And you will have to fix audio separately, stretch to 1001/1000 of its original duration.

Ah, manono was faster. I took to much time for testing... ;-)

I've now got a 38GB Huffyuv AVI of the film using this script.

I'll look around the forums here and Google around, but how do I stretch the audio to 1001/1000 of its original duration?

This is all new to me... more baby steps to take.

Thanks.

manono
28th February 2011, 04:26
You had better first check the AVI you made using that script. Step through it frame-by-frame. Do you see all the duplicate and blended frames? Also, if you slowed the video from 24.975fps to 23.976fps, the audio ratio for the same thing isn't 1001/1000.

Smithee
28th February 2011, 10:38
You had better first check the AVI you made using that script. Step through it frame-by-frame. Do you see all the duplicate and blended frames? Also, if you slowed the video from 24.975fps to 23.976fps, the audio ratio for the same thing isn't 1001/1000.

I did check the AVI, and didn't see any duplicate frames. As for blended frames, I'm not certain what that means but have an idea. In a nutshell, both scripts yielded very similar results--to the point where I'm hard-pressed to tell the difference. I've stepped through key action sequences frame-by-frame, too. And after reading your post, I re-evaluated things with the same conclusion.

Your method produced 118,594 frames with no audio sync problems. The other method produced 118,713 frames, with the audio out of sync by about 5 seconds at the film's end.

Obviously you're seeing something that I'm not. Is there any chance that my scripts are askew in some way? Excuse the hodgepodge of paths, as I really did "wing" this being a complete newbie. I converted to greyscale because the final half of the film has a very faint pinkish hue.

1st:

DGDecode_mpeg2source("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\Lady from Louisiana PAL.d2v")
LoadPlugin("C:\Users\Neil\Downloads\MeGUI_1911_x86_WithoutInstaller\tools\dgindex\DGDecode.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\TIVTC.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\mt_masktools-25.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\Average.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\RemoveGrain.dll")
Import("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\Srestore.avsi")
Load_Stdcall_Plugin("C:\Users\Neil\Downloads\MeGUI_1911_x86_WithoutInstaller\tools\yadif\yadif.dll")
Yadif(Mode=1)#or the bobber of your choice
SRestore()
LanczosResize(720,480) # Lanczos (Sharp)
Greyscale()


2nd:

DGDecode_mpeg2source("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\Lady from Louisiana PAL.d2v")
LoadPlugin("C:\Users\Neil\Downloads\MeGUI_1911_x86_WithoutInstaller\tools\dgindex\DGDecode.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\TIVTC.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\mt_masktools-25.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\Average.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\RemoveGrain.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\nnedi3.dll")
LoadPlugin("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\mvtools2.dll")
Import("C:\Users\Neil\Desktop\AAAAAAAAAAAAAAAAAAAAAAAA\QTGMC3.11.avsi")
QTGMC()
SRestore(FRate=25000/1001)
#MedSharp2(str=3) #if you can afford slow sharpening
#Lanczos4Resize(704, 480, 10, 0, -4, -0).AddBorders(0, 0, 0, 0, color=$000000)#in case AR needs to be tweaked.
AssumeFPS(23.976023976)
LanczosResize(720,480) # Lanczos (Sharp)
Greyscale()

manono
28th February 2011, 11:07
If what you say is correct, then I'm wrong and I apologize. I see now. His script gives a framerate of 24fps before the AssumeFPS, and his ratio of 1001/1000 is also correct. If you go that route, I don't see the need to then slow it to 23.976fps necessitating also reencoding the audio. Just leave it at 24fps (applying DGPulldown for 24->29.97 after doing the encoding for MPEG-2) and use the original audio unchanged, if it's OK.

Thanks for providing the information necessary for me to figure out where I went wrong. Emulgator's script is pretty clever and I shouldn't have doubted it.

Smithee
1st March 2011, 11:55
If what you say is correct, then I'm wrong and I apologize. I see now. His script gives a framerate of 24fps before the AssumeFPS, and his ratio of 1001/1000 is also correct. If you go that route, I don't see the need to then slow it to 23.976fps necessitating also reencoding the audio. Just leave it at 24fps (applying DGPulldown for 24->29.97 after doing the encoding for MPEG-2) and use the original audio unchanged, if it's OK.

Thanks for providing the information necessary for me to figure out where I went wrong. Emulgator's script is pretty clever and I shouldn't have doubted it.

24 to 29.97 with DGPulldown it is. I now have both versions on DVD.

Thank you for your help, and the same to Emulgator.

Smithee
1st March 2011, 22:29
I've now watched both DVD versions of the PAL conversion. I made note of the time where I saw very, very slight judder and then looked at the AVI, which shows the same thing. However, if I load the script into VirtualDubMod and step through the exact sequence of frames, there's no judder. In other words what I'm seeing before encoding to AVI isn't what I'm seeing in the subsequent AVI.

Is there something I'm not doing right when exporting the AVI? I'm using Huffyuv in full processing mode. I tried a few different codecs on some test clips, too, with the same results.

Both conversion scripts produce the same results.

manono
2nd March 2011, 06:03
What do you mean by 'judder'? Are you talking about duplicate frames or missing frames? When stepping through the script in VDubMod, you should be seeing the same thing as when stepping through the completed AVI, unless you made some changes in VDubMod itself.

And all NTSC DVDs with pulldown will exhibit some sort of jerkiness, perhaps most noticeable during slow pans. It's just the nature of the beast. I'm so used to it, though, that it doesn't bother me in the least.
I'm using Huffyuv in full processing mode.
If using AviSynth scripts, you use Fast Recompress and not Full Processing, unless you're also using some VDub filters.

Smithee
2nd March 2011, 14:16
What do you mean by 'judder'? Are you talking about duplicate frames or missing frames? When stepping through the script in VDubMod, you should be seeing the same thing as when stepping through the completed AVI, unless you made some changes in VDubMod itself.

And all NTSC DVDs with pulldown will exhibit some sort of jerkiness, perhaps most noticeable during slow pans. It's just the nature of the beast. I'm so used to it, though, that it doesn't bother me in the least.

If using AviSynth scripts, you use Fast Recompress and not Full Processing, unless you're also using some VDub filters.

Sorry, I should have been more specific.

Imagine someone walking from left to right at a consistent pace. Everything looks normal then a duplicate frame occurs, then returns to normal, then one frame shows abrupt movement--jumping forward; then returns to normal. So in an otherwise normal sequence of movement, two frames aren't right.

This shows up in the 24fps progressive AVI, and isn't a byproduct of pulldown being added to the subsequent MPEG.

Stepping through the exact sequence of frames in VirtualDubMod before encoding to AVI shows perfect, fluid movement.

Clip tests:

If I mark in the start frame and mark out the end frame of the sequence mentioned above and export only that, the movement is fluid in the AVI... sometimes. Tests show that it depends on what frame I start the clip. So for example if I clip from frame 40419-40559, movement is fluid; if I clip from 40212-40559, those two bad frames show up.

If I export the whole film (whether it be full processing or fast recompress), that sequence still has the two bad frames. Note that I'm not using any VDub filters.

So underneath the hood so to speak is a "rhythm" or "cadence" that's being thrown off depending on where things start. There are a few other points in the conversion where I saw non-fluid frames, but have only concentrated on this specific sequence.

The gist of things is that, in my case, VDub isn't WYSIWYG. I'm running Windows 7 if that has any bearing on things.

Didée
2nd March 2011, 14:37
Well ... don't "jump around in the timeline". E.g., if you load the script (with Srestore) and then jump to frame 9000 in order to inspect section 9000-9100, then you'll get a different result compared to running start-to-end. That's basically normal for anything that involves framerate decimation.

Also, try Srestore with the additional parameter "speed=-1". The default value is a bit rough at times.

Smithee
3rd March 2011, 09:11
Well ... don't "jump around in the timeline". E.g., if you load the script (with Srestore) and then jump to frame 9000 in order to inspect section 9000-9100, then you'll get a different result compared to running start-to-end. That's basically normal for anything that involves framerate decimation.

Also, try Srestore with the additional parameter "speed=-1". The default value is a bit rough at times.

OK... that did it. No more jumping around the timeline before saving--the AVI is good now. And I used "speed=-1".

Thanks for your help.