logo Sign In

g-force

User Group
Members
Join date
24-Sep-2004
Last activity
16-Jul-2020
Posts
662

Post History

Post
#322695
Topic
STAR WARS V8 - A Final Attempt (Released)
Time

Arnie.d,

here's my first crack at it.

 

ConvertToYV12()

########## set black level, adjust gamma, saturation/hue
Levels(15,1.2,240,0,255)
Tweak(sat=1.5,hue=-5)

########## prefilter (for obtaining motion vectors)
source = last
source.TemporalSoften(7,255,255,25,2).Repair(source,9)

########## get motion vectors
bw_vec1 = last.MVAnalyse(isb=true, delta=1,pel=2,sharp=1,overlap=4,idx=1)
fw_vec1 = last.MVAnalyse(isb=false,delta=1,pel=2,sharp=1,overlap=4,idx=1)

########## apply motion vectors
bw1 = source.MVCompensate(bw_vec1,idx=2,thSAD=400)
fw1 = source.MVCompensate(fw_vec1,idx=2,thSAD=400)

########## 1st degrain stage
inter = Interleave(bw1,source,fw1)
inter.Clense(reduceflicker=false).TemporalSoften(1,255,255,25,2)

########## limit 1st degrain stage
last.Repair(inter,9)

########## 2nd degrain stage
TemporalSoften(1,255,255,25,2)
SelectEvery(3,1)

########## temporal min/max sharpening stage
pmax = source.MT_Logic(bw1,"max").MT_Logic(fw1,"max")
pmin = source.MT_Logic(bw1,"min").MT_Logic(fw1,"min")
MT_lutxy(last,last.RemoveGrain(12,-1),"x y - 1.7 * x +",U=2,V=2)
MT_Clamp(pmax,pmin,2,2,U=2,V=2)

 

 

-G

Post
#322586
Topic
STAR WARS V8 - A Final Attempt (Released)
Time
Arnie.d said:

 

Anyway, I made a testclip. It's just a raw capture upscaled to anamorphic, no other filters were applied (also no averaging). It was captured using the default capture settings:

Movealong

And another one:

Leia

And the flyover, average of 3 captures:

Flyover

 

I welcome suggestions about the contrast, color, saturation, brightness etc. (or any other suggestions or ideas).

 

 Arnie,

these are looking nice so far. I'll play around with these and (hopefully) the 3 different sources you will post and get back to you on some suggestions.

BTW, it is so nice to see a source without so much telecine wobble! I also agree that the whites and blacks don't appear to be clipped, but I would still take Moth3r's suggestion of checking these objectively just in case.

Keep up the good work!

-G

Post
#322492
Topic
STAR WARS V8 - A Final Attempt (Released)
Time
Arnie.d said:

g-force said:

Arnie.d said:

I didn't test the median filter. I thought the temperalsoften was better?

 

 

It all depends on what type of noise you have. Only one way to tell really...

Any chance you could post the same clip from 3 different captures?

-G

 Does it have to be uncompressed or is mpeg2 ok?

 

mpeg2 should be just fine for what I have in mind!

thanks,

-G

Post
#321919
Topic
GOUT image stabilization - Released
Time
Davis said:

Still have the lines. It’s not “DGIndex”- that is fine. It seems to be induced by AVIsynth itself. When I run the AVS file on the Star Wars video (not encoding at all, just playing it in Media Player), the horizontal interlace lines appear. Nothing I do in TMPEGenc takes them away….

 

Hey Davis, did you ever get this figured out? I'm at a loss, since there really is no way the script could be interlacing the video.

Is it possible that it is the DVD ripping software? Are you absolutely sure that you are using "force film" in DGindex?

The only other thing that I could think of is that some plugin is not the most recent version and is defaulting to interlaced video. Might want to check that you are using the most recent versions of the needed plugins.

-G

Post
#321908
Topic
STAR WARS V8 - A Final Attempt (Released)
Time

Max_Rebo said:

I hope that makes sense, if not I'll try to explain tomorrow.

I definitely understand what you are saying!

Max_Rebo said:

I've been thinking about it and I'm still not sure if a median filter would be better, in your example you made the assumption that only a third of pixels duffer from noise and that no one pixel suffers noise in two captures, which is a highly idealised situation.

I think the median method would be a good way avoiding bursts of static or dropouts that may not be reproduceable so only effect one capture but I can't see how it would help with the smaller random variations present in all analouge captures, when dealing with random variations taking the mean of the multiple values is surely the better way.

You are correct. But it will depend on what type of noise you have. The random variations you are used to with VHS are much smaller with LD. The biggest problem with LD is the noise introduced by such things as laser rot and dot crawl. These are not random variations that affect the entire frame equally, but rather isolated incidents that do not always occurr in the same place on every capture. I guess it all depends on the type of noise you have, and hopefully Arnie.d will try both!

