digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Latest script discussion (http://www.digitalfaq.com/archives/avisynth/3145-avisynth-latest-script.html)

AmericanKickboxer 04-04-2003 06:24 PM

oh yeah, and what will go in those parenthesis?? for a 352x240 AVI?

Kane 04-04-2003 06:27 PM

Quote:

Originally Posted by AmericanKickboxer
hmm... so many script so little time...

can anyone recomend a good script to me to use when turn my WAV

using Headac3he?? :idea:

thanx

you don´t need any script to turn you wav in to mp2 with headac3he. just open the wav with headac3he, choose MP2 as destination format, click the options button twice to select the bitrate, the audio ahould have ( 128kbit is enough, i think ). then press start and headac3he will go to work

those scripts are just for video encoding

AmericanKickboxer 04-04-2003 06:56 PM

ok ok :oops: , thanx for clarifying that 1 Kane!

AmericanKickboxer 04-04-2003 07:05 PM

sorry for not mentioning this 1...but Im a lil further behind, and I

was asking how to split my AVI file first :)

:mrgreen: then Ill be able to use headac3he

thanx for ur patience!

Kane 04-04-2003 07:13 PM

you mean, how to extract the audio?
open the avi with virtualdub, make sure you have selected "full processing mode" in audio option, than "save .wav"

AmericanKickboxer 04-04-2003 07:19 PM

aight, thanx :wink:

AmericanKickboxer 04-04-2003 08:25 PM

LOST AGAIN!

hmm..okay, i have a WAV file ready to encode to MP2..

I do all the settings an stuff and press start at the bottom of the

headac3he screen..

then it gives me some stupid 'This program has performed an illegal

operation' crap.. it wont lemme encode the WAV file

WHAT WENT WRONG??

Reno 04-04-2003 09:50 PM

Americankickboxer, what CPU do you have? I had a similar problem going from mp3 to mp2 and downloading the alternate .dll's from Dark Avenger's site fixed it right up!!

P.S. I've got an Athlon

rendalunit 04-04-2003 09:51 PM

Did you download the right dll's for your CPU?

Would you happen to be running Windows 98? I hardly ever see that error message anymore since I upgraded to XP :o

See if you can encode it with BeSweet

AmericanKickboxer 04-04-2003 10:09 PM

alright! :) I got it workin and i was able to use Headac3he for my

WAV file. I deleted the old DLL and downloaded DarkAvenger's. That

worked for me! :D thanx

PS: I have windows 98.. :oops:

lata :D

Jellygoose 04-05-2003 05:54 AM

Hi kwag and all others...

After looking at your latest script, I did some heavy testing. I've come to the conclusion, that the smearing of the picture is caused by the combination of the luma threshold of TemporalCleaner and the lumablur...
But: TemporalCleaner still gives a hell of a lot compression if you drop the luma filtering.
I see that a sharpening with Unfilter after the smoothing, followed by a Blur of Chroma and Luma, looks way better, than without any sharpening. just like someone said, it's more like noise where there used to be blocks. that does look more natural indeed.
However I think that this effect is already very visible at a small amount of sharpening. I used Unfilter(7,7) and after that only a very light luma blur (0.1), so that the luma is almost not touched at all. This is giving me a higher compression with only a small decrease in quality compared to kwag's latest script.
try it please and tell me your results...

Quote:

TemporalSmoother(radius=2, strength=2)
SpaceDust()
TemporalCleaner(ythresh=0, cthresh=10)

Unfilter(7,7)
STMedianFilter(7,15,4,7,7,15)
mergechroma(blur( 1.58 ))
mergeluma(blur(0.1))

Wolfi 04-05-2003 05:54 AM

Witch command should I use for a DivX file witch has good quality :arrow:

Convolution3d (preset="movieHQ") // Movie Hi Quality (good DVD source)
is an alias for Convolution3D (0, 3, 4, 3, 4, 2.8, 0)
Convolution3d (preset="movieLQ") // Movie Low Quality (noisy DVD source)
is an alias for Convolution3D (0, 6, 10, 6, 8, 2.8, 0)
Convolution3d (preset="animeHQ") // Anime Hi Quality (good DVD source)
is an alias for Convolution3D (0, 6, 12, 6, 8, 2.8, 0)
Convolution3d (preset="animeLQ") // Anime Low Quality (noisy DVD source)
is an alias for Convolution3D (1, 8, 16, 8, 8, 2.8, 0)
Convolution3d (preset="animeBQ") // Anime Bad Quality (???)
is an alias for Convolution3D (1, 12, 22, 8, 8, 2.8, 0)
Convolution3d (preset="vhsBQ") // VHS capture Bad Quality (???)
is an alias for Convolution3D (0, 32, 128, 16, 64, 10, 0)

