PDA

View Full Version : Problems converting NTSC to PAL with smoothdeinterlace.dll


funkydude74
13th January 2006, 09:22
Hi. I'm wanting to convert my NTSC videos to PAL and I can successfully do so with without using smoothdeinterlace.dll but when I do use it I get errors. Here's my AVIsynth script:

LoadPlugin("c:\MPEG2DEC3.dll")
LoadPlugin("c:\SmoothDeinterlacer.dll")
MPEG2Source("testing.d2v")
SeparateFields()
Assumeframebased()
SmoothDeinterlace(doublerate=true)
ConvertToYUY2()
ConvertFPS(50) # or ChangeFPS(50)
LanczosResize(720,576)
SeparateFields()
SelectEvery(4,1,2)
Weave()
ConvertToRGB()

With this script I get:
ConvertFPS: New frame rate too small. Must be greater than 799200. Increase or use 'zone:'

I don't know what to do to fix this problem. I've developed this script in the past from looking at a number of NTSC-PAL related pages and with some help here and there. Anyways I was wondering if anyone here knows the solution to this problem so the script can work and I can successfully convert NTSC videos to PAL. I'm doing interlaced video material not movies so I'm dealing with converting 60 pictures/sec to 50 pictures/sec and weaving them down to 25 frames/sec. If anyone can help I'd most appreciate it.

Cheers
Troy

Mug Funky
13th January 2006, 10:31
ditch the "separatefields" line. it's unnecessary, and is doubling the framerate (after smoothdeinterlace it will be 120 instead of 60).

convertfps doesn't allow you to go beyond 2/3 or so of the initial framerate.

Kika
13th January 2006, 10:52
And i suggest to use AssumeXFF().SelectEvery(4,0,3) instead of SelectEvery(4,1,2).

(Change the "X" in AssumeXFF to B or T, to set the correct field order).
Also i suggest to use LeakKernelBob or EEDI2 as Bobber for the conversion.

funkydude74
14th January 2006, 03:16
Okay here's my new script:
LoadPlugin("c:\MPEG2DEC3.dll")
LoadPlugin("c:\SmoothDeinterlacer.dll")
MPEG2Source("testing.d2v")
Assumefieldbased()
#SeparateFields()
ConvertToYUY2(interlaced=true)
SmoothDeinterlace(doublerate=true)
LanczosResize(720,576)
ChangeFPS(50)
AssumeBFF() #.SelectEvery(4,0,3)
SelectEvery(4,1,2)
Weave()
ConvertToRGB()

Now I tried 4,0,3 but that puts the field order wrong so I just used 4,1,2 though maybe I should try AssumeTFF(). Anyways fixed one problem but created another which is the video sets the output to 720x1152 instead of 720x576 and the picture is stretched vertically. I changed smooth deinterlace doublerate to false and whilst it didnt stretch picture it still set the output to 1152 in height. So I'm still getting nowhere I'm afraid. Any suggestions to what to add or remove or change in the script?

Cheers
Troy

Boulder
14th January 2006, 07:32
Remove AssumeFieldBased from the script.

Mug Funky
14th January 2006, 07:52
LoadPlugin("c:\MPEG2DEC3.dll")
LoadPlugin("c:\SmoothDeinterlacer.dll")
MPEG2Source("testing.d2v")
ConvertToYUY2(interlaced=true)
SmoothDeinterlace(doublerate=true)
LanczosResize(720,576)
ChangeFPS(50)
assumetff().separatefields().selectevery(4,0,3).weave()
ConvertToRGB()

this should do it. there was in fact a separatefields() missing, but not in the place it was originally. the selectevery(4,0,3).weave() trick only works on field-separated video, or you end up with half the framerate and twice the height...

also, i suggest using convertfps() instead of changefps() - it will blend fields together in a very difficult to remove way, but that's no problem if you've still got access to the source. it'll make it a little less jerky when watching on a TV.

however, it does hurt compression, so don't do it unless you're using an encoder that can handle it for the bitrate you have in mind. any mpeg-2 encoder should be fine above about 6500 kbps. just make sure to set top-field first :)

funkydude74
14th January 2006, 21:52
Thanks for the new script, however when I tried it I get this error message:
Weave:Weave should be applied on fieldbased material: use AssumeFieldbased() beforehand

Troy

Wilbert
15th January 2006, 00:32
The version you are using doesn't work with v2.56. Try http://www.geocities.com/wilbertdijkhof/SmoothDeinterlacer_25.zip

funkydude74
15th January 2006, 06:48
SUCCESS AT LAST!!!!!:D Thank you guys so much for helping me get this conversion script running, it works perfectly now and I've tested the results of NTSC-PAL and PAL-NTSC conversions and I'm so impressed!!!!! The playback is so smooth it looks like it's been done professionally!!!!!

Thank you's so much
Cheers and beers
Troy

Boulder
15th January 2006, 08:16
If you wish do one colorspace conversion less, try using AssumeTFF().TDeint(mode=1) or LeakKernelBob(order=1,sharp=true,threshold=3) instead of SmoothDeinterlace. You can remove the ConverttoYUY2 line in this case. Those can be found in LeakKernelDeint.dll or TDeint.dll.

The quality should be better and using LeakKernelBob should be quite a bit faster as well.