digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   SansGrip Filters: FluxSmooth (http://www.digitalfaq.com/archives/avisynth/1597-sansgrip-filters-fluxsmooth.html)

SansGrip 11-17-2002 08:13 PM

Quote:

Originally Posted by jorel
why don't you put the FluxSmooth-01.zip here,please?
i can't download it from your link! :(

That's very odd. How would I attach it to a message here?

kwag 11-17-2002 08:18 PM

Re: FluxSmooth Sample
 
Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
When you do, don't use the default CQ_VBR setting. Use the file prediction formula to adjust it, so that space and quality are optimized.

Ok, I'll do a search for that.

http://www.kvcd.net/forum/viewtopic.php?t=1369 ;)

Quote:

By the way, I just did a couple of test clips with the 528x480 template (the first of yours I've ever tried) with FluxSmooth and Blockbuster and it looks fantastic. I'm going to read up on the formula and do a two-disc of American Pie :).
:mrgreen:

Quote:

By the way, I'm playing these on my Panasonic CV52 and the clips worked just fine. I've had bad luck with VBR movies in the past, though, with corruption problems around what I believe to be the middle of the disc. I'm thinking this might have something to do with the minimum bitrate... What do you think?
Yes. I had to set mine to 300Kbps MIN. Lower than that, it doesn't play smooth. And on completely black scenes, it would sometimes stutter. Worse than slow motion. So it needs at least a low constant bit stream to stay in sync. I set all templates to MIN=300Kbps.

-kwag

kwag 11-17-2002 08:19 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by jorel
why don't you put the FluxSmooth-01.zip here,please?
i can't download it from your link! :(

That's very odd. How would I attach it to a message here?

Is it ok if I put your .zip files here for people to download?

-kwag

SansGrip 11-17-2002 08:24 PM

Quote:

Originally Posted by kwag
Is it ok if I put your .zip files here for people to download?

Absolutely. It's always best to have more than one download source.

(Though I also always attach them to my Doom9 announcements, so in a pinch people can get them there too).

SansGrip 11-17-2002 08:26 PM

Re: FluxSmooth Sample
 
Quote:

Originally Posted by kwag
Yes. I had to set mine to 300Kbps MIN. Lower than that, it doesn't play smooth.

Strangely, this was CQ 500-2500, padded. I'm wondering if my player needs a higher minimum bitrate.

kwag 11-17-2002 08:32 PM

Here they are:

http://mpeg.0catch.com/FluxSmooth-0.2.zip
http://mpeg.0catch.com/NoMoSmooth-0.1a.zip
http://mpeg.0catch.com/Blockbuster-0.4.zip

-kwag

SansGrip 11-17-2002 08:45 PM

Quote:

Originally Posted by kwag
Here they are

Thanks :).

kwag 11-17-2002 08:52 PM

I am currently ripping "The Green Mile". No need to wait for the complete movie to encode. I'll run the file prediction formula, to target the movie for one CD-R with the filters, and I'll post the sample and script so everyone can take a look how it will look once encoded.

-kwag

jorel 11-17-2002 09:02 PM

big thanks
 
Thanks Kwag and SansGrip,now i can download all(i'm doing this)
came so fast!

8) :wink: :!:

jorel 11-17-2002 09:07 PM

@ SansGrip and Kwag
don't want to bore....
but read this and post your opinion there,please!
thanks in advance! :)

http://www.kvcd.net/forum/viewtopic....b57286e7b027f7

:?: what do you think?

kwag 11-17-2002 10:16 PM

Well, here it is. This is the way "The Green Mile" will look on a single CD-R. Remember that when I did the LBR I clearly specified that this was a "Convenience" template, for travelers, etc, to watch on small screens. So quality is way below a VCD. On small portable DVD players, it is perfectly watchable.
So here it is: http://mpeg.0catch.com/green-LBR-nom...fluxsmooth.m1v
That's the way it will look. The complete three hours on a 80 minute CD-R. Audio at 112Kbps, and I did set the MAX bit rate on the LBR to 1,150Kbps. That's it. Good for some, crap for others :lol:

Here's the script I used:


LoadPlugin("C:\encoding\MPEG2DEC.dll")
LoadPlugin("C:\encoding\nomosmooth.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll")
LoadPlugin("C:\encoding\blockbuster.dll")
mpeg2source("K:\THE_GREEN_MILE\VIDEO_TS\mile.d2v")
BilinearResize(336,192,45,0,630,480)

nomosmooth()
FluxSmooth(temporal_threshold=7, spatial_threshold=7)

######## Auto Strength, proportional strength depending on resolution #####
## Remove only one "#" on front of the resolution that matches your encoding.