And one thing more, should I use UnFilter Old or UnFilter AviSynth 2.5 alpha ?

//Wolfi :)

Kane 04-05-2003 06:25 AM

i use movie low quality with all clean sources, ´cause i can´t see a difference between HQ an LQ, but LQ gives a little more compression.

if you have avisynth 2.5 installed use the unfilter 2.5 otherwise, use unfilter old

Wolfi 04-05-2003 06:51 AM

I have avisynth 2.8 installed so I'll go for UnFilter Old, Thanks you :!:

//Wolfi

Kane 04-05-2003 07:10 AM

hi jellygoose

i just wanted to test your script, but then something strange happened:
i create the "roof" of the script with moviestacker and added the rest of the filters manually and loaded them into ToK. now, i used a 528x576 resolution but Tmpgenc startet to encode with 528x336???
any idea, why this happens? It´s only with your script

Jellygoose 04-05-2003 10:28 AM

No I don't sorry. Try it again. Just add these filters and settings to an existing script...

dazedconfused 04-05-2003 08:42 PM

Quote:

Originally Posted by kwag
Latest test:

Code:

SpaceDust()
sharpen(0.7)
mergechroma(blur(1.58))
mergeluma(blur(0.7))

-kwag

Hey Kwag, just out of curiosity, when you finally settled on the sharpen and mergeluma values used in your latest optimal script, did you arrive at those by doing comparisons on your hdtv, or a regular one, or both? Because those of us using standard televisions could probably get away with a bit more tweaking if it's primarily HDTV-optimized, right?

See, while I really like the resultant quality of this new script, I'm one of the poor schmucks whose dvd player requires me to encode @29.97fps, AND (to top it off) I also have to use 544x480 rez instead of 528x480 (hence giving me even less bitrate to play with :cry: ...and I really don't like dropping to 480x480 or 352x480 if I don't have to).

So what I'm really wondering is how far I could: 1) lower Sharpen, or 2) raise MergeLuma-Blur, without it having too noticeable of an effect on quality on my standard 4:3 ntsc TV. That is, if your .7 values aren't already "Standard TV"-optimized compression-wise. :wink: Or might I even be able to get away with BilinearResize to save a bit more space. Ugh :!: "Just when I thought I was out...(of the "testing" phase)...they pull me back in!". :lol:

Thanks, :drink:
-d&c

kwag 04-05-2003 09:37 PM

Hi d&c,

Your script is outdated :mrgreen:. Check the latest script I posted :)
If you want to squeeze your video even more, and you don't have an HDTV, use BilinearResize and increase your mergeluma value a little. This will keep a very descent quality, while allowing a lower file size :wink:

-kwag

TemplateAVS 04-05-2003 10:03 PM

LegalClip()
GripCrop( X, Y )
GripSize(resizer="BicubicResize")
unfilter(50,50)
temporalsmoother(1,2)
mergechroma(blur(1.58))
mergeluma(blur(0.2))
GripBorders()
LegalClip()

No more spacedust? So, using temporalsmoother with merge does what spacedust was meant to do but with more umph. (I guess) With the new script, is it still at 60 cq and 300 - 2500 kbits?

kwag 04-05-2003 10:05 PM

Quote:

Originally Posted by TemplateAVS
LegalClip()
GripCrop( X, Y )
GripSize(resizer="BicubicResize")
unfilter(50,50)
temporalsmoother(1,2)
mergechroma(blur(1.58))
mergeluma(blur(0.2))
GripBorders()
LegalClip()

No more spacedust? So, using temporalsmoother with merge does what spacedust was meant to do but with more umph. (I guess) With the new script, is it still at 60 cq and 300 - 2500 kbits?

Try it. I just dropped spacedust :wink:

Edit: This is what you get with the script above :): http://www.kvcd.net/sample.mpg

-kwag

dazedconfused 04-05-2003 11:37 PM

Quote:

Originally Posted by kwag
Try it. I just dropped spacedust :wink:

Edit: This is what you get with the script above :): http://www.kvcd.net/sample.mpg

-kwag

:!: 8O 8O 8O Wha-wha-WHAT!!!! 8O 8O 8O

