Log in

View Full Version : Help with new script please.


IceManTX
21st September 2006, 06:17
I am capturing FIOS DTV with my Nvidia DualTV card in MCE which outputs a dvr-ms file. I am then using DVRMSToolbox to get a regular .mpg file. I then have tried TMPGEnc MPEG editor to cut commercials out and used AutoGordian or GordianKnot to encode to Xvid. The shows I am capturing are SciFi Channel (Stargate). My captures are 720x480 29.97fps.

I have spent the last week learning Avisynth Usage and customizing the script that GordianKnot kicked out for me so that I could try this from another angle.

My main problem is just an overall cleaning (or smoothing?) of the footage after I do the TomsMoComp deinterlace. I went through the whole tutorial on decomb but after hours of tweaking I don't think my footage was enough 3:2 and my ignorance just had me fooled. It shows "out of pattern" way more than it does "in pattern" and my results are never as clean as a deinterlace.

1) Should I be doing the decomb before I edit out commercials, etc.. Is this messing up my decomb or am I right to forget it and do deinterlace instead?

2) I have found the usage of TWEAK to try and brighten up my first few captures which came out really really dark. Is this the recommended way of adjusting the contrast, etc.. or is there a more accepted method here in 2006?

3) Early tests with DEEN seem to impress me but I cannot get the "w3d" to work at all. It just fails to open in VDub unless I select "a3d". I can't find hardly a thing regarding the usage of Deen on the web. Any clue why this happens? Should I just use "a3d"? Is this the most current reliable tool that is used for what I am doing?

I have found a million filters but there is no way to test them all in this lifetime and there is absolutely no way to know which filters are still the best for usage today since most every tut I find on the web is dated in the 2000 to 2003 range.

Can someone point me in the right direction? I hate to use the dreaded "what is best" question but a few suggestions would be MOST appreciated. Here is the basic gist of my little test script right now.

#LoadPlugin("C:\Encoding\GordianKnot\AviSynthPlugins\decomb.dll")
LoadPlugin("C:\Encoding\AviSynth 2.5\plugins\deen.dll")
LoadPlugin("C:\Encoding\GordianKnot\AviSynthPlugins\TomsMoComp.dll")
LoadPlugin("C:\Encoding\AviSynth 2.5\plugins\fluxsmooth.dll")
LoadPlugin("C:\Encoding\AviSynth 2.5\plugins\undot.dll")

DirectShowSource("E:\Temp\OUTPUT\Atlantis quik test.mpg")

#AssumeTFF()
#Telecide(guide=0,post=2,blend=true,vthresh=10,show=true)
#Decimate()

TomsMoComp(1,5,1)
crop(10,60,700,356)
LanczosResize(640,368)
Undot()
deen("a3d",4)
fluxsmootht(7)
Tweak(cont=1.25,sat=1.4,bright=5, hue=0)

Please and thank you.

Jeremy Duncan
21st September 2006, 07:23
Try this from decomb.

fieldDeinterlace(full=true, blend=true, dthreshold=10)

foxyshadis
21st September 2006, 07:42
Stargate is excessively hybrid and pretty insane. But TIVTC+Tdeint (or any other deinterlacer) has some powerful hybrid-handling tools. Still, simply deinterlacing won't hurt too bad either; if it doesn't look jerky while watching you're pretty safe. Commercial cuts shouldn't affect anything other than the one cycle at the seam.

For brightening: HDRAGC. For best results you'll still need to tweak it, but it can do things you never could with curves and tweak.

No idea about Deen, I never cared for it given all the awesomer and more stable current filters.

IceManTX
21st September 2006, 07:58
Stargate is excessively hybrid and pretty insane.

Oh thank god...so I'm not totally insane. I guess I just picked a hard show for my debut into capture world.

No idea about Deen, I never cared for it given all the awesomer and more stable current filters.

Thank you so much for this info. I have spent so many hours on outdated filters that my head is spinning. The next one in my list was "hqdn3d". Is this one of the newer ones? Please give me a heads up on a few of the "awesomer more stable" variety!

I will run some tests with the current info you both have already provided.

Thank you very very much.

foxyshadis
21st September 2006, 09:37
My stable consists of degrainmedian (fast), fft3dfilter (moderate), frfun7 (slow), and mvdegrain (moderate to very slow). Along with VagueDenoiser or FluxSmoothST if I want something fast but harder than DGM.

Pookie
21st September 2006, 09:38
Hi IceManTX - try out fft3dfilter, degrainmedian, and removegrain for starters :)

IceManTX
21st September 2006, 09:43
OK...the TIVTC with Tomsmocomp is very nice picture using these settings:

