Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
3rd August 2010, 05:30 | #1 | Link |
Registered User
Join Date: Jul 2003
Posts: 20
|
Help with Babylon 5 scaling
I'm trying to get the best picture I can out of the dvd's for babylon 5. On any shots with cgi in them they have been poorly scaled from the original 4:3 broadcast masters. Seeing how I don't have the Laserdiscs for the show i'm trying to correct the problem with avisynth. I found a website here: http://www.modeemi.fi/~leopold/Babyl...ml#030421proof that demonstrates a form of correcting the problem. I have tried to figure out a way to do this in avisynth and have come up short handed so far.
I have tried searching the forums here with no luck. Maybe I just haven't used the right search terms. Thanks in advance for any help anyone can provide. |
3rd August 2010, 13:17 | #3 | Link |
Registered User
Join Date: Feb 2004
Posts: 1,348
|
Well, really fixing this isn't possible. What he did is a pretty simple linear filter of some kind, which corrects about half of the problem.
In avisynth it probably looks something like this: Code:
In = assumeframebased() odd = In.separatefields().selectodd.spline36resize(width, 360).pointresize(width, 180) even = In.separatefields.selecteven.spline36resize(width, 360).pointresize(width, 180) out = interleave(odd, even).weave().spline36resize(width, 480) out You still have to figure out how to apply this to the correct parts of a frame. Or the correct frames, depending on how the compositing was done. Also, linear filters cannot adequately correct for previous linear filters, to really fix this problem completely you would need a specialty strong nonlinear filter of some kind. Not that your going to get any more detail from this, but to kill the remaining artifacts without removing detail would require some sort of pseudo deconvolution. |
3rd August 2010, 13:29 | #4 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Is it really that complicated? Isn't it a rather simple case of misaligned fields, due to field separated resizing without correction?
Since I own the German R2 version, I can't reproduce the problem. The bad thing about R2 is that the CGI sections are ... fieldblended!
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
3rd August 2010, 14:35 | #5 | Link |
Registered User
Join Date: Feb 2004
Posts: 1,348
|
The complication is that if you have an improperly sampled signal (such as interlacing) linear filters do very poorly. A lot of the ugliness is from the signal leakage of the aliasing into other parts of the signal. If you look at the example he linked to, you can see some residual problems, and this is most likely the cause.
It probably is, but I didn't find the correct offsets when I took a few minutes to check. Offsets didn't appear to work aswell as pointresizing, so it could be a bit more complicated. Though its quite possible I just made a mistake looking for the offsets. |
4th August 2010, 00:27 | #6 | Link |
Registered User
Join Date: Jul 2003
Posts: 20
|
To be honest i'm not shure how to post a sample video clip on here. On the R1 Dvd's every shot that had a visual effect suffers from the same problem. Even tho it means taking apart every episode to find all of these shots I don't mind the work, I just want the best I can get from the source material I have. I have been using TemporalDegrain to filter the film sections. The intent is to calm down the grain a bit, not remove it all together.
|
4th August 2010, 01:29 | #10 | Link |
Registered User
Join Date: Jul 2003
Posts: 20
|
Assuming file hosting works correctly a sample should be at this address http://www.mediafire.com/?tcau3c8fgsouch4
I just haven't done a post like this before. Been using avisynth for years. I remember dvd ripping when it was done by running a program to take a screenshot from powerdvd for every frame, it was always a pain to get the audio to sync exactly. I realise some of the posters on here are a lot smarter with scripting than I am, that's why i'm asking for help. I don't post becuase every problem I have wanted a solution for has already been discussed here before. This is the first time I have come across something worth asking about. I've tried finding a way to align the image correctly in photoshop but can't find a way of making it work as well as on the website I mentioned in the original post. Processing time isn't a big problem. Besides on a show like B5 there are a bunch of stock shots that get used so it's really just editing them into several episodes as they were in the original version. Last edited by Buck746; 4th August 2010 at 01:37. |
4th August 2010, 02:59 | #11 | Link |
Guest
Join Date: Jan 2002
Posts: 21,901
|
You posted to ask about restoring the CGI portions:
"On any shots with cgi in them they have been poorly scaled from the original 4:3 broadcast masters." So why, instead of posting such a CGI section, did you post a sample with no CGI and which appears to be simple, unproblematic hard telecine? And does that disk really only have one audio track? Or did you get the source from somewhere other than the original disk? |
4th August 2010, 03:24 | #12 | Link |
Registered User
Join Date: Jul 2003
Posts: 20
|
It was from the original R1 Disc. The scaling problem is present in every shot that had a digital matte and the pure cgi shots. I think it's becuase they scaled those shots from the 4:3 master tapes to 1080 to match the Telecine that Sci-Fi funded when they started airing the episodes so they could show them in widescreen. The 1080 masters that got made were then downscaled to NTSC and PAL for the dvd releases.
When the show was being made it was always assumed that re-rendering the effects would be easy when hdtv got hammered down in spec. Over time tho all the elements got lost so the only options were to scale the 4:3 material up and use new film scans of everything without some kind of composite or cgi work. The other option of course would be to do what paramount did with Star Trek and generate new effects to replace the old ones. Seeing how B5 is the red headed stepchild of warner brothers they went with the former option. Here's a file with pure cgi http://www.mediafire.com/?iqx9fzk7bln8pgj And a file of pure film http://www.mediafire.com/?rpm2rgpnr6q5n9t The 3:2 pulldown is hard coded into the file. Mainly due to some of the computer graphics sequences are a mix of 24 and 30fps with the occasional 60 fields content thrown in. I figured that it made sense to just clip the raw vob files down for a sample rather than a avi with deinterlacing already done. |
4th August 2010, 12:40 | #13 | Link |
Registered User
Join Date: Dec 2002
Location: UK
Posts: 1,673
|
I couldn't unpick the broken resizing, so I cheated...
PHP Code:
Cheers, David. |
4th August 2010, 13:20 | #14 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
I'll have a look, too, but it may take a little. (BTW, the B5 saga is my all-time favorite.)
From which episode are these samples? I'd like to compare with my R2 DVDs.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
4th August 2010, 18:03 | #15 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
the creators of the 16x9 anamorphic masters basically b0rked all CGI scenes.
they simply cropped the 4x3 fullscreen (480 lines) cgi scenes to 16x9 letterboxed (360lines) and then applied a linear fieldbased upscale to 16x9 anamorphic (480 lines again). The result is image artifact seen in the sample video. You can basically undo it with this code: PHP Code:
The problem is, that this code only will make the center of the image look better. The top and bottom parts of the image are still very blurred, because the scaling offsets do NOT match. You have to try and error of the amount of scaling (360 +/- 2 pixels) as well as for the vertical offset. I really haven't got the time to do so. Maybe Didée or someone else has a quick shot for it.
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
4th August 2010, 23:19 | #16 | Link |
Registered User
Join Date: Jul 2003
Posts: 20
|
I just got home from work so i'll have a bit of time to run thru and try the suggested scripts. Didée the clips were taken from a S2 disc, the episode would be either (The Coming of Shadows) or (GROPOS). I ripped just the first chapter from the episodes because I wanted to take the opening credits and average them all together from all the different dvd's. When I started doing stuff with tv shows I usually captured the original airing and as many repeats as I could so I could get the cleanest image possible.
|
5th August 2010, 03:15 | #17 | Link |
Registered User
Join Date: Feb 2004
Posts: 1,348
|
Well I figured out why offsets don't work, there isn't a universal offset for the entire frame (duh). Luckily, since the ratio between the two sizes can be simplified to 3:4 (if the information on the source is correct) the offsets repeat every 16 interlaced frame lines (or every 8 field progressive lines). Which is still a massive PITA. I haven't coded any of this up yet, but it might be a while before I have the time, so I figured I should post what I figured out so far. Hopefully I'm wrong and someone else will figure out how to do this much more easily, but I doubt it .
|
5th August 2010, 07:46 | #18 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
I think, I've got it:
PHP Code:
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
5th August 2010, 15:43 | #19 | Link |
Registered User
Join Date: Dec 2002
Location: UK
Posts: 1,673
|
scharfis_brain - Magic!
I think there must be a correct set of offsets (possibly different for top field vs bottom field) to use without doing a bob first. This might be sharper (might not be!). Not sure about correct chroma processing in that case (might be fine as-is, might be some other nastiness to fix). Cheers, David. |
5th August 2010, 17:43 | #20 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
you might try reverse scalingg without using bob().
but I don't see any real benefit doing so except of getting to hassle with scripting.
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
Thread Tools | Search this Thread |
Display Modes | |
|
|