No Dust :?: :!: 8O You're treading on blasphemy my friend! :lol: But I'll take your word for it Kwag and give it a shot. :wink: Boy, just when you think you know something, some wiseguy comes along and rewrites the whole darn book... :P Thanks,

-d&c

jorel 04-06-2003 01:41 AM

yeah.....
"Boy, just when you think you know something, some wiseguy comes along and rewrites the whole darn book... "

i think that 50,50 for unilter is "too much". 8O
try a sample with 20,20 or 30,30....

i posted in "somewhere over the rainbow" :roll:
(in avisynth thread,some sample scripts i think...)
a few months ago that unfilter and temporalsmoother
was the best filters for me used in my samples!
my first kvcd 352x240 mpeg1 lbr was using this filters,
and the colors are better than the news encodes.

but we are trying to do the best,than i change the filters but,
when my son is watching monsters sa encoded with this filters,
i see fantastic brilliant colors....!
:wink:

J-Wo 04-06-2003 09:39 AM

Quote:

Originally Posted by kwag
If you want to squeeze your video even more, and you don't have an HDTV, use BilinearResize and increase your mergeluma value a little. This will keep a very descent quality, while allowing a lower file size :wink:

Wow great tip Kwag. Any other possibilities for a guy with only a 23" TV without S-Video input?

BTW, I know you're an Avisynth 2.0x kinda guy Kwag, but I'd REALLLLLLY appreciate it if someone could maybe reply to your read-only sticky topic with the equivalent 2.5x scripts. Now that you'd dropped SpaceDust I'd think you'd see some real speed increases by switching avisynth versions. But I just got too damned confused with all the ConvertToYUV2 crap and other stuff.

kwag 04-06-2003 09:39 AM

Quote:

Originally Posted by jorel
i think that 50,50 for unilter is "too much". 8O
try a sample with 20,20 or 30,30....

It would be too much if it was used alone, without any kind smoothing after it. But the lines:

temporalsmoother(1,2)
mergechroma(blur(1.58 ))
mergeluma(blur(0.2))


Take care of that, and it's part of the trick :)
Look at the sample :wink:

-kwag

kwag 04-06-2003 09:44 AM

Quote:

Originally Posted by J-Wo
Now that you'd dropped SpaceDust I'd think you'd see some real speed increases by switching avisynth versions.

Yes I agree, specially after reading the comments on 2.5. That's my next move. I'll try AviSynth 2.5 today. The quality I've been getting with the new script on one disk is just so good, that I'm going to re-encode some of my movies again :mrgreen:

-kwag

jorel 04-06-2003 10:44 AM

Kwag posted:
"temporalsmoother(1,2)
mergechroma(blur(1.58 ))
mergeluma(blur(0.2))

Take care of that, and it's part of the trick :)
Look at the sample :wink: "

ok,Kwag! :D

and i'm reading the comments on 2.5 too....is working better now.

:D
waiting your results!
:!:

Kane 04-06-2003 01:19 PM

wow, 8O 8O 8O
the sample looks awesome
i´ve some testings to do 8)

Bchteam 04-06-2003 02:09 PM

I encoded a sample of the Movie "Spygame" using this script and CQ 63

Code:

Mpeg2Source("E:\spygame\spygameproj.d2v")
LegalClip()
GripCrop(480, 480, overscan=2,  source_anamorphic=false )
GripSize(resizer="BicubicResize")
VobSub("E:\spygame\SpyGameSubs\VTS_01_0")


TemporalSmoother(radius=2, strength=3)
SpaceDust()
TemporalCleaner(ythresh=5, cthresh=10)

unfilter(70,70)
STMedianFilter(6,15,4,7,6,15)

mergechroma(blur(1.58))
mergeluma(blur(0.7))
 
DctFilter(1,1,1,1,1,.5,.5,0)
 
GripBorders()
LegalClip()

The Filesize of the Sample was 11,3 MB.

The I used Kwag's script with the same CQ

Code:

Mpeg2Source("E:\spygame\spygameproj.d2v")
LegalClip()
GripCrop(480, 480, overscan=2,  source_anamorphic=false )
GripSize(resizer="BicubicResize")
VobSub("E:\spygame\SpyGameSubs\VTS_01_0")
unfilter(50,50)
TemporalSmoother(1,2)
mergechroma(blur(1.58))
mergeluma(blur(0.2))
GripBorders()
LegalClip()

And the Sample size was 13,7MB 8O

