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 12th November 2019, 21:45   #1  |  Link
nfv
Registered User
 
Join Date: Aug 2007
Posts: 44
Compression Artifacts

What do you guys use to help reduce compression artifacts?

I've tried deblock and I honestly see no difference at all. Maybe I'm not using it right?

I have a lot of captures sourced from satellite TV with lots of compression artifacts.

Thanks!
nfv is offline   Reply With Quote
Old 12th November 2019, 22:28   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Deblock can be quite effective against starved images suffering from blocking artifacts.
If you are re-encoding using x264 or x265 you can use the built-in deblock filter which is quite good: positive values are more aggressive, negative values are less aggressive.
You can try by setting it really high and then lower it down 'till you'll find the sweet spot.
There are also deblocking plugins for Avisynth, like Deblock_QED, Unbloc etc, but it's really up to what you gotta do.

As a side note: please note that once the quantizer cut off important values, there's no way you can get them back, so although the picture will look "nicer" than a blocky one, it's gonna be blurry.
FranceBB is offline   Reply With Quote
Old 13th November 2019, 01:57   #3  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
There are many tricks to getting clean encodes with minimal artifacts.

1. Do light noise reduction (although resist the urge to do too much: never over-do NR) before encoding.

2. Get rid of any pulldown. I learned this twenty years ago when doing SVCD encodes. At those low bitrates and crude encoding, artifacts could be huge. IVTC made the most massive reduction in compression artifacts of anything I've ever done.

3. Do multi-pass encoding. This too is really important when doing low bitrate encodes. High bitrates should not exhibit significant compression artifacts, and if you are getting artifacts when using high bitrates, you are doing something wrong.

4. Use a good encoder. With every type of video compression, there can be massive differences between encoders. Back when MPEG-2 was the big thing, the cheap encoders were really quite awful, and the professional codecs ran circles around them. These days, the open source encoders are actually pretty good, but there still can be differences.
johnmeyer is offline   Reply With Quote
Old 13th November 2019, 02:25   #4  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
Quote:
Originally Posted by nfv View Post
I have a lot of captures sourced from satellite TV with lots of compression artifacts.
Did you capture with a too low bitrate or were the compression artifacts already in the TV stream?
Cary Knoop is offline   Reply With Quote
Old 13th November 2019, 06:49   #5  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Sometimes excessive ugly compression artifacts can be hidden by applying artificial noise on the image and then denoising slightly if required. It can create a layer of fake detail to fool your brain. Something like GrainFactory3 could be useful here.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 13th November 2019, 22:34   #6  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
I use this script:

Quote:
MPEG2Source("video.d2v", cpu=0,info=3)

# deblocking interlaced video with Deblock_QED:
par=getparity()
SeparateFields().PointResize(width,height)
Deblock_QED(24,28,uv=3)
AssumeFrameBased()
SeparateFields()
Merge(SelectEven(),SelectOdd())
par ? AssumeTFF() : AssumeBFF()
Weave()


# Noise reduction (for interlaced video)

c=last
#even fields
# Motion compensation on frames -2...+2
even = c.SeparateFields().SelectEven()
super_even=even.MSuper()
vf2 = super_even.MAnalyse (isb=false, delta=2, overlap=4)
vf1 = super_even.MAnalyse (isb=false, delta=1, overlap=4)
vb1 = super_even.MAnalyse (isb=true, delta=1, overlap=4)
vb2 = super_even.MAnalyse (isb=true, delta=2, overlap=4)
cf2 = MCompensate (even, super_even, vf2, thSAD=400)
cf1 = MCompensate (even, super_even, vf1, thSAD=400)
cb1 = MCompensate (even, super_even, vb1, thSAD=400)
cb2 = MCompensate (even, super_even, vb2, thSAD=400)
# dfttest on motion-compensated clip
Interleave (cf2, cf1, even, cb1, cb2)
RemoveSpotsMC()
dfttest (sigma=4, sigma2=4, tbsize=5, lsb=false)
SelectEvery (5, 2)
# Gradient smoothing
presmooth = last
#SmoothGrad (radius=20, thr=0.15) #
#SmoothGrad (radius=12, thr=0.25, ref=presmooth)#
# Back to 8 bits, ordered dithering
#DitherPost () #
filtered_even=last
#odd fields
# Motion compensation on frames -2...+2
odd = c.SeparateFields().SelectOdd()
super_odd=odd.MSuper()
vf2 = super_odd.MAnalyse (isb=false, delta=2, overlap=4)
vf1 = super_odd.MAnalyse (isb=false, delta=1, overlap=4)
vb1 = super_odd.MAnalyse (isb=true, delta=1, overlap=4)
vb2 = super_odd.MAnalyse (isb=true, delta=2, overlap=4)
cf2 = MCompensate (odd, super_odd, vf2, thSAD=400)
cf1 = MCompensate (odd, super_odd, vf1, thSAD=400)
cb1 = MCompensate (odd, super_odd, vb1, thSAD=400)
cb2 = MCompensate (odd, super_odd, vb2, thSAD=400)
# dfttest on motion-compensated clip
Interleave (cf2, cf1, odd, cb1, cb2)
RemoveSpotsMC()
dfttest (sigma=4, sigma2=4, tbsize=5, lsb=false)
SelectEvery (5, 2)
# Gradient smoothing
presmooth = last
#SmoothGrad (radius=20, thr=0.15) #
#SmoothGrad (radius=12, thr=0.25, ref=presmooth)#
# Back to 8 bits, ordered dithering
#DitherPost ()#
filtered_odd=last
Interleave(filtered_even, filtered_odd)
weave()
Mounir is offline   Reply With Quote
Reply

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 02:05.


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