Log in

View Full Version : x264 settings to avoid ringing and mosquito noises ?


sirt
12th April 2012, 01:04
Hi,

My request is almost simple to formulate : what x264 settings would you recommand to adjust in order to achieve one particular goal : avoid ringing and mosquito noises ? I suppose I would have to deal - at least - with deblock parameter. Furthermore, my expectations are not to blur too much nor my output to come up with additional ringing or another annoying chroma inconvenience.

I wait for your suggestions, especially if you know some interesting combination of parameters that could lead to my wish. I precise I plan to use --preset placebo --crf 16 for a test.

LoRd_MuldeR
12th April 2012, 01:59
As explained earlier, you can't optimize for several conflicting goals at the same time. You can only try to find an acceptable compromise.

By using the "placebo" preset you have already cranked up all "speed -vs- quality" options to the maximum. Actually you could stick with "veryfast" and you would probably not be able to see the different, but safe a lot of time.

Anyway, at this point there are no "secret" hidden options that will magically give you even better quality (at the same bitrate) for free ;)

You may still try to tweak the Psy-options, such as Psy-RDO or Psy-Trellis. As mention before, some Psy-RDO/Psy-Trellis will nicely improve the detail/sharpness, but too much of it can produce artifacts (like ringing and/or mosquito noise).

The same goes for the deblocking filter: Stronger deblocking settings will help to avoid blocking, but they will also smooth out more detail/sharpness. Lowering the deblocking settings will improve the sharpness, but at the cost of increased blocking.

As you see, there is not the one setting that will give you the "perfect" quality. The x264 defaults are already heavily optimized, especially when the proper "tune" option is used. So you will have a hard time to improve them even further ^^

Of course you can always improve the quality by spending more bits, i.e. by using an even lower CRF value in CRF mode or by using an even higher target bitrate in 2-Pass mode. If you don't care about file size, use "lossless" mode!

Last but not least it should be clear no encoder setting will ever be able to "repair" defects of your source video. If at all, you may try to "clean up" the source before sending it to the encoder...

sirt
12th April 2012, 02:33
Thanks Lord_Mulder. Yes, You have told me about the conflictual goals but as you see I am...obstinate. What do you mean by "for free" ?

I have done some encode right there (using my bought source which I refer to in my AR problem post in the same section) ; I have encoded it many times with different settings and I will show you the one I like the most.
It's possible you won't like the parameters I've used in so far they might be not realistic but the deal is you to tell me if there is something absurd in setting them like that, or/and if I might change something or if you think something has simply non sence :



x264 core 122 r2184kMod 5c85e0a

cabac=1 / ref=5 / deblock=1:-1:-1 / analyse=0x3:0x133 /
me=tesa / subme=11 / psy=1 / fade_compensate=0.00 /
psy_rd=1.00:0.25 / mixed_ref=1 / me_range=64 / chroma_me=1 /
trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 /
chroma_qp_offset=-8 / threads=6 / sliced_threads=0 / nr=0 /
decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 /
bframes=12 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 /
weightb=1 / open_gop=1 / weightp=2 / keyint=240 / keyint_min=24 /
scenecut=35 / intra_refresh=0 / rc_lookahead=55 / rc=crf / mbtree=1
/ crf=15.0000 / qcomp=0.75 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.60 / aq=2:1.00



https://rapidshare.com/files/2901863388/test.mkv

I have done another one setting aq-strenght a bit lower than it's default but it was not really different from this one. Like that, the encode looks enough sharpened for me, enough detailed and not blurry, edges are also enough clean to me. I have used some unusual settings like scenecut 35 thinking it may help to react to the complexity of some scenes. Of course, I won't insist on the fact I worked like hell during several days to deinterlace that video (I cut in segment some frames to deinterlace ect) and I'm still not satisfied with 4 or 5 frames, but that is another problem (many frames during the fades are interlaced after ivtc). CRF 15 is the lowest Ratio Factor I managed to use without getting an output beyond 100 MB.

So I would like you to comment on the encode, the settings regarding what I want to achieve and of course the most interesting would be to know if some settings below are simply incomptible one with other or totally bad. I precise I couldn't control some parameters like chroma_qp_offset setted to -8 apparently due to the psy quantizers.

About the external filters I shall use to reduce mosquito noises and ringing, I didn't manage (since now) to find something that is satisfying me : either it will kill details and make the scene too static (like mctemporal denoise applied on specific frames), either it will blur too much, either it will have an unsuitable impact on what I don't want (chroma or luma noise especially at the back or grains on people) ; well the encode test I uploaded is not filtered excepted the vertical residue that appears during fades which I approximately corrected with different settings of vinverse. Is there some filter(s) you would recommand ?