The difference between the first and the second script is 2,4 MB.

With Kwag's script, the picture is a bit sharper with the same CQ.But with the same CQ you won't be able to get the Movie on 1 CD.So you have to decrease the CQ and that will also decrease the Quality.That's why I will still use the first script.

Kane 04-06-2003 02:14 PM

i just made a sample with kwag´s newest script from a movie, which lasts 95 minutes. the result was the sharpest video i´ve ever seen with kvcd and the sample-size is only 10.9MB.
that´s unbelievable

8O 8O 8O 8O

great script http://www.digitalfaq.com/archives/error.gif

PS: i made this sample with ToK filesize prediction for 1 CD

Bchteam 04-06-2003 02:17 PM

Quote:

Originally Posted by Kane
i just made a sample with kwag´s newest script from a movie, which lasts 95 minutes. the result was the sharpest video i´ve ever seen with kvcd and the sample-size is only 10.9MB.
that´s unbelievable

8O 8O 8O 8O

great script http://www.digitalfaq.com/archives/error.gif

PS: i made this sample with ToK filesize prediction for 1 CD

How high was your CQ???

Kane 04-06-2003 02:22 PM

cq was 64,82

kwag 04-06-2003 02:38 PM

Quote:

Originally Posted by Bchteam
So you have to decrease the CQ and that will also decrease the Quality.

That's what I thought before too :D. Go ahead an lower the CQ to match the file size, and your picture will still look better than the one with the temporal filters :wink:
The temporal filters do decrease the file size, but they also spoil the image when used that heavily :!:
I have compared the results on my HDTV, and I won't go back to those temporal filters, unless I have a dirty (badly authored) source or VHS, capture, etc.

-kwag

Bchteam 04-06-2003 04:05 PM

Kwag, it's just unbelieveable.With your new script, I get better results with CQ 52 than with CQ 63 and the old script. :ole:

But I have one Question:

Can I retain the sharpness, If add DctFilter(1,1,1,1,1,.5,.5,0) and increase mergeluma(blur(0.2)) to mergeluma(blur(0.7))???Or will it be too blurry???

kwag 04-06-2003 04:19 PM

Quote:

Originally Posted by Bchteam
Kwag, it's just unbelieveable.With your new script, I get better results with CQ 52 than with CQ 63 and the old script. :ole:

But I have one Question:

Can I retain the sharpness, If add DctFilter(1,1,1,1,1,.5,.5,0) and increase mergeluma(blur(0.2)) to mergeluma(blur(0.7))???Or will it be too blurry???

I haven't played too much with DCTFilter. I'll have to put that on my schedule 8). You're going to have to experiment with that, and see if the speed decrease/file size ratio is worth it.

Also, I think that beyond 0.5 on luma, it starts to blurr the picture too much. Part of the trick was to use a sharpener with heavy value to enhance details (beyond recognition :lol:), then apply the blurr to kill the artificial artifacts. This works good, and I think that with the current value of unfilter and chroma/luma merge, the picture looks very natural and is not over enhanced.

So right now:

Code:

unfilter(50,50)
temporalsmoother(1,2)
mergechroma(blur(1.58))
mergeluma(blur(0.2))

I've found that it's a very good quality/sharpness/file size compromise :D

-kwag

VILLA21 04-06-2003 04:41 PM

Quote:

Code:
unfilter(50,50)
temporalsmoother(1,2)
mergechroma(blur(1.58))
mergeluma(blur(0.2))
Isn"t the image too blurry with these high values 50,50 ?

Just finished an encoding of a TV captured avi, only Unfilter(20,20) plus Bilinear resize gave me an amazing result in less than an hour. Previously i did the same avi with the script u posted on "Optimal scripts" , the one for VHS_Captures, the encoding time was 4.5hours and the result was blocky picture full of artifacts...
Seems Unfilter does a good job even with non-aggresive values...

kwag 04-06-2003 04:51 PM

Quote:

Originally Posted by VILLA21
Quote:

Code:
unfilter(50,50)
temporalsmoother(1,2)
mergechroma(blur(1.58))
mergeluma(blur(0.2))
Isn"t the image too blurry with these high values 50,50 ?

No. 50,50 is sharpenning. Negative values make the image more blurry. Did you download the sample I posted :wink:

-kwag

Bchteam 04-06-2003 04:56 PM

What about this:

Increase mergeluma(blur(0.2)) to mergeluma(blur(0.7)) and Unfilter(70,70) to compensate it.