Max_Rebo said:

will the scenechange parameter allow the middle capture to be excluded from the average? as this would not be useful for it's original purpose and the differences are measured relative to the middle capture, so if the middle capture had a significant problem then the other two would be excluded and the problem would remain.

You are correct. I didn't think of this situation. I could code up something that would replace the scenechange parameter to still average the 2 good frames.

Max_Rebo said:

what does it really mean by 'average pixel change'? is it a percentage? if 5-30 is appropriate for a change in scene isn't 25 too great a difference for supposedly identical frames I wouldn't expect 2 captures of the same frame to be different by more that 1-2%

The scenechange parameter is the maximum allowable average pixel difference in luma from one frame to the next. 25 may not be the best value especially if the captures are relatively noise free.

Orinoco_Womble said:

 

g-force said:

Also, there may be some benefit to throwing a mocomped-denoised source into the mix as well.

 

Sorry, didn't understand that bit at all. Umm, whats a mocomped-denoiser?

That was Moth3r's quote, not mine! A mocomped-denoiser is one that motion compensates objects in previous and next frames to their positions in the current frame and does some sort of filtering (median, average, fft etc.) on those frames.

-G

Post
#321805
Topic
STAR WARS V8 - A Final Attempt (Released)
Time
Arnie.d said:

g-force said:

Arnie.d said:

I'll give that one a try as soon as I get my new voltage convertor.

 

You know, I just thought of something. That voltage converter may be adding some noise to your captures due to the fact that the computer ground and the LD player ground are no longer the same. You may get better results if you can run your PC off of the voltage converter also. This may be possible if you flip the switch near the power input of your PC to 115 instead of 230. Just a thought.

-G

 I can't switch my PC to 115. But the LD player doesn't have ground (if I think I know what you mean by ground).

 Bummer. Yeah, it still has a ground, just not a chassis ground. Second best is to make sure the PC and the voltage converter are connected to the same outlet.

-G

Post
#321792
Topic
STAR WARS V8 - A Final Attempt (Released)
Time
Arnie.d said:

I'll give that one a try as soon as I get my new voltage convertor.

 

You know, I just thought of something. That voltage converter may be adding some noise to your captures due to the fact that the computer ground and the LD player ground are no longer the same. You may get better results if you can run your PC off of the voltage converter also. This may be possible if you flip the switch near the power input of your PC to 115 instead of 230. Just a thought.

-G

Post
#321790
Topic
STAR WARS V8 - A Final Attempt (Released)
Time
WXM said:

Darn, I was hoping you, Mother, or someone else knew a trick for easily wiping those dupe frames...

Mother and G-Force, would you say that your scripts above are better than the "Average" dll that I use? I would guess it would just be a different route to exactly the same result. What could the diffference be?

 

The doom9 forums are full of avisynth scripts to get rid of those dupe frames. Check it out! Luckily, the LD catures should give you exactly the same number of frames every time.

