View Full Version : XviD encoding for TV Output
pimpdawg
9th March 2004, 02:40
I've been lurking these boards for a while, but never really posted anything. I've been using XviD for about a year to encode stuff for output on my TV through an ATi Radeon All-In-Wonder 7500 card.
I figured that the time was right to start to document what I knew so I could hopefully get some feedback from people who might know a few more things about encoding than me.
I posted it to my web site (http://www.lowleveldeity.com/id30.html) to share with others.
Let me know what you think. Any and all feedback appreciated.
aaar9800
9th March 2004, 06:03
I wouldn't say that trellis is faster, but worse quality. I always thought that it was the contrary because of the small tests i did. The files were smaller and the quality difference wasn't there, so I assumed that trellis will give me better quality.
Of course, it's up to you to decide, whether to use it or not, but don't believe evreything you read - conduct your own tests and decide - just an advice.
Koepi
9th March 2004, 06:29
Trellis will slow things down. And give better quality.
Regards
Koepi
crusty
9th March 2004, 16:51
Hi there, nice looking site.
A few things:
-When encoding for TV-output, it really doesn't matter a lot how you encode. TV is very forgiving on the quality of your encodes.
-I see you use virtualdub filters. It's far better to use avisynth filters, they are far better and much more up to date. Especially the deinterlacing filters are way better.
-DVD's are NOT clean. Some of them are, but you have to get lucky really. Filtering can substantially improve on the output quality. Also, because they filter away noise that would need to be encoded, your output will look less blocky because more bits can go to the real picture. I've made DVD rips that look BETTER than the original DVD, because they contain less noise and have the same visual quality.
-Also keep in mind that DVD's can already contain compression artifacts (i.e. block noise). I've seen it, and they're a bitch to work with.
-I see you set max i-frame quantizer to 2. That's way too high. Set it to 6 IF you really want to cap them.
-At an output resolution of 320x240 on 1 CD, nothing matters. :)
At that resolution you could encode in DivX 3 and it would still look good.
unixfs
9th March 2004, 17:48
@pimpdawg,
anything to suggest against blacker-than-black effect?
I saw it even with my Radeon 7000, which supposedly has one of the best
TV-out interface.
pimpdawg
9th March 2004, 18:34
Crusty --
TV output is both forgiving and brutal. It doesn't show blockiness as much as a TV monitor, but if a sharp line isn't completely crisp in the encode, it might as well be scribbled by a 2 year-old. (Did I mention I'm on a 27" TV?)
I don't have any experience on the AViSynth filters, so I'll have to take your word on it. As far as deinterlacing goes, I find that the combo of the deinterlace filter and the 3:2 pulldown framerate seems to be an effective combo.
I've tried filtering DVDs, and almost without exception, the output ends up looking worse. The only DVDs that are really fuzzy that benefit from filters are of a genre that we won't talk about here (or so I've heard... I would never do suck a thing;) )
I disagree on the I-frame thing. Unless there is an unusually large percentage of I-frames, the size won't make enough of a difference.
Lastly, who said anything about resolution of 320x240? LOL. If that's what I was going for, I wouldn't bother writing all that stuff up. My goal is for an output size that will yield a finished file with an average quantizer of between 2.8 and 3.2. For most movies with a 2.35:1 aspect ratio, that's around 288x672 -- it looks good on a TV, and is still respectable on a monitor.
Unixfs - Either I haven't experienced the blacker-than-black effect, or I'm not familiar with the term.
Pen-Pen
9th March 2004, 19:02
pimpdawg, you really should give AviSynth a try... There's a filter called Decomb that rocks for 3:2 pulldown and deinterlacing (as well as many other things), the advantage being that you don't have to convert the color space (VDub filters only work in RGB) and you can stick with YV12 during processing...
as for noise filtering, you have to be careful with it, of course, but it often helps
(and I totally agree with you : I-frame = Q2 :p)
unixfs
9th March 2004, 20:59
Originally posted by pimpdawg
Unixfs - Either I haven't experienced the blacker-than-black effect, or I'm not familiar with the term.
it's that disgusting effect that shows large black areas as full of greyish or greenish blocks, that sometimes flash.
I experienced in every encode made with xvid/divx/libavcodec and
with every codec used: mpeg1/2/4 at any bitrate.
The only program (that I know of) that minimises this effect is TMPG.
The cause is the different (smaller) ranges use by TVs for chrominance and luminance planes.
pimpdawg
9th March 2004, 21:42
I used to apply a filter to increase the contrast, especially when I was working from material I recorded from a TV broadcast. I got better compression and better picture quality that way, probably because the codec couldn't possibly miss the subtelties of the picture. That was also when I would try to make the output dimensions reasonably small (not much larger than the display dimensions of the TV.)
I switched my philosophy a bit by not using the filters any more, and increasing the dimensions of the output file. The effect seemed to be about the same -- the compression of the image from the large dimensions of the file to the low resolution of the TV effectively produced sharp lines and good contrast without the arbitrary filters.
It might be coincidental, but that was about the same time that I cut the max quantizer of my I-frames to 2. When I had problems with the creeping green and other wierd things, it usually seemed to follow scene changes or I-frames.
This is all embarrassingly non-technical, so I may be WAY off base here. Still, hopefully it helps a little.
pimpdawg
29th March 2004, 09:15
An observation and a question.
First, the observation. Trellis quantization seems to introduce more artifacts in dark areas when the output medium is the television. I get better results without it.
Now the question. Up until now, I've understood that the lower quantizers yields a better quality picture. I've done some experimentation with resolution and the result on the TV, and it seems like that's not always the case. I get a better quality picture on a higher resolution where the average quantizer is between 2.8 - 3.2 than I do on a *slightly* smaller image with an average quantizer in the low 2's.
Just before someone posts the obvious, both resolutions are well above the resolution of a television (624x336 vs 528x288, for example.)
Does anybody have any idea why this might be the case?
Thanks!
Andrey
29th March 2004, 10:20
>>Just before someone posts the obvious, both resolutions are well above the resolution of a television (624x336 vs 528x288, for example.)
Hmm ?
Resolution of an average TV is about 1000x550 in pixels (it is analog, interlaced and interpolated horisontally, and interpolated vertically for PAL sometimes, so you can not tell about TV resolution in this manner :), thought )
But anyway, about your question.
Practice showed, that the larger is resolution, the less blocks are noticable. That's logically, BTW.
As example I would recommend you to see HDTV and large resolution encodes at ~2Mbit and more than 1000hres on this forum. They are sometimes extremely blocky, but when you play them, it is not noticable at all (8x8 block is very small at such resolution).
So, the larger resoltion, the better. On the other hand, the larger resolution - the more macroblocks and other artifacts you will probably get at the same bitrate.
So, encoding is a balance thing about resolution you should use and artifacts you will get with it :)
maciek_m
29th March 2004, 14:08
@pimpdawg
My, newbie's, logic is that:
Resizing to a lower resolution is in fact a very rough "quantisation process". If you had 576 lines originaly and you downsized it to 288 for example, a process must have been used on the way that employed some type of a 2 quant picture transformation: you are making 1 line out of every two lines.
And saying that 576 lines is more than enough for a TV-set may be true, but still simple resize must introduce a lot of chrominance/luminance (and what not) "mistakes".
So, going back to quantification and picture quality ..
I would think that saying "lower quants equals better quality" is true (or nearly true) providing you are using exactly the same quality master copy for both encodings (i.e. for the one with lower and for the one with higher quants). A master with vertical resolution of 288 is, by definition, not the same quality as one with 576 lines.
Can anyone REALLY knowing about these issues confirm/verify that?
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.