TFM(order=1,mode=3)
TomsMoComp(1,5,1)
tdecimate(hybrid=1)

The tdecimate is only if I want to go to 23.76 is that correct?? So to leave it at 29.97 I would omit that line or am I way off on this? (it's almost 4am so forgive me, I'm only partially awake)

Also, the HDRAGC is awesome at brightening!! Way better for me than tweak was doing. I need to tweak it a little tomorrow when my eyes aren't blurring but I am VERY happy so far.

Not sure about hqdn3d yet. Would I still use Fluxsmooth with that? Maybe I need to find right settings...more testing in morning with new ones you all suggested!

thanks again!

Your_Idol
21st September 2006, 10:49
firstly you should try to get your tv capture card to record just the mpg file. On my dvico fusionHDTV card this option is called Capture Native Mpeg.

Once you have your mpg you can demux the audio and make your d2v file with the program DGIndex.

The d2v can be put in your avs script with LoadPlugin("C:\DGDecode.dll") and mpeg2source("C:\Media\Movie.d2v").

Open the avs in VirtualDubMod and add the audio stream then cut out the ads.

Tip: Veedub does not have an undo button so after you cut each ad break save your processing settings in case you make a mistake.

IceManTX
21st September 2006, 19:44
firstly you should try to get your tv capture card to record just the mpg file. On my dvico fusionHDTV card this option is called Capture Native Mpeg.


I don't think there is a way when recording through Media Center. But I don't "think" that it is hurting it as the dvr-ms is really just a wrapper around the MPEG file so stripping it doesn't really touch the MPEG itself so to speak.

I am going to try Yahoo GO TV to see what capture formats they offer but I just can't afford to spend any more money on BeyondTV or Sage right now.

IceManTX
21st September 2006, 21:13
OK....I've tried the filters (some of them are damn difficult too "fft3dfilter") and I'm sure I haven't exhausted their endless possible tweaks but I have come to the following conclusion.

My rookie eyes cannot discern a noticeble difference in the effectiveness of one of them over the others so unless someone sees a problem with this logic I will go with the relative simplicity of:

undot()
DeGrainMedian() #default settings
Fluxsmoothst(7,7)

I'm going to go ahead and do a whole episode now and see what it looks like. The amount of hours I have spent this week and last week chasing the perfect xvid is staggering. If this encode fails to give good results I think I will just get out the nickel plated revolver and put on the old dress blues. ;)

Thanks for the help!

IceManTX
21st September 2006, 22:57
Oh my god......nothing is simple.

Please help.

I was going to just use Gordian but plug my .avs into it instead. But whenever it finishes first pass then VDUBMOD closes with error. I click ok on error and it starts the 2nd pass then same thing and it never ends up muxing at the end. The error I keep seeing is this:

4:31:17 PM: *************************************
4:31:17 PM: EXCEPTION: Cannot create file "C:\Encoding\VirtualDubMod\LastJob.vcf". The process cannot access the file because it is being used by another process
4:31:17 PM: EXCEPTION: Encoder Thread Terminated.
4:31:17 PM: *************************************

I have all but blessed and sacrificed my first born for this .vcf file and still I get this error. :scared:

Soooo......I just said to hell with Gordian and opened my .avs in VDUBMOD myself. My only question is (and please forgive me if it is incredibly dumb) but it only seems to do the one pass and then deliver my AVI file when I "Save As..". How do I get it to do 2 passes?? Am I doing this right??? :confused:

Pookie
21st September 2006, 23:22
IceManTX - you don't need Gknot any longer. Now that you have your AVS template, just load the thing in VirtualDubMod and transcode away. Doing a 2-pass in VirtualDub is really easy. Let us know if you need some help in that regard.

Post ten seconds or so of the source file you are working on if you want some advice on filtering. You can always post to one of the free services - Rapidshare.de , etc.

BTW - Yes, FFT3dfilter is kinda tricky if you're just starting out. But hey, nothing great is created without a struggle :)

IceManTX
22nd September 2006, 04:40
OK, thank you. I think I have found something on the web regarding the 2 passes in Vdub so I am going to struggle with that for a bit to see if I can figure it out on my own.

In the meantime. Here is a snippet of what I am dealing with if anyone wants to give some filter advice.

