View Full Version : Best deblocker for heavily compressed video?
bcn_246
9th June 2016, 13:40
Hey, for most sources I use DeBlock_QED, as I find it removes light blocking without damaging detail. However, for lower bitrate sources if I set the quant1/quant2 values to high (~40 seems to be the limit) the filter produces strange results (and still isn't strong enough).
I have tried a few others... I wondered if you guys had any reconsiderations on what to use for heavily compressed material. DeblockPP7 and seem to show promise... also tried SmoothD2 and SmoothD2c. On this I am not sure which is better quality, SmoothD(1), SmoothD2 or SmoothD2c?.
Any other suggestions?... basically I am looking to remove blocking only, and as much as possible keep other noise/grain, something filters like Deblock (aka BlindPP) failed to do.
Izuchi
9th June 2016, 14:12
Rather than remove the blocks entirely, which will most likely result in heavy detail loss, (especially in low quality heavily compressed material — although if it really is that LQ to begin with you probably wouldn't care too much either way) it might be better to hide the blocking by performing a light to medium denoise to smooth out the blocks and then adding a layer of dynamic grain to hide the remaining blockiness.
hello_hello
11th June 2016, 00:06
It might seem odd, but try this. Better than deblocking filters, in my opinion:
QTGMC(InputType=1, Preset="Medium", EzDenoise=1.5)
gradfun3()
You'll never fix severe blocking, and even fixing mild blocking will probably cost you some detail, but the above method has a pretty good deblocking to detail loss ratio, and I find it looks better because it cleans up the edges of objects and does a much better job debanding.
You might find Deblock_QED on it's own does a better deblocking job where there's fast movement, but it'll also blur a lot, and it's in more static areas where blocking looks worse anyway. It's hard to illustrate with still pictures but....
An old crappy quality AVI I had lying around. If you look at the edge of the car roof or the car in the background you'll see what I mean about cleaning up edges of objects, although as a demonstration of deblocking it didn't turn out as I'd hoped. Sometimes, you just need to see the pictures moving.
Before:
http://s33.postimg.org/odpp4epzz/image.jpg
DeBlock_QED (default settings):
http://s33.postimg.org/ya0vya8f3/image.jpg
QTGMC(InputType=1, Preset="Medium", EzDenoise=1.5)
gradfun3()
http://s33.postimg.org/g0v16q1b3/image.jpg
That's kind of along the lines of what Izuchi suggested, and I'm pretty sure you can add grain with QTGMC too, plus tweaking gradfun3 would probably improve the result a little. I usually don't bother tweaking too much myself as low quality video generally isn't worth spending a lot of time on.
feisty2
18th June 2016, 12:35
You'll never fix severe blocking, and even fixing mild blocking will probably cost you some detail.
false
http://i.imgur.com/StFLX72.png
#vaporsynth python script
clp = whatever blocky shit
clp = Oyster.Deblocking(clp, Oyster.Basic(clp, Oyster.Super(clp)))
http://i.imgur.com/a6Wd5IL.png
feisty2
18th June 2016, 13:22
clp = havsfunc.Deblock_QED(clp, quant1=60, quant2=60)
http://i.imgur.com/2J1Hdpp.png
hydra3333
18th June 2016, 15:09
my goodness. just ... my goodness ... if it looks too good to be true it probably is. Are you pulling our legs and have blockified the source and posted that as the oyster output, for fun ?
damn, now I need to learn vapoursynth.
feisty2
18th June 2016, 15:23
my goodness. just ... my goodness ... if it looks too good to be true it probably is. Are you pulling our legs and have blockified the source and posted that as the oyster output, for fun ?
hell no, that's just real like the earth is round
oyster is sooooooooooo slow like 0.0xfps on NTSC resolution vids, it acts like the placebo quality reference to other faster filters, you might not want to use it on projects out there in the real world if you don't wanna end up dead for the old age first
hydra3333
18th June 2016, 15:31
I feel a burning, aching, need for some serious time wasting.
Is there doco and a link somewhere for Oyster and how to get it going ? eg a full vapoursynth script, for a beginner?
Now I'll have to search for how to install and use vapoursynth (hopefully it can be installed alongside avisynth 2.57 which is my dearly loved and very reliable workhorse).
feisty2
18th June 2016, 15:36
I feel a burning, aching, need for some serious time wasting.
Is there doco and a link somewhere for Oyster and how to get it going ? eg a full vapoursynth script, for a beginner?
Now I'll have to search for how to install and use vapoursynth (hopefully it can be installed alongside avisynth 2.57 which is my dearly loved and very reliable workhorse).
I'm the author of oyster, I have finished the filter writing part but ain't started writing about doc stuff yet....
feisty2
18th June 2016, 16:12
if anyone's intrigued...
Blocking
pretty bad but not as extreme like the example overhead
http://imgur.com/Xy5mn2n.png
ref = Oyster.Basic(clp, Oyster.Super(clp))
clp = Oyster.Deblocking(clp, ref ,sigma=12.0, lowpass=3, block_step=2)
clp = Oyster.Deringing(clp, ref, block_step=2)
http://i.imgur.com/3AXZULd.png
Ringing (aka mosquito noise)
kind of severe
http://i.imgur.com/VdPsYpW.png
ref = Oyster.Basic(clp, Oyster.Super(clp))
clp = Oyster.Destaircase(clp, ref, block_step=2)
clp = Oyster.Deringing(clp, ref, h=12.8, block_step=2, lowpass=3)
http://i.imgur.com/8O5sOjq.png
mild
http://i.imgur.com/nrtBW4q.png
ref = Oyster.Basic(clp, Oyster.Super(clp))
clp = Oyster.Destaircase(clp, ref, block_step=2)
clp = Oyster.Deringing(clp, ref, block_step=2)
http://i.imgur.com/ZgOwC0u.png
MysteryX
18th June 2016, 16:26
For old VCDs with HEAVY blocking and artifacts, here's what I found to work best... InterFrame!
By increasing the frame rate to 60fps, it analyzes the animation patterns of the videos and smooths things out. I got very surprised when I realized it was getting rid of most of the blocking artifacts, as if by magic!
For example, look at what I did with this 288p video with horrible artifacts.
Before (https://www.spiritualselftransformation.com/files/media-encoder-old.mpg) and after (https://www.spiritualselftransformation.com/files/media-encoder-new.mkv). It's a complex script but the blocking disappears mostly with Interframe.
feisty2
18th June 2016, 16:50
For old VCDs with HEAVY blocking and artifacts, here's what I found to work best... InterFrame!
By increasing the frame rate to 60fps, it analyzes the animation patterns of the videos and smooths things out. I got very surprised when I realized it was getting rid of most of the blocking artifacts, as if by magic!
For example, look at what I did with this 288p video with horrible artifacts.
Before (https://www.spiritualselftransformation.com/files/media-encoder-old.mpg) and after (https://www.spiritualselftransformation.com/files/media-encoder-new.mkv). It's a complex script but the blocking disappears mostly with Interframe.
mdegrain(thsad=2000) is far better in that case, and stop wasting any time on vcd related stuff, don't be Katie 2.0 like this.
StainlessS
18th June 2016, 17:55
Think MX was suggesting VCD as input, not output.
Nice work on the Oyster thing Feisty2, looks great.
feisty2
18th June 2016, 18:16
Nice work on the Oyster thing Feisty2, looks great.
I luuuuuuuv Britney, wanna have a set of her music video collection, emailed her record company but they refused to sell the master tapes of her videos to me, and her DVDs are super crappy (video quality-wise, not the content), and I have to do something about it, so time for my brain to work, go make some black magic even if it's outrageously slow :p
Groucho2004
18th June 2016, 18:28
go make some black magic even if it's outrageously slow :p
If you think it's slow we may have to introduce a new unit of measure for this type of filter - FPM (frames/month).
feisty2
18th June 2016, 19:01
If you think it's slow we may have to introduce a new unit of measure for this type of filter - FPM (frames/month).
yeah I blame it all on lossy compression, I f**king hate that evil b**ch
cork_OS
18th June 2016, 19:32
MSU Deblocking is the best of what I've tried.
johnmeyer
18th June 2016, 20:02
1. I want Oyster. I'm looking forward to it, FPM, or not.
2. If you have specific Britney requests, PM me. I collect music videos and have a few of her things from my own captures from satellite (SD quality, however, given when it happened). I think I have the original (and the backstory) of the "world premiere" (first showing) of at least one of her videos, the one where she is dressed up like a school girl (can't remember the song title).
I just checked my list and I have her 2001 Grammy performance, that I recorded OTA. I have the "Brtiney Spears, Live and More" DVD, but you probably already have that. I may have a few other things.
Reel.Deel
18th June 2016, 20:21
@feisty2
Can you share a video sample of the 1st image?
hello_hello
18th June 2016, 21:18
false
A shadow from her hair under her chin is gone, the material on her dress and hanging from her arm looks a little blurred. Anything that might have passed for detail you can see on her skin is gone, and in the original image there's two small rows of dots near the bottom, left corner which are probably a pattern on someone's clothing (it's dark and hard to tell) but the top row was all but blurred away and the bottom row is reduced in brightness. A background shadow? above the guy's eye has been reduced, and it's a black and white image, I'd be keen to see the same again in colour.
A blink test on your two images makes the deblocked one look a little blurred by comparison. I think it's mostly the effect of the blocking masquerading as picture detail, so maybe one of the reasons it could be deblocked without a huge loss of detail, is the blocks don't contain much of it. With only a single screenshot to go by, I'd happily say as far as deblocking goes, it's quite good. If that was always the deblocking to noise removal ratio, it's very good, but I don't think it proved me wrong.
StainlessS
18th June 2016, 21:40
What is that saying,
You can please some of the people some of the time and ...
johnmeyer
18th June 2016, 21:53
What is that saying,
You can please some of the people some of the time and ...I also thought that at first, but in re-reading Hello's post, I think he was in total agreement that Feisty's Oyster is producing some amazing results, and he was merely picking a few nits because Feisty had said "false" to Hello's earlier statement that detail was always lost. I think Hello was simply pointing out that, despite how good it looks, the Oyster plugin had lost a few small details along the way.
So, while he has to speak for himself, I think he was actually pretty pleased, and was merely taking issue with the "no details lost" claim.
And, as I already posted, I can't wait to get my hands on it. I've been using MDegrain2 for deblocking (never could get the various QED plugins to work), and MDegrain2 is far from satisfactory. To be fair, it was never intended for this purpose, but I'm not the only one that uses it this way: Hello already posted, earlier in this thread, that he uses a similar plugin for deblocking. He uses QTGMC, and of course it is mostly a front end for MVTools2, and for noise reduction it uses MDegrain1/2/3.
hello_hello
18th June 2016, 22:36
Reading the posts and my reply again, I'm not sure if feisty2 disagreed with the "can't fix severe blocking" claim, "even fixing mild blocking costing you detail" claim, or both. He wasn't particularly specific. feisty2 could have been predominately referring to the first part while my brain blocked it out when replaying to dedicate as many neural pathways as possible to the second one. ;)
I don't see "always lose some detail" as wrong, and I'll also admit much of what I wrote was almost nitpicking in the grand scheme of things. I did admit that as far as deblocking goes it appeared to be very good, but I would like to see it in action in colour, or understand why feisty2 has an exceptionally large collection of black and white video. Unless that's unreasonable of me, for reasons I don't yet understand.
hello_hello
18th June 2016, 22:44
What is that saying,
You can please some of the people some of the time and ...
By all means, finish your sentence.
StainlessS
18th June 2016, 23:10
I deliberately mixed the some and all (don't like new Androi ko hi kod keyboard ,it is rubbish)
I was opening up the discussion range.
Mobile stuff screwed up a bit of above, a!s it does.
StainlessS
19th June 2016, 00:38
Nah, hello Hello, Hello, you finish my sentence, I'm sure you will be well good :)
johnmeyer
19th June 2016, 00:49
By all means, finish your sentence.The full quote: "You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time".
It's usually attributed to USA president Abraham Lincoln, but some sites claim John Lydgate uttered it centuries earlier.
StainlessS
19th June 2016, 00:55
Thank you, In future, I will attribute to JohnMeyer. :)
Yo, john, bit pissed again, say la, vie.
real.finder
19th June 2016, 00:58
RemoveDirtMC_SE() (http://pastebin.com/raw/xG34dgu3) it's for another's problems but can work in blocks in fast motions
MC_Spudsmod() (http://pastebin.com/raw/CB6ZEbGR)
dfttestMC() (http://forum.doom9.org/showpost.php?p=1725400&postcount=36) for median blocks
FunkyDeBlock() (http://avisynth.nl/index.php/FunkyDeBlock)
DeHaloH() (http://forum.doom9.org/showpost.php?p=1675762&postcount=16) for ringing (mosquito noise)
StainlessS
19th June 2016, 01:03
Feisty, does the Oyster thing require 16bit, yeh oder neh ?
(yes or no)
Is it something that could be implemented in Avisynth. ?
feisty2
19th June 2016, 01:15
Feisty, does the Oyster thing require 16bit, yeh oder neh ?
(yes or no)
Is it something that could be implemented in Avisynth. ?
32bits floating point is a must, I don't care about low precisions like 8 or 16bits
not possible with avisynth cuz BM3D is vaporsynth exclusive
feisty2
19th June 2016, 01:20
Reading the posts and my reply again, I'm not sure if feisty2 disagreed with the "can't fix severe blocking" claim, "even fixing mild blocking costing you detail" claim, or both. He wasn't particularly specific. feisty2 could have been predominately referring to the first part while my brain blocked it out when replaying to dedicate as many neural pathways as possible to the second one. ;)
I don't see "always lose some detail" as wrong, and I'll also admit much of what I wrote was almost nitpicking in the grand scheme of things. I did admit that as far as deblocking goes it appeared to be very good, but I would like to see it in action in colour, or understand why feisty2 has an exceptionally large collection of black and white video. Unless that's unreasonable of me, for reasons I don't yet understand.
I was referring to "can't fix severe blocking"
obviously there will be certain detail loss, more or less, even humans sometimes cannot decide if a part of image is noise or the actual image...
StainlessS
19th June 2016, 01:25
I have no idea what BM3d is, but willbe lookin at this when I am not so sozzled.
Thank you for your ideas and time.
feisty2
19th June 2016, 01:26
1. I want Oyster. I'm looking forward to it, FPM, or not.
2. If you have specific Britney requests, PM me. I collect music videos and have a few of her things from my own captures from satellite (SD quality, however, given when it happened). I think I have the original (and the backstory) of the "world premiere" (first showing) of at least one of her videos, the one where she is dressed up like a school girl (can't remember the song title).
I just checked my list and I have her 2001 Grammy performance, that I recorded OTA. I have the "Brtiney Spears, Live and More" DVD, but you probably already have that. I may have a few other things.
https://github.com/IFeelBloated/Oyster/blob/master/Oyster.py
but without any docs cuz I haven't started writing... and I probably won't be able to reply soon if you run into some kind of trouble playing with it, the tests are coming again and I will disappear for a few days, damn college
feisty2
19th June 2016, 01:30
but I would like to see it in action in colour, or understand why feisty2 has an exceptionally large collection of black and white video. Unless that's unreasonable of me, for reasons I don't yet understand.
the source vids are colored, I simply extracted luma out and ignored chroma cuz they need different kinds of processing and I haven't gotten my head around chroma stuff yet
feisty2
19th June 2016, 02:07
@feisty2
Can you share a video sample of the 1st image?
https://mega.nz/#!el0lGaII!cn0bG9d74sFQBb25cQwFKafRAjFRGKuAFTudqh9nv-4
import vapoursynth as vs
import Oyster
core = vs.get_core()
clp = core.raws.Source("1.rgb", 720, 480, src_fmt="GRAYS")
clp = core.std.Reverse(clp)+clp #padding in temporal dimension
clp = Oyster.Deblocking(clp, Oyster.Basic(clp, Oyster.Super(clp)))
clp.set_output()
frame 33
StainlessS
19th June 2016, 02:15
Feisty, please come back, dont be a stranger :)
Really, do your college stuff, then come back, Whatya gonna get, f+ or what.
(I might get f+, but only on a good day).
feisty2
19th June 2016, 02:26
1. I want Oyster. I'm looking forward to it, FPM, or not.
and besides the insane speed, Oyster is fairly hard?(more of complicated) to operate also, you might need to tweak parameters carefully for each scene or even each frame in some extreme cases, you'll get a shitty output, either too much detail loss or residual noise if the parameters are set casually or mindlessly...
feisty2
19th June 2016, 02:40
I dunno wtf this kind of artifacts is called (looks like mosquito noise, but different...), but anyways it's super gross and triggered my trypohobia switch...
http://i.imgur.com/EKKnDa6.png
ref = Oyster.Basic(clp, Oyster.Super(clp))
clp = Oyster.Destaircase(clp, ref, block_step=2)
clp = Oyster.Deringing(clp, ref, block_step=2, h=12.8, lowpass=12)
http://i.imgur.com/AN6aV8o.png
feisty2
19th June 2016, 02:55
Feisty, please come back, dont be a stranger :)
Really, do your college stuff, then come back, Whatya gonna get, f+ or what.
(I might get f+, but only on a good day).
straight A ever since high school was over, no more tedious English classes, I got C or D at English back in high school
fell in love with physics for this ;)
http://britneyspears.ac/lasers.htm
semiconductor physics is not my major tho..
MysteryX
19th June 2016, 03:59
32bits floating point is a must, I don't care about low precisions like 8 or 16bits
not possible with avisynth cuz BM3D is vaporsynth exclusive
There are several filters that do 16-bit processing. They all convert the input to 16-bit, do the processing in high-bit-depth, and then return the output as 8-bit, with an optional lsb_inout parameter.
It can be done no problem; but as a DLL, not as an AVSI script.
Reel.Deel
19th June 2016, 04:00
https://mega.nz/#!el0lGaII!cn0bG9d74sFQBb25cQwFKafRAjFRGKuAFTudqh9nv-4
I meant an unprocessed sample directly from the source. I'm assuming it came from a DVD.
I dunno wtf this kind of artifacts is called (looks like mosquito noise, but different...), but anyways it's super gross and triggered my trypohobia switch...
That's residual combing. Vinverse() was made specifically for this type of artifact. The output is not as clean as your script but it does do quite well considering that is hundreds of times faster.
feisty2
19th June 2016, 04:11
I meant an unprocessed sample directly from the source. I'm assuming it came from a DVD.
that is the (almost) unprocessed sample
I trimmed it down from the DVD and IVTCed it and extracted luma plane and converted the bitdepth to full range 32bits float and that's all.
are you doubting my skills of doing some everybody knows basic DVD pre-processing?
Reel.Deel
19th June 2016, 04:16
that is the (almost) unprocessed sample
I trimmed it down from the DVD and IVTCed it and extracted luma plane and converted the bitdepth to full range 32bits float and that's all.
are you doubting my skills of doing some everybody knows basic DVD pre-processing?
I'm not doubting your skills, just kindly requesting a completely untouched sample from the DVD. :)
feisty2
19th June 2016, 04:21
I'm not doubting your skills, just kindly requesting a completely untouched sample from the DVD. :)
fine
https://mega.nz/#!qh13jYrC!6o17_1yw53i3MVIhNXjgCAehLDYIEUrZJuklNatQTnI
johnmeyer
19th June 2016, 05:11
First of all, thanks for the link to the Oyster code. Looks like I'll finally have to install Vapoursynth. I didn't have a need for it until now.
fell in love with physics for this ;)
http://britneyspears.ac/lasers.htm
semiconductor physics is not my major tho..It's been over forty years since I read that stuff. I just skimmed through 8-10 pages. I sure don't remember those illustrations in either my physics or EE semiconductor classes.
I do remember a lot of talk about excitation when talking about lasers, and I can now understand what that word means.
MysteryX
19th June 2016, 05:20
mdegrain(thsad=2000) is far better in that case
Wow, adding that into the script really does GREATLY improve the output!! At the expense of severe blurring and quality loss.
Adding it after the first SuperResXBR image double, right before Interframe, does reduce the loss of details. Then removing the .15 softness on SuperResXBR can help make up for the blurriness.
Feisty2, I believe you really can have seriously useful contributions to this whole community by having improved architectural skills. The approach you have now is "shoot it in the wall and see what sticks". It works and provides killer quality with deadly performance. I'm sure that 90% of the work being done isn't directly related to the desired output magic. By understanding more of the fundamental work being done and designing it more tightly from the core, I'm sure you could produce filters that provide great quality with good performance.
bxyhxyh
19th June 2016, 05:42
@feisty,
A bit off topic.
Do you use your filters and scripts on long clips like movies?
feisty2
19th June 2016, 05:51
@feisty,
A bit off topic.
Do you use your filters and scripts on long clips like movies?
Never, there're bluray disks for movies and bluray vids are already free from compression artifacts (in general cases)
feisty2
19th June 2016, 05:54
Wow, adding that into the script really does GREATLY improve the output!! At the expense of severe blurring and quality loss.
Adding it after the first SuperResXBR image double, right before Interframe, does reduce the loss of details. Then removing the .15 softness on SuperResXBR can help make up for the blurriness.
Feisty2, I believe you really can have seriously useful contributions to this whole community by having improved architectural skills. The approach you have now is "shoot it in the wall and see what sticks". It works and provides killer quality with deadly performance. I'm sure that 90% of the work being done isn't directly related to the desired output magic. By understanding more of the fundamental work being done and designing it more tightly from the core, I'm sure you could produce filters that provide great quality with good performance.
I understand how my filters work, oyster just cannot go fast, it's impossible (unless someone writes a gpu version for mvtools and bm3d)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.