Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th August 2017, 07:08   #61  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Woah!! My video once encoded with FrameRateConverter Preset="slower" with mClean, it's a whole other experience!! Quality is absolutely amazing
https://mega.nz/#!iEYlTRxQ!tt2h-qmy6...CQPGSm1JOKGRWY

original video
MysteryX is offline   Reply With Quote
Old 27th August 2017, 09:34   #62  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
There's no noise in the original video, and I just don't see the point of doubling the framerate of a 30fps video, as it was pretty smooth to begin with already.
lansing is offline   Reply With Quote
Old 27th August 2017, 11:03   #63  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
Updated the first post with version 1.3. Added outbits function, default is the same as the input bits. If input is 8 bits, converts to 12 bits for processing for improved quality, and outputs 8 bits unless otherwise specified. If outbits is specified, script processes in that depth unless outbits is specified as 8, in which case it is processed in 12 bits.
burfadel is offline   Reply With Quote
Old 27th August 2017, 18:19   #64  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by lansing View Post
There's no noise in the original video, and I just don't see the point of doubling the framerate of a 30fps video, as it was pretty smooth to begin with already.
Original is standard 23.97fps, not 30fps -- like almost every video out there. There's not much noise yet this still benefits from improved prefilter.

I'll have to do tests on noisier videos.
MysteryX is offline   Reply With Quote
Old 27th August 2017, 20:34   #65  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
Does the latest Avisynth+ build support Avisynth output in high bit depths, or is it only for processing? If I set outbits=10 such as the colour format is YUV420P10, avisynth returns an empty clip error. If I convert back to YV12 YUV420P8 it works fine. Of couse, I'm assuming 10-bit x265 (for example) can have a 10-bit input. As long as the filters support it, I would think 10-bit output along the whole chain to the encoder would be preferential over first dithering back to 8 bit?
burfadel is offline   Reply With Quote
Old 27th August 2017, 20:59   #66  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
burfadel
Avs+ can pass HBD clips to your software, it's only matter of that software to support desired format. For example, it's possible to write 10-bit y4m file with proper header using avs+ and my avs2yuv mod. If you want to preview HBD clip, your software for previewing avs scripts should support it.
As I know, you only can feed y4m to x265, so
Code:
avs2yuv script.avs -o - | x265 --params -
should work for you.
DJATOM is offline   Reply With Quote
Old 27th August 2017, 22:13   #67  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
I'm using avs2yuv with x264 and with ffmpeg without problem

I just remembered one point: x264-10bit encodes better than x264-8bit even on 8-bit content. If I'm going to re-encode 1080p videos into H264, I might consider using x264-10bit again.

Last edited by MysteryX; 27th August 2017 at 22:22.
MysteryX is offline   Reply With Quote
Old 28th August 2017, 02:15   #68  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by MysteryX View Post
Original is standard 23.97fps, not 30fps -- like almost every video out there. There's not much noise yet this still benefits from improved prefilter.

I'll have to do tests on noisier videos.
I just found the time to read through the entire thread, your feedback are just nonsense. How on earth are you commenting/comparing on the effect of denoising filters with a sample video that has absolutely no noise at all? What is there to compare?

Like people on the thread pointed out earlier, the OP's script is nothing more than a SMDegrain + removegrain. With SMDegrain, you are bound to have visual differences(artifacts) to the original on fast moving scenes, that's just the nature of the filter, there's no way to fix it. And comparing removegrain to KNLMeanCL on spatial denoising is also pointless because KNLMeansCL is going to win every single time.