EDIT : about lossless mode, I think I won't never use it. Firstly, my computer can't afford this, I can't even encode any long movie either bluray, so I simply keep them untouched and mux them into MKV's. Moreover, lossless mode would take an eternity to complete my video, even for a short clip like the one I've uploaded below. So I would prefer using a lossless codec such as MSU or even Lagarith instead of wasting hours or days to encode in lossless mode.

Atak_Snajpera
12th April 2012, 10:29
i'm surprised that placebo plus crf 16 is still not good enough for you. maybe you should stop using lossy codecs at all. i can't wait to see your next annoying question. what will it be? how to reduce banding or blocks in dark areas?

sirt
12th April 2012, 10:53
Exactly, you guessed another of my wishes ! :p If you have some suggestion... :) Most seriously I can't use x264 LOSSLESS mode given that my computer is not enough strong to support an encode like this, it barely achieves an encode like that test I've done (I will never be able to encode any movie of my own for example, that's why I keep them not encoded in an MKV container, it's the only way I found to save my commercial dvds and blu rays from usury). Futhermore, I think you misunderstand me : I'm not critisizing placebo + crf, I'm sorry if it sounds like I don't like anything, but that's not the case at all. I'm simply fond of encoding, finding the most adequate parameters to encode a specific video, so if I ask there for help it's simply because I'm passionate of that stuff. I'm lucky to have some free time during that period so I can totally focuse on x264 encoding. So, if you prefer I would stuck with placebo/crf without any problem for my personnal use, but what I try to furfill is simply to test settings and understand deeply how they work. That's why I encode a video several times ; I'm not doing that to say "Hey guys, default are crap", but only to see what will happen if I modify myself some settings, do you understand my point of view ? It's just a pleasure for me to do that.

nm
12th April 2012, 11:15
EDIT : about lossless mode, I think I won't never use it. Firstly, my computer can't afford this, I can't even encode any long movie either bluray, so I simply keep them untouched and mux them into MKV's. Moreover, lossless mode would take an eternity to complete my video, even for a short clip like the one I've uploaded below. So I would prefer using a lossless codec such as MSU or even Lagarith instead of wasting hours or days to encode in lossless mode.

Single-threaded lossless x264 is about as fast as MSU. Multithreaded can be much faster. Your problem is the insanely slow preset that makes no sense for lossless encoding. Preset medium is the slowest that you should consider for this purpose.

As for lossy encoding, have you even tried --preset slower or slow at CRF 16 and compared the output to a placebo encode at the same CRF? I bet there's no visible difference during playback! File size might be 5 to 10 % larger, but that's nothing compared to the amount of time wasted on placebo encoding.

sirt
12th April 2012, 11:43
Yes I did and I also discussed that with Lord_Mulder in another thread. Of course my eye won't see anything if I use the same bitrate (when encoding in 2 Pass) or the same factor (while using CRF) ; the only difference that I've seen - according to my experience - are a few frames being better with placebo or custom parameters that I try, especially with chroma noise, but I talk about a minority of frames (I force myself to compare same specific frames such as noisy (luma, chroma) frames, static frames ect). It appears many people (apparently even Lord_Mulder) argue Placebo is a waste of time and lower presets may be enough then what is the point of using placebo or veryslow ?

Groucho2004
12th April 2012, 11:54
what is the point of using placebo or veryslow ?
Big difference between the two. The developers chose the name "placebo" for a reason. It's either for masochists or people with way too much time (or both).

Also, in your previous post you wrote "I will never be able to encode any movie of my own".
I wonder what you use for your experiments and what you try to achieve?

sirt
12th April 2012, 12:11
But what is that "reason" you mention then ? Does encoding using such preset worth a try whereas using medium would me enough for eye perception according to some people there ?

Yes I will never encode any long movie because my computer doesn't enable me to do that ; as an example the "test.mkv" uploaded below took 4 hours to be encoded and it's only 4 minutes length and the last time I tried to encode a commercial film (instead of just keeping it untouched on my computer as an ISO or remuxed in an MKV container) I chose to encode it in too pass and it took 3 days for the first pass with veryslow preset and one day and the half with medium. As you say it yourself, I want to EXPERIMENT, that's why I'm there and ask a lot of things ; Of course I encode some stuff with "standard" parameters but that is just to save personnal data with the guaranty the quality will not be far from the original source, but that's another story. On this thread, I focuse on what I like the most : testing parameters on a specific video, modify them and see what happens. In that perspective I have too goals : 1) try parameters and understand if they are bad or no sence / 2/ compare different encodes with different parameters in order to achieve something (for example, reduce blocking or mosquito noises) ; I repeat, it's just for the pleasure of experimenting and understand my errors. Otherwise, I have no particular ambition if you prefer.

