Log in

View Full Version : Help me restore an old family tape


Chainmax
15th September 2006, 00:52
As I explained in this thread (http://forum.doom9.org/showthread.php?t=115034), 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 ******, 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.

Now, thanks to scharfis_brain the video was reverted to progressive NTSC and I'm now trying to make it look better. Thing is, it has little detail and it's quite blurry and blocky too. Also, there are parts with some big chroma noise issues which I'm not sure wether to treat with a derainbower or with TemporalSoften. Here's the filterchain so far:

AssumeTFF()
TDeint(mode=1,tryweave=true,full=false)

Crop(20,4,690,554,align=true)

Lanczos4Resize(656,448)

TDecimate(mode=7,rate=29.97)

e=depanestimate(last,pixaspect=0.911)
last.depanstabilize(data=e, pixaspect=0.911, cutoff=3.0, dxmax=48, dymax=32)

FFT3DFilter(sigma=1,bw=32,bh=32,bt=3,ow=16,oh=16,sharpen=0.7)

Deblock_QED()

dull=last
sharp=dull.LimitedSharpenFaster(SMode=4,Strength=200)
Soothe(sharp,dull,25)

AddGrain(5,0,0)

AddBorders(32,16,32,16)

Levels(0,1,255,16,235)

And here's a couple of screenshots:


Before:
http://img126.imageshack.us/img126/7938/beforezb5.png (http://imageshack.us)


After:
http://img119.imageshack.us/img119/738/afterbd7.png (http://imageshack.us)


As you can see, not much improvement has been made. In fact, the results could be construed as worse depending on how you look at it. I appreciate any help you can give me.

Pookie
15th September 2006, 04:46
I don't blame you if you don't like this effect, but it does fool the brain into thinking the video looks better than it really is.

http://fileserver1.jpghosting.com/images/scanlines50_a7f8d426d64fa5b4d1d09ce6b1b10191.jpg (http://www.jpghosting.com/showpic.php?image=scanlines50_a7f8d426d64fa5b4d1d09ce6b1b10191.jpg)


http://www.avisynth.org/warpenterprises/files/scanlines_25_dll_20031103.zip

Scanlines(50)

Maybe combine it with FFT3dfilter cleaning the chroma planes ?

Chainmax
15th September 2006, 05:04
That looks great, but this footage is too important to use a gimmick (how does it work anyway? does it truly interlace the picture or just colors every second line in black?) like that on it. As for the suggestion to use FFT3DFilter on chroma, like I already said:

I'm not sure wether to treat with a derainbower or with TemporalSoften

I can upload a couple of short vob samples if needed.

Pookie
15th September 2006, 05:17
From the documentation -

"The Scanlines() effect gives the impression that
the movie has more resolution than it realy has
for example you could have a video of 320x240 and
resize it to 640x480 with PointResize() and then
applying the Scanlines() filter you would get the
impression that the video looks better.

This filter has one parameter only and it sets
the strength of the odd rows from 0% to 100% of a
regular row. Valid values are between 0 and 100."


It adds black lines, rather than interlaces. Test out a mergeluma(source,scanlined,.50)? Then again, interlacing at the end will enhance the image the correct way. Good luck, Chainmax. Post some screen caps when you have it figured out.

DryFire
15th September 2006, 06:24
I can upload a couple of short vob samples if needed.

That would be lovely.

scharfis_brain
15th September 2006, 08:52
@ Chainmax: use a deblocker straight after loading the file.
Also I don't think, that Deblock_QED is capable for interlacing, so try
separatefields().Deblock_QED().weave()

Chainmax
15th September 2006, 12:55
But in the previous thread you said that filtering in this case was better applied after stabilizing. Besides, why applying the deblocker right after MPEG2Source using SeparateFields&Weave rather than right after bobbing?

[link removed]
[edit 2] Does anyone notice how some vertical lines in the "Before" picture are almost completely straight but in the "After" picture they are wobbly?

scharfis_brain
15th September 2006, 14:11
But in the previous thread you said that filtering in this case was better applied after stabilizing. Besides, why applying the deblocker right after MPEG2Source using SeparateFields&Weave rather than right after bobbing? aaargh. make yourself familiar with video compression, where artifacts occur, and where to put which filters :(

[edit 2] Does anyone notice how some vertical lines in the "Before" picture are almost completely straight but in the "After" picture they are wobbly?
because these aren't the same images.

Chainmax
15th September 2006, 16:01
aaargh. make yourself familiar with video compression, where artifacts occur, and where to put which filters :(

Throughout the course of my stay in this forum I learned many things, sometimes by reading documents and mostly by hearing the patient and kind advice of the Pros around here, including you. I don't know why you react that way when I'm just asking for clarification, be it by a direct reply or a link to an article.


because these aren't the same images.
You're right, Avisynth must be screwing up random access :(.

Chainmax
17th September 2006, 06:14
Didée? foxyshadis? Anyone? I really need some help making this watchable...

foxyshadis
17th September 2006, 07:38
Sorry, I've done VHS conversions before (which this might as well be, even if it came from DV), and all I do is throw together a script sort of like yours and live with the results, since there's only so much I can do for it.

You might want some kind of lighting stabilizer, if such a thing exists in avisynth, and HDRAGC. That's all I can think of helping.

Chainmax
17th September 2006, 07:48
Thanks :).

I don't know about a lighting stabilizer, but wouldn't HDRAGC make it even more bright than it already is? In any case, I was wondering if there was something I could do to increase the perceived detail.


[edit]This is a horrible DVD transfer from a VHS source.

Chainmax
20th September 2006, 01:02
Anyone else?

Fizick
20th September 2006, 05:10
Rules:

11) Don't post just to increase your number of posts. If you have nothing to say on a certain matter then don't post. The number of posts on this board has no direct relation to the experience of a member.


12) How NOT to post on this forum:

5 minutes after your initial post you reply to your own post writing something like "Why is nobody helping me? I'm sure you know the answer". Once somebody replies to your thread but doesn't give you exactly the answer you've been expecting you insult them.

Soulhunter
20th September 2006, 17:32
@ Chainmax

Really, there isnt much more you can do with a source like this!

Live with it or burn it... ^^


Bye

Chainmax
20th September 2006, 17:49
How very passive aggresive of you Fizick, let me answer in a similar fashion:

1) I know the rules of this forum full well and don't need you to remind me of them, thank you very much.

2) The bumps are not for postcount upping, they are a request for help in something that is dear to me and beyond my ability to repair. That would be fairly obvious to you if you weren't intent on being confrontational.

3) Did you even bother to check this thread? Both bumps occurred after over a day and a half without further answers. It's not a case of me not liking the answers that were given either since I didn't complain (even to your first reply which was contentless and unhelpful), it is about seeking the attention of more people to see if someone else can help me.

4) You are not a moderator, so stop trying to act like one. If you have a problem with this thread, report it like any normal user would do.



SoulHunter: I understand what you're saying, but I've seen many cases (and been a participant in many others) where amazing results were achieved out of a crappy source. The very reverting of this to 29.97p thanks to scharfis_brain's advice is proof of that. I know miracles don't happen and a turd can't be polished, all I'm asking if for someone to give this a go since any improvement over my result will be enough.
For instance, one of the things that I'd like to know is if TemporalSoften might be a better solution than FFT3DFilter for the chroma artifacts as I lack the theoretical knowledge to make that assertion and don't want to make the result even worse than it is.

Chainmax
22nd September 2006, 01:11
I altered the filterchain slightly and achieved this:


Before:
http://img174.imageshack.us/img174/3037/beforexv2.png (http://imageshack.us)

After:
http://img174.imageshack.us/img174/6681/afteryn0.png (http://imageshack.us)

Do you think increasing the saturation and adding some chroma noise would help?

setarip_old
22nd September 2006, 01:38
The only difference I can perceive between the two is that the second appears to be a little bit lighter - but then again, I have ancient eyes...

(Just kidding) Any chance your brother could be Bar Mitzvah'd again, so you can shoot digital video? ;>}

Guest
22nd September 2006, 02:15
@Chainmax

>Both bumps occurred after over a day and a half without further answers.

Please do not bump threads, per forum rule 11. Every post should have useful content. If you need to discuss this rule further, take it to PM. Thank you.

You should make your own decisions about what is "better".

