View Full Version : Staggering NTSC to PAL conversion
Blue_MiSfit
1st December 2006, 20:37
Hey folks...
So I've been working on doing the best possible DV NTSC 29.97i -> PAL 25i conversion using Didee's new mcbob, and motionprotectedfps. The sheer number of plugins and scripts involved alone is utterly terrifying as is the memory usage.
I thought I would post some bits about it:
Example Script:
setmemorymax(512)
Import("C:\Program Files\AviSynth 2.5\plugins\mcbob.avs")
Import("C:\Program Files\AviSynth 2.5\plugins\motionprotectedfps.avs")
qtinput("J:\Transfer Folder\Workout 1 - elite endurance", audio=false)
assumebff()
ConvertToYV12(interlaced=true)
mcbob()
fft3dgpu(sigma=1, plane=3)
motionprotectedfps(50)
LanczosResize(720,576)
separatefields().selectevery(4,0,3).weave()
AssumeTFF()
This script is killer. I'm running a MacPro on Boot Camp - twin Xeon 2.66 Core 2 Duos and 2 GB of quad channel FB-DIMM. Running two instances of this script (for 2 separate QuickTime input files) I get the following performance:
https://home.comcast.net/~blue_misfit/omg.gif
:D :D :D
Love it. Outputting to a Lagarith AVI, and will run it through HC at ~ 4600kbit.
Anyway, I am wondering if there is anything else I can do to bring this poor Mac to its knees. I haven't seen the results.. I will report when it finishes in roughly 24 hours (for a total of 90 minutes of video)
~MiSfit
scharfis_brain
1st December 2006, 20:47
one hint to avoid future weirdnesses:
put assumetff() before separatefields()
Blue_MiSfit
2nd December 2006, 06:19
Hmm... I will take your word for it Scharfi, but I'm not sure I understand why.
In fact, I don't understand how the re-interlace process works. Once the fields have been bobbed and converted to 50fps progressive, why would you need to separate fields again? It seems like that followed by selectevery and weave would result in a big loss of information?
Maybe that's exactly what happens :)
foxyshadis
2nd December 2006, 15:10
Well, yeah. You just combine half the fields and toss out the other half - if we didn't lose so much, deinterlacing wouldn't be nearly as hard. :p Separatefields is just the way to work with fields instead of whole frames, whether going interlaced->progressive, progressive->interlaced, or interlaced->interlaced.
Pookie
3rd December 2006, 04:14
So... is it soup yet ?:D
Blue_MiSfit
3rd December 2006, 05:49
gotcha... Well, no unfortunately, I needed to boot the machine back into Mac OS X to access some files on the software RAID (macdrive only lets you mount single drive hfs filesystems, it doesn't support Mac OS X RAID)
So I will have to start it again later :( Sorry guys
Blue_MiSfit
4th December 2006, 00:32
So, when you are doing a ntsc -> pal conversion, why would you bob instead of just separating the fields, reinterpolating them to half pal height, converting the field rate, and then reinterlacing?
Why bob-deinterlace to interpolate the full frame height, and then throw that information away?
~MiSfit
Mug Funky
4th December 2006, 02:54
blue_misfit:
it'd look fugly is the short answer :)
the picture would have a misalignment between fields, and would also bob up and down periodically as the 50hz and 60hz cycles bounce off each other.
i'd say MCbob is overkill, but at the very least you need an extremely robust motion-adaptive deinterlacer that's as free of artefacts as possible and preserves as much detail as possible.
the fft3dGPU is probably unnecessary if you're using HC at that bitrate - it should be able to encode a decent amount of noise before it goes barmy. also, running it after motionprotectedfps will give it less frames to work on, and hence it'll be faster.
also, beware: motionprotectedfps is very fast and exceptionally good, but it's not as protected as it could be :) see the alchemist thread for some slower solutions...
also also, this script would probably not handle telecine or 30p very well. for that, see my own script "autopal" (shameless plug... i seem to be the only one using it, in spite of how brilliant it is :))
Blue_MiSfit
4th December 2006, 05:16
Thanks Mug :)
I'm only concerned with pure 60i -> 50i conversions - the script is solely for exercise shows that the company I work for produces.
TDeint(mode=1) seems to be a good smart bobber?
The reason I was using fft3dgpu was that I was noticing a distinctly blurrier appearance in the PAL vs the NTSC versions of these files (using a simpler PAL script). Admitedly, the NTSC version had almost 2x the bitrate, and didn't go through a conversion, but I figured that maybe by denoising I could make the final result look better.
Is it expected that an NTSC -> PAL conversion will loose a lot of detail? I mean, it was pretty shocking how different the images were.
~MiSfit
Mug Funky
4th December 2006, 05:54
that's interesting.
i don't see anything in your script that'd cause a loss in sharpness - it all comes down to the deinterlacer, and even a relatively simple one will keep things pretty sharp in static areas.
there'll be a small amount of blurring simply because you're going to 576 lines with only 480 to work from, but it shouldn't blur any more than the resizer would normally, plus a small amount in moving areas from the deinterlacer (and if you're postprocessing with something like vinverse, a tiny bit more).
Blue_MiSfit
4th December 2006, 07:08
That's why I figured it was probably the MPEG-2 encoder that was causing the problem. I figured it was starved for bitrate - I know 4600 kbit should be plenty for pal 50i, but the results spoke for themselves.
remember this was with a really simple script - a dumb bob, changefps(50) etc...
Mug Funky
4th December 2006, 07:40
ah, a dumb bob will soften things a lot - there'll sort of soft vertical up and down motion to it.
Blue_MiSfit
4th December 2006, 12:21
That makes a lot of sense, considering that the whole exercise video is basically somebody riding an exercise bicycle - read: moving up and down.
~MiSfit
Chainmax
5th December 2006, 18:12
Blue_MiSfit, have you tried Didée's or Mug Funky's latest framerate conversion tools on the Alchemist thread?
Blue_MiSfit
6th December 2006, 05:13
Not yet, I've been at a new job recently lugging around computers, and have barely the energy to perform day to day functions. I will get back to the 'fun' job hopefully this weekend and stress out my beloved macpro...
Thanks for all the help folks!
~MiSfit
Piper
8th December 2006, 23:17
You might also want to check out Mug Funky's "NTSC tools: auto NTSC to PAL with 24p, 30p, 60i detection (v 0.93)" thread (http://forum.doom9.org/showthread.php?t=114054&highlight=autopal)
I've been pouring over that and the Alchemist thread a lot lately after I realized that my once trusty RePAL script is now producing horrible results on Doctor Who, season 2. :mad:
Adub
10th December 2006, 04:04
Which new MCbob are you talking about?
Has Didee released a new one in the passed few weeks?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.