Atlantisclip.mpg (http://71.164.186.136:81/moviez/atlantisclip.mpg)

Here's what I am doing so far:

# IVTC/Deinterlacing
TFM(order=1,mode=3,PP=1)
TomsMoComp(1,5,1)
tdecimate(hybrid=1)

# CROPPING
crop(10,60,700,356)

# RESIZING
LanczosResize(640,368)

# DENOISING
Undot()
DeGrainMedian()
fluxsmoothst(7,7)

# Brightening
HDRAGC(coef_gain=1.5,min_gain=1.0,corrector=.8)


:thanks:

Pookie
22nd September 2006, 06:36
Hey, you're figuring this stuff out pretty quickly!

Your source is very good. Using three denoisers is overkill.

Hdragc is a fantastic plugin, but again, it might be overkill. If you think your target video is going to look too dark, maybe search BT709toBT601 or Colormatrix before hitting it with the hard stuff. Otherwise, try this:

mergeluma(HDRAGC(coef_gain=1.5,min_gain=1.0,corrector=.8),.20)

That'll make the filter peek through the luma channel only.

IceManTX
22nd September 2006, 06:52
Hey, you're figuring this stuff out pretty quickly!

HA! I can't begin to convey to you the amount of hours I have spent reading & learning this Avisynth stuff this week. The days have gone by in a blur and I think my wife/kid have forgotten my name. I am leaving for a week at Disneyworld with them tomorrow evening and then its back to work and my time for video playing will be near zero again except on weekends.

I was wondering if all those filters were overkill. Which denoiser(s) do you think I should kill?

I will try the brightening hints. Hopefully this won't be an issue in the future. This was my first recording and I had the levels set too low which resulted in footage being a little dark. I think I have this corrected but haven't had any time to do new captures because of learning encoding! ;)

Pookie
22nd September 2006, 07:03
Up to you, but the results of Undot are meant to be invisible (or at least close to it), so that's no fun :D

Load each one up and scrub through your video with VirtualDub, looking for any obvious oversmoothing or artifacts. Whichever one your eyes like more is the one to use.

IceManTX
22nd September 2006, 07:39
OK....I removed Undot.

Then I tested the others one by one and since I can't tell a bit of difference in either one of them....

I used the "Eeny Meeny Miney Moe" method and decided to keep DegrainMedian. "Eeny Meeny" is pretty scientific and hasn't let me down before. :D

I do have one question though that can't be normal. Every time I close an .avs fed video file in VDubmod or close VdubMod I get the dreaded "Vdub has encountered a problem and needs to close..." message. What gives? I have the latest version and if I open a video file normally it doesn't have a problem at all.

Also, do I add my audio via the streams list in VDub or do I need to add that to my .avs as well or does it matter?

And finally, the logoaway filter is pretty darn neat! I've only had a chance to play with it briefly but that is really cool.

thanks again for all the help.

IceManTX
22nd September 2006, 08:00
Figured out crash...did not realize that folder in Avisynth\plugins was autoload and I had been dumping a LOT of plugs in there that I was testing.

I cleaned out the folder and the crashing stopped. Thank you Google.

Your_Idol
22nd September 2006, 10:59
It doesn't say yet if you figured out 2 pass in VeeDub. Save the first time with the setting Twopass - 1st pass, then save it again with the setting Twopass – 2nd pass. For all the other options in xvid look at this linkEncoding DivX 5-Compatible video with XviD (http://www.animemusicvideos.org/guides/avtech/xvid.html)

IceManTX
22nd September 2006, 18:45
Yes, I'm sorry. I did figure out the 2-pass and the page you linked is the exact page that helped me do it!

It took 2 1/2 hours to encode the whole 43 minutes ep. That's not to bad for 2 passes. I'm still arguing with myself over whether or not to use Degrain or Fluxsmooth though.

The odds of anyone else ever seeing these is so miniscule, yet I am so anal that I am driving myself mad over these settings.

Thanks for all the help.

IceManTX
2nd October 2006, 18:19
Alright I'm back from vacation and trying to remember why I did all the things I did in my .avs script before I left.

My main question is in regards to aspect ratio.

1st) If I am capturing in 720x480 and I wish to leave it 4:3 is there a good reason for me to resize to 640x480 when converting to xvid? What am I gaining by doing a resize?

2nd) If I do the resize above then is cropping necessary still or only when going to a 16:9 from 4:3??

3rd) If I wish to convert to a 16:9 how can I tell what would be 16:9? For example, I was resizing to 624x368 but I've seen others use 624x352?? I can't figure out for the life of me why I picked those numbers a couple weeks back and it has me really scratching my head.

I will most likely watch these xvids on my PC but sometimes I do watch them on my television if that makes any difference.

Just when I think I halfway understand the aspect ratio stuff I realize I don't really have a clue. I just can't seem to wrap my head around it.

thanks!

nibbles
5th October 2006, 08:33
This will get you started: http://lipas.uwasa.fi/~f76998/video/conversion/