![]() |
FluxSmooth
Here's a new spatio-temporal smoother I wrote today based on ideas that came to me developing NoMoSmooth.
The source code is available. Here's the description from the documentation: Quote:
Edit: Removed links to old version. |
Hi SansGrip,
So this filter supercedes NoMoSmooth? Thanks, -kwag |
Re: FluxSmooth
Quote:
-kwag |
FluxSmooth Sample
To keep up with the tradition ;) , here's a sample with FluxSmooth+Blockbuster:
http://mpeg.0catch.com/test6-flux-smooth-LBR.m1v I use default parameters with the filter ( FluxSmooth() ) Sample encoded with the LBR template at CQ_VBR value of 27. Average bit rate is 610Kbps. It's 11 seconds, and file size is 932KB. -kwag |
help please,the links to download don't work SansGrip,help.
:cry: :cry: :cry: |
Quote:
-kwag |
Quote:
In other words, with NoMo you can use very strong spatial smoothing on areas of motion to improve compressibility (though you will very occasionally notice some artifacts if you look carefully). Flux is just a "noise remover". Flux should be a lot more gentle than NoMo if maintaining detail is a priority. |
Re: FluxSmooth
Quote:
|
Quote:
|
New version
Here's version 0.2 with a minor bugfix, some optimizations, and support for Avisynth 2.5/YV12. I also changed the defaults as I found them too high.
Edit: Removed links to old version. |
Re: FluxSmooth Sample
Quote:
|
Re: FluxSmooth Sample
Quote:
The file size difference is almost none. In a 1 minute, 30 second file prediction test, the difference is 16KB larger on the NoMoSmooth+Blockbuster. And that's negligible. However, I can see a MUCH better artifact reduction with the FluxSmooth+Blockbuster. Here's a sample of what the complete 120 minute movie looks like on one CD-R. I encoded it last night with FluxSmooth+Blockbuster: http://mpeg.0catch.com/test7-fluxsmooth-blockbuster.m1v -kwag |
hey kwag what does your script look like??
|
Quote:
FluxSmooth() ######## 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 #################### -kwag |
Re: FluxSmooth Sample
Quote:
Quote:
|
Re: FluxSmooth Sample
Quote:
But I didn't do any benchmarks 8O . Sorry!, I'm so amazed at the results, that I really don't care about encoding speed :) . I'm encoding on a P4 @1.6Ghz, and at 352x240, it's about .9 real-time. Quote:
Quote:
Last time I did, it looked good, considering it was encoded for one CD-R , but your filters were not around. That should be a good "stress" test to put your filters through :lol: Also," Pearl Harbor" is also ~180 minutes, and was also encoded on one CD-R. I'll pull out my "Green Mile" tonight and run it again with your filters. We'll see the results late late tonight or tomorrow ;) -kwag |
Re: FluxSmooth Sample
Quote:
FluxSmooth(temporal_threshold=7, spatial_threshold=7) Quote:
|
Re: FluxSmooth Sample
Quote:
Quote:
Quote:
And let us know your results ;) -kwag |
@SansGrip
why don't you put the FluxSmooth-01.zip here,please? i can't download it from your link! :( |
Re: FluxSmooth Sample
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 :). 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? |
Quote:
|
Re: FluxSmooth Sample
Quote:
Quote:
Quote:
-kwag |
Quote:
-kwag |
Quote:
(Though I also always attach them to my Doom9 announcements, so in a pinch people can get them there too). |
Re: FluxSmooth Sample
Quote:
|
|
Quote:
|
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 |
big thanks
Quote:
came so fast! 8) :wink: :!: |
@ 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? |
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 |
Quote:
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? ;) |
Quote:
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 |
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 |
Quote:
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:
|
hey thanks alot SansGrip!!
|
Quote:
.NET's the future anyway, so you might as well download it now :twisted:. Quote:
|
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... |
Quote:
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 |
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 :). |
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.