Chainmax
26th September 2006, 19:11
I finally found a filterchain that does a decent job: the result looks a bit sharper, a few more details are visible and most of the jaggyness was eliminated. Here's the filterchain if anyone is interested:

SeparateFields().DeBlock_QED().ColorYUV(off_y=-3,gain_y=20,cont_u=0,cont_v =25.6,opt="coring").Weave()

Interp = SeparateFields().EEDI2(field=3,maxd=29,nt=80,pp=3)
TDeint(mode=1,order=1,type=3,mtnmode=3,tryweave=true,edeint=Interp)

TIsophote(iterations=6,chroma=true)

Crop(22,4,688,554,align=true)
Lanczos4Resize(656,448)

TDecimate(mode=7,rate=29.97)

e=depanestimate(last,pixaspect=0.911)
last.depanstabilize(data=e, pixaspect=0.911, cutoff=3.0, dxmax=48, dymax=32)

Cnr2("xxx",4,5,255)

FFT3DFilter(sigma=1,bw=32,bh=32,bt=3,ow=16,oh=16,sharpen=0.3)

dull=last
sharp=dull.LimitedSharpenFaster(SMode=4,Strength=150,wide=true)
Soothe(sharp,dull,25)

AddGrain(5,0,0)

AddBorders(32,16,32,16)

Levels(0,1,255,16,235)

*.mp4 guy
27th September 2006, 10:26
If you wan't to give it a more film like, contrasty look, try appending this to the end of your script (and remove any levels you might be using).


converttorgb24()

Layer0 = last.spline36resize(512, 512).converttoyv12(Matrix="pc.601")
Layer1 = last.BilinearResize(8, 4).bilinearResize(16, 8).BilinearResize(32, 16).Spline36Resize(512, 512).converttoyv12(matrix="pc.601")
Diff1 = Subtract(Layer1, Layer0)
Diff2 = Subtract(Layer0, Diff1)

Diff2
Spline36Resize(720, 480)

example pic (http://img227.imageshack.us/img227/671/example8673mh7.png)

Its poor-mans HDR.

Chainmax
27th September 2006, 20:02
Going to try it, thanks. How diferent would that be from HDRAGC?

Chainmax
7th October 2006, 04:57
mmm, these lines

e=depanestimate(last, pixaspect=0.911)
last.depanstabilize(data=e, pixaspect=0.911, cutoff=3.0, dxmax=48, dymax=32)

Cause variable black bars to appear and since I'm already including overscan borders they become very noticeable. I'll try to see if I can reduce that, but I bet it will boil down to having to disable stabilizing altogether :(.

scharfis_brain
7th October 2006, 07:25
Why are you compensating for overscan at all?
I never do that, cause you never know how much overscan a TV has.

Some newer TVs have a very small overscan....

Also you should read the documentation of depan.
It describes how to compensate the black bars in to ways.

Chainmax
7th October 2006, 16:47
We have very few HDTVs here for two reasons; not having HD signals (I believe we haven't even decided what standard to use yet) and they are much too expensive: all we have is generic crap that costs U$$1000+ and the single 50'' Panasonic one I saw went for like U$$5000. So, most of us here have SDTVs. And the ones I tried my DVDs on have huge overscan.
I actually used to encode DVDs to 704x480 since the extra 16px went to side bars, but then I noticed on a TV that it wasn't enough and that a small part of the picture was still hidden. That's why I changed to 720x480.

As for DePan's manual saying how to compensate for the borders, I know that, remember we talked about it several times in other threads. That's why I said "I'll try to see if I can reduce that" and that I doubted it would give satisfactory results. I will try and report back though.

2Bdecided
9th October 2006, 16:50
This is meant to be a helpful comment to save time and effort...

I bet the people who will watch this will never notice the improvements you are trying to get now.

"Normal" people are interested in content, not quality. If you've got rid of the nasty jumping from bad standards conversion, then that's great. Stop there!

Cheers,
David.

Chainmax
9th October 2006, 18:00
I appreciate your concern and am well aware of what you state, but if you read back a couple of posts you'll see that I found a suitable filterchain some days ago and this last post was a comment and not a request for extra help. In any case, I am a hopeless perfectionist and this is a great way to further my knowledge about filtering :).