BB_Resolution = 352*240
#BB_Resolution = 352*480
#BB_Resolution = 528*480
#BB_Resolution = 544*480
#BB_Resolution = 704*480

BB_StrengthConstant = 352 * 240 * 20 # Base strength
StrengthValue = round (BB_StrengthConstant / BB_Resolution)
Blockbuster( method="noise", detail_min=1, detail_max=10, lv=1 ) # Apply noise if complexity is <= 10%.
Blockbuster( method="sharpen", detail_min=20, detail_max=90, strength=StrengthValue) # Sharpen only if complexity is >= 20% AND <=90%.

# The last ~10% is left untouched (pass-through), to avoid sharpening highest frequency components ( Peak artifacts, sharpest edge, etc. )
##
################## End Auto Strength ####################


AddBorders(8,24,8,24)


-kwag

SansGrip 11-17-2002 10:40 PM

Quote:

Originally Posted by kwag
Well, here it is.

It looks surprisingly good. Quite a bit of mosquito noise, but that's to be expected considering just how much data you're squeezing onto a CD-R.

At the moment I'm trying out file size prediction and KVCDx3, and all this mucking around with a calculator made me think it might be nice to have a GUI tool to do most of this for us: enter movie length, sample length, scaling factor, disc size, number of discs, audio bitrate, etc. and tell us the maximum size the encoded sample can be in kb. We can then play with CQ levels and bitrates etc. until we're as close as possible to that target.

Does something like this already exist, or should I fire up VisualStudio? ;)

kwag 11-17-2002 10:48 PM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
Well, here it is.

It looks surprisingly good. Quite a bit of mosquito noise, but that's to be expected considering just how much data you're squeezing onto a CD-R.

At the moment I'm trying out file size prediction and KVCDx3, and all this mucking around with a calculator made me think it might be nice to have a GUI tool to do most of this for us: enter movie length, sample length, scaling factor, disc size, number of discs, audio bitrate, etc. and tell us the maximum size the encoded sample can be in kb. We can then play with CQ levels and bitrates etc. until we're as close as possible to that target.

Does something like this already exist, or should I fire up VisualStudio? ;)


YES YES :lol: Fire it up :lol:
:lol: We are ALL in sync :lol: . Rendalunit send me about two hours ago a small C command line program to do the manual steps automatically. But we really need a GUI. Here's his code, which does compile and work:

// This is a very simple program to calculate what the final file size of the
// 100 second sample should be using the file size prediction method (thnks Kwag
// and Ozzi!). The estimated audio file size by Headac3he is subtracted from the total space
// available to determine how much video space is available. This program assumes
// you're using 80 min cdrs (if not change the const cd_size value)
// This program will crash if the wrong data type is entered:-(

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
const long long cd_size = 800000000;
const long convert_to_mb = 1000000;
float framerate, error_margin;
double sample_video_size;
int number_of_cds;
long total_movie_frames, est_audio_size;
long long video_space;

printf("enter estimated audio size in mb >");
scanf("%d", &est_audio_size);
printf("%dmb audio \n\n",est_audio_size);
est_audio_size = est_audio_size * 1000000;

printf("enter the number of 80 min cds to use >");
scanf("%d", &number_of_cds);
printf("%d cd(s) to burn \n\n",number_of_cds);

video_space = (cd_size * number_of_cds)-est_audio_size;
printf("there's %lldmb space for video \n\n",video_space / convert_to_mb);

printf("enter total frames of video >");
scanf("%d", &total_movie_frames);
printf("%d total frames \n\n",total_movie_frames);

printf("enter the framerate >");
scanf("%f", &framerate);
printf("%.2f frames per second \n\n",framerate);

printf("enter percent error margin (5 is suggested, enter 0 for none) >");
scanf("%f",&error_margin);
printf("error margin >%.1f percent \n\n",error_margin);
error_margin = (100 - error_margin) / 100;

sample_video_size = (video_space / ((total_movie_frames/framerate) /100)) * error_margin;

printf("the target sample size should be about %.1fmb \n", sample_video_size / convert_to_mb);
printf("\npress <enter> to end..");
getchar();
getchar();
return 0;
}

-kwag

edmund 11-17-2002 11:16 PM

hey kwag.. i have a problem.. every time i try to use the filters it says in tmpgenc that i need to convert to yuy2 formate.. why is that and if i really need to.. do i put the ConvertoYUY2() right before the nomosmooth() function??
thanks

SansGrip 11-17-2002 11:21 PM

Quote:

Originally Posted by edmund
hey kwag.. i have a problem.. every time i try to use the filters it says in tmpgenc that i need to convert to yuy2 formate

Forgive me for answering a post addressed to kwag, but I happened to read it and know the answer ;).

