PDA

View Full Version : help in using avisynth for pal -> ntsc


godus
9th August 2006, 20:49
I have a 19-minute PAL MPEG2 movie that I want to convert to NTSC. Usually I stay away from brainy stuff like AVIsynth but having no choice I've to take a bite. Reading through these forums, it seems AVIsynth is a piece of cake to many of you, but for me it's a hard nut to crack!

Follow instruction from some guides, I use DGIndex to get a D2V file, then use the AVS script below:

LoadPlugin("C:\DGIndex\DGDecode.dll")
LoadPlugin("C:\DECOMB\decomb521.dll")
LoadPlugin("C:\Convolution3D_yuy2\convolution3d.dll")
Mpeg2Source("C:\tmp\testmpg.d2v")
FieldDeinterlace(full=false)
ConvertToYUY2()
Convolution3d (preset="movieHQ")
LanczosResize(720,480)

(Well, someone says using Convolution3d() for high quality but I truly don't know what it does.)

Next, I fed this AVS script to CCE SP and obtain a MPV and MPA files. I apply DGPulldown to convert the frame rate from 23.97 to 29.97 to get a file named testmpg.pulldown.M2V.
(As another test, I also tried to pulldown from 25 to 29.97. No matter what frame rate is, I still got the out-of-synch problem below.)

Feeding the last M2V and the MPA files to EncoreDVD 1.5 to author an NTSC DVD, I see an error. The problem is: the video has been shortened to 18 minutes while the audio retains the original length of 19 minutes. EncoreDVD aborts and reports an unknown error.

From the guides I read, the method above should not throw the audio and video parts out of synch.

What could have gone wrong?

Also, when CCE runs, I notice that it shows the original movie contains 29000 frames, yet when CCE's done, it shows that only ablout 27000 frames have been processed. Is that strange? Or is that OK to be so?

Thank you very much for any help.

Mug Funky
10th August 2006, 11:28
you didn't change the frame rate...

try:

converttoyuy2(interlaced=true)
leakkernelbob(order=1,threshold=4)
convertfps(60/1.001)
lanczosresize(720,480)
assumetff().separatefields().selectevery(4,0,3).weave()

don't worry about denoising and stuff - if you're going to DVD it's probably not necessary.

[edit]

that assumes your content is interlaced... i really don't know what it is. if it's filmed stuff you're best off just resizing and DGpulldowning to 29.97 from 25

godus
10th August 2006, 18:40
Thank you very much, Mug Funky.

About interlacing, DGIndex says my MPG is interlaced. I also loaded it to VirtualDubMod and eyeballing it to see if any combing effects appear but didn't see any. So I assume it's not interlaced. Is there any better way to determine this?

I'll try your suggestion twice, one with interlace set to false and one set to true and see what happens.

I'll let you know. Again, thanks.

scharfis_brain
10th August 2006, 19:53
@Mugfunky: why are you converting YV12 to YUY2 before deinterlacing? COnverting to YUY2 after deinterlacing results in much better chroma quality.

@godus: if you don't see any interlacing effects, you can stick with this script:

mpegsource("PAL.d2v")
converttoyuy2()
lanczosresize(720,480)

then encode it as 720x480 pixels m2v with 25fps PROGESSIVE (yeah, this is unusual!)

afterwards squeeze it through dgpulldown to make it 29.97fps pseudo-interlaced (it still is stored progressive, but it will be put out interlaced/telecined)

Mug Funky
11th August 2006, 02:15
oh yeah... forgot about that. to be honest i use blendfps instead of convertfps, so no yuy2 needed.

godus
11th August 2006, 22:05
@MugFunky,

After adding the AVS lines you suggest and loading the AVS to CCE, CCE shows the movie has only 240 frames, not its true size of 29111 frames.

@scharfis_brain,

I try your suggestion and find out why the movie has been shortened too much. It's because in my original script, I use decomb521.dll. If I don't load that plugin, the movie is encoded OK (i.e., in-synch with the audio) no matter whether I set the Progressive flag ON or OFF.

As a test, I encoded the movie both ways, one as progressive and one as an interlaced movie, then build the two NTSC versions of the video.

Two new problems: 1) After burning the movie to a DVD disc, my Sony DVD player can't play it. It loads the movie (either version), shows a few seconds, then dies! Yet when I play those discs in a PC using WinDVD, they run fine.

2) When playing on a PC, no matter the movie is encoded as progressive or interlaced, the resulting NTSC movie manifests very visible combing effects!

Obviously during the transition, video quality has been lost somewhat. That's tolerable. What is really frustrating is that I still don't have a movie I can play in a DVD player.

Any suggestion is very appreciated. Many thanks.