Groucho2004
12th April 2012, 12:33
But what is that "reason" you mention then ?Google "placebo" and you'll know.

Does encoding using such preset worth a try whereas using medium would me enough for eye perception according to some people there ?
I think most people here will advise you not to use placebo. Depending on your computer and your satisfaction with the results, try anything from "medium" to "veryslow". It's quite simple.

LoRd_MuldeR
12th April 2012, 13:56
Thanks Lord_Mulder. Yes, You have told me about the conflictual goals but as you see I am...obstinate. What do you mean by "for free" ?

I mean that if you tweak the encoder for a certain goal too much, you will get new problems elsewhere. No improvement comes for free :sly:

There are "quality -vs- speed" options. With these kind of options you can improve the "quality per bit" ratio, i.e. achieve a better quality at the same bitrate.
Obviously you pay with encoding speed here, so it's not for free. At least there should be no other drawbacks for using even "slower" settings, so it's "safe" to use the slowest settings.
And, by using "placebo" preset, you have maxed out all the available "quality -vs- speed" options anyway - beyond usefulness ;)

Things are quite different with Psy options! They usually trade one artifact for another one, like Psy-RDO/Psy-Tellis improves sharpness/details but starts causing other artifacts when set too high.
Or like the In-Loop Deblocking filter helps to avoid blocking artifacts, but comes at the cost of reduced sharpness/detail.
Consequently you can't have great sharpness, no artifacts (ringing, mosquito noise, blocking, etc) at all and a low bitrate at the same time. They simply are conflicting goals!
One of these will start to suffer, if you optimize for the others too much. So you'll have to decide where the most acceptable compromise is...

(BTW: If you feel like your source may need some sharpening, you could try to apply a subtle(!) sharpening filter before you send the video to the encoder)

Audionut
12th April 2012, 14:25
I've come across a few people who really have a thing about --merange 64. Since placebo isn't good enough and your just experimenting......

Cheers.

Ghitulescu
12th April 2012, 15:19
Honestly, the op has made it quite clear that he has no idea and is asking questions.

Then this is the wrong forum - he should have used this one (http://forum.doom9.org/forumdisplay.php?f=6) instead.

Atak_Snajpera
12th April 2012, 15:43
You're a developer, and i've seen you ask some pretty stupid questions yourself, so do us all a favour and drop your arrogant attitude.
any particular example? i'm just curious.

sirt
12th April 2012, 15:43
Audionut, there is no need to warn Atak_Snajpera, I will simply ignore people that tell me I should not discuss specific issues ; the fact is I am there to discuss about settings and their effect on particular area, end of the story. Telling me "You don't understand" or "Why don't you stick with this or that" won't really help at all because I'm convinced more than half people still don't understand anything to x264 settings and use them without focusing on what they are intended to. Contrary to them, I won't act like that because my goal is to understand and learn, not to encode and have a "good quality" encode without understanding why it has come out that great. I'm not ashamed at all to say I don't understand what such-and-such parameter does. It's my point of view. As regards, merange 64 is extraordinary slow, so it's just for testing.

Lord_Mulder, I think you have told me several times about those psy quantizers, so I begin to understand what they do. I will stick with -1,-1 deblocking and 1,0 ; howhever I've read from somewhere that I should just set deblocking to 0:0 and it would be ok (it's some kind of compromise) as much as using something like -3,-3 may be too much and create blocks and artefacts. Anyway, you have not commented upon those encoding settings, are the non standard changes I've done incompatible or absurd ?

I've tested LimitSharpen and SSSharpen on some sources, especially Blu Ray movies, but I thought the "test.mkv" would not requiere anything more than a little correction during the fades, don't you think it is enough detailed ?

nm
12th April 2012, 16:24
I've read from somewhere that I should just set deblocking to 0:0 and it would be ok (it's some kind of compromise) as much as using something like -3,-3 may be too much and create blocks and artefacts.

Deblocking strength is reduced automatically at lower quantizers. You won't see much difference between 0:0 and -1:-1 at CRF 16 and -3:-3 probably won't cause visible artifacts at that quality level.