Bchteam 04-06-2003 05:28 PM

OK,Kwag.

Now I tried this one

Code:

Mpeg2Source("E:\spygame\spygameproj.d2v")
LegalClip()
GripCrop(480, 480, overscan=2,  source_anamorphic=false )
GripSize(resizer="BicubicResize")
VobSub("E:\spygame\SpyGameSubs\VTS_01_0")
 
unfilter(50,50)
TemporalSmoother(1,2)

mergechroma(blur(1.58))
mergeluma(blur(0.2))

DctFilter(1,1,1,1,1,.5,.5,0)
 
GripBorders()
LegalClip()

With DCTFilter the quality remains the same and I even could raise the CQ from 52 to 56,5. :fahr:

Kane 04-06-2003 05:44 PM

Quote:

Originally Posted by Bchteam
OK,Kwag.

Now I tried this one

Code:

Mpeg2Source("E:\spygame\spygameproj.d2v")
LegalClip()
GripCrop(480, 480, overscan=2,  source_anamorphic=false )
GripSize(resizer="BicubicResize")
VobSub("E:\spygame\SpyGameSubs\VTS_01_0")
 
unfilter(50,50)
TemporalSmoother(1,2)

mergechroma(blur(1.58))
mergeluma(blur(0.2))

DctFilter(1,1,1,1,1,.5,.5,0)
 
GripBorders()
LegalClip()

With DCTFilter the quality remains the same and I even could raise the CQ from 52 to 56,5. :fahr:

damn , i still don´t know, what this filter exactly does, but decreasing file-size is good, i will try it tomorrow

dazedconfused 04-06-2003 05:53 PM

Quote:

Originally Posted by kwag
Quote:

Originally Posted by Bchteam
So you have to decrease the CQ and that will also decrease the Quality.

That's what I thought before too :D. Go ahead an lower the CQ to match the file size, and your picture will still look better than the one with the temporal filters :wink:
The temporal filters do decrease the file size, but they also spoil the image when used that heavily :!:
I have compared the results on my HDTV, and I won't go back to those temporal filters, unless I have a dirty (badly authored) source or VHS, capture, etc.

-kwag

Anyone have any idea yet what the new minimum "acceptable" CQ range is while using the latest optimal test script with the x3 template? (generally speaking of course). With the old script (using Space and TempCleaner, etc), I think the general consensus was somewhere around CQ=60 was the cutoff.

I did an encode last night of a ~90 minute movie with the x3 template (544x480). I also included some extras that came out to ~105MB muxed, so after all the extras + the movie's audio, my target for video was 607MB. I used the script below, and after prediction, ended up with a CQ of only 51.3! 8O :

Code:

Telecide()
#Decimate()
LegalClip()
GripCrop(width=544, height=480, overscan=2 )
GripSize()
Unfilter(50,50)
TemporalSmoother(1,2)
MergeChroma(blur(1.58))
MergeLuma(blur(0.41))
DctFilter(1,1,1,1,1,1,.5,0)
GripBorders()
LegalClip()

As you can see, I switched to BilinearResize and raised MergeLuma to arrive at my target CQ...but I haven't had time to do any comparison-tests/optimizations of my own yet with this new script to see what I consider acceptable on my Standard TV, so I didn't want to go too overboard with tweaks (this is also why I added DctFilter...the very low CQ level was really starting to worry me, so I started to add filters rather than further lowering CQ...maybe I shouldn't have).

Surprisingly, the resulting movie was very watchable, although I'm not certain whether I'd consider it one of my better encodes. Right now, I'm thinking that to get a 2-hour encode onto 1 disc with the new optimal script (@ 29.97fps and 544x480 as my player requires), it's definetly going to take some further optimization of the Unfilter and MergeLuma levels, and probably even some additional smoothing as well. :cry: :?

With the old methods (using Space, and TC or C3D), fitting ~2-hours onto 1 disc wasn't normally a problem, and I was pretty happy with the results at the time. I'm thinking I may have to use the old script with heavier filtering for 2-hour movies and the new "optimal script" for ~90 minute films. I hope I'm wrong...as always, only testing will tell I guess. :roll: Man, do I hate testing! :evil: :lol:

If anyone figures out the new general lowest-acceptable CQ, or an optimally tweaked version of the current script for use on a Standard, non-HDTV television, please post your results. Thanks,

-d&c


All times are GMT -5. The time now is 01:32 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.