View Full Version : Need help fixing an awful NTSC-to-PAL conversion
Chainmax
22nd August 2006, 02:03
My elder brother recently let me borrow a DVD transfer of his Bar Mitzvah tape. The person who made the transfer did a truly allmighty f***up, converting the original NTSC (which I assume was interlaced since it was shot on tape) to PAL which shows a pattern of 4 interlaced frames and a progressive one.
The DVD showed up in DVDDecrypter's IFO mode as two PGCs with identical length. Upon selecting one and ripping it, I got this:
http://img246.imageshack.us/img246/4261/rippednp2.png (http://imageshack.us)
I could only play the first M2V (VTS_01_1), which seems to have the beginning of the video: the VOB shows a black frame for the whole length of the video and the other M2Vs cause ZoomPlayer to throw a missing codec-related error and PowerDVD to display a black frame.
After loading the M2Vs and the VOB in the order I assume they have and trying to make the project file, the Info part on the Status section reports "Picture Error", and upon finalizing the process, I get a report that the field order has been corrected.
That's all the information I gathered this far. You can download a short unprocessed sample encoded to YV12 Lagarith [link removed]. I realize that the source is pretty damaged and a perfect result is not a possibility, but this is all I have until I can build a capturing machine and a SVHS with TBC. Therefore, any improvement, however small, will be extremely welcome.
Chainmax
24th August 2006, 14:03
Anyone?
MOmonster
25th August 2006, 07:39
I have only little time internet in the week. A m2v sample would be really better, but I downloaded your sample and will have a look on it over the weekend.
Mug Funky
25th August 2006, 10:02
protip:
in windows explorer, click "view" (the big icon on the far right) and "details" to get a much more useful file list - non-truncated filenames and sensibly sized icons (nobody really needs that many zoomplayer icons to understand that there's m2v's around).
if there were 2 PGCs of equal length, then you've got a playlisted DVD. for whatever reason the playlist plays nothing other than the main feature (usually a playlist would be used to only show certain chapters in a feature, either to cut out unwanted bits or show single episodes, or both). just rip the first one like you did and you'll get everything :)
as for the conversion, well i don't have time to look right now - i'm waiting for my computer to catch up with me, then i'm out of here :)
Chainmax
27th August 2006, 03:45
MOmonster: like I said, the only M2V I could play (therefore the only one that DirectShow could handle) had the beginning of the movie. That's why I couldn't provide a sample. In any case, this sample is just as good as an M2V chunk since it's a lossless encode from a script that only had the MPEG2Source line.
Mug Funky: it's too bad you can't help me for now :(. Do you think Restore24 could help in this case? If so, could you please tell me where to find the latest package?
Now that I think about it, has anyone made an entry for Restore24 in the wiki?
Mug Funky
28th August 2006, 10:08
i believe restore24 is "between releases". ie there's a new and fantastic one in the works that's not ready yet.
that's 2nd hand info though.
Didée
28th August 2006, 12:08
Probability of rumour's truth: low.
Chainmax
28th August 2006, 20:25
So what could I use to alleviate the issues seen on the sample then?
MOmonster
29th August 2006, 15:55
The good news first:
Your short sample shows a constant pattern
c d c d c c d c d c
There are no blends, 30 or 29.97 clear fields in one second and two of three can be fieldmatched. So itīs not a big problem to restore this (tdeint(mode=1,tryweave=true) + ...). No need for restore24 and so on.
because of the black border on the left it would be possible to adjust the lineshifting caused by the tape capture. with a tolerant cropping the source would look significantly better.
Itīs a easy task for the plugin writers to realize such a filter.
But there are also the bad news:
I donīt have the possibilities (not the next two months) to create such a filter and I donīt know if there is something similar allready around.
Without the repairing of the lineshifting the automatic decimation will fail and you have to decimate the source manual with selectevery or similar.
Chainmax
30th August 2006, 01:46
Thanks for the informative answer MOmonster, I really appreciate it :) http://smilies.vidahost.com/otn/wink/thumb.gif. Since this is the only source we have right now, I think I'll use MVBob rather than TDeint's mode1.
When you're talking about line shifting, are you referring to those "needs tracking adjustment"-type artifacts that appear every now and then? That sounds like what TBCs do, right? Why don't you post your idea in the Dev forum? Maybe someone will pick it up.
Even if no one does, since I assume the source was interlaced, it will have to be reinterlaced at the end, which means using SelectEvery at some point so decimation would get done anyway.
So, the basic script would be something like this:
Source Loading
MVBob()
Crop(whatever,align=true)
filtering
Lanczos4Resize(656,448)
Sharpening
Grain Adding
???
AddBorders(24,16,24,16)
,right? The ??? part refers to going to 50p to 60p and then reinterlacing to 30i, which I don't know how to do (gonna check some standards conversion threads to find out how).
Trixter
31st August 2006, 07:00
Source Loading
MVBob()
Crop(whatever,align=true)
filtering
Lanczos4Resize(656,448)
Sharpening
Grain Adding
???
AddBorders(24,16,24,16)
I know this is incredibly OT, and I apologize, but I have to ask: Why are you resizing to 656x448?
~bT~
31st August 2006, 20:29
I know this is incredibly OT, and I apologize, but I have to ask: Why are you resizing to 656x448?Maybe coz he's adding borders???
Chainmax
1st September 2006, 00:49
Yup :).
Trixter
1st September 2006, 05:37
It's true: I'm a moron.
scharfis_brain
1st September 2006, 06:40
I tried this script.
It puts out 720x480@29.97fps progressive.
29.97 interlaced is not possible unless you use some motion compensated framerate doubling methods.
loadplugin("D:\x\dgdecode.dll")
loadplugin("D:\x\tdeint.dll")
loadplugin("D:\x\tivtc.dll")
loadplugin("D:\x\depan.dll")
# load video and do some deblocking.
avisource("Sample.avi")
blindpp(cpu=4, iPP=true)
# deinterlace to 50p
assumetff()
TDeint(mode=1, tryweave=true, full=false)
# scale to NTSC resolution
Bicubicresize(width, 480)
# decimate 50p to 29.97p
TDecimate(mode=2, rate=29.97)
# stabilize the jumping VHS sync loss
e=depanestimate(last, pixaspect=0.911)
last.depanstabilize(data=e, pixaspect=0.911, cutoff=3.0, dxmax=48, dymax=32)
Why isn't there a mpeg2 sample?
Why are you persisting on mvbob() even if tdeint(mode=1) is recommened? mvbob() won't gain ANYTHING with this source.
MOmonster
1st September 2006, 15:29
@scharfis_brain
I donīt know how good the stabilizing works (no plugin I would need for my sources), but it is not better to stabilize before the decimating? Tdecimate will recognize the jumping vhs sync loss as motion. I remember that mode=7 has two wrong dups detected.
But maybe mode=2 donīt have this problem and the stabilizing is better after decimating?
scharfis_brain
1st September 2006, 17:49
look at the bobbed source.
you'll find 29.97 fps perfectly decimatable (perfect dupes!)
the VHS-jumping is in the 29.97 fps video.
if I would stabilize before decimation I would have smoothed global motion from 29.97p to 50p. So tdecimate wouldn't drop the right frames anymore.
Chainmax
1st September 2006, 20:01
scharfis_brain: thanks for the script :). How complicated would those motion compensated framerate doubling methods be? I'd really like to have 29.97 interlaced output if possible as I won't be able to capture it myself for a long time.
As for why I didn't provide an MPEG2 sample, it's already been said: only one of the M2Vs displays something. You are not losing much anyway because it's a losslessly encoded sample from an Avisynth script with just the MPEG2Source line.
I wasn't insisting on using MVBob, just assuming that it would yield better results. Since you say it won't, of course I'll stick to Tdeint as it's going to make for a much faster encode :).
One more thing: I intend to do some mayor filtering, would this
assumetff()
TDeint(mode=1, tryweave=true, full=false)
filtering
Bicubicresize(width, 448)
TDecimate(mode=2, rate=29.97)
e=depanestimate(last, pixaspect=0.911)
last.depanstabilize(data=e, pixaspect=0.911, cutoff=3.0, dxmax=48, dymax=32)
sharpening
grain adding
borders adding
be a suitable filter order?
scharfis_brain
1st September 2006, 22:27
filtering is better placed after stabilizing or as a call after depaninterleave.
Chainmax
2nd September 2006, 01:08
I see. About those motion compensated framerate doubling methods, could you cook something up? If not, who could I ask?
scharfis_brain
2nd September 2006, 10:58
either use motionprotectedfps(59.95, iterate=5) from mg262
or mvflowfps2(...) from fizick
or didee's framerate doubling protection script.
Chainmax
2nd September 2006, 18:52
By Didée's script you mean this one (http://forum.doom9.org/showpost.php?p=863809&postcount=73)? In that case I guess I'll stick to TDeint and 29.97p, because that script uses MVFlowFPS and both it and motionprotectedfps give some very noticeable artifacting on high motion scenes. Thanks for your advice, my family and I greatly appreciate it :)
scharfis_brain
2nd September 2006, 19:13
As I recommended, just leave it 29.97p.
Isn't it possible to let someone send the VHS to you via snail-mail?
Chainmax
3rd September 2006, 06:17
Oh, I do have the original VHS: like I already said in the OP it's from my elder brother's Bar Mitzvah so he must have it. Thing is, I won't have a capturing machine for a long time which is why we have to make do with reconstructing this for the time being.
Boulder
3rd September 2006, 09:43
Would it be possible for you to have the tape digitized by someone else, like some company that does this kind of stuff?
Chainmax
4th September 2006, 02:59
The only "proffesional" (read: place that films events that have decks with TBCs) charges ~U$$30 per hour in the tape.
Chainmax
7th September 2006, 23:01
When using RipIt4Me and its two cleanup options, DGIndex shows no "picture error" or "field order has been corrected" reports. Should I trust RipIt4Me's cleanup (although it's intended for ARccOS-protected discs) or should I just rip with DVDDecrypter and let DGIndex solve the problems?
Chainmax
11th September 2006, 00:58
scharfis_brain: I had to change TDecimate to mode=7 since mode=2 was causing wavy lines, but other than that your script works perfect. Once I figure out the rest of the filterchain I'm going to post some before-after shots. Thanks for all the help :).
[edit]By the way, I ripped the disc again, this time in IFO mode but without mucking around with the "Stream Processing" options and the output were all VOBs and I didn't get those "picture error" and "order fixed" messages from DGIndex. I can now upload a sample vob if needed.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.