LoRd_MuldeR
12th April 2012, 16:34
Lord_Mulder, I think you have told me several times about those psy quantizers, so I begin to understand what they do. I will stick with -1,-1 deblocking and 1,0 ; howhever I've read from somewhere that I should just set deblocking to 0:0 and it would be ok (it's some kind of compromise) as much as using something like -3,-3 may be too much and create blocks and artefacts.

I think I said it earlier, but you should trust the x264 developers and stick with whatever the proper "--tune" options sets for your type of source (e.g. "-1:-1" for "--tune film), unless you are willing to accept the downsides of setting this to more "extreme" values. This not only applies to the In-Loop Deblocking filter, it applies to Psy-RDO/Psy-Trellis, AQ-Strength and probably others in the same way...

Anyway, you have not commented upon those encoding settings, are the non standard changes I've done incompatible or absurd ?

Most of the other options you mentioned (e.g. chroma_qp_offset) are from the category that should never be touched by users.

I would say that anything that is not listed under "x264.exe --longhelp" is not for you to worry about. For most users the options listed under "x264.exe --help" should be perfectly sufficient ;)

I've tested LimitSharpen and SSSharpen on some sources, especially Blu Ray movies, but I thought the "test.mkv" would not requiere anything more than a little correction during the fades, don't you think it is enough detailed ?

Well, it was you who was asking for more sharpness. Thus you should ask yourself: Is it really the encoder who causes the lack of sharpness, in which case tweaking the encoder settings might help, or was the problem already present in the source, in which case tweaking the encoder settings cannot help (but a pre-processing filter might be able to do so). It should also be clear that a "sharpening" filter isn't very helpful to make a video more "compressible" ^^

Groucho2004
12th April 2012, 16:48
I would say that anything that is not listed under "x264.exe --longhelp" is not for you to worry about. For most users the options listed under "x264.exe --help" should be perfectly sufficient ;)
"--fullhelp" might be interesting for our inquisitive friend since it lists all parameter changes for the various presets and tune options.

sirt
12th April 2012, 16:55
Okay, then I will trust you in so far as I don't see a huge difference when using those modified parameters. The problem is there are many tutorials around and people giving their own advise on how to use parameters : for example they suggest there http://forum.digital-digest.com/f114/x264-options-explained-67180.html to raise scenecut by 5 for high action video or to reduce it by 5 for low action videos. But I've read somewhere - I can't remember where - the CONTRARY, so you don't really know what to trust. But that tutorial is maybe outdated.