Your usage of the script as a prefilter of your own filter is also out of context of what the OP originally intended. And for your filter, using a motion compensated denoise clip as a prefilter for another motion compensation process is just weird (and you wondered why it's so slow?). The point of a prefilter before the whole mc process is to have a clip that's without noise so that you can have better motion vector search for the mc filter later, you don't need a bundled script that's doing 10 different things at once, all you need is something that can remove noise. In this case, the OP's script is no better than a fft3dfilter.
lansing is offline   Reply With Quote
Old 28th August 2017, 02:38   #69  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
How about comparison images to support your points?

I'll do tests on noisier videos later.
MysteryX is offline   Reply With Quote
Old 28th August 2017, 03:31   #70  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by lansing View Post
The point of a prefilter before the whole mc process is to have a clip that's without noise so that you can have better motion vector search for the mc filter later,
This is exactly the point I would like to make (or maybe someone can correct me about how FrameRateConverter really works).

To me it was never quite clear how MClean together with FrameRateConverter is used. Do you use it BEFORE FrameRateConverter (having no prefilter in FRC), or do you use it WITHIN FrameRateConverter by defining MClean as a prefilter in FRC ?

I was under the impression so far that you use MClean WITHIN FRC. But if this is the case then I do not understand how you can say that the output quality is improved dramatically by using MClean as a FRC prefilter.

As lansing states, if you use a prefilter WITHIN FRC, the prefiltered clip will not show up in the result at all. The prefiltered clip is only used as input for MSuper and MAnalyze (which calculates motion vector data). The final clip is created with this command:
Quote:
Flow = MFlowFps(C, super, bak, fwd, num=NewNum, den=NewDen, blend=false, ml=200, mask=2, thSCD2=255)
The "super" param does not have any prefiltered content in it. Only "bak" and "fwd" are based on the prefiltered clip, and these two only have motion vector data in them.

I did reread the MVTools doc and I also scrutinized the FrameRateConverter.avsi before I came to this conclusion. Please correct me if I misunderstood something here...


Cheers
manolito

Last edited by manolito; 28th August 2017 at 06:04.
manolito is offline   Reply With Quote
Old 28th August 2017, 06:35   #71  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
That is how I tested it and as you can see with the sample images, it made a difference.

Applying it "before" degraded the quality in this test video.
MysteryX is offline   Reply With Quote
Old 28th August 2017, 06:39   #72  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
Quote:
Originally Posted by lansing View Post
Like people on the thread pointed out earlier, the OP's script is nothing more than a SMDegrain + removegrain. With SMDegrain, you are bound to have visual differences(artifacts) to the original on fast moving scenes, that's just the nature of the filter, there's no way to fix it. And comparing removegrain to KNLMeanCL on spatial denoising is also pointless because KNLMeansCL is going to win every single time.
An issue with spatial noise is the filters ability to distinguish actual noise from detail. KNLMeansCL does provide strong denoising, but it also destroys fine detail. Check for yourself . The same applies for any spatial denoiser that is applied to the whole image. If you apply KNLMeansCL or other denoiser to a noisey image, the result looks goood because you are comparing it to the noisey source. If you run them on an already clean source the detail detruction become more obvious. Another aspect I wanted for my script is something that runs relatively fast but still produces results. You might be thinking that running a denoiser on a relatively clean source is a bad thing, and in general, it is! What if your video contains scenes which are noiser than others? Are you going to manually go through and splice together the video with strong denoising on one clip, weak on another, and maybe even none on some of them in order to not lose the extra detail?

For those thinking it's just SMDegrain plus Removegrain, have you looked at the scripts? Yes, both use MDegrain which is NOT unique to SMDegrain. If it's a simple as that you might as well not even use SMDegrain and use MDegrain directly .

My script uses MDegrain for luma, and fft3dfilter for chroma. MDegrain does a great job on luma but not so much on chroma. fft3dfilter does a great job on chroma, but the result is too soft for luma, hence the combination. A mask is created that coincides with what we see visually, and is temporally stabilised. These areas have an unsharp mark of selectable strength applied to it (enh setting). Sure, you can apply a sharpening filter separately, however they are typically applied to the whole image, which amplifies everything in the image and not just areas of detail. For enhancement you can choose a higher enh setting, as this settings depends on clarity of the source. Areas that aren't these have removegrain applied to it. These areas also have a component of the original noise readded, however this noise is heavily modified and temporally stabilised. It helps very much with not blowing out the file size, whilst making the image not appear flat that denoisers tend to do. What do people do to overcome this flatness normally? Add grain!

In any case, it's another option that people can try that doesn't have a dozen settings there to confuse people, with the additional benefit of being relatively fast and not unintentionally destroy detail. It negates the need for filters like lsfmod (it's not the same as lsfmod and does not use its function, SMDegrain does as an option) etc with the use of enh (or a higher setting of), and can be used on basically any source as is, with maybe fine adjustment of enh for preference and rn for really noisey sources.

BTW MDegrain is a core function of MVtools, added back in version 1.4.0.0, dated 19/06/2006. Originally it was called MVDegrain.

All scripts just use existing filters in different ways. If the argument that it's all the same is true as people claim, then they're claiming literally every avisynth script is pointless because you can just call the command directly. In any case, nobody is forcing you to use any particular filter or script, it's just providing another option that does things differently that you can use based on your preferences .

Last edited by burfadel; 28th August 2017 at 06:58.
burfadel is offline   Reply With Quote
Old 28th August 2017, 09:38   #73  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by MysteryX View Post
That is how I tested it and as you can see with the sample images, it made a difference.

Applying it "before" degraded the quality in this test video.
Are you talking about this post?

You know why the difference? Because your filter is NOT doing any denoising, how do you write a filter when you don't know what it is doing?
lansing is offline   Reply With Quote
Old 28th August 2017, 11:24   #74  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by burfadel View Post
An issue with spatial noise is the filters ability to distinguish actual noise from detail. KNLMeansCL does provide strong denoising, but it also destroys fine detail. Check for yourself . The same applies for any spatial denoiser that is applied to the whole image. If you apply KNLMeansCL or other denoiser to a noisey image, the result looks goood because you are comparing it to the noisey source.
KNLMeansCL is a subtle denoiser, it can go strong only when you bump up the strength.

Quote:
What if your video contains scenes which are noiser than others? Are you going to manually go through and splice together the video with strong denoising on one clip, weak on another, and maybe even none on some of them in order to not lose the extra detail?
What is the point of this? I don't see your script doing anything different on this either.
Quote:
For those thinking it's just SMDegrain plus Removegrain, have you looked at the scripts? Yes, both use MDegrain which is NOT unique to SMDegrain. If it's a simple as that you might as well not even use SMDegrain and use MDegrain directly .

My script uses MDegrain for luma, and fft3dfilter for chroma. MDegrain does a great job on luma but not so much on chroma. fft3dfilter does a great job on chroma, but the result is too soft for luma, hence the combination. A mask is created that coincides with what we see visually, and is temporally stabilised. These areas have an unsharp mark of selectable strength applied to it (enh setting). Sure, you can apply a sharpening filter separately, however they are typically applied to the whole image, which amplifies everything in the image and not just areas of detail. For enhancement you can choose a higher enh setting, as this settings depends on clarity of the source. Areas that aren't these have removegrain applied to it. These areas also have a component of the original noise readded, however this noise is heavily modified and temporally stabilised. It helps very much with not blowing out the file size, whilst making the image not appear flat that denoisers tend to do. What do people do to overcome this flatness normally? Add grain!
The main core of denoising of your script are smdegrain and removegrain, smdegrain for temporal noise and removegrain for spatial noise. Nothing in your post processing is going to change that. Basically you're just taking 2 filters that everyone uses and said to provide a better result, which to me is an overstatement. And the quality of your denoise can only go what these 2 filters can go, along you are also bounded to the issues these 2 filters create. Using smdegrain for an objective to "retain as much detail as possible" does not make sense either, because the filter removes details on every motion scene. It will do even more harms on cleaner source.
lansing is offline   Reply With Quote
Old 28th August 2017, 11:30   #75  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
I think people are missing the point. I can assure you 100 percent it is NOT the core of SMDegrain, it's just the case the Luma part of the denoising in my script uses a similar method to SMDegrain from MVTools. The difference in any of these denoisers is how the denoising is handled, post-processing, and everything else. My intention is to keep things as simple as possible, and that includes the actual script. Some of the SMDegrain script could actually be trimmed back now with Avisynth+. mClean isn't finished either, although that doesn't mean the additional things I add will make it to a posted script version, it depends on how effective they are versus alternatives. As for KNLMeansCL, sure you can use a strong setting to remove more noise, but it removes details when achieving the same denoising amount.

On a clean, high resolution source you can go a higher enh like 80-100 or even 101, as well as a high RN, which can actually enhance the image. That high of enh setting is quite strong sharpening though . There is still a little modification I can do for these setings, but it's only minor and I may not even apply it . Chroma is the next thing I'll be looking at.

Remember the RN setting adds back cleaned, altered, and temporally stabilised versions of the existing noise on non high detail areas. enh applies a termporally stabilised unsharp mask on detailed areas. These two things do separate it from other filters. Again, if you claim my script is no different to SMDegrain then that's kind of a compliment, since SMDegrain is much, much longer script and runs slower when trying to apply things like the sharpening etc . The separate chroma denoiser is necessary, in the SMDegrain description is even states that it can smear chroma. FFT3dFilter does a better job of chroma filtering. If you want to update SMDegrain to make it simpler (which can be done with Avisynth) go ahead .

Last edited by burfadel; 28th August 2017 at 11:58.
burfadel is offline   Reply With Quote
Old 28th August 2017, 15:18   #76  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
lansing, I'll repeat a similar comment I made to someone else before. If you're just here to tear things apart, you're wasting your time.

If you don't find personal use for this, then just let us do our work.

If you have constructive feedback on how to make things better, of can pin-point flaws, then we're all ears. Just try to keep a constructive attitude instead of trying to tear things down.

I posted comparison of mClean vs KNLMeans here. Sure, most of the image doesn't have much noise but the leather and some of the textures have. It's actually a good test for detail preservation: a mix of no-noise with light-noise.

Last edited by MysteryX; 28th August 2017 at 15:22.
MysteryX is offline   Reply With Quote
Old 28th August 2017, 18:26   #77  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by MysteryX View Post
lansing, I'll repeat a similar comment I made to someone else before. If you're just here to tear things apart, you're wasting your time.

If you don't find personal use for this, then just let us do our work.

If you have constructive feedback on how to make things better, of can pin-point flaws, then we're all ears. Just try to keep a constructive attitude instead of trying to tear things down.

I posted comparison of mClean vs KNLMeans here. Sure, most of the image doesn't have much noise but the leather and some of the textures have. It's actually a good test for detail preservation: a mix of no-noise with light-noise.
I'm commenting because you are misleading the OP by giving him false feedback. You are the one that's hijacking his post by using his script on your own filter, when you were told multiple times not to.

Your link about the comparison between OP's script and KNLMeansCL is one example of your false feedback. Your screenshots clearly showed that KNLMeansCL is better, it's removing noise while really not touching anything on the image. On the other hand, mClean, having smdegrain being the core, is exerting the flaws of smdegrain as expected, that is removing details on motion areas, the problem was clearly shown on the losing details of the leather jacket. And yet in your conclusion of the post, you talked as if mClean came out to be the better one, which is completely wrong.
lansing is offline   Reply With Quote
Old 28th August 2017, 18:26   #78  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
I did some tests on a noisier source, only mClean to start with.

Source: KARA - Jumping

Here I get better results with higher thSAD such as 550. Enh=20 is unwatcheable. I again get best results with enh=12, rn=10. Because of the renoise, I think it's safer to go with higher thSAD.

Screenshots:
- Original
- RemoveGrain(21)
- KnlMeansCL(D=2, A=2, h=1.4, channels="YUV")
- mClean(550, enh=12, rn=10)
- mClean(450, enh=20, rn=12)





Last edited by MysteryX; 28th August 2017 at 18:28.
MysteryX is offline   Reply With Quote
Old 28th August 2017, 18:54   #79  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
It makes sense about the lower settings, those sources are more low quality sources than grainey sources. Renoise only works with temporal noise removed (which is then altered), so it is obviously making changes if a different renoise value is required . How does each look in motion though? mClean is designed to be temporally stabilised in the renoise and sharpening.
burfadel is offline   Reply With Quote
Old 28th August 2017, 18:59   #80  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
I'd need to encode both to see how it looks in motion
MysteryX is offline   Reply With Quote
Reply

Tags
cleaning, denoise, denoiser, mclean

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:23.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.