Yes, almost all Avisynth plugins work only in YUY2 mode. If you're using a source other than YUY2 you'd be best to do a ConvertToYUY2() straight after the ...Source line. In other words, if you're pulling in an RGB AVI:

Quote:

AviSource("interesting_clip.avi")
BlahFilter()
SuperResize()
AwesomeSmoother()
etc., stick the ConvertToYUY2() between AviSource and BlahFilter. This way all the filters get to work in YUY2 mode and everyone's happy.

edmund 11-17-2002 11:24 PM

hey thanks alot SansGrip!!

SansGrip 11-17-2002 11:25 PM

Quote:

Originally Posted by kwag
YES YES :lol: Fire it up :lol:
:lol: We are ALL in sync :lol: . Rendalunit send me about two hours ago a small C command line program to do the manual steps automatically. But we really need a GUI.

heheh ok, I'll start on it tonight and will hopefully have something ready tomorrow. It'll be in C#, though, so it'll require the .NET runtime.

.NET's the future anyway, so you might as well download it now :twisted:.

Quote:

Here's his code, which does compile and work
Cool, that's almost exactly what I was thinking as far as the back end goes. Nice to know we're all on the same wavelength :).

Jellygoose 11-18-2002 05:19 PM

Hi kwag, hi SansGrip...

I have read this whole topic and also downloaded the samples, which i find pretty damn awesome :wink: ...
My question is just why ya'll always limit the testing to one resoulution... See I really like higher resolutions better, at least standard SVCD resolution seems good to me...
No offend, kwag your KVCD LBR Template DOES look awesome on small TV-Sets... I wouldn't dare to put a 180 min. movie like The Green Mile on one CD-R, but I'm interested in seeing the effects of FluxSmooth and Blockbuster on one of your higher resolution templates like 704x480 or 480x480 or the KVCD x3 Templates...
Honestly I think you can use your KVCDx2 (704x480) templates WITHOUT these filters for at least 105 minutes of high quality video (still on a normal TV-Screen) on ONE CD-R... How far could you tweak that with these filters?
Why don't you try that out and show us the results?

Best Regards guys...

kwag 11-18-2002 06:58 PM

Quote:

Originally Posted by Jellygoose
Hi kwag, hi SansGrip...

I have read this whole topic and also downloaded the samples, which i find pretty damn awesome :wink: ...
My question is just why ya'll always limit the testing to one resoulution... See I really like higher resolutions better, at least standard SVCD resolution seems good to me...
No offend, kwag your KVCD LBR Template DOES look awesome on small TV-Sets... I wouldn't dare to put a 180 min. movie like The Green Mile on one CD-R, but I'm interested in seeing the effects of FluxSmooth and Blockbuster on one of your higher resolution templates like 704x480 or 480x480 or the KVCD x3 Templates...
Honestly I think you can use your KVCDx2 (704x480) templates WITHOUT these filters for at least 105 minutes of high quality video (still on a normal TV-Screen) on ONE CD-R... How far could you tweak that with these filters?
Why don't you try that out and show us the results?

Best Regards guys...

Hi Jellygoose,

The 352x240 resolution is IDEAL to test filters, just because of that. Low resolution. The higher resolutions don't need that much of "sharpen" filters, but they do need the Blockbuster filter, to remove DCT blocks on black areas. That's one of the reasons I wrote the script that automatically lowers the "sharpen" value, the more you increase the resolution ;)
So on 704x480, the sharpen is actually very low, but the "Noise" method is in there, doing all it's work.

-kwag

SansGrip 11-19-2002 02:40 AM

Just a quick update:

I was puzzled by why I had to reduce the default thresholds so much in the last release I made, so I took a look at the code and spotted a pretty major bug that was messing up the smoothing. I fixed it and changed some things around, and now it's significantly faster and you can use much higher thresholds (exactly how high I'll leave to the testers...).

On my system it runs on a 720x480 clip at about 17-18fps, that's roughly 6-7fps faster than Convolution3D in preset="movieHQ" mode (but bear in mind its performance changes depending on the amount of noise in the clip -- this was with American Pie, a fairly clean DVD). It also, IMO, smooths more where it's needed and less where it isn't, resulting in better noise reduction and more details kept :D. I was surprised at just how destructive C3D can be when you look real close. No wonder it does such good things for compression...

Of course, I might be slightly biased ;). Anyway, it's very late now and I need to get to bed, but in the morning I'll port the changes over to the YV12 version, update the docs and make a release.

I'm very excited about what I'm seeing from this filter, and I'd really like it if you guys could give this one a good test. I think it might be even better than NoMo, and I'd love to know just how high you can push those thresholds before you start to see unacceptable softening. For me it's pretty darn high, but I won't give any numbers out so I don't influence anyone :).


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

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