I would guess that the averaging script that Moth3r posted would give you EXACTLY the same results as whatever average you are using, as long as you give yours only 3 sources, so no worries! The median script though (yes Orinoco_Womble, it's the same concept as TOOT) should give even better results with 3 sources than an average of 3 sources, and a 3-source median may even be better than a 5-source average.

-G

Post
#321788
Topic
STAR WARS V8 - A Final Attempt (Released)
Time
resonator said:

As far as the upscaling to anamorphic is concerned you should definatly check out a small tool called "Video Enhancer" (www.thedeemon.com), it's the only resizing/upscaling method I know of that is temporal-based and gets detail and sharpness off the neighbouring frames. I've tried various upscaling algorithms (Lanczos, SSpline, RedGiant's InstantHD), and they all do pretty well but the "SuperResolution" does more than noticibly better. 30$ well spent for me. There's a version for AfterEffects available too, but it costs a 100.

 

 

I can think of a couple other temporal based sharpness filters, the best of which is currently used in my GOUT stabilization script. ;) I think it is important to temper people's expectations about "super-resolution". Super-resolution only works for things that are moving. This is a good thing for sources that suffer from DVNR smearing such as the GOUT, but for sources without smearing, all you're doing is getting rid of motion blur. Since all of the motion blur on the Pre-THX LDs is intentional, this would probably not be a good thing.

The best upsizers actually use Edge-Directed Interpolation. Arnie.d has already indicated that he plans on using NNEDI (Neural-Network Edge-Directed Interpolation) so I think he's already heading in the right direction.

-G

Post
#321553
Topic
STAR WARS V8 - A Final Attempt (Released)
Time
Moth3r said:


And for an average, I suppose you'd use something like this:

interleave(source1,source2,source3)
temporalsoften(1,255,255)
selectevery(3,1)



Corect!
Even better:

interleave(source1,source2,source3)
temporalsoften(1,255,255,25,2)
selectevery(3,1)

The addition of the "25" is the scenechange parameter, which will prevent the averaging in of a frame of a particular capture if that frame is really bad. The "2" is the mode parameter, which according to the documentation, is better and faster than the default mode "1", although in my tests I have yet to see the difference between the modes.

-G
Post
#321405
Topic
GOUT image stabilization - Released
Time
Davis said:

Thank you very much. That solved the problem!

I just had one more question- what exactly is AVIsynth doing to the video? Is it interlacing it? Converting it to 30fps? Because when I run the AVS file in TMPEGenc, no matter what setting I've used, there are the horizontal interlace lines in the final video.

Thanks again for all your help!


Glad I could help on that one. The script doesn't change the framerate, nor make it interlaced. I would suggest checking the settings in TMPEGenc first, and make sure you are encoding progressive. Then I would check your DGdecode settings and make sure it isn't trying to de-interlace the .vob files.

-G
Post
#321292
Topic
STAR WARS V8 - A Final Attempt (Released)
Time
Arnie.d said:


I still have a script somewhere for averaging 3 or 5 sources. But I'm not at home so I can't check what it does exactly. Some help would be nice. I've never actually used an averaging script/filter.

I will IVTC so it will be 23.976 progressive.


The median filter in Avisynth would be very similar to what I'm doing in my "stabilize" script, except that instead of using motion compensated neighboring frames, you would use 3 different sources.

something like this:

Interleave(source1,source2,source3)
Clense(reduceflicker=false)
SelectEvery(3,1)

You would need to capture the 3 sources in EXACTLY the same way every time, and they would need to be time aligned. It wouldn't matter if you did this before or after IVTC.

You could also do it with 5 sources, but you can't use the VERY fast "clense" median filter, since that only handles 3 frames. You would need to use the EXTREMELY slow "MedianBlurT", and to make things even slower, you have to process 5 frames instead of 3.

These are merely suggestions, as I'm sure that whatever you do will be a great addition to the preservation effort! Let me know if there is any help I can lend.

-G
Post
#321175
Topic
STAR WARS V8 - A Final Attempt (Released)
Time
Wow! I'm really excited about this Arnie.d!

As for the averaging of the captures, it would be even better to do a median filter on 3 captures.

so given a row of pixels from three different captures:

(n1),(x2),(x3)

(x1),(n2),(x3)

(x1),(x2),(n3)

where x is a good pixel, and n is a noisy pixel, averaging would give you:

2/3*x1 + 1/3*n1 , 2/3*x2 + 1/3*n2 , 2/3*x3 + 1/3*n3

whereas a median filter would give:

(x1),(x2),(x3)

Even better to use 3 captures from 3 different laserdiscs to remove laser rot, but that I suspect is out of reach. I would love to help with the Avisynth scripting if you would like.

Do you plan on de-interlacing also?

-G
Post
#320578
Topic
GOUT image stabilization - Released
Time
Kyp said:

OK... Used DVD Decrypter in IFO mode and demuxing. Used Womble to fix the GOPs. Used DGIndex afterwards. No change in my frame numbering... still way off as originally posted. Tempted to just manually figure my subtitle frame points but want to be able to edit and enhance the way the experts are doing it and arrive at the same frame numbers. 2006 GOUT EPS IV NTSC.


Take a look at the script on page one. Enter your "SW logo" frame (861) in the setup line that starts with "sw_frame_no". The rest of the script will put the subtitles in the right place for you.

-G
Post
#317909
Topic
GOUT image stabilization - Released
Time
boba feta said:

Allrighty then - thanks for your help moth3r, g-force, arnie & OSJ (That's what I love about this forum, it truly is a community), apparently I was running an old version, it reported back v 2.50. After upgdating that (to 2.58), stepping up to CCE 2.70 and installing a missing ffttw3 DLL (into the system32 folder mind) i'm just 4 days away from fanboy heaven. I initially ran a CBR version with only took 22 or so hours, but now I'm on a 3 pass VBR which will take a lot longer. I must say g-force you've done an absolutely stunning job with this script, I find it hard to believe this is indeed the GOUT I'm watching here.


Thanks for the kind words! Are you sure that you are using the most recent script (1.11)? I'm not doing an fft anymore, so you shouldn't need that .dll.

-G
Post
#317609
Topic
GOUT image stabilization - Released
Time
boba feta said:

Script error: there is no function named "Mpeg2Source"
(E:\GOUT\GOUT.avs, line9)

Is this a path error, because the source path does look correct.

Is the .avs script supposed to reside in the AVISynth directory? Or doesn't it matter?

You need the DGDecode.dll from dgmpgdec149.zip in the AviSynth 2.5\plugins folder.

It doesn't matter where the .avs file resides.

-G