Log in

View Full Version : best quality for encoding sports


shpitz
20th June 2005, 05:49
everyone,

i've been encoding xvid for over a year now, using vdub and avisynth.

during this time i've always kept reading about ways to improve the quality of encodes, yet i'm still very confused in regards to pretty much everything.

my capture source is DVB, capturing 544x480 mpeg2 streams straight from satellite.

does that considered a 'clean' source? is there a need to use undot or any of the other denoisers?

i've been doing most of my encodes with the same script as follows:


mpeg2source("F:\soccer.d2v")
# DEINTERLACING
#FieldDeinterlace(blend=false)
FieldDeinterlace()
#TomsMoComp(-1,10,1)
# Cropping
Crop(4,4,-4,-14)
# RESIZING
#BicubicResize(512,384) #Medium
#undot()
#RemoveGrain(mode=4)
BicubicResize(512,384,0,0.75)
#fluxsmootht()
#RemoveGrain(mode=4)
#unfilter(-5,-5)
#TemporalSoften(5,2,2,15,2)
undot()

#Lumafilter()
#FluxsmoothST(5,3)
#Lanczos4Resize(808,330)


as you can see i've been trying all kinds of filters and such, yet NONE satisfies me.

i tried a ton of matrices using different xvid settings, and also many avs filters.

i focused on encoding @ 1400kbps using xvid 1.1.0 beta 2.

the matrix i liked the most was 6of9 or jawor's 2cd, they were pretty close.

the problem i have with the encoding test is that both have blocking around the players (the players are in constant move).

you can d/l the sample here:

clip (http://www.avisynth.org/shpitz/soccer_clip.vob)

any help getting this look sharp and high-quality will be greatly appreciated.

which filters do you recommend to use on a DVB source?

thanks,

shpitz

Mug Funky
20th June 2005, 06:12
for ex-DVB stuff, deblocking is a must. that is, mpeg2source("blah.d2v",cpu=4, ipp=true) or even cpu=6. the "ipp" means it postprocesses in interlaced mode (so it doesn't mess up the chroma any more than the DVB people would have). the blocks you're seeing are most probably in your source, as DVB has scandalously low bitrates and a very low max bitrate most of the time. you probably wont need denoising as there'll be barely any detail in this source, let alone noise.

for sport, it might help to leave it interlaced, as xvid can handle it, and it might actually improve motion-precision for sport, as there's very little motion-blur in most sports footage. a decent playback filter will be able to deinterlace on playback, and you'll have better looking motion for it, which is critical in sport (it'll look real jerky otherwise). 1500kbps xvid should be okay for interlace. just make sure you tell xvid that it is actually an interlaced source.

shpitz
20th June 2005, 12:26
thanks for the reply m8.

any more thoughts on which filters to use to make it look sharper?

does my script look ok? in the right order?

thanks

Teegedeck
20th June 2005, 13:04
When you keep it interlaced denoising is a problem. Try just using deblocking, as Mug Funky wrote.

If you have to denoise deinterlace with something like TDeint, TomsMoComp, or KernelDeint. Try removedirt for denoising.

iNFO-DVD
20th June 2005, 13:21
This isn't a reply to your question but just wanted to ask.....
my capture source is DVB, capturing 544x480 mpeg2 streams straight from satellite.So that sample is a typical DVB source? Would it normally be saved with a 'VOB' extension? Is that clip exactly what you'd capture?

shpitz
20th June 2005, 14:29
info-dvd, this is the bare minimum resolusion here in north america.

some stations broadcast at 704x480, some at 640x480, but mostly 544x480.

the vob clip is just a sample of the original capture, untouched (i've made it using mpeg2cut).

thanks for the tips Teegedeck, i'll give it a try.

Teegedeck
20th June 2005, 14:39
This clip is bad, bad DVB-T indeed; no chance of making this look 'high-quality', I'm afraid. A high-bitrate custom quantization matrix is wasted here, too.

Anyway,

mpeg2source("F:\soccer.d2v",idct=7,iPP=true,cpu=6,moderate_h=45,moderate_v=60)
tdeint()
Crop(4,4,-4,-14)
BicubicResize(512,384,0,0.75)
removedirt(mode=2)produces a reasonable result below 1400 kbps from your sample using either Javor's 1CD-matrix or Sharktooth's v3ULR matrix at quantizer=4. Javor's 1CD produces a slightly sharper result here.

You could also fare nicely keeping it interlaced without denoising, as Mug Funky said. Edit: Denoising is not really necessary for this sample.

shpitz
20th June 2005, 14:44
thanks tee.

when you say "quantizer=4", and i've seen this all over the place, what exactly do you mean by that? where do i set this in the xvid settings?

i will post my xvid settings screenshots when i come back from work.

thanks

Teegedeck
20th June 2005, 14:46
Errr; I only meant that I tested in CBR mode with capped quantizers in order to see whether I'd reach the desired bitrate at reasonably low quantizers. The result was, that I reached that bitrate at almost constant quantizer 4 (a bit lower actually).

You can set a zone with constant quant=4 for first pass in order to reduce quantizer-fluctuation in 2nd pass. There's been quite some threads where this was explained. (Like this thread (http://forum.doom9.org/showthread.php?t=95103).) Or you can go for one-pass at constant quantizer.

Edit: I'd like to add two comments:

The quality of your source is poor, although it is not noisy, because DVB-T is broadcasted as hopelessly overcompressed MPEG-2. Consequences of that are that a) artefacts in such streams are commonplace and details have been quantized away, and b) in order to reach smaller filesizes than such extremely compressed MPEG-2 files, XviD must be used with quite extreme settings, too.

Also, such material is handled much better using MPEG-4 AVC which at least prevents introducing additional artefacting and ringing through its inloop-deblocking filter.

shpitz
21st June 2005, 00:56
i'm trying to use removedirtsse2 to no avail.

vdub/tmpgenc say 'there is no function named removedirt'.

i have the filter in place and imported, also verified i have msvcr70.dll and msvcr71.dll in system32.

any ideas why it's not accepting the filter?

*** EDIT: weird, trying the latest version 0.9 i get that error above, but when i tried v0.6.1 it works fine, but no sse2 dll ***

shpitz
21st June 2005, 03:19
here is statistics about the cap file:

http://www.avisynth.org/shpitz/soccer_stats.jpg

shpitz
21st June 2005, 04:49
another thing is, many times the video appears very color-saturated.

is there any way to reduce that?

E-Male
21st June 2005, 05:19
a search on avisynth.org for "saturation" would have pointed you to:
tweak(a,b,c,d)

shpitz
21st June 2005, 15:53
thanks m8, i'll look into that.