Anyway I also tried some custom matrix made by the *mp4 guy (M4G-HighDetail-V3.1) but I think it is obsolete - since x264 has been optimised in the past years - to use such stuff (the Flat matrix seems to be satisfying from what I've read) and to be honest I don't understand at all what will happen if you use a custom matrix, even though the different examples on Doom9 are greatly developped, I haven't noticed any difference with a standard encode. For example, with that matrix I referred before, the only thing that is modified is qpmin=1 / qpmax=62 ; therefore, I didn't see anyhting suspect in the output.

EDIT : about the chroma_qp_offset mentionned below, I didn't touch it, it seems it has been setted to -8 without my assent ; the same things happened with a HD source (from Vimeo) I tried to encode using the X264 bluray guide from x264.nl (for 720p) : rc lookahead was automatically setted to 24 instead of 60.

EDIT 2 : about rc-lookahead : I think I found the reason for which it was lowered, it's because I was dumb and setted some Blu Ray parameter that constrained some settings like this one and keyint...well doing those tests just killed my brain and lead me up to commit foolish errors...

EDIT 3 : so what's so extraordinary with fullhelp, I should just read the x264 settings wikipedia's page instead, shouldn't I ? I hope those who build it update it as often as possible so we can use and test improvements !

LoRd_MuldeR
12th April 2012, 19:21
Okay, then I will trust you in so far as I don't see a huge difference when using those modified parameters. The problem is there are many tutorials around and people giving their own advise on how to use parameters : for example they suggest there http://forum.digital-digest.com/f114/x264-options-explained-67180.html to raise scenecut by 5 for high action video or to reduce it by 5 for low action videos. But I've read somewhere - I can't remember where - the CONTRARY, so you don't really know what to trust. But that tutorial is maybe outdated.

Don't believe everything you may read on the internet. At least take it with a good portion of suspiciousness ;)

x264 will place an IDR-Frame whenever a "scenecut" is detected. It also enforces an IDR-Frame when "--keyint" frames have passed since the last IDR-Frame. If a "scenecut" is detected, but less than "--min-keyint" frames have passed since the last IDR-Frame, then x264 will put a Non-IDR I-Frame. If you lower the scenecut threshold too much, x264 will detect scenecuts very frequently, so you will be running into the "--min-keyint" limit all the time. And if you raise the threshold too much, x264 will rarely detect scenecuts, so you will be running into the "--keyint" limit all the time. Obviously neither too high nor too low is good. Scencuts should be detected where the source actually contains a scenecut. Unless you have analyzed the output of x264 and noticed that scenecuts are often detected at the "wrong" positions, you have no reason to change the default scenecut threshold. I would assume that, if at all, "high action" video may need a slightly higher threshold...

Anyway I also tried some custom matrix made by the *mp4 guy (M4G-HighDetail-V3.1) but I think it is obsolete - since x264 has been optimised in the past years - to use such stuff (the Flat matrix seems to be satisfying from what I've read) and to be honest I don't understand at all what will happen if you use a custom matrix, even though the different examples on Doom9 are greatly developped, I haven't noticed any difference with a standard encode. For example, with that matrix I referred before, the only thing that is modified is qpmin=1 / qpmax=62 ; therefore, I didn't see anyhting suspect in the output.

You are right. Custom matrices usually are not needed these days. Most things that people tried to achieve with custom matrices in that past can be achieved easier and better with x264's Psy-optimizations ;)

EDIT : about the chroma_qp_offset mentionned below, I didn't touch it, it seems it has been setted to -8 without my assent ; the same things happened with a HD source (from Vimeo) I tried to encode using the X264 bluray guide from x264.nl (for 720p) : rc lookahead was automatically setted to 24 instead of 60.

x264 has its reason to adjust the "chroma_qp_offset" when Psy-RDO or Psy-Trellis are used. You should not overwrite it manually...

sirt
12th April 2012, 19:40
Okay thanks a lot for all of those explanations Lord_Mulder, it's more clear from all the questions I asked and your really detailled answers. I will retain I should conform to standards because I had a really bad suprise today : I encoded some HD video and due to some bad settings I lowered too much keyint, rc-lookahead and setted deblock unproperly and it resulted in awful macroblocks at the back. Look at this : http://i44.tinypic.com/2qsxfzl.png ; I think I've created the worst frame ever, how could it be worse than that ? It really made me laugh...anyway the source frame is not perfect either but not destroyed. All that certainly means I shall have to conform to standards or be carefull. I think the best thing for me would be to meet some of x264 developers and to understand what the hell they do the whole day to improve that fantastic x264. I tried to analyze myself the multiple C files from the last release coming from VideoLAN site but it's TERRIBLY complicated.

nm
12th April 2012, 23:43
EDIT 3 : so what's so extraordinary with fullhelp, I should just read the x264 settings wikipedia's page instead, shouldn't I ? I hope those who build it update it as often as possible so we can use and test improvements !

1. --fullhelp is updated by x264 developers, so it's up to date and correct.
2. x264 doesn't have settings listed on Wikipedia.
3. MeWiki is written and updated by random users. It's usually correct and reasonably up to date though. And more verbose than --fullhelp.

You should follow the git log (http://git.videolan.org/?p=x264.git;a=summary) or perhaps even the IRC channel if you want to be informed about new things.

J_Darnley
13th April 2012, 00:08
You should follow the git log (http://git.videolan.org/?p=x264.git;a=summary) or perhaps even the IRC channel if you want to be informed about new things.

The x264 mailing list is another option: http://mailman.videolan.org/listinfo/x264-devel

Groucho2004
13th April 2012, 00:53
1. --fullhelp is updated by x264 developers, so it's up to date and correct.
2. x264 doesn't have settings listed on Wikipedia.
3. MeWiki is written and updated by random users. It's usually correct and reasonably up to date though. And more verbose than --fullhelp.
I mentioned "--fullhelp" because it lists all changes from default settings for the various presets and tune options.
For example:
- veryslow:
--b-adapt 2 --bframes 8 --direct auto
--me umh --merange 24 --partitions all
--ref 16 --subme 10 --trellis 2
--rc-lookahead 60

I can't see this on mewiki. Since the OP likes to fiddle with all the knobs it might be useful to see how parameters change from preset to preset.

Audionut
13th April 2012, 02:34
any particular example? i'm just curious.

Sure! Here are 2 I found quickly.

http://forum.doom9.org/showthread.php?t=163353
http://forum.doom9.org/showthread.php?t=162770

And my personal favorite.

http://forum.doom9.org/showthread.php?t=155205

LoRd_MuldeR
13th April 2012, 03:16
Audionut and Atak_Snajpera, please stick to the topic guys!

Guest
13th April 2012, 03:16
@Audionut and Atak_Snajpera

Please take off-topic discussion to PM. Further OT posts are subject to deletion without warning.

smok3
13th April 2012, 05:09
@sirt
With such hiq settings, how can you tell if mosquitos or whatever bothers you is not allready on your lossy master? Did you consider testing some lossless footage first? (simply to actually discover the difference between encoder "problems" and other "placebos"?)

sirt
13th April 2012, 10:13
@sirt
With such hiq settings, how can you tell if mosquitos or whatever bothers you is not allready on your lossy master? Did you consider testing some lossless footage first? (simply to actually discover the difference between encoder "problems" and other "placebos"?)

Of course the problems are on the original sources (even thought the one used to encode the "test.mkv" file is roughly clean but not perfect either) ; what I want to avoid is to create EXTRA blocking and mosquito noises which were NOT in the source ; so I was wondering how to set my parameters so as to fight against such effects. I especially want to keep edges clean and keep intact intact dark bakgrounds. Look at this :

http://i44.tinypic.com/2rwuhrt.png

I zoomed so there are distorsions but this is to precisely help you understand what I focus on ; so check the bad artifacts around the green dress and of course the whole arm. Here some kind of ringing or mosquito noises clearly appear, but I don't know how to officialy call that. Anyway, I was wondering if some x264 settings may help to solve such things ? Or some filters (Virtualdub, Avisynth...) ? I've tried something like Edgecleaner (some avisynth script) but it practilly doesn't do anything in this case and I am reluctant to use some denoising filter because it usually BLURS other parts in the area that I would like to keep intact. Do you have some suggestions that could help me ?

Didée
13th April 2012, 10:34
Your screenshot tells pretty much nothing, since pixel detail is flubbered from resampling. Don't use resampling for zooming. Either use pointresampling and integral upscale factor, or don't zoom at all. (People can zoom by themselves. Those who cannot zoom are those who cannot help anyway.)

sirt
13th April 2012, 10:52
Well as I said it is zoomed but even if I don't zoom what I describe is there ; Didée I think you might help to find something adequate against ringing, mosquito noise that won't blur too much areas that are not suitable to be filtered. I have tried a large amount of your filters, but honestly I don't know what to choose, that's why I nned some advise.

Here is a picture from google : http://imageshack.us/f/831/algolithfig2.jpg/ ; I want to avoid noises around the edges as the arrow point out but without blurring too much the rest. Another example : http://www.videophile.info/Review/Hunchback/07_c1.jpg but the apparently corrected frame is blurred.

Groucho2004
13th April 2012, 11:48
Didée I think you might help to find something adequate against ringing, mosquito noise that won't blur too much areas that are not suitable to be filtered.
If you want the ScriptWizard™ (aka Didée) to help you, post a video sample. Screenshots are (almost) useless. :D

Didée
13th April 2012, 12:01
hehe, no need for showcase samples, I know what gibbs and mosquito looks like. The point is that there's hardly anything of that to see in your problem screenshot.

Nuking gibbs and mosquito away is not such a big problem. The problem is that you're usually also nuking any real detail that might be located beneath broad edges. Any "edgecleaner"-type filter will only look out for broad edges, and filter out any small/weak signal peaks in their neighborhood. The decision if those small/weak signal peaks actually are noise or actually are detail, this decision is only happening in your brain. A mechanic algorithm has not much clue of that difference.

In animated sources, cartoonish or simple anime, it is often more simple. There, your're mostly supposed to have sharp lines with "nothing around" but flat areas. Natural movie sources are a different ballgame.

However, the screenshot looks like it is from a Bollywood movie (?) , so it shouldn't matter too much. Bollywood movies are supposed to have artifacts and other technical defects, aren't they? :p

Groucho2004
13th April 2012, 12:13
Bollywood movies are supposed to have artifacts and other technical defects, aren't they? :p
Yes, that's implied, as is the excessive usage of colour saturation.

sirt
13th April 2012, 12:26
Didée, I really don't know from where those frames are taken, I typed mosquito noise on google...I'm lazy to check one of my sources and find out much more artifacts like that. As you say the decison is happening in my brain...may have I killed my brain with too many tests ? :p ; most seriously, what would you suggest instead of a edgecleaner filter then ? As I don't know all your filters yet, perhaps there might be one that would cater for my needs. I defintely encounter difficulties to clearly explain what I want : I would like edges to be enough smooth not to be ringed as well as not be polluted by such anoying noises. I especially don't like curved artifacts near arms, faces, legs...

sirt
13th April 2012, 12:27
EDIT : in fact Didee you should just write a new dedicated fitler called "special_for_sirt_v1" and I will be happy ! :D

Atak_Snajpera
13th April 2012, 14:55
EDIT : in fact Didee you should just write a new dedicated fitler called "special_for_sirt_v1" and I will be happy !
send him some $$$$ and he will do that with pleasure.

sirt
13th April 2012, 21:32
Maybe who knows ?

I got some strange message when I tried something weird like that :

http://i1240.photobucket.com/albums/gg481/abel413/annoying.jpg

"Cannot ect"

Why does that happen ? It seems my deblocking settings can't be applied as I would like. It will be 1,1,-2 instead or 1,-2,-2

LoRd_MuldeR
13th April 2012, 21:52
If your are talking about the warning "[h264 @ ...] Cannot parallelize deblocking type 1, ...", then this probably is a message from the decoder, which is decoding your source/input.

Also the "--deblock" option only has two parameters. The syntax is "--deblock <alpha:beta>" ;)

sneaker_ger
13th April 2012, 22:12
Also the "--deblock" option only has two parameters. The syntax is "--deblock <alpha:beta>" ;)

Seems to be one of those undocumented possibilities again.

sirt
13th April 2012, 22:13
If your are talking about the warning "[h264 @ ...] Cannot parallelize deblocking type 1, ...", then this probably is a message from the decoder, which is decoding your source/input.

Also the "--deblock" option only has two parameters. The syntax is "--deblock <alpha:beta>" ;)

Oh sorry as I said too many tests are killing my brain...but it's the same with --deblock -2,-2 ; it seems it will assign 1,-2 without my assent...

*.mp4 guy
13th April 2012, 23:15
If you want to avoid banding and mosquito noise at the same time, you must lower the strength of your psy settings and encode in 10bpp colorspace, everything else is rearranging deck chairs on the Titanic. Also, leave deblock at 0:0.

Try --psy-rd 0.2:0.115 --aq-strength 0.7 In 10bit X264

sirt
13th April 2012, 23:29
In 10bit X264

Thanks for the advise *mp4 guy, but am I forced to use 10bit version and why ? I usually use 8 bit but I'm currently giving a test to 10 bit in lossless mode but...it is infamously slow in spite of the low settings.

Anyway, I know it's off topic but I wanted to try your Quality matrixes with XviD, is that a good idea ? (for example M4G Smooth V1 because you say it won't deblock too much ; I also gave a try to the M4G High Detail V3.1 but it didn't work as well with an HD source from Vimeo)

jasonwc
14th April 2012, 01:02
Yes I will never encode any long movie because my computer doesn't enable me to do that ; as an example the "test.mkv" uploaded below took 4 hours to be encoded and it's only 4 minutes length and the last time I tried to encode a commercial film (instead of just keeping it untouched on my computer as an ISO or remuxed in an MKV container) I chose to encode it in too pass and it took 3 days for the first pass with veryslow preset and one day and the half with medium. As you say it yourself, I want to EXPERIMENT, that's why I'm there and ask a lot of things ;.

I think you really should ask yourself what you're trying to achieve. Why are you encoding this video at all when it's obviously not very long and is already lossy? If you're not satisfied with a CRF16 placebo encode, just keep the original video.

Is taking the time to do dozens of encoding tests AND days of CPU time for the final encode worth it for a video much shorter than a feature film. How large can the original video be if it's a highly compressed Bollywood flick anyhow?

Also, you suggested that you can't tell the difference between the source and your encode during normal video playback but only by doing detailed frame comparisons. If so, should you be happy with your output? Unless you plan to watch movies by advancing frame by frame, those artifacts shouldn't matter.

Surely your time is worth more than the cost of a few GB of hard drive space. Perhaps this is a purely academic affair for you and you just want to play around. I can understand that, but if this is an encode for playback, just keep the source. Even if your time is worth nothing, electricity is not. You are very likely spending more money on the electricity needed to encode at placebo than you are gaining in hard drive space.

For example, say there is a 5% difference in size between placebo and veryslow (doubtful) but placebo is 1/2 the speed and takes an additional 24 hours of encoding time. Even on a 2 hour movie @ CRF16 the difference would be only a few hundred MB. Let's say 500. You can get a 2 TB drive for $130 in the US - so that's 6.5 cents/GB.

So, if the electricity of encoding for 24 hours is more than 3.25 cents, you're wasting money. And it almost certainly is. At 10-12 cents/KwH you're looking at at a cost of 10-40 cents for encoding alone due to the extra watt hours used (at least 50W/hr) over idle. If you would otherwise put your computer into sleep mode, it's more like 100 or 150W. So, that's somewhere between 1.2 and 3.6 KwH. You may very well be spending 40 cents to save 3... And all of this assumes your time is worth NOTHING.

As many others have said before, you're getting a negligible benefit from using placebo over veryslow. Using TESA over UMH will make your encode MUCH slower but will provide a marginal benefit, if any. You say you have a slow computer so you should definitely be using a faster preset. --Veryslow is the lowest you should reasonably go.

So, either keep the source (best option), encode at a lower CRF level, or just enjoy the encode and stop looking for artifacts in individual frames.

CruNcher
14th April 2012, 01:16
If you want to avoid banding and mosquito noise at the same time, you must lower the strength of your psy settings and encode in 10bpp colorspace, everything else is rearranging deck chairs on the Titanic. Also, leave deblock at 0:0.

Try --psy-rd 0.2:0.115 --aq-strength 0.7 In 10bit X264

Noted that one http://en.wiktionary.org/wiki/rearrange_the_deck_chairs_on_the_Titanic :D

@jasonwc
not every avg user thinks economical ;)

sirt
14th April 2012, 01:32
jasonwc, thanks for you detailled analysis. Honestly, your plighted speech about electricity really made me laugh ; fortunately, I know I will pay a lot of bills this month but be sure it won't happen each month. I am aware of the wastes I might bring about with my encoding stuff but I still have a private and professional life to assume, not only encoding the whole day ; I'm sorry if it sound like that for you - or at least it appears you feel it in this way - but I have just some (unwanted) free time to waste and I do tests.

I'm not totally sure but it seems you misunderstand me : as I said I will keep my personnal stuff untouched, unpacked in MKV containers or encoded with LAGARITH. Nonetheless, I may encode sometimes some stuff but I merely use XviD codec in this case. I won't complain about mosquito noises and another annoying artifacts. I don't particulary care about that, I won't asolutely want to solve everything, everytime.

No, actually I am just curious to learn and understand more. That's why I keep on asking more and more at the price of being dumb sometimes, but it doesn't matter as long as I finally understand what is wrong, or what such-and-such filter/parameter is dedicated to. It's just for the pleasure of encoding and and to see what is happening : for example - and you will blame me for promoting Earth's implosion - I encoded the same video (some HD footage taken from Vimeo) like TEN times today : several examples with XviD (standard, custom matrix), another with x264 (2 passes, crf and lossless but I didn't have enough mettlle go through with it until the end) ; I don't want to achieve anything in particulary but as I really have anything to do for some personal reasons, I stick with encoding. I want to see what happens, what will change such and such parameters. Believe me it's really amazing to see that something you have read really happens because you setted either setting in either way. But it is a purely academic purpose as you argued, I don't absolutely want to furfil some particular expectations at all costs. Eventually, I am just really curious and willing to learn ! Anyway, I am aware it might hurt one's patience to read me.

sirt
15th April 2012, 12:22
Okay, here is an example of a try ; I tried many settings in order to remeove what I want (mosquito noises, ringing ect) and here are the settings used :

mctemporaldenoise(settings="very low",sigma=1,limit=255,limit2=255,chroma=true,strength=2, threshold=2,quant1=1,quant2=1,cutoff=10,edgeclean=true,ECMode="Removegrain(0,0)",temp=2,useEEDI2=false,stabilize=true,maxr=7)

Source (unproceesed, a video from Vimeo)
http://i1240.photobucket.com/albums/gg481/abel413/be1.png

Result (After cropping, resize + mctemporaldenoise)
http://i1240.photobucket.com/albums/gg481/abel413/be.png

I have no idea if it is weird or not to set that filter like this but it doesn't seem to give a bad result. What do you think ? How to improve ? Do you know something similar to that mctemporaldenoise ?

I suggest you save both frames to your browser and check them by fading from one to another. It would be easier with an hoster that would enable fades between too frames but I don't know one.

smok3
15th April 2012, 12:35
improve on what?

a. finding avisynth script that uses 76 plugins instead of just 25?
b. writing a javascript that would show another picture onmouseover?
c. lifeless hand on 2nd screenshot?
d. annoying background on 1st screenshot?
e. my imagination so i could imagine how would that look in motion?
f. finding a filteritis cure?

sirt
15th April 2012, 13:05
Improvements to set the filters and/or to properly filter the first frame (even with another filter(s)) WITHOUT blurring or creating another artifacts that were